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 librtlsdr.so.0.0, 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 librtlsdr.so.0.0 /usr/local/lib/libusb-1.0.so.1.0 -lpthread -lm \
-lrt -Wl,-rpath,/usr/tmp/hardware/rtl_dongle/osmocom/git/rtl-sdr/build/src \ -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib
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
On 12/9/12, Alan Corey alancorey@yahoo.com wrote:
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
On linux, librt provides a very high precision and usually fairly accurate timer. This is used by rtl_test to make a rough PPM error measurement.
I don't know about OpenBSD libraries. We can either #ifdef in support for whatever high resolution timer OpenBSD provides (similar to the OSX specific code in rtl_test) or if no such timers are provided (such as on Windows) we could #ifdef the whole thing out.
I'm guessing OpenBSD does not have these timers.
-Kyle http://kmkeen.com
From: keenerd keenerd@gmail.com
To: "osmocom-sdr@lists.osmocom.org" osmocom-sdr@lists.osmocom.org Cc: Sent: Sunday, December 9, 2012 12:54 PM Subject: Re: Problem under OpenBSD
On 12/9/12, Alan Corey alancorey@yahoo.com wrote:
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
On linux, librt provides a very high precision and usually fairly accurate timer. This is used by rtl_test to make a rough PPM error measurement.
I don't know about OpenBSD libraries. We can either #ifdef in support for whatever high resolution timer OpenBSD provides (similar to the OSX specific code in rtl_test) or if no such timers are provided (such as on Windows) we could #ifdef the whole thing out.
I'm guessing OpenBSD does not have these timers.
-Kyle http://kmkeen.com
I lucked out. The timer functions you're using are all standard under OpenBSD without loading any libraries, so I just removed the -lrt and it compiles and seems to work. I just got the dongle in the mail today so I haven't actually seen it work yet due to other screwups, but rtl_test and everything else seem to work. It's a NooElec R820T, serial # 13 according to the eeprom. Came from somebody selling through Amazon. $19.95 with a remote and a magmount antenna. Seems to have a protection diode. Strange (MC?) antenna connector, gotta extend that out of the basement somehow. Seems well made.
Found 1 device(s): 0: ezcap USB 2.0 DVB-T/DAB/FM dongle
Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle Found Rafael Micro R820T tuner
Current configuration: __________________________________________ Vendor ID: 0x0bda Product ID: 0x2838 Manufacturer: Realtek Product: RTL2838UHIDIR Serial number: 00000013 Serial number enabled: yes IR endpoint enabled: yes Remote wakeup enabled: no
OpenBSD dmesg says ugen0 at uhub0 port 2 "Realtek RTL2838UHIDIR" rev 2.00/1.00 addr 2
I've got more downloading to do before I can actually hear anything on it.
Alan