[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] libusb error on Mac OS X when building uhd driver
From: |
Matthias Wilhelm |
Subject: |
Re: [Discuss-gnuradio] libusb error on Mac OS X when building uhd driver |
Date: |
Mon, 6 Sep 2010 09:51:10 +0200 |
Hello,
I had the same problem, the host configuration for the mac seems broken when it
come to libusb. There is a
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
and it seems the compiler takes the wrong branch.
Anyway, these errors are actually warnings (non-standard C++) that are turned
to errors by the "pedantic" compiler flag used for UHD.
As a workaround, you can edit uhd/host/CMakeLists.txt, just edit line 62
ADD_DEFINITIONS(-pedantic)
by commenting this line out. Then it will compile.
I'm not so sure if this is a great idea, however, but it will work.
Matthias
Am 05.09.2010 um 09:37 schrieb Elvis Dowson:
> Hi,
> I just updated to the latest uhd driver sources from the git repo,
> and I get the following error on Mac OS X 10.6.4.
>
> In file included from
> /Users/elvis/Tool/ettus/uhd/host/lib/transport/libusb1_base.hpp:23,
> from
> /Users/elvis/Tool/ettus/uhd/host/lib/transport/libusb1_control.cpp:18:
> /usr/local/include/libusb-1.0/libusb.h: In function ‘void
> libusb_fill_control_setup(unsigned char*, uint8_t, uint8_t, uint16_t,
> uint16_t, uint16_t)’:
> /usr/local/include/libusb-1.0/libusb.h:886: error: ISO C++ forbids
> braced-groups within expressions
> /usr/local/include/libusb-1.0/libusb.h:887: error: ISO C++ forbids
> braced-groups within expressions
> /usr/local/include/libusb-1.0/libusb.h:888: error: ISO C++ forbids
> braced-groups within expressions
> /usr/local/include/libusb-1.0/libusb.h: In function ‘void
> libusb_fill_control_transfer(libusb_transfer*, libusb_device_handle*,
> unsigned char*, void (*)(libusb_transfer*), void*, unsigned int)’:
> /usr/local/include/libusb-1.0/libusb.h:936: error: ISO C++ forbids
> braced-groups within expressions
> make[2]: *** [lib/CMakeFiles/uhd.dir/transport/libusb1_control.cpp.o] Error 1
> make[1]: *** [lib/CMakeFiles/uhd.dir/all] Error 2
> make: *** [all] Error 2
>
>
> I have libusb-1.0.8 installed from
>
> http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.8/libusb-1.0.8.tar.bz2/download
>
> This must be happening since the UHD driver added support for USRP1 with USB
> support.
>
> Best regards,
>
> Elvis
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio