community
community copied to clipboard
wxwidgets/3.1.3: Not compiling (linker error: xmlparse.c: undefined reference to `getrandom')
Hello,
I'm trying to build wxwidgets/3.1.3 from source:
git clone https://github.com/bincrafters/conan-wxwidgets.git
mkdir tmp && cd tmp
conan install ../tmp
CC=gcc CXX=g++ conan create ../tmp 3.1.3@bincrafters/stable
The output looks as expected (installing of dependencies, building of wxwidgets) up until this point:
...
[791/799] Building CXX object source_subfolder/libs/qa/CMakeFiles/qa.dir/__/__/__/__/src/generic/dbgrptg.cpp.o
[792/799] Building CXX object source_subfolder/libs/xml/CMakeFiles/xml.dir/__/__/__/__/src/xml/xml.cpp.o
[793/799] Linking CXX static library lib/libwx_baseu_xml-3.1.a
[794/799] Linking CXX static library lib/libwx_gtk2u_qa-3.1.a
[795/799] Building CXX object source_subfolder/libs/xrc/CMakeFiles/xrc.dir/__/__/__/__/src/xrc/xmlres.cpp.o
[796/799] Linking CXX static library lib/libwx_gtk2u_richtext-3.1.a
[797/799] Linking CXX static library lib/libwx_gtk2u_xrc-3.1.a
[798/799] Building CXX object source_subfolder/utils/CMakeFiles/wxrc.dir/__/__/__/utils/wxrc/wxrc.cpp.o
[799/799] Linking CXX executable bin/wxrc
FAILED: bin/wxrc
: && /usr/local/bin/g++ -m64 -O3 -DNDEBUG -s -rdynamic -pthread source_subfolder/utils/CMakeFiles/wxrc.dir/__/__/__/utils/wxrc/wxrc.cpp.o -o bin/wxrc -L/home/fb/.conan/data/libpng/1.6.37/_/_/package/008f1a2b119556f550c1109663570e0f5040c13f/lib -L/home/fb/.conan/data/libtiff/4.0.9/_/_/package/914ddbbe26be49a8a12df7b80fcbf813feb203da/lib -L/home/fb/.conan/data/expat/2.2.7/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib -L/home/fb/.conan/data/zlib/1.2.11/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib -L/home/fb/.conan/data/libjpeg/9d/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib -L/home/fb/.conan/data/xz_utils/5.2.4/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib -L/home/fb/.conan/data/jbig/20160605/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib -Wl,-rpath,/home/fb/.conan/data/libpng/1.6.37/_/_/package/008f1a2b119556f550c1109663570e0f5040c13f/lib:/home/fb/.conan/data/libtiff/4.0.9/_/_/package/914ddbbe26be49a8a12df7b80fcbf813feb203da/lib:/home/fb/.conan/data/expat/2.2.7/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib:/home/fb/.conan/data/zlib/1.2.11/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib:/home/fb/.conan/data/libjpeg/9d/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib:/home/fb/.conan/data/xz_utils/5.2.4/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib:/home/fb/.conan/data/jbig/20160605/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib: lib/libwx_baseu_xml-3.1.a lib/libwx_baseu-3.1.a /home/fb/.conan/data/zlib/1.2.11/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib/libz.a lib/libwxregexu-3.1.a -lsecret-1 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lpthread -ldl -lSM -lICE -lX11 -lXext -lglib-2.0 -lgobject-2.0 -latk-1.0 -lgio-2.0 -lgthread-2.0 -lgmodule-2.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lpangocairo-1.0 -lpangoft2-1.0 -lpangoxft-1.0 -lgdk-x11-2.0 -lgtk-x11-2.0 -lXtst /home/fb/.conan/data/expat/2.2.7/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib/libexpat.a && :
/home/fb/.conan/data/expat/2.2.7/_/_/package/f7e573cb501ccfc49e9e4d84de886bc1ef2e6ebb/lib/libexpat.a(xmlparse.c.o): In function `startParsing':
xmlparse.c:(.text+0x42cd): undefined reference to `getrandom'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
wxwidgets/3.1.3@bincrafters/stable:
wxwidgets/3.1.3@bincrafters/stable: ERROR: Package 'cfa57acfc9ee62a4eb1c419cf6b5f07ea2599568' build failed
wxwidgets/3.1.3@bincrafters/stable: WARN: Build folder /home/fb/.conan/data/wxwidgets/3.1.3/bincrafters/stable/build/cfa57acfc9ee62a4eb1c419cf6b5f07ea2599568
ERROR: wxwidgets/3.1.3@bincrafters/stable: Error in build() method, line 246
cmake.build()
ConanException: Error 1 while executing cmake --build '/home/fb/.conan/data/wxwidgets/3.1.3/bincrafters/stable/build/cfa57acfc9ee62a4eb1c419cf6b5f07ea2599568/build_subfolder' '--' '-j4'
Package and Environment Details:
- Package Name/Version: wxwidgets/3.1.3
- Operating System+version: Slackware 14.2 (yeah, I know...)
- Compiler+version: GCC 6.5
- Conan version: conan 1.21.1
- Python version: Python 2.7.11
- Python3 version: Python 3.6.1
Conan profile
[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=6
compiler.libcxx=libstdc++11
build_type=Release
[options]
[build_requires]
[env]
Anybody any ideas?
Thanks, florin.
This is also happening with wxwidgets/3.1.2, so I'm suspecting that it's me doing something wrong.
This seem to be a libc incompatibility version between binaries built on your computer and binaries downloaded from Conan Center Index. What you need to do is follow recommendations in conan-io/conan#3972 and add a custom setting (distro and/or libc), so that conan does not reuse the binaries from Conan-Center-Index. This way all binaries will be compiled on your distribution and will use the same version of libc.
Hello Erik
On 2020-07-20 11:23, ericLemanissier wrote:
This seem to be a libc incompatibility version between binaries built on your computer and binaries downloaded from Conan Center Index. What you need to do is follow recommendations in conan-io/conan#3972 and add a custom setting (distro and/or libc), so that conan does not reuse the binaries from Conan-Center-Index. This way all binaries will be compiled on your distribution and will use the same version of libc.
thanks a lot for the feedback! I'l look into conan-io/conan#3972.
We're currently in the process of redesigning our build stack to use well-defined container images for the toolkits. This should allow us to experiment with different libc versions, and/or to recompile all dependencies four our specific setup.
If I run into (more) problems, I'll probably be able to ask more specific questions in a few weeks.
Thanks & Cheers, Florin.