Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while compiling on Linux, "nice make" #258

Closed
amadin opened this issue Nov 8, 2015 · 15 comments
Closed

Error while compiling on Linux, "nice make" #258

amadin opened this issue Nov 8, 2015 · 15 comments

Comments

@amadin
Copy link

amadin commented Nov 8, 2015

[ra@ra _build]$ nice make -j $(nproc || sysctl -n hw.ncpu || echo 2)
Scanning dependencies of target cguittfont
Scanning dependencies of target lua
[ 1%] Building C object src/lua/build/CMakeFiles/lua.dir/lapi.o
[ 1%] Building CXX object src/cguittfont/CMakeFiles/cguittfont.dir/xCGUITTFont.cpp.o
[ 1%] Building C object src/lua/build/CMakeFiles/lua.dir/lauxlib.o
[ 1%] Building C object src/lua/build/CMakeFiles/lua.dir/lbaselib.o
[ 1%] Building C object src/lua/build/CMakeFiles/lua.dir/lcode.o
[ 2%] Building C object src/lua/build/CMakeFiles/lua.dir/ldblib.o
[ 2%] Building C object src/lua/build/CMakeFiles/lua.dir/ldebug.o
[ 2%] Building C object src/lua/build/CMakeFiles/lua.dir/ldo.o
[ 2%] Building C object src/lua/build/CMakeFiles/lua.dir/ldump.o
[ 2%] Building C object src/lua/build/CMakeFiles/lua.dir/lfunc.o
[ 3%] Building C object src/lua/build/CMakeFiles/lua.dir/lgc.o
[ 3%] Building C object src/lua/build/CMakeFiles/lua.dir/linit.o
[ 3%] Building C object src/lua/build/CMakeFiles/lua.dir/liolib.o
[ 3%] Building C object src/lua/build/CMakeFiles/lua.dir/llex.o
[ 3%] Building C object src/lua/build/CMakeFiles/lua.dir/lmathlib.o
[ 4%] Building C object src/lua/build/CMakeFiles/lua.dir/lmem.o
[ 4%] Building C object src/lua/build/CMakeFiles/lua.dir/loadlib.o
/mnt/sda3/freeminer-master/src/lua/src/loadlib.c: In function ‘ll_sym’:
/mnt/sda3/freeminer-master/src/lua/src/loadlib.c:76:21: warning: ISO C forbids conversion of object pointer to function pointer type [-pedantic]
[ 4%] Building C object src/lua/build/CMakeFiles/lua.dir/lobject.o
[ 4%] Building C object src/lua/build/CMakeFiles/lua.dir/lopcodes.o
[ 5%] Building C object src/lua/build/CMakeFiles/lua.dir/loslib.o
[ 5%] Building C object src/lua/build/CMakeFiles/lua.dir/lparser.o
[ 5%] Building C object src/lua/build/CMakeFiles/lua.dir/lstate.o
[ 5%] Building C object src/lua/build/CMakeFiles/lua.dir/lstring.o
[ 5%] Building C object src/lua/build/CMakeFiles/lua.dir/lstrlib.o
[ 6%] Building C object src/lua/build/CMakeFiles/lua.dir/ltable.o
[ 6%] Building C object src/lua/build/CMakeFiles/lua.dir/ltablib.o
[ 6%] Building C object src/lua/build/CMakeFiles/lua.dir/ltm.o
[ 6%] Building C object src/lua/build/CMakeFiles/lua.dir/lundump.o
[ 6%] Building C object src/lua/build/CMakeFiles/lua.dir/lvm.o
[ 7%] Building C object src/lua/build/CMakeFiles/lua.dir/lzio.o
Linking C static library liblua.a
[ 7%] Built target lua
Scanning dependencies of target GenerateVersion
[ 7%] Built target GenerateVersion
Scanning dependencies of target translations
[ 8%] mo-update [zh_TW]: Creating locale directory.
[ 8%] mo-update [be]: Creating locale directory.
[ 8%] mo-update [cs]: Creating locale directory.
[ 8%] mo-update [da]: Creating locale directory.
[ 9%] mo-update [de]: Creating locale directory.
Linking CXX static library libcguittfont.a
[ 9%] mo-update [eo]: Creating locale directory.
[ 9%] Built target cguittfont
[ 9%] mo-update [es]: Creating locale directory.
Scanning dependencies of target freeminer
[ 9%] mo-update [et]: Creating locale directory.
[ 9%] mo-update [fr]: Creating locale directory.
[ 10%] mo-update [hu]: Creating locale directory.
[ 10%] mo-update [id]: Creating locale directory.
[ 10%] mo-update [it]: Creating locale directory.
[ 10%] mo-update [ja]: Creating locale directory.
[ 10%] mo-update [jbo]: Creating locale directory.
[ 11%] mo-update [ko]: Creating locale directory.
[ 11%] mo-update [ky]: Creating locale directory.
[ 11%] mo-update [lt]: Creating locale directory.
[ 11%] mo-update [nb]: Creating locale directory.
[ 12%] mo-update [nl]: Creating locale directory.
[ 12%] mo-update [pl]: Creating locale directory.
[ 12%] mo-update [pt]: Creating locale directory.
[ 12%] mo-update [pt_BR]: Creating locale directory.
[ 12%] mo-update [ro]: Creating locale directory.
[ 13%] mo-update [ru]: Creating locale directory.
[ 13%] mo-update [tr]: Creating locale directory.
[ 13%] mo-update [uk]: Creating locale directory.
[ 13%] mo-update [zh_CN]: Creating locale directory.
[ 14%] mo-update [zh_TW]: Creating mo file.
[ 14%] mo-update [be]: Creating mo file.
[ 14%] mo-update [cs]: Creating mo file.
[ 15%] mo-update [da]: Creating mo file.
[ 15%] mo-update [de]: Creating mo file.
[ 15%] mo-update [eo]: Creating mo file.
[ 15%] mo-update [es]: Creating mo file.
[ 15%] mo-update [et]: Creating mo file.
[ 16%] mo-update [fr]: Creating mo file.
[ 16%] mo-update [hu]: Creating mo file.
[ 16%] mo-update [id]: Creating mo file.
[ 16%] mo-update [it]: Creating mo file.
[ 16%] mo-update [ja]: Creating mo file.
[ 17%] mo-update [jbo]: Creating mo file.
[ 17%] mo-update [ko]: Creating mo file.
[ 17%] mo-update [ky]: Creating mo file.
[ 17%] mo-update [lt]: Creating mo file.
[ 18%] mo-update [nb]: Creating mo file.
[ 18%] mo-update [nl]: Creating mo file.
[ 18%] mo-update [pl]: Creating mo file.
[ 18%] mo-update [pt]: Creating mo file.
[ 18%] mo-update [pt_BR]: Creating mo file.
[ 19%] mo-update [ro]: Creating mo file.
[ 19%] mo-update [ru]: Creating mo file.
[ 19%] mo-update [tr]: Creating mo file.
[ 19%] mo-update [uk]: Creating mo file.
[ 19%] mo-update [zh_CN]: Creating mo file.
[ 19%] mo update
[ 19%] Built target translations
Scanning dependencies of target freeminerserver
[ 19%] Building CXX object src/CMakeFiles/freeminer.dir/client/clientlauncher.cpp.o
In file included from /mnt/sda3/freeminer-master/src/network/networkprotocol.h:31:0,
from /mnt/sda3/freeminer-master/src/network/networkpacket.h:25,
from /mnt/sda3/freeminer-master/src/network/fm_connection.h:30,
from /mnt/sda3/freeminer-master/src/network/connection.h:26,
from /mnt/sda3/freeminer-master/src/server.h:26,
from /mnt/sda3/freeminer-master/src/client/clientlauncher.cpp:23:
/mnt/sda3/freeminer-master/src/network/../msgpack_fix.h:14:23: fatal error: msgpack.hpp: No such file or directory
compilation terminated.
make[2]: *** [src/CMakeFiles/freeminer.dir/client/clientlauncher.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/freeminer.dir/all] Error 2
make[1]: *** The expectation of completing tasks...
[ 19%] [ 19%] Building CXX object src/CMakeFiles/freeminerserver.dir/contrib/environment.cpp.o
Building CXX object src/CMakeFiles/freeminerserver.dir/contrib/fallingsao.cpp.o
In file included from /mnt/sda3/freeminer-master/src/sound.h:29:0,
from /mnt/sda3/freeminer-master/src/itemdef.h:32,
from /mnt/sda3/freeminer-master/src/inventory.h:27,
from /mnt/sda3/freeminer-master/src/inventorymanager.h:26,
from /mnt/sda3/freeminer-master/src/serverobject.h:28,
from /mnt/sda3/freeminer-master/src/content_sao.h:26,
from /mnt/sda3/freeminer-master/src/contrib/fallingsao.h:22,
from /mnt/sda3/freeminer-master/src/contrib/fallingsao.cpp:19:
/mnt/sda3/freeminer-master/src/msgpack_fix.h:14:23: fatal error: msgpack.hpp: No such file or directory
compilation terminated.
In file included from /mnt/sda3/freeminer-master/src/mapnode.h:33:0,
from /mnt/sda3/freeminer-master/src/environment.h:43,
from /mnt/sda3/freeminer-master/src/contrib/environment.cpp:19:
/mnt/sda3/freeminer-master/src/msgpack_fix.h:14:23: fatal error: msgpack.hpp: No such file or directory
compilation terminated.
make[2]: *** [src/CMakeFiles/freeminerserver.dir/contrib/fallingsao.cpp.o] Error 1
make[2]: *** The expectation of completing tasks...
make[2]: *** [src/CMakeFiles/freeminerserver.dir/contrib/environment.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/freeminerserver.dir/all] Error 2
make: *** [all] Error 2

ALTlinux 7.0.5, 32-bit, kernel 3.14.33-std-def-alt1, sources from github.

@amadin amadin changed the title Nice make error while compiling on linux Error while compiling on Linux, "nice make" Nov 8, 2015
@proller
Copy link
Member

proller commented Nov 8, 2015

try run
git submodule update --init --recursive
and run make again.

if it not helps - delete CMakeCache.txt and run cmake and make again

@amadin
Copy link
Author

amadin commented Nov 8, 2015

[ra@ra freeminer-master]$ git submodule update --init --recursive
fatal: Not a git repository (or any parent up to mount point /mnt/sda3)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

[ra@ra freeminer-master]$ git --help
usage: git [--version] [--help] [-C ] [-c name=value]
[--exec-path[=]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=] [--work-tree=] [--namespace=]
[]

The most commonly used git commands are:
add Add file contents to the index
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
checkout Checkout a branch or paths to the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
grep Print lines matching a pattern
init Create an empty Git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
rebase Forward-port local commits to the updated upstream head
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
show Show various types of objects
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG

Deleting CMakeCache.txt not helped.

@proller
Copy link
Member

proller commented Nov 8, 2015

try follow instruction from readme:

git clone --recursive https://github.com/freeminer/freeminer.git
cd freeminer
mkdir _build && cd _build
cmake ..
nice make -j $(nproc || sysctl -n hw.ncpu || echo 2)

@amadin
Copy link
Author

amadin commented Nov 8, 2015

Now I've done all steps from readme:
git clone --recursive https://github.com/freeminer/freeminer.git
cd freeminer
mkdir _build && cd _build
cmake ..
nice make -j $(nproc || sysctl -n hw.ncpu || echo 2)

All steps finish fine except last step.

Log here http://pastebin.com/jn2G33HA
Ошибка - error.

@proller
Copy link
Member

proller commented Nov 8, 2015

please show cmake output

@amadin
Copy link
Author

amadin commented Nov 9, 2015

[ra@ra _build]$ cmake ..
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- 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
-- 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
-- *** Will build version 0.4.13.7-dev ***
-- Build type: Release
-- Found Irrlicht: /usr/lib/libIrrlicht.so
-- Performing Test HAVE_THREAD_LOCAL
-- Performing Test HAVE_THREAD_LOCAL - Failed
-- Performing Test HAVE_FUTURE
-- Performing Test HAVE_FUTURE - Success
-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.8")
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Performing Test MSGPACK_ENABLE_GCC_CXX_ATOMIC
-- Performing Test MSGPACK_ENABLE_GCC_CXX_ATOMIC - Failed
-- Found Doxygen: /usr/bin/doxygen (found version "1.7.6.1")
-- Using bundled msgpack /mnt/sda3/freeminer-master/freeminer/src/msgpack-c/include
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
CMake Warning at src/CMakeLists.txt:261 (message):
cURL is required to load the server list

CMake Warning at src/CMakeLists.txt:264 (message):
cURL is required to announce to the server list

-- Found GetText: /usr/include
-- GetText enabled; locales found: be;cs;da;de;eo;es;et;fr;hu;id;it;ja;jbo;ko;ky;lt;nb;nl;pl;pt;pt_BR;ro;ru;tr;uk;zh_CN;zh_TW
-- Found OpenAL: /usr/lib/libopenal.so
-- Found VORBIS: /usr/include
-- Sound enabled.
-- Found Freetype: /usr/lib/libfreetype.so (found version "2.4.11")
-- Freetype enabled.
-- LuaJIT not found, using bundled Lua.
-- Using GMP provided by system.
-- Found GMP: /usr/lib/libgmp.so
-- Found Curses: /usr/lib/libcurses.so
-- ncurses console enabled.
-- Snappy library: SNAPPY_LIBRARY-NOTFOUND
-- Snappy headers: SNAPPY_INCLUDE_DIR-NOTFOUND
CMake Warning at src/CMakeLists.txt:418 (message):
LevelDB not found! Player data cannot be saved in singleplayer or server

-- Found SQLite3: /usr/lib/libsqlite3.so
-- sqlite3 backend enabled
-- Redis not found!
-- JsonCpp Version: 1.6.5
-- Using bundled JSONCPP library. /mnt/sda3/freeminer-master/freeminer/_build/src/jsoncpp
-- SpatialIndex not found!
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/libX11.so
-- Found OpenGL: /usr/lib/libGL.so
-- Found JPEG: /usr/lib/libjpeg.so
-- Found BZip2: /usr/lib/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so - found
-- Found PNG: /usr/lib/libpng.so (found version "1.5.21")
-- Looking for include file endian.h
-- Looking for include file endian.h - found
-- Looking for fcntl
-- Looking for fcntl - found
-- Looking for poll
-- Looking for poll - found
-- Looking for getaddrinfo
-- Looking for getaddrinfo - found
-- Looking for getnameinfo
-- Looking for getnameinfo - found
-- Looking for gethostbyname_r
-- Looking for gethostbyname_r - found
-- Looking for gethostbyaddr_r
-- Looking for gethostbyaddr_r - found
-- Looking for inet_pton
-- Looking for inet_pton - found
-- Looking for inet_ntop
-- Looking for inet_ntop - found
-- Performing Test HAS_MSGHDR_FLAGS
-- Performing Test HAS_MSGHDR_FLAGS - Success
-- Check size of socklen_t
-- Check size of socklen_t - done
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/sda3/freeminer-master/freeminer/_build

All outputs are here - http://pastebin.com/jn2G33HA

@proller
Copy link
Member

proller commented Nov 10, 2015

looks like old compiler (gcc 4.7)
can you try build with 4.8+ or clang ?

@amadin
Copy link
Author

amadin commented Nov 11, 2015

I have clang 3.3 but i don't know hot to use it.

@proller
Copy link
Member

proller commented Nov 11, 2015

cmake . -DCMAKE_CXX_COMPILER=which clang++ -DCMAKE_C_COMPILER=which clang
or
cmake . -DCMAKE_CXX_COMPILER=which clang++-3.3 -DCMAKE_C_COMPILER=which clang-3.3
or use magic:
util/autotest/auto.pl play --clang=1

@proller proller closed this as completed Apr 30, 2016
@HybridDog
Copy link
Contributor

HybridDog commented May 3, 2016

amadin, try this command

$ cmake . -DCMAKE_CXX_COMPILER=$(which $(compgen -c clang | grep ++)) -DCMAKE_C_COMPILER=$(which $(compgen -c clang | grep g-3))

@proller
Copy link
Member

proller commented May 3, 2016

github eats quotes around which clang++
and auto.pl param --clang renamed to --cmake_clang
so current ways (where 3.3 is your installed compiler version (now usually 3.8)):

cmake . -DCMAKE_CXX_COMPILER=`which clang++` -DCMAKE_C_COMPILER=`which clang`
cmake . -DCMAKE_CXX_COMPILER=`which clang++-3.3` -DCMAKE_C_COMPILER=`which clang-3.3` 
util/autotest/auto.pl play --cmake_clang=1
util/autotest/auto.pl play --cmake_clang=-3.3

@proller
Copy link
Member

proller commented May 4, 2016

you use old release freeminer-0.4.13.7 ?
try latest github.
and delete /home/ra/Загрузки/freeminer-0.4.13.7/auto_* before running auto.pl - seems cmake config broken by previous runs

@proller
Copy link
Member

proller commented May 4, 2016

and here is another way to autobuild anything from latests git:
curl https://raw.githubusercontent.com/freeminer/freeminer/master/build/debian_ogles.sh | sh

@proller
Copy link
Member

proller commented May 4, 2016

can you join to irc #freeminer-ru @freenode ?

@proller
Copy link
Member

proller commented May 4, 2016

@HybridDog thank you for compgen magic, now auto.pl tool detect good clang version a98f00a

also manual:

cmake . -DCMAKE_CXX_COMPILER=$(which $(compgen -c clang | grep 'clang++-[[:digit:]]' | sort --version-sort --reverse | head -n1)) -DCMAKE_C_COMPILER=$(which $(compgen -c clang | grep 'clang-[[:digit:]]' | sort --version-sort --reverse | head -n1))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants