Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/native/periph_timer: add missing -lrt to linker flags #20816

Merged
merged 1 commit into from
Aug 17, 2024

Conversation

maribu
Copy link
Member

@maribu maribu commented Aug 17, 2024

Contribution description

This (hopefully) fixes #20009 (comment)

Testing procedure

E.g. make BOARD=native64 -C tests/periph/timer should now work on Debian 11.

Issues/PRs references

#20009 (comment)

@maribu maribu requested a review from chrysn August 17, 2024 11:54
@github-actions github-actions bot added Platform: native Platform: This PR/issue effects the native platform Area: cpu Area: CPU/MCU ports labels Aug 17, 2024
@maribu
Copy link
Member Author

maribu commented Aug 17, 2024

Debian 11 on master:

make BOARD=native64 -C tests/periph/timer
make: Entering directory '/home/maribu/RIOT/tests/periph/timer'
Building application "tests_timer" for "native64" with CPU "native".

"make" -C /home/maribu/RIOT/boards/common/init
"make" -C /home/maribu/RIOT/boards/native64
"make" -C /home/maribu/RIOT/boards/native
"make" -C /home/maribu/RIOT/boards/native/drivers
"make" -C /home/maribu/RIOT/core
"make" -C /home/maribu/RIOT/core/lib
"make" -C /home/maribu/RIOT/cpu/native
"make" -C /home/maribu/RIOT/cpu/native/periph
"make" -C /home/maribu/RIOT/cpu/native/stdio_native
"make" -C /home/maribu/RIOT/drivers
"make" -C /home/maribu/RIOT/drivers/periph_common
"make" -C /home/maribu/RIOT/sys
"make" -C /home/maribu/RIOT/sys/auto_init
"make" -C /home/maribu/RIOT/sys/isrpipe
"make" -C /home/maribu/RIOT/sys/libc
"make" -C /home/maribu/RIOT/sys/preprocessor
"make" -C /home/maribu/RIOT/sys/test_utils/interactive_sync
"make" -C /home/maribu/RIOT/sys/test_utils/print_stack_usage
"make" -C /home/maribu/RIOT/sys/tsrb
/usr/bin/ld: /home/maribu/RIOT/tests/periph/timer/bin/native64/periph/timer.o: in function `timer_start':
/home/maribu/RIOT/cpu/native/periph/timer.c:205: undefined reference to `timer_settime'
/usr/bin/ld: /home/maribu/RIOT/tests/periph/timer/bin/native64/periph/timer.o: in function `timer_stop':
/home/maribu/RIOT/cpu/native/periph/timer.c:218: undefined reference to `timer_settime'
/usr/bin/ld: /home/maribu/RIOT/tests/periph/timer/bin/native64/periph/timer.o: in function `timer_init':
/home/maribu/RIOT/cpu/native/periph/timer.c:117: undefined reference to `timer_create'
/usr/bin/ld: /home/maribu/RIOT/cpu/native/periph/timer.c:124: undefined reference to `timer_delete'
collect2: error: ld returned 1 exit status
make: *** [/home/maribu/RIOT/tests/periph/timer/../../../Makefile.include:737: /home/maribu/RIOT/tests/periph/timer/bin/native64/tests_timer.elf] Error 1
make: Leaving directory '/home/maribu/RIOT/tests/periph/timer'

Debian 11 with this PR:

make BOARD=native64 -C tests/periph/timer
make: Entering directory '/home/maribu/RIOT/tests/periph/timer'
Building application "tests_timer" for "native64" with CPU "native".

"make" -C /home/maribu/RIOT/boards/common/init
"make" -C /home/maribu/RIOT/boards/native64
"make" -C /home/maribu/RIOT/boards/native
"make" -C /home/maribu/RIOT/boards/native/drivers
"make" -C /home/maribu/RIOT/core
"make" -C /home/maribu/RIOT/core/lib
"make" -C /home/maribu/RIOT/cpu/native
"make" -C /home/maribu/RIOT/cpu/native/periph
"make" -C /home/maribu/RIOT/cpu/native/stdio_native
"make" -C /home/maribu/RIOT/drivers
"make" -C /home/maribu/RIOT/drivers/periph_common
"make" -C /home/maribu/RIOT/sys
"make" -C /home/maribu/RIOT/sys/auto_init
"make" -C /home/maribu/RIOT/sys/isrpipe
"make" -C /home/maribu/RIOT/sys/libc
"make" -C /home/maribu/RIOT/sys/preprocessor
"make" -C /home/maribu/RIOT/sys/test_utils/interactive_sync
"make" -C /home/maribu/RIOT/sys/test_utils/print_stack_usage
"make" -C /home/maribu/RIOT/sys/tsrb
   text	  data	   bss	   dec	   hex	filename
  27536	  5870	 58912	 92318	 1689e	/home/maribu/RIOT/tests/periph/timer/bin/native64/tests_timer.elf
make: Leaving directory '/home/maribu/RIOT/tests/periph/timer'

@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Aug 17, 2024
@riot-ci
Copy link

riot-ci commented Aug 17, 2024

Murdock results

✔️ PASSED

29a00be cpu/native/periph_timer: add missing -lrt to linker flags

Success Failures Total Runtime
10198 0 10198 15m:03s

Artifacts

Copy link
Member

@chrysn chrysn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this super fast.

I've verified that the only code using the offending function (that I know) is periph_timer on native, and trust your tests.

@chrysn chrysn enabled auto-merge August 17, 2024 14:57
@chrysn chrysn added this pull request to the merge queue Aug 17, 2024
Merged via the queue into RIOT-OS:master with commit d5bd9d7 Aug 17, 2024
28 checks passed
@maribu
Copy link
Member Author

maribu commented Aug 17, 2024

Thx a bunch!

@maribu maribu deleted the cpu/native/periph_timer/linkflags branch August 17, 2024 19:27
@maribu
Copy link
Member Author

maribu commented Aug 18, 2024

Backport provided in #20819

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: native Platform: This PR/issue effects the native platform Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants