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

Is there a readme that tells what packages must be installed? Can't build on windows. #41

Open
squinkylabs opened this issue Apr 21, 2018 · 5 comments

Comments

@squinkylabs
Copy link

this got me closer: mingw-w64-x86_64-libusb-compat-git
this was a help: mingw-w64-x86_64-pkg-config
adding this the the makefile seemed to help, but was probably a mistake: PKG_CONFIG_PATH ?= ./src/sdr

I now get this error:

Package librtlsdr was not found in the pkg-config search path.
Perhaps you should add the directory containing `librtlsdr.pc'
to the PKG_CONFIG_PATH environment variable
No package 'librtlsdr' found
g++  -Wsuggest-override -std=c++11  -DSLUG=PulsumQuadratum-SDR -fPIC -I../../include -I../../dep/include -DVERSION=0.6.0dev -MMD -MP -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_WIN -D_USE_MATH_DEFINES -c -o build/src/sdr/SDR.cpp.o src/sdr/SDR.cpp
In file included from src/sdr/SDR.cpp:2:0:
src/sdr/rtl-sdr.h:3:10: fatal error: rtl-sdr.h: No such file or directory
 #include <rtl-sdr.h>
@wizardishungry
Copy link
Member

@dizzisound might have some insights on the Windows platform.

If we wanted to add general build instructions, we should include the Mac/Linux environment setup from the .travis.yml

@dizzisound
Copy link
Collaborator

@squinkylabs Hi, I can try to recover what worked for me. After some unsatisfactory trials at linking precompiled dependencies, I chose to install and build the required dependencies from source. For what I remember (I wrote down only some quick notes), I used the following cli command sets.

  1. For libusb:
$ cd ~
$ git clone https://github.com/libusb/libusb.git
$ cd libusb
$ ./autogen.sh
$ make && make install
  1. For librtlsdr:
$ cd ~
$ git clone git://git.osmocom.org/rtl-sdr.git
$ mkdir rtl-sdr/build && cd rtl-sdr/build
$ cmake -G "MSYS Makefiles" -D LIBUSB_FOUND=1 -D LIBUSB_INCLUDE_DIR=/mingw64/include/libusb-1.0 -D "LIBUSB_LIBRARIES=-L/mingw64/lib -llibusb-1.0" -D THREADS_PTHREADS_WIN32_LIBRARY=/mingw64/x86_64-w64-mingw32/lib/libpthread.a -D THREADS_PTHREADS_INCLUDE_DIR=/mingw64/x86_64-w64-mingw32/include -D CMAKE_INSTALL_PREFIX=/mingw64 ..
$ make && make install

Here a bunch of my sensible env vars:

MSYSTEM=MINGW64
MSYSTEM_CHOST=x86_64-w64-mingw32
MSYSTEM_PREFIX=/mingw64
MINGW_CHOST=x86_64-w64-mingw32
MINGW_PREFIX=/mingw64
MINGW_PACKAGE_PREFIX=mingw-w64-x86_64

That's all, then the makefile shared with Jon worked for me together with the latest Rack sourcecode.
Hope it's all correct and it can works for you.

@wizardishungry
Copy link
Member

@dizzisound thanks for that info - I want to move towards building dependencies in the makefile on all platforms #31

@squinkylabs
Copy link
Author

tx for the info!

@dizzisound
Copy link
Collaborator

@wizardishungry Also could this be of some interest? https://github.com/FPGAwars/libusb-cross-builder

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

3 participants