Problem under OpenBSD

Alan Corey alancorey at
Sun Dec 9 06:57:08 UTC 2012

Under OpenBSD 5.0 I get:
Linking C executable rtl_test
/usr/bin/ld: cannot find -lrt
collect2: ld returned 1 exit status
gmake[2]: *** [src/rtl_test] Error 1
gmake[1]: *** [src/CMakeFiles/rtl_test.dir/all] Error 2
gmake: *** [all] Error 2

It built, rtl_eeprom, rtl_fm, rtl_sdr, rtl_tcp so I think it mostly worked.

In /usr/tmp/hardware/rtl_dongle/osmocom/git/rtl-sdr/build/src/CMakeFiles/rtl_test.dir/link.txt I see:
-lpthread -lm -lrt -Wl

The whole link.txt says (continuation \ added by me to shorten lines):
/usr/bin/gcc  -DNDEBUG  -L/usr/local/lib CMakeFiles/rtl_test.dir/rtl_test.c.o \
 -o rtl_test /usr/local/lib/ -lpthread -lm \

-lrt -Wl,-rpath,/usr/tmp/hardware/rtl_dongle/osmocom/git/rtl-sdr/build/src \

It looks like it's trying to link against a library it hasn't installed yet.

Is this just an OpenBSD thing or has it happened to anyone else?  I saw hamlib do something similar but I had an old version of that installed.

  Alan, ab1jx

Radio Astronomy - the ultimate DX
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the osmocom-sdr mailing list