Page 1 of 1

installing on Mac OS 10.9, 64-bit

Posted: Thu Oct 31, 2013 8:37 pm
by richardb
Hey all, I am trying to install the software on my MacBook Pro running 10.9. I am running through the instructions in the Wiki, but I keep getting an error on the make step:

Code: Select all

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [output/libbladeRF.0.dylib] Error 1
make[1]: *** [libraries/libbladeRF/CMakeFiles/libbladerf_shared.dir/all] Error 2
make: *** [all] Error 2
I assume this is because it is running under a 64-bit OS. How can I make this work?

Re: installing on Mac OS 10.9, 64-bit

Posted: Tue Nov 12, 2013 7:30 am
by jynik
Have you had any success since this fix was made?
https://github.com/Nuand/bladeRF/pull/170

If not, mind opening an issue on the tracker?

Re: installing on Mac OS 10.9, 64-bit

Posted: Sat Nov 23, 2013 2:08 pm
by lvbernal
Hi! I think the main error during the installation on Mavericks is the change in the function "clock_gettime": now its called "clock_get_time".

/bladeRF/host/utilities/bladeRF-cli/src/cmd/rxtx.c:703:18: error:
implicit declaration of function 'clock_gettime' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
status = clock_gettime(CLOCK_REALTIME, &timeout_abs);
^
/bladeRF/host/utilities/bladeRF-cli/src/cmd/rxtx.c:703:32: error:
use of undeclared identifier 'CLOCK_REALTIME'
status = clock_gettime(CLOCK_REALTIME, &timeout_abs);
^
/bladeRF/host/utilities/bladeRF-cli/src/cmd/rxtx.c:773:33: error:
use of undeclared identifier 'CLOCK_REALTIME'
status = clock_gettime(CLOCK_REALTIME, &timeout_abs);

There's a fix needed on the source code: https://gist.github.com/jbenet/1087739

Re: installing on Mac OS 10.9, 64-bit

Posted: Sat Nov 23, 2013 5:13 pm
by lvbernal
This worked for me, hope it helps you. I modified the source code of rxtx.c and added the function current_time:

Code: Select all

int current_time(struct timespec *ts) // from https://gist.github.com/jbenet/1087739

{
    
#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
    clock_serv_t cclock;
    mach_timespec_t mts;
    host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
    int status = clock_get_time(cclock, &mts);
    mach_port_deallocate(mach_task_self(), cclock);
    ts->tv_sec = mts.tv_sec;
    ts->tv_nsec = mts.tv_nsec;
    return status;
#else
    int status = clock_gettime(CLOCK_REALTIME, ts);
    return status;
#endif
    
}
Then I renamed the variable NSEC_PER_SEC to NSEC_PER_SEC_MOD (in the whole document), because there's a global variable with the same name but different type.

Finally I modified the calls to clock_gettime:

Code: Select all

//status = clock_gettime(CLOCK_REALTIME, &timeout_abs);
status = current_time(&timeout_abs);

Re: installing on Mac OS 10.9, 64-bit

Posted: Sun Nov 24, 2013 3:12 pm
by jynik
Pulled this code into a dev-osx_clock_gettime branch: https://github.com/Nuand/bladeRF/tree/d ... ck_gettime

However, I don't have an OSX machine to test it on. If someone could kindly let me know if that works and get back to me with patches against that branch for any build or runtime errors, it'd be greatly appreciated.

Thanks,
Jon

Update: This fix was merged into master in 9126eac65ec0bb0a37edc9c6fcffbdb869218c9d

Re: installing on Mac OS 10.9, 64-bit

Posted: Sun Nov 24, 2013 5:33 pm
by lvbernal
The latest master branch works great, thank you.