ziggi / FCNPC

FCNPC - Fully Controllable NPC
Apache License 2.0
138 stars 31 forks source link

Problem compiling with Centos 7 #127

Closed Abyss-z94 closed 6 years ago

Abyss-z94 commented 6 years ago

I have try to compiling FCNPC plugins in my VPS but get error when using 'cmake..', what can i do now?

[root@static FCNPC]# mkdir build
[root@static FCNPC]# cd build
[root@static build]# cmake ..
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/usr/bin/cc" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: /root/FCNPC/build/CMakeFiles/CMakeTmp

  Run Build Command:/usr/bin/gmake "cmTryCompileExec3855798494/fast"

  /usr/bin/gmake -f CMakeFiles/cmTryCompileExec3855798494.dir/build.make
  CMakeFiles/cmTryCompileExec3855798494.dir/build

  gmake[1]: Entering directory `/root/FCNPC/build/CMakeFiles/CMakeTmp'

  /usr/bin/cmake -E cmake_progress_report
  /root/FCNPC/build/CMakeFiles/CMakeTmp/CMakeFiles 1

  Building C object
  CMakeFiles/cmTryCompileExec3855798494.dir/testCCompiler.c.o

  /usr/bin/cc -o CMakeFiles/cmTryCompileExec3855798494.dir/testCCompiler.c.o
  -c /root/FCNPC/build/CMakeFiles/CMakeTmp/testCCompiler.c

  Linking C executable cmTryCompileExec3855798494

  /usr/bin/cmake -E cmake_link_script
  CMakeFiles/cmTryCompileExec3855798494.dir/link.txt --verbose=1

  /usr/bin/cc CMakeFiles/cmTryCompileExec3855798494.dir/testCCompiler.c.o -o
  cmTryCompileExec3855798494 -rdynamic

  /usr/bin/ld: skipping incompatible
  /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libc.so when searching for
  -lc

  /usr/bin/ld: skipping incompatible /lib/libc.so when searching for -lc

  /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc

  /usr/bin/ld: cannot find -lc

  collect2: error: ld returned 1 exit status

  gmake[1]: *** [cmTryCompileExec3855798494] Error 1

  gmake[1]: Leaving directory `/root/FCNPC/build/CMakeFiles/CMakeTmp'

  gmake: *** [cmTryCompileExec3855798494/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:7 (project)

-- Configuring incomplete, errors occurred!
See also "/root/FCNPC/build/CMakeFiles/CMakeOutput.log".
See also "/root/FCNPC/build/CMakeFiles/CMakeError.log".
[root@static build]# make
make: *** No targets specified and no makefile found.  Stop.
[root@static build]#
Abyss-z94 commented 6 years ago

Here is the error logs CMakeOutput.log CMakeError.log

ziggi commented 6 years ago

You need to install multilib version of gcc. And i386 version of libc. Look at this https://github.com/ziggi/FCNPC/blob/master/.travis.yml, try to find similar packages for CentOS.

Abyss-z94 commented 6 years ago

So confusing, i just being using linux for while and i don't know how to do it :(. Could you show me the command to do that?

ziggi commented 6 years ago

I think what the issue is out of date. Also i'm planning to making static fcnpc builds for linux