aeonofdiscord / ferret

A gopher client
Other
8 stars 2 forks source link

Won't compile #5

Closed hackervera closed 6 years ago

hackervera commented 7 years ago
$ ./build.sh
-- The C compiler identification is GNU 7.2.0
-- The CXX compiler identification is GNU 7.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vagrant/ferret/build
Scanning dependencies of target ferret
[ 25%] Building CXX object CMakeFiles/ferret.dir/src/main.cpp.o
[ 50%] Building CXX object CMakeFiles/ferret.dir/src/worker.cpp.o
[ 75%] Building CXX object CMakeFiles/ferret.dir/src/net.cpp.o
[100%] Linking CXX executable ferret
/usr/bin/ld: CMakeFiles/ferret.dir/src/main.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/usr/lib/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ferret.dir/build.make:147: ferret] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/ferret.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
cp: cannot stat 'ferret': No such file or directory
aeonofdiscord commented 7 years ago

Huh, okay.

Try clearing out the build directory and replacing line 4 of CMakeLists.txt with target_link_libraries(ferret ui pthread) then run build.sh again and see if that works.

aeonofdiscord commented 7 years ago

Also, what distro are you on?

hackervera commented 6 years ago

Arch linux

aeonofdiscord commented 6 years ago

Cool, I was thinking of trying out an Arch VM anyway so I'll have a look. Did adding that line to CMakeLists.txt work?

aeonofdiscord commented 6 years ago

I've updated the CMakeLists.txt to make libpthread available and tested it in the Arch VM, so it should build now. lmk if it's still not working on your system.

aeonofdiscord commented 6 years ago

Closing this for now.