Building From Source: Getting CMake error

Having issues with the site, hardware, source code, or any other issues?
Post Reply
scancapecod
Posts: 83
Joined: Tue Jan 21, 2014 6:38 pm
Location: Cape Cod, Massachusetts, USA
Contact:

Building From Source: Getting CMake error

Post by scancapecod »

Hi,

I am trying to learn how to build from source, using the tutorial at this link: https://github.com/Nuand/bladeRF/wiki/G ... rom_source

I have followed the instructions, but left out steps 3-9 under the "Installing libusbx" section as I already have an installed bladeRF on the PC I'm working with (I used the Windows Installer to initially set it up back in January). If this is what's steering me wrong I feel like a dope.

I get to the point where I run CMake, point myself to the source code and where to build the binaries, select Visual Studio 12 (2013), and click Finish to start the configuration. Off it goes, only to halt with the following error:
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
C:/Program Files (x86)/Project/lib does not exist. Defaulting libbladeRF install location to C:/Program Files (x86)/Project/lib.
CMake Error at host/libraries/libbladeRF/CMakeLists.txt:168 (message):
libusb-1.0 not found. This is required to use the libbladeRF libusb
backend. For binary releases, try setting LIBUSB_PATH.


Configuring incomplete, errors occurred!
See also "C:/bladerf/host/build/CMakeFiles/CMakeOutput.log".
See also "C:/bladerf/host/build/CMakeFiles/CMakeError.log".
Well, there are no errors in either of the above logs that I can see, but neither of the two listed folders under the above "could NOT find" line exist on my PC because I had no instructions to do so.

In all likelihood I'm doing something wrong, or there's a step missing from the tutorial. Can anyone point me in the right direction?

Thanks.
Scott
Webmaster - Scan New England
http://www.scan-ne.net
scancapecod
Posts: 83
Joined: Tue Jan 21, 2014 6:38 pm
Location: Cape Cod, Massachusetts, USA
Contact:

Re: Building From Source: Getting CMake error

Post by scancapecod »

OK, I think I see that it's bonking at CMAKE_INSTALL_PREFIX which points to C:/Program Files (x86)/Project which isn't there. It's looking for libusb-1.0 content that isn't there, I guess.
Scott
Webmaster - Scan New England
http://www.scan-ne.net
scancapecod
Posts: 83
Joined: Tue Jan 21, 2014 6:38 pm
Location: Cape Cod, Massachusetts, USA
Contact:

Re: Building From Source: Getting CMake error

Post by scancapecod »

Thanks Jon,

So as not to blow up my stable setup I'll restart this project on another 64 bit Windows 8.1 PC and follow it through its entirety. I appreciate the help. Figures it's the one thing I left out! :roll:
Scott
Webmaster - Scan New England
http://www.scan-ne.net
scancapecod
Posts: 83
Joined: Tue Jan 21, 2014 6:38 pm
Location: Cape Cod, Massachusetts, USA
Contact:

Re: Building From Source: Getting CMake error

Post by scancapecod »

Just as a followup, this worked flawlessly for me this morning on a Windows 7 Pro 32 bit laptop. Now I'll go back to the main machine and try it again. I know this is "in your sleep" stuff for you folks, but for someone that knows zilch about programming and compiling it's a victory for me. :lol:

Thanks Jon.
Scott
Webmaster - Scan New England
http://www.scan-ne.net
scancapecod
Posts: 83
Joined: Tue Jan 21, 2014 6:38 pm
Location: Cape Cod, Massachusetts, USA
Contact:

Re: Building From Source: Getting CMake error

Post by scancapecod »

OK, I've completed this on a 64 bit machine now, but my observation is that there is no difference in the procedure than there is on a 32 bit PC.

Is this normal or do I have to do something different to build an x64 version of this? Or, does that even matter? Sorry for the novice questions.
Scott
Webmaster - Scan New England
http://www.scan-ne.net
scancapecod
Posts: 83
Joined: Tue Jan 21, 2014 6:38 pm
Location: Cape Cod, Massachusetts, USA
Contact:

Re: Building From Source: Getting CMake error

Post by scancapecod »

Yep, that did it, the choice of the x64 version. The current version is "Visual Studio Express 13 for Windows Desktop"...which translates to "Visual Studio 12 2013" in CMake. I chose the X64 option and the end result when I tried to run bladerf-cli on the 32 bit machine it very nicely told me to go screw. Moving the files to the 64 bit PC next to this one resulted in it working fine.

Nifty, thanks!
Scott
Webmaster - Scan New England
http://www.scan-ne.net
Post Reply