Unable to compile: Linux

Added by xiphos almost 5 years ago

Greetings,

I have been having difficulty with compiling following the provided instructions. Following the Build Source (Linux) instructions, I encounter the following:

xiphos@metropolis:~/src/ryzom/code/ryzom> ${RYZOM_PATH}/tools/scripts/linux/make_all
*********************** BUILD INIT NEL SUCCESS !

*********************** BUILD NEL SUCCESS !

*********************** BUILD NEL INSTALL SUCCESS !

rm: /data/home/xiphos/src/ryzom/code/ryzom/server/src/*/*.packed_sheets: No such file or directory
***************************************************
***************************************************
*********************** UPDATE RYZOM MAKEFILE COMMON FAILED
***************************************************
***************************************************
exiting...

The logs show the above were not as successful as stated:

/usr/local/share/aclocal/smpeg.m4:13: warning: underquoted definition of AM_PATH_SMPEG
/usr/local/share/aclocal/smpeg.m4:13:   run info '(automake)Extending aclocal'
/usr/local/share/aclocal/smpeg.m4:13:   or see http://sources.redhat.com/automake/automake.html#Extending-ac
local
configure.ac:25: installing `./config.guess'
configure.ac:25: installing `./config.sub'
configure.ac:17: installing `./install-sh'
configure.ac:17: installing `./missing'
samples/3d/cegui/Makefile.am: installing `./depcomp'
configure.ac: installing `./ylwrap'
configure: WARNING: Unrecognized options: --with-stlport, --with-python-version, --with-nel
configure: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: png.h: proceeding with the compiler's result
configure: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: jpeglib.h: proceeding with the compiler's result
configure: WARNING: Unrecognized options: --with-stlport, --with-python-version, --with-nel
*********************** BUILD INIT NEL SUCCESS !

1 error
*********************** BUILD NEL SUCCESS !

1 error
*********************** BUILD NEL INSTALL SUCCESS !

Error expanding embedded variable.
***************************************************
***************************************************
*********************** UPDATE RYZOM MAKEFILE COMMON FAILED
***************************************************
***************************************************
No email to send the error mail

Proceeding to the CMake instructions, I go to the nel source directory, create a build directory, and proceed as instructed:

xiphos@metropolis:~/src/ryzom/code> setenv RYHOME "`pwd`" 
xiphos@metropolis:~/src/ryzom/code> cd nel/build
xiphos@metropolis:~/src/ryzom/code/nel/build> cmake -DWITH_TESTS=OFF -DWITH_TOOLS=OFF -DWITH_SAMPLES=OFF ..
-- The CXX compiler identification is GNU
-- The C compiler identification is GNU
-- 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
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - 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
-- checking for module 'libxml-2.0'
--   found libxml-2.0, version 2.7.6
-- Found LibXml2: /usr/local/lib/libxml2.so
-- Found ZLIB: /usr/lib/libz.so
-- Found PNG: /usr/local/lib/libpng.so
-- Found Jpeg: /usr/local/lib/libjpeg.so
-- Found FreeType: /usr/local/lib/libfreetype.so
-- Looking for XOpenDisplay in /usr/local/lib/libX11.so;/usr/local/lib/libXext.so
-- Looking for XOpenDisplay in /usr/local/lib/libX11.so;/usr/local/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/local/lib/libX11.so
-- Warning: Unable to find XF86VidMode!
-- Warning: Unable to find XRandR!
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xiphos/src/ryzom/code/nel/build

So far so good. It's a headless machine that acts as a dedicated server, so it's unsurprising there's no XF86VidMode or XRandR

xiphos@metropolis:~/src/ryzom/code/nel/build> make -j3
Scanning dependencies of target nelmisc_pch_dephelp
[  0%] Building CXX object src/misc/CMakeFiles/nelmisc_pch_dephelp.dir/stdmisc.cpp.o
Scanning dependencies of target nel_drv_opengl_pch_dephelp
Scanning dependencies of target nel3d_pch_dephelp
[  0%] Building CXX object src/3d/driver/opengl/CMakeFiles/nel_drv_opengl_pch_dephelp.dir/stdopengl.cpp.o
[  0%] Building CXX object src/3d/CMakeFiles/nel3d_pch_dephelp.dir/std3d.cpp.o
Linking CXX static library ../../lib/libnelmisc_pch_dephelp.a
[  0%] Built target nelmisc_pch_dephelp
Scanning dependencies of target nelgeorges_pch_dephelp
[  0%] Building CXX object src/georges/CMakeFiles/nelgeorges_pch_dephelp.dir/stdgeorges.cpp.o
In file included from /usr/local/include/libxml2/libxml/parser.h:801,
                 from /home/xiphos/src/ryzom/code/nel/src/georges/stdgeorges.h:28,
                 from /home/xiphos/src/ryzom/code/nel/src/georges/stdgeorges.cpp:17:
/usr/local/include/libxml2/libxml/encoding.h:28:19: error: iconv.h: No such file or directory
In file included from /usr/local/include/libxml2/libxml/parser.h:801,
                 from /home/xiphos/src/ryzom/code/nel/src/georges/stdgeorges.h:28,
                 from /home/xiphos/src/ryzom/code/nel/src/georges/stdgeorges.cpp:17:
/usr/local/include/libxml2/libxml/encoding.h:136: error: 'iconv_t' does not name a type
/usr/local/include/libxml2/libxml/encoding.h:137: error: 'iconv_t' does not name a type
*** Error code 1
1 error
*** Error code 2
Linking CXX static library ../../../../lib/libnel_drv_opengl_pch_dephelp.a
[  0%] Built target nel_drv_opengl_pch_dephelp
Linking CXX static library ../../lib/libnel3d_pch_dephelp.a
[  0%] Built target nel3d_pch_dephelp
1 error
*** Error code 2
1 error

That's no good! I check, and iconv.h is in /usr/local/include. I clear things out and rerun CMake adding a -I/usr/local/include flag, then try again but get the same error. On a whim, I try without the -j3 flag and get a completely different error:

xiphos@metropolis:~/src/ryzom/code/nel/build> make
[  0%] Built target nelmisc_pch_dephelp
[  0%] Built target pch_Generate_nelmisc
[  0%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/bitmap_jpeg.cpp.o
[  0%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/bitmap_png.cpp.o
/home/xiphos/src/ryzom/code/nel/src/misc/bitmap_png.cpp: In member function 'bool NLMISC::CBitmap::writePNG(NLMISC::IStream&, uint32)':
/home/xiphos/src/ryzom/code/nel/src/misc/bitmap_png.cpp:210: warning: argument 'd' might be clobbered by 'longjmp' or 'vfork'
[  0%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/block_memory.cpp.o
[  1%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/bsphere.cpp.o
[  1%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/buf_fifo.cpp.o
[  1%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/check_fpu.cpp.o
[  1%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/class_id.cpp.o
[  1%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/class_registry.cpp.o
[  1%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/cmd_args.cpp.o
[  2%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/co_task.cpp.o
[  2%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/log.cpp.o
[  2%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/command.cpp.o
[  2%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/common.cpp.o
[  2%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/contiguous_block_allocator.cpp.o
[  2%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/cpu_time_stat.cpp.o
[  3%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/debug.cpp.o
[  3%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/di_event_emitter.cpp.o
[  3%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/di_game_device.cpp.o
[  3%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/di_keyboard_device.cpp.o
[  3%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/di_mouse_device.cpp.o
[  4%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/diff_tool.cpp.o
[  4%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/displayer.cpp.o
[  4%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/dummy_window.cpp.o
[  4%] Building CXX object src/misc/CMakeFiles/nelmisc.dir/dynloadlib.cpp.o
/home/xiphos/src/ryzom/code/nel/src/misc/dynloadlib.cpp: In member function 'bool NLMISC::CLibrary::loadLibrary(const std::string&, bool, bool, bool)':
/home/xiphos/src/ryzom/code/nel/src/misc/dynloadlib.cpp:213: error: invalid conversion from 'const char*' to 'char*'
*** Error code 1

Stop in /data/home/xiphos/src/ryzom/code/nel/build.
*** Error code 1

Stop in /data/home/xiphos/src/ryzom/code/nel/build.
*** Error code 1

Stop in /data/home/xiphos/src/ryzom/code/nel/build.

Any thoughts? I'll keep plugging away and post any solutions I find for any who come after me.
Thanks!


Replies (2)

RE: Unable to compile: Linux - Added by vl almost 5 years ago

Hello,

look at line 213 on dynloadlib.cpp and change:

char *errormsg=dlerror();

into

const char *errormsg=dlerror();

and tell us if it works better

RE: Unable to compile: Linux - Added by xiphos almost 5 years ago

Thank you, that seems to have resolved that issue.
The other issue cropped up again, even with explicitely telling cmake to include /usr/local/include - or perhaps I am mis-understanding the syntax?

xiphos@metropolis:~/src/ryzom/code/nel/build> cmake -DWITH_TESTS=OFF -DWITH_TOOLS=OFF -DWITH_SAMPLES=OFF -DINCLUDE_DIRECTORIES=/usr/local/include ..

The fix was easy enough: edit all flags.make files to have -I/usr/local/include. There was also some weirdness going on with the AL libraries; even with the -I/usr/local/include flag it was failing. Yet if I ran the failing command exactly as it appeared with a make VERBOSE=1 manually, it concluded with out issues. This happened at a few locations, but I did not have the where-with-all to note which commands failed in this manner.

NeL has now compiled on FreeBSD AMD64. Since the FreeBSD ports tree is still on luabind 0.7, the Ryzom client/server is a different story, but I feel confident about tackling that one :)

Thanks again for the help! Hopefully this will come in useful for others, as well.

(1-2/2)