I am having irritating issues with building DFHack, and I can't figure out what I'm doing wrong. I was hoping I could get some assistance.
When I attempt to build the latest version with cmake or ccmake, I get the following error message:
CMake Error at depends/protobuf/CMakeLists.txt:60 (MESSAGE):
Could not find a working hash map implementation. Please install GCC >=
4.4, and all necessary 32-bit C++ development libraries.
Which, if the other posts here are correct, suggest that I don't have the correct 32-bit libraries installed.
I'm running 64-bit Debian Testing. I have multiarch support enabled. I have practically every GCC and G++ library I can get from the repository without conflicts to include:
gcc
gcc-multilib
gcc-4.4
gcc-4.4-base
gcc-4.4-multilib
gcc-4.6
gcc-4.6-base
gcc-4.6-multilib
gcc-4.7
gcc-4.7-base
gcc-4.7-multilib
lib32gcc-4.7-dev
libgcc-4.7-dev
libx32gcc-4.7-dev
gcc-4.8
gcc-4.8-base
gcc-4.8-multilib
lib32gcc-4.8-dev
libgcc-4.8-dev
libx32gcc-4.8-dev
gcc-4.8-base:i386
lib32gcc
libgcc
lib32gcc1
libgcc1
libgcc1:i386
libx32gcc1
I also have protobuf-compiler and protobuf-c-compiler, and mingw. mingw has both 32-bit and 64-bit libraries available, and I'm not sure about protobuf, but there is a separate :i386 library, I just can't have both installed simultaneously.
So I'm at a loss. I have no idea what package I could be missing to fix this. Does anyone have any ideas?
Below is my CMakeError.log:
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/adam/Games/df_linux/dfhack/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec1932352873/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec1932352873.dir/build.make CMakeFiles/cmTryCompileExec1932352873.dir/build
make[1]: Entering directory `/home/adam/Games/df_linux/dfhack/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/adam/Games/df_linux/dfhack/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec1932352873.dir/CheckSymbolExists.c.o
/usr/bin/cc -fvisibility=hidden -m32 -march=i686 -mtune=generic -o CMakeFiles/cmTryCompileExec1932352873.dir/CheckSymbolExists.c.o -c /home/adam/Games/df_linux/dfhack/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec1932352873
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1932352873.dir/link.txt --verbose=1
/usr/bin/cc -fvisibility=hidden -m32 -march=i686 -mtune=generic CMakeFiles/cmTryCompileExec1932352873.dir/CheckSymbolExists.c.o -o cmTryCompileExec1932352873 -rdynamic
CMakeFiles/cmTryCompileExec1932352873.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0xa): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[1]: *** [cmTryCompileExec1932352873] Error 1
make[1]: Leaving directory `/home/adam/Games/df_linux/dfhack/build/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec1932352873/fast] Error 2
File /home/adam/Games/df_linux/dfhack/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/adam/Games/df_linux/dfhack/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec3908671546/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec3908671546.dir/build.make CMakeFiles/cmTryCompileExec3908671546.dir/build
make[1]: Entering directory `/home/adam/Games/df_linux/dfhack/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/adam/Games/df_linux/dfhack/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3908671546.dir/CheckFunctionExists.c.o
/usr/bin/cc -fvisibility=hidden -m32 -march=i686 -mtune=generic -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec3908671546.dir/CheckFunctionExists.c.o -c /usr/share/cmake-2.8/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec3908671546
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3908671546.dir/link.txt --verbose=1
/usr/bin/cc -fvisibility=hidden -m32 -march=i686 -mtune=generic -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec3908671546.dir/CheckFunctionExists.c.o -o cmTryCompileExec3908671546 -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: Leaving directory `/home/adam/Games/df_linux/dfhack/build/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec3908671546] Error 1
make: *** [cmTryCompileExec3908671546/fast] Error 2
There's something about lpthreads in there, but I don't know jack about cmake and so I'm not sure what's going on.