Building doesn't work out of the box for v3.tar.gz or for github
building from github:
Making all in po
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -I./../zlib -g -O2 -static-libstdc++ -static-libgcc -o size size.o bucomm.o version.o filemode.o ../bfd/.libs/libbfd.a -L/home/dojoy/src/emilpro/build/binutils/zlib -lz ../libiberty/libiberty.a -ldl
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -I./../zlib -g -O2 -static-libstdc++ -static-libgcc -o objdump objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o od-xcoff.o ../opcodes/.libs/libopcodes.a ../bfd/.libs/libbfd.a -L/home/dojoy/src/emilpro/build/binutils/zlib -lz ../libiberty/libiberty.a -ldl
In file included from ./../include/alloca-conf.h:16:0,
from sysdep.h:23,
from arparse.y:29:
./config.h:7:4: error: #error config.h must be #included before system headers
# error config.h must be #included before system headers
^
Makefile:1361: recipe for target 'arparse.o' failed
make[7]: *** [arparse.o] Error 1
error was too deep for me to understand, so I tried the following
building from the source archive provided on emilpro.com (v3)
Linking CXX executable emilpro
/usr/bin/ld: CMakeFiles/tools/squash-instruction-models.dir/src/model.cc.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/tools/squash-instruction-models.dir/build.make:522: recipe for target 'tools/squash-instruction-models' failed
make[2]: *** [tools/squash-instruction-models] Error 1
CMakeFiles/Makefile2:200: recipe for target 'CMakeFiles/tools/squash-instruction-models.dir/all' failed
make[1]: *** [CMakeFiles/tools/squash-instruction-models.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: CMakeFiles/emilpro.dir/src/model.cc.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
it can be fixed with adding the following two lines to CMakeLists.txt (close to the bottom)
target_link_libraries(emilpro pthread)
target_link_libraries(tools/squash-instruction-models pthread)
so now I got a running build.
eventually the -pthread flag of g++ would be better?
Thanks for the report and sorry for not answering yet!
What system are you building under? The first error sounds like a dependency issue somehow. Anyway, I've been working on rewriting the GUI in QT for a long time, and that will really be the future version of emilpro - that one is built from the CMakeFiles.txt under src/qt/ instead. I don't think it will affect this issue though, but we should really aim to resolve it there.
DebianJessie64
Hi relascope,
You may be able to work around this issue by using:
cmake -DTHREADS_PREFER_PTHREAD_FLAG:INTERNAL=ON ..
I ran across this problem in a different project though so it may not be an exact fix
cheers