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

kalibrate-rtl has support to mac? #10

Closed
cristianchaparroa opened this issue Dec 21, 2014 · 4 comments
Closed

kalibrate-rtl has support to mac? #10

cristianchaparroa opened this issue Dec 21, 2014 · 4 comments

Comments

@cristianchaparroa
Copy link

Hello I'm trying to compile kalibrate-rtl on mac yosemite but when I try to execute the command make I get the following problem:

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in src
g++ -I/opt/local/include  -I/opt/local/include/ -I/opt/local/include/libusb-1.0  -g -O2   -o kal kal-arfcn_freq.o kal-c0_detect.o kal-circular_buffer.o kal-fcch_detector.o kal-kal.o kal-offset.o kal-usrp_source.o kal-util.o -L/opt/local/lib -lfftw3  -L/opt/local/lib -lrtlsdr -lusb-1.0  -lrt 
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [kal] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I wondering if is posible install kalibrate on mac?

@leee
Copy link

leee commented Oct 17, 2015

You need to bootstrap it.

./bootstrap

You'll probably run into not having glibtoolize and aclocal, which I've installed with brew:

brew install libtool
brew install automake

Then you'll want to configure, but you'll probably be missing fftw3. brew, as usual has this:

brew install fftw
./configure

Now you'll want to make and probably make install as well. When you attempt to make, ld is going to moan about not finding -lrt, which is referring to librt. It's not needed on OS X, and so @steve-m should commit a change that tests if the environment is apple/darwin, and appropriately use/not build with it.

I had to modify https://github.com/steve-m/kalibrate-rtl/blob/master/src/Makefile.am#L23 and remove the flag.

It'll build fine afterwards and worked for my use, which was determining drift of the R820T tuner.

@davidbailey
Copy link

The following worked for me:
(You have to add -L/usr/local/Cellar/libusb/1.0.20/lib and remove -lrt from the last g++ command.)

git clone https://github.com/steve-m/kalibrate-rtl.git
brew install autoconf automake libusb librtlsdr libtool
cd kalibrate-rtl
./bootstrap
./configure
make
cd src 
g++ -I/usr/local/Cellar/fftw/3.3.4_1/include -I/usr/local/Cellar/librtlsdr/0.5.3/include/ -I/usr/local/Cellar/libusb/1.0.20/include/libusb-1.0 -g -O2   -o kal kal-arfcn_freq.o kal-c0_detect.o kal-circular_buffer.o kal-fcch_detector.o kal-kal.o kal-offset.o kal-usrp_source.o kal-util.o -L/usr/local/Cellar/fftw/3.3.4_1/lib -lfftw3 -L/usr/local/Cellar/librtlsdr/0.5.3/lib -L/usr/local/Cellar/libusb/1.0.20/lib -lrtlsdr -lusb-1.0
cd ..
make install

@kadin2048
Copy link

kadin2048 commented Aug 18, 2016

I am getting the following when trying to run bootstrap on a Mac OS 10.10.5 box with dependencies installed via MacPorts:

$ ./bootstrap 
/usr/local/bin/glibtoolize: line 406: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 2513: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 2513: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 3601: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 3845: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 3124: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 753: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 754: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 753: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 754: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 753: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 754: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 753: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 754: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 753: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 754: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 753: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 754: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 753: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 754: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 757: /usr/local/Library/ENV/4.3/sed: No such file or directory
: warning: no serial number in '/usr/local/Cellar/libtool/2.4.6/share/libtool/build-aux/ltmain.sh', not copying.
/usr/local/bin/glibtoolize: line 3771: /usr/local/Library/ENV/4.3/sed: No such file or directory

This is on commit f61b9e6 which is the current head of viraptor/kalibrate-rtl/master because it has the MacOS-specific changes in it (merges in b9f95b5).

An additional quick test also shows the same errors using aae11c8.

@kadin2048
Copy link

On further investigation, the error seems to be caused by a misbehavior in Homebrew's libtool 2.4.6 which was corrected in 2.4.6_1. Running brew unlink libtool and then reinstalling brought me up to 2.4.6_1 which seems to correct the issue. More info here: Homebrew/legacy-homebrew#43874

However, I then ran into an issue where the current Homebrew-supplied version of librtlsdr (librtlsdr-0.5.3) is incompatible with kalibrate due to steve-m/librtlsdr#29 so at the moment it looks like Mac users have to build librtlsdr from source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants