Various distro problem

Added by Naush about 4 years ago

I have a small hudson/jenkins grid of various distro, here are some problems.

Gentoo x86_64

more undefined references to `typeinfo for luabind::detail::registration' follow
collect2: ld returned 1 exit status

FindLuabind.cmake only test if LUABIND_LIBRARY_RELEASE is set but in this case LUABIND_LIBRARY_DEBUG is present, also IF doesn't mean you have libluabind.so library

netBSD i686 (GCC 4.1.3)

string_common.h:188: error: expected `)' before '__PRI64_PREFIX'

netBSD doesn't have __PRI64_PREFIX

NOTE: luabind ignore NETBSD, so just add it !

centos 5.6 X86_64: (GCC 4.1.2)

string_common.h: In function ‘std::string NLMISC::toString(const long unsigned int&)’:
string_common.h:195: error: redefinition of ‘std::string NLMISC::toString(const long unsigned int&)’
string_common.h:188: error: ‘std::string NLMISC::toString(const uint64&)’ previously defined here

duplicate method ...

Slackware-l33t x86_64

/usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../lib64/libxmlparse.so: undefined reference to `XmlSizeOfUnknownEncoding'

The problem is 'expat.h' is missing from the include directory, but the library is present.
Linking with xmltok instead of expat will do the job, I have tested this solution and it's working ;)


Replies (6)

RE: Various distro problem - Added by kervala about 4 years ago

Gentoo x86_64

more undefined references to `typeinfo for luabind::detail::registration' follow
collect2: ld returned 1 exit status

FindLuabind.cmake only test if LUABIND_LIBRARY_RELEASE is set but in this case LUABIND_LIBRARY_DEBUG is present, also IF doesn't mean you have libluabind.so library

Under Linux, debug libraries don't need to be found because they are used automatically by GDB if present (they should be in /usr/lib/debug/usr/lib/...).

LUABIND_FOUND is only defined if LUABIND_INCLUDE_DIR, Boost_INCLUDE_DIR and LUABIND_LIBRARY_RELEASE are found.

In your case with Gentoo, why doesn't it find a "release" version of luabind ?

RE: Various distro problem - Added by Naush about 4 years ago

Because the default built of luabind only build the debug one :)
and it is installed in /usr/lib{64}

btw, it's not a gentoo specific problem, it's just a problem if you build luanbind with an upstream tarball

RE: Various distro problem - Added by kervala about 4 years ago

Ok, so that's not a problem related to Gentoo.

Gentoo removed luabind from their packages so it's up to you to compile luabind.

When you do "bjam" it compiles only the debug version.

...found 224 targets...
...updating 18 targets...
gcc.compile.c++ bin/gcc-4.5.2/debug/class.o
gcc.compile.c++ bin/gcc-4.5.2/debug/class_info.o
gcc.compile.c++ bin/gcc-4.5.2/debug/class_registry.o
gcc.compile.c++ bin/gcc-4.5.2/debug/class_rep.o
gcc.compile.c++ bin/gcc-4.5.2/debug/create_class.o
gcc.compile.c++ bin/gcc-4.5.2/debug/error.o
gcc.compile.c++ bin/gcc-4.5.2/debug/exception_handler.o
gcc.compile.c++ bin/gcc-4.5.2/debug/function.o
gcc.compile.c++ bin/gcc-4.5.2/debug/inheritance.o
gcc.compile.c++ bin/gcc-4.5.2/debug/link_compatibility.o
gcc.compile.c++ bin/gcc-4.5.2/debug/object_rep.o
gcc.compile.c++ bin/gcc-4.5.2/debug/open.o
gcc.compile.c++ bin/gcc-4.5.2/debug/pcall.o
gcc.compile.c++ bin/gcc-4.5.2/debug/scope.o
gcc.compile.c++ bin/gcc-4.5.2/debug/stack_content_by_name.o
gcc.compile.c++ bin/gcc-4.5.2/debug/weak_ref.o
gcc.compile.c++ bin/gcc-4.5.2/debug/wrapper_base.o
gcc.link.dll bin/gcc-4.5.2/debug/libluabindd.so.0.9.0
...updated 18 targets...

But if you use "bjam release"

...found 224 targets...
...updating 19 targets...
MkDir1 bin/gcc-4.5.2/release
gcc.compile.c++ bin/gcc-4.5.2/release/class.o
gcc.compile.c++ bin/gcc-4.5.2/release/class_info.o
gcc.compile.c++ bin/gcc-4.5.2/release/class_registry.o
gcc.compile.c++ bin/gcc-4.5.2/release/class_rep.o
gcc.compile.c++ bin/gcc-4.5.2/release/create_class.o
gcc.compile.c++ bin/gcc-4.5.2/release/error.o
gcc.compile.c++ bin/gcc-4.5.2/release/exception_handler.o
gcc.compile.c++ bin/gcc-4.5.2/release/function.o
gcc.compile.c++ bin/gcc-4.5.2/release/inheritance.o
gcc.compile.c++ bin/gcc-4.5.2/release/link_compatibility.o
gcc.compile.c++ bin/gcc-4.5.2/release/object_rep.o
gcc.compile.c++ bin/gcc-4.5.2/release/open.o
gcc.compile.c++ bin/gcc-4.5.2/release/pcall.o
gcc.compile.c++ bin/gcc-4.5.2/release/scope.o
gcc.compile.c++ bin/gcc-4.5.2/release/stack_content_by_name.o
gcc.compile.c++ bin/gcc-4.5.2/release/weak_ref.o
gcc.compile.c++ bin/gcc-4.5.2/release/wrapper_base.o
gcc.link.dll bin/gcc-4.5.2/release/libluabind.so.0.9.0
...updated 19 targets...

RE: Various distro problem - Added by kervala about 4 years ago

The 2 first issues are fixed, thanks for reporting :)

About NLMISC::toString, under some architectures uint64 is different from long unsigned int. We have to check how to determine that.

About libwww problem, that depends on distro libwww. libwww can be compiled with a version of expat included in libwww sources or can use an external expat. I think i can check if libxmlparse contains needed symbols or not. If internal expat is used, expat.h is not available in system includes.

RE: Various distro problem - Added by Naush about 4 years ago

Gentoo x86_64

CMake Error at nel/src/3d/driver/opengl/cmake_install.cmake:44 (FILE):
  file cannot create directory: /usr/local/lib/nel.  Maybe need
  administrative privileges.

Sure it will fail :p

cmake -DCMAKE_INSTALL_PREFIX=/home/hudson/workspace/test/OS/xxx/build_install [...snip...]

a missing ${CMAKE_INSTALL_PREFIX} in nel/src/3d/driver/opengl/cmake_install.cmake

Arch :

> SET(LIBRARY_NAME_DEBUG luabind_d libluabind_d libluabindd luabindd)

ok, already fixed in hg
Also one point I forget, if cmake can crash directly instead to crash at link time its can be better.

netBSD i686 (GCC 4.1.3)

error: declaration of 'struct std::tr1::hash blah blah

It's probably my setup, I already build NeL on netBSD without this problem

RE: Various distro problem - Added by kervala about 4 years ago

What about "cmake_install.cmake" ? That's a script generated by CMake, if there is a problem it's in a CMakeLists.txt or a file in CMakeModules.

I never got any problem with CMAKE_INSTALL_PREFIX being defined on command line.

Please could you check again ?

(1-6/6)