Gource
Gource copied to clipboard
Failing to detect Boost::Filesystem (misleading error: Could not link against -lGLU !) (Raspberrian)
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for timegm... yes
checking for unsetenv... yes
checking how to run the C++ preprocessor... g++ -E
checking for X... libraries , headers
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether we are using the Microsoft C compiler... no
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking for GL/gl.h... yes
checking for OpenGL/gl.h... no
checking for OpenGL library... -lGL
checking for GL/glu.h... yes
checking for OpenGL/glu.h... no
checking for OpenGL Utility library... -lGLU
checking for varargs GLU tesselator callback function type... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FT2... yes
checking for PCRE... yes
checking for GLEW... yes
checking for SDL2... yes
checking for PNG... yes
checking for IMG_LoadPNG_RW... yes
checking for IMG_LoadJPG_RW... yes
checking for boostlib >= 1.46... yes
checking whether the Boost::System library is available... yes
checking whether the Boost::Filesystem library is available... yes
configure: error: Could not link against -lGLU !
I am running under Raspberrian
the config log said:
configure:6202: g++ -o conftest -g -O2 -pthread -lGL conftest.cpp -lglu32 >&5
/usr/bin/ld: cannot find -lglu32
collect2: error: ld returned 1 exit status
configure:6202: $? = 1
I am having a similar problem on CentOS 7. libGLU.so exists in the LD_LIBRARY_PATH but configure still shows this error.
Same issue on Raspbian as well.
I'm pretty sure this is it failing to detect Boost::Filesystem: https://github.com/acaudwell/Gource/blob/7e793c96cbfb8d742c690f4a9bec49880f985e60/m4/ax_boost_filesystem.m4#L110
There is a bug in the m4 script when it fails as it hasn't set ax_lib so it contains the previous value.
There are some configure options for boost e.g. --with-boost. It possibly needs some help finding the boost installation path.
As the C++ standard now implements filesystem support based on Boost::Filesystem I might remove it as a dependency. Doesn't look like Clang supports it yet though.
A little late to the party, but I've managed to compile it successfully by using the --with-boost-libdir flag during the configure step. For completeness sake, all the commands I ran to get it working are listed below. Note that this is on a fresh install of Raspbian so some of these may not be necessary for you.
To actually compile everything, these are all the commands I ran:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install gcc cmake build-essential libsdl2-dev libsdl2-image-dev libpcre3-dev libfreetype6-dev libglew-dev libglm-dev libboost-all-dev libpng-dev autoconf
git clone https://github.com/acaudwell/Gource.git
cd Gource
./autogen.sh
./configure --with-boost-libdir=/usr/lib/arm-linux-gnueabihf
make
sudo make install
To find the libdir location I used above, I used the following command:
sudo find / -name libboost_*
Worked like a charm!