srb007 / audioscout

Automatically exported from code.google.com/p/audioscout
GNU General Public License v3.0
0 stars 0 forks source link

Unable to build on freeBSD #24

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download and install audioscout dependencies (zeromq, libsndfile, 
libsamplerate, libmpg123)
2. Download audioscout on a FreeBSD 9.0 system, untar
3. cd ./build; cmake ../.; make

What is the expected output?
audioscout builds

What do you see instead?
/home/rp/src/audioscout/libs/audiodata.c:31:17: error: zmq.h: No such file or 
directory
/home/rp/src/audioscout/libs/audiodata.c:33:21: error: sndfile.h: No such file 
or directory
/home/rp/src/audioscout/libs/audiodata.c:34:24: error: samplerate.h: No such 
file or directory
/home/rp/src/audioscout/libs/audiodata.c:37:20: error: mpg123.h: No such file 
or directory
... <snip>

What version of the product are you using? On what operating system?
1.05, freeBSD 9.0, AMD64 processor

Please provide any additional information below.
zmq, sndfile, samplerate, mpeg123 are installed, as evident below:

$ ls -alt /usr/local/include/zmq.h
-rw-r--r--  1 root  wheel  12898 Sep 15 17:17 /usr/local/include/zmq.h

$ ls -alt /usr/local/include/sndfile.h
-r--r--r--  1 root  wheel  21664 Apr 10 19:05 /usr/local/include/sndfile.h

$ ls -alt /usr/local/include/samplerate.h
-r--r--r--  1 root  wheel  5442 Sep 15 15:53 /usr/local/include/samplerate.h

$ ls -alt /usr/local/include/mpg123.h
-rw-r--r--  1 root  wheel  60675 Sep 15 17:25 /usr/local/include/mpg123.h

Initially I thought CMAKE simply wasn't looking in the correct places, so I 
added the following to the CMakeFiles.txt:

set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "/usr/local/include/")
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "/usr/local/")

but that didn't help either.

Original issue reported on code.google.com by rhuang.w...@gmail.com on 16 Sep 2013 at 12:12

GoogleCodeExporter commented 8 years ago
Here's what I had to do to get around the error:

1) Add include_directories("/usr/local/include/") to all CMakeLists.txt

2) Replace mentions of "sndfile", "zmq", and "mpg123" with variables containing 
the actual path to the link objects.  E.g., 

-target_link_libraries(AudioData  sndfile ${MPG123_LIB} ${AMR_LIB} samplerate 
zmq)
+target_link_libraries(AudioData ${HAVE_LIBSNDFILE} ${HAVE_MPG123} ${AMR_LIB} 
${HAVE_SAMPLERATE} ${HAVE_ZMQ})

3) Compile libs/ first, then follow the compile instructions in README.txt

I am running FreeBSD 9.0 and cmake 2.8.  I am not sure if that causes cmake to 
treat library names (like sndfile, zmq, etc) differently.

Original comment by rhuang.w...@gmail.com on 19 Sep 2013 at 1:25