Compiling Compiling Ubuntu tfs

Discussion in 'Support' started by Sp0tl3ss, Oct 9, 2018.

  1. Sp0tl3ss

    Sp0tl3ss Nestalia.org Premium User

    Joined:
    Jul 19, 2014
    Messages:
    268
    Likes Received:
    11
    Best Answers:
    0
    Hello im trying to compile ninjalulz/forgottenserver on linux ubuntu and i get there errors
    Code (Text):
    1. collect2: error: ld returned 1 exit status
    2. CMakeFiles/tfs.dir/build.make:2002: recipe for target 'tfs' failed
    3. make[2]: *** [tfs] Error 1
    4. CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/tfs.dir/all' failed
    5. make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
    6. Makefile:83: recipe for target 'all' failed
    7. make: *** [all] Error 2
    8.  
    i would love some help fixing these errors :)


    Performing C++ SOURCE FILE Test COMPILER_KNOWS_STDLIB failed with the following output:
    Change Dir: /home/lud/nestalia/build/CMakeFiles/CMakeTmp
    Run Build Command:"/usr/bin/make" "cmTC_55888/fast"
    /usr/bin/make -f CMakeFiles/cmTC_55888.dir/build.make CMakeFiles/cmTC_55888.dir/build
    make[1]: Entering directory '/home/lud/nestalia/build/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_55888.dir/src.cxx.o
    /usr/bin/c++ -Wall -Werror -pipe -fno-strict-aliasing -std=c++11 -DCOMPILER_KNOWS_STDLIB -stdlib=libc++ -o CMakeFiles/cmTC_55888.dir/src.cxx.o -c /home/lud/nestalia/build/CMakeFiles/CMakeTmp/src.cxx
    c++: error: unrecognized command line option '-stdlib=libc++'
    CMakeFiles/cmTC_55888.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_55888.dir/src.cxx.o' failed
    make[1]: *** [CMakeFiles/cmTC_55888.dir/src.cxx.o] Error 1
    make[1]: Leaving directory '/home/lud/nestalia/build/CMakeFiles/CMakeTmp'
    Makefile:126: recipe for target 'cmTC_55888/fast' failed
    make: *** [cmTC_55888/fast] Error 2
    Source file was:
    int main() { return 0; }
    Determining if the pthread_create exist failed with the following output:
    Change Dir: /home/lud/nestalia/build/CMakeFiles/CMakeTmp
    Run Build Command:"/usr/bin/make" "cmTC_ad166/fast"
    /usr/bin/make -f CMakeFiles/cmTC_ad166.dir/build.make CMakeFiles/cmTC_ad166.dir/build
    make[1]: Entering directory '/home/lud/nestalia/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_ad166.dir/CheckSymbolExists.c.o
    /usr/bin/cc -o CMakeFiles/cmTC_ad166.dir/CheckSymbolExists.c.o -c /home/lud/nestalia/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
    Linking C executable cmTC_ad166
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ad166.dir/link.txt --verbose=1
    /usr/bin/cc -rdynamic CMakeFiles/cmTC_ad166.dir/CheckSymbolExists.c.o -o cmTC_ad166
    CMakeFiles/cmTC_ad166.dir/CheckSymbolExists.c.o: In function `main':
    CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
    collect2: error: ld returned 1 exit status
    CMakeFiles/cmTC_ad166.dir/build.make:97: recipe for target 'cmTC_ad166' failed
    make[1]: *** [cmTC_ad166] Error 1
    make[1]: Leaving directory '/home/lud/nestalia/build/CMakeFiles/CMakeTmp'
    Makefile:126: recipe for target 'cmTC_ad166/fast' failed
    make: *** [cmTC_ad166/fast] Error 2
    File /home/lud/nestalia/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/lud/nestalia/build/CMakeFiles/CMakeTmp
    Run Build Command:"/usr/bin/make" "cmTC_39b7c/fast"
    /usr/bin/make -f CMakeFiles/cmTC_39b7c.dir/build.make CMakeFiles/cmTC_39b7c.dir/build
    make[1]: Entering directory '/home/lud/nestalia/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_39b7c.dir/CheckFunctionExists.c.o
    /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_39b7c.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c
    Linking C executable cmTC_39b7c
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_39b7c.dir/link.txt --verbose=1
    /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_39b7c.dir/CheckFunctionExists.c.o -o cmTC_39b7c -lpthreads
    /usr/bin/ld: cannot find -lpthreads
    collect2: error: ld returned 1 exit status
    CMakeFiles/cmTC_39b7c.dir/build.make:97: recipe for target 'cmTC_39b7c' failed
    make[1]: *** [cmTC_39b7c] Error 1
    make[1]: Leaving directory '/home/lud/nestalia/build/CMakeFiles/CMakeTmp'
    Makefile:126: recipe for target 'cmTC_39b7c/fast' failed
    make: *** [cmTC_39b7c/fast] Error 2
     
  2. Sp0tl3ss

    Sp0tl3ss Nestalia.org Premium User

    Joined:
    Jul 19, 2014
    Messages:
    268
    Likes Received:
    11
    Best Answers:
    0
  3. Sp0tl3ss

    Sp0tl3ss Nestalia.org Premium User

    Joined:
    Jul 19, 2014
    Messages:
    268
    Likes Received:
    11
    Best Answers:
    0
  4. Sp0tl3ss

    Sp0tl3ss Nestalia.org Premium User

    Joined:
    Jul 19, 2014
    Messages:
    268
    Likes Received:
    11
    Best Answers:
    0
    Still need support with this issue if any experienced linux user have some spare time to show me a thing or 2 :D
     
  5. Catalyst

    Catalyst whoU

    Joined:
    May 12, 2017
    Messages:
    53
    Likes Received:
    10
    Best Answers:
    2
    Open your Makefile find -lpthreads and replace it to -lpthread
    Let me know.
     
    Last edited: Oct 13, 2018
    Sp0tl3ss likes this.
  6. Sp0tl3ss

    Sp0tl3ss Nestalia.org Premium User

    Joined:
    Jul 19, 2014
    Messages:
    268
    Likes Received:
    11
    Best Answers:
    0
    hmm i cant seem to find this lines anywhere i find it in the error logs but not in any cmake files.... (i will update this comment if i find it!)
     

Share This Page

Loading...