Build from Dockerfile fails on not finding boost_regex libraries
Using latest version Building graph-tool from Dockerfile Added patch to the list of installed packages, as per #556 (closed)
Reproduce:
-
Download the Dockerfile from https://git.skewed.de/count0/graph-tool/uploads/9344ed078248f1b0eaacac850eff1069/Dockerfile
-
docker build Expected: Docker image to be built successfully
Actual: Build process fails on linkage failure with boot_regex libraries
Sending build context to Docker daemon 3.072kB
Step 1/22 : FROM base/archlinux:latest
---> 1c5491d5745d
Step 2/22 : MAINTAINER Tiago de Paula Peixoto <tiago@skewed.de>
---> Using cache
---> 04e0f3b454e6
Step 3/22 : RUN echo 'Server=https://archive.archlinux.org/repos/2018/06/28/$repo/os/$arch' > /etc/pacman.d/mirrorlist
---> Using cache
---> 59c8c03a33fd
Step 4/22 : RUN pacman-key --refresh-keys
---> Using cache
---> af6381d03fa0
Step 5/22 : RUN pacman -Suy --noconfirm
---> Using cache
---> 078ce374dd5f
Step 6/22 : RUN pacman -S binutils make gcc fakeroot --noconfirm --needed
---> Using cache
---> 823816a71224
Step 7/22 : RUN pacman -S expac yajl git --noconfirm --needed
---> Using cache
---> ec89efb1e05e
Step 8/22 : RUN pacman -S sudo grep file --noconfirm --needed
---> Using cache
---> ae6457707c8f
Step 9/22 : RUN pacman -S sudo boost python3 python3-scipy python-numpy cgal cairomm python-cairo sparsehash cairomm autoconf-archive pkg-config patch --noconfirm --needed
---> Running in bdffea0d332f
warning: sudo-1.8.23-2 is up to date -- skipping
warning: skipping target: cairomm
resolving dependencies...
looking for conflicting packages...
Packages (50) autoconf-2.69-4 blas-3.8.0-2 boost-libs-1.67.0-4 cairo-1.15.12-1 cblas-3.8.0-2 fontconfig-2.13.0+10+g58f5285-1 freetype2-2.9.1-1 glu-9.0.0-5 graphite-1:1.3.11-1 harfbuzz-1.8.1-1 lapack-3.8.0-2 libdrm-2.4.92-1 libedit-20180525_3.1-1 libglvnd-1.0.0-1 libnsl-1.2.0-1 libomxil-bellagio-0.9.3-2 libpciaccess-0.14-1 libpng-1.6.34-2 libsigc++-2.10.0-1 libunwind-1.2.1-1 libx11-1.6.5-1 libxau-1.0.8-3 libxcb-1.13-1 libxdamage-1.1.4-3 libxdmcp-1.1.2-2 libxext-1.3.3-2 libxfixes-5.0.3-2 libxrender-0.9.10-1 libxshmfence-1.3-1 libxxf86vm-1.1.4-2 llvm-libs-6.0.0-4 lm_sensors-3.4.0-4 lzo-2.10-1 m4-1.4.18-1 mesa-18.1.2-1 pixman-0.34.0-1 wayland-1.15.0-1 xcb-proto-1.13-1 xorgproto-2018.4-1 autoconf-archive-1:2018.03.13-1 boost-1.67.0-4 cairomm-1.12.2-2 cgal-4.12-2 patch-2.7.6-1 pkgconf-1.5.1-1 python-3.6.5-3 python-cairo-1.17.0-1 python-numpy-1.14.5-1 python-scipy-1.1.0-1 sparsehash-2.0.3-1
Total Download Size: 105.56 MiB
Total Installed Size: 581.77 MiB
:: Proceed with installation? [Y/n] warning: dependency cycle detected:
warning: libglvnd will be installed before its mesa dependency
warning: dependency cycle detected:
warning: harfbuzz will be installed before its freetype2 dependency
:: Retrieving packages...
downloading libnsl-1.2.0-1-x86_64.pkg.tar.xz...
downloading libedit-20180525_3.1-1-x86_64.pkg.tar.xz...
downloading lzo-2.10-1-x86_64.pkg.tar.xz...
downloading m4-1.4.18-1-x86_64.pkg.tar.xz...
downloading autoconf-2.69-4-any.pkg.tar.xz...
downloading pkgconf-1.5.1-1-x86_64.pkg.tar.xz...
downloading patch-2.7.6-1-x86_64.pkg.tar.xz...
downloading boost-libs-1.67.0-4-x86_64.pkg.tar.xz...
downloading boost-1.67.0-4-x86_64.pkg.tar.xz...
downloading python-3.6.5-3-x86_64.pkg.tar.xz...
downloading blas-3.8.0-2-x86_64.pkg.tar.xz...
downloading cblas-3.8.0-2-x86_64.pkg.tar.xz...
downloading lapack-3.8.0-2-x86_64.pkg.tar.xz...
downloading python-numpy-1.14.5-1-x86_64.pkg.tar.xz...
downloading libpciaccess-0.14-1-x86_64.pkg.tar.xz...
downloading libdrm-2.4.92-1-x86_64.pkg.tar.xz...
downloading wayland-1.15.0-1-x86_64.pkg.tar.xz...
downloading xcb-proto-1.13-1-any.pkg.tar.xz...
downloading xorgproto-2018.4-1-any.pkg.tar.xz...
downloading libxdmcp-1.1.2-2-x86_64.pkg.tar.xz...
downloading libxau-1.0.8-3-x86_64.pkg.tar.xz...
downloading libxcb-1.13-1-x86_64.pkg.tar.xz...
downloading libx11-1.6.5-1-x86_64.pkg.tar.xz...
downloading libxext-1.3.3-2-x86_64.pkg.tar.xz...
downloading libxxf86vm-1.1.4-2-x86_64.pkg.tar.xz...
downloading libxfixes-5.0.3-2-x86_64.pkg.tar.xz...
downloading libxdamage-1.1.4-3-x86_64.pkg.tar.xz...
downloading libxshmfence-1.3-1-x86_64.pkg.tar.xz...
downloading libomxil-bellagio-0.9.3-2-x86_64.pkg.tar.xz...
downloading libunwind-1.2.1-1-x86_64.pkg.tar.xz...
downloading llvm-libs-6.0.0-4-x86_64.pkg.tar.xz...
downloading lm_sensors-3.4.0-4-x86_64.pkg.tar.xz...
downloading libglvnd-1.0.0-1-x86_64.pkg.tar.xz...
downloading mesa-18.1.2-1-x86_64.pkg.tar.xz...
downloading glu-9.0.0-5-x86_64.pkg.tar.xz...
downloading libpng-1.6.34-2-x86_64.pkg.tar.xz...
downloading libxrender-0.9.10-1-x86_64.pkg.tar.xz...
downloading graphite-1:1.3.11-1-x86_64.pkg.tar.xz...
downloading harfbuzz-1.8.1-1-x86_64.pkg.tar.xz...
downloading freetype2-2.9.1-1-x86_64.pkg.tar.xz...
downloading fontconfig-2.13.0+10+g58f5285-1-x86_64.pkg.tar.xz...
downloading pixman-0.34.0-1-x86_64.pkg.tar.xz...
downloading cairo-1.15.12-1-x86_64.pkg.tar.xz...
downloading libsigc++-2.10.0-1-x86_64.pkg.tar.xz...
downloading cairomm-1.12.2-2-x86_64.pkg.tar.xz...
downloading python-cairo-1.17.0-1-x86_64.pkg.tar.xz...
downloading python-scipy-1.1.0-1-x86_64.pkg.tar.xz...
downloading cgal-4.12-2-x86_64.pkg.tar.xz...
downloading sparsehash-2.0.3-1-any.pkg.tar.xz...
downloading autoconf-archive-1:2018.03.13-1-any.pkg.tar.xz...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
installing boost-libs...
Optional dependencies for boost-libs
openmpi: for mpi support
installing boost...
Optional dependencies for boost
python: for python bindings [pending]
python2: for python2 bindings
installing libnsl...
installing python...
Optional dependencies for python
python-setuptools
python-pip
sqlite [installed]
mpdecimal: for decimal
xz: for lzma [installed]
tk: for tkinter
installing blas...
installing cblas...
installing lapack...
installing python-numpy...
Optional dependencies for python-numpy
python-nose: testsuite
openblas: faster linear algebra
installing python-scipy...
Optional dependencies for python-scipy
python-pillow: for image saving module
installing libpciaccess...
installing libdrm...
installing wayland...
installing xcb-proto...
installing xorgproto...
installing libxdmcp...
installing libxau...
installing libxcb...
installing libx11...
installing libxext...
installing libxxf86vm...
installing libxfixes...
installing libxdamage...
installing libxshmfence...
installing libomxil-bellagio...
installing libunwind...
installing libedit...
installing llvm-libs...
installing lm_sensors...
Optional dependencies for lm_sensors
rrdtool: for logging with sensord
installing libglvnd...
installing mesa...
Optional dependencies for mesa
opengl-man-pages: for the OpenGL API man pages
mesa-vdpau: for accelerated video playback
libva-mesa-driver: for accelerated video playback
installing glu...
installing cgal...
Optional dependencies for cgal
qt5-svg: for CGAL_Qt5
eigen: for some packages, see the CGAL manual
installing libpng...
installing libxrender...
installing graphite...
installing harfbuzz...
Optional dependencies for harfbuzz
cairo: hb-view program [pending]
installing freetype2...
installing fontconfig...
Fontconfig configuration is done via /etc/fonts/conf.avail and conf.d.
Read /etc/fonts/conf.d/README for more information.
Configuration via /etc/fonts/local.conf is still possible,
but is no longer recommended for options available in conf.avail.
Main systemwide configuration should be done by symlinks
(especially for autohinting, sub-pixel and lcdfilter):
cd /etc/fonts/conf.d
ln -s ../conf.avail/XX-foo.conf
Check also https://wiki.archlinux.org/index.php/Font_Configuration
and https://wiki.archlinux.org/index.php/Fonts.
Rebuilding fontconfig cache... done.
installing pixman...
installing lzo...
installing cairo...
installing libsigc++...
installing cairomm...
installing python-cairo...
installing sparsehash...
installing m4...
installing autoconf...
installing autoconf-archive...
Optional dependencies for autoconf-archive
automake: macros for use with it
installing pkgconf...
installing patch...
Optional dependencies for patch
ed: for patch -e functionality
:: Running post-transaction hooks...
(1/3) Reloading system manager configuration...
Skipped: Current root is not booted.
(2/3) Arming ConditionNeedsUpdate...
(3/3) Updating the info directory file...
Removing intermediate container bdffea0d332f
---> e9995f0375a5
Step 10/22 : ENV MAKEPKG_USER=mkpkg MAKEPKG_GROUP=mkpkg MAKEPKG_ROOT=/tmp/build
---> Running in 30f6080f4725
Removing intermediate container 30f6080f4725
---> 924690cb57cf
Step 11/22 : RUN groupadd "${MAKEPKG_USER}" && useradd -g "${MAKEPKG_GROUP}" "${MAKEPKG_USER}"
---> Running in 109a4b2c352d
Removing intermediate container 109a4b2c352d
---> 7635fefc49d6
Step 12/22 : RUN mkdir -p ${MAKEPKG_ROOT}; chown mkpkg:mkpkg ${MAKEPKG_ROOT}
---> Running in a2de510499bd
Removing intermediate container a2de510499bd
---> 058f64211ba9
Step 13/22 : WORKDIR ${MAKEPKG_ROOT}
---> Running in 8e51e056b641
Removing intermediate container 8e51e056b641
---> da9304064d0c
Step 14/22 : USER ${MAKEPKG_USER}
---> Running in 94f121978482
Removing intermediate container 94f121978482
---> 2af7d5f50b66
Step 15/22 : RUN curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=python-graph-tool
---> Running in 7043121d7c67
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
100 1750 100 1750 0 0 314 0 0:00:05 0:00:05 --:--:-- 430
Removing intermediate container 7043121d7c67
---> f1685bf39d7f
Step 16/22 : RUN makepkg PKGBUILD --needed CXXFLAGS="-mtune=generic -O3 -pipe -flto=4 -ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections"
---> Running in d33fa5ec845f
==> Making package: python-graph-tool 2.27-1 (Fri Feb 1 13:53:10 2019)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading graph-tool-2.27.tar.bz2...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14.2M 100 14.2M 0 0 242k 0 0:01:00 0:01:00 --:--:-- 307k
-> Downloading 0407f41a35b6be7c670927fb5dc578cbd0e88be4.diff...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1661 100 1661 0 0 261 0 0:00:06 0:00:06 --:--:-- 390
-> Downloading aa39e4a6b42d43fac30c841d176c75aff92cc01a.diff...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 714 100 714 0 0 122 0 0:00:05 0:00:05 --:--:-- 171
==> Validating source files with sha256sums...
graph-tool-2.27.tar.bz2 ... Passed
0407f41a35b6be7c670927fb5dc578cbd0e88be4.diff ... Passed
aa39e4a6b42d43fac30c841d176c75aff92cc01a.diff ... Passed
==> Extracting sources...
-> Extracting graph-tool-2.27.tar.bz2 with bsdtar
==> Starting prepare()...
patching file src/graph_tool/draw/gtk_draw.py
patching file src/graph/generation/graph_triangulation.cc
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/sbin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/sbin/grep
checking for egrep... /usr/sbin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for gcc option to accept ISO C99... unsupported
checking for gcc option to accept ISO C89... (cached) none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking how to run the C++ preprocessor... g++ -E
checking for ANSI C header files... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/sbin/sed
checking for fgrep... /usr/sbin/grep -F
checking for ld used by gcc... /usr/sbin/ld
checking if the linker (/usr/sbin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/sbin/nm -B
checking the name lister (/usr/sbin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/sbin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/sbin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/sbin/dd
checking how to truncate binary pipes... /usr/sbin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/sbin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/sbin/ld -m elf_x86_64
checking if the linker (/usr/sbin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/sbin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/sbin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/sbin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether g++ supports C++14 features by default... yes
checking whether to enable debug info... no
checking whether to enable parallel algorithms with openmp... yes
checking for OpenMP flag of C++ compiler... -fopenmp
checking whether to enable cairo drawing... yes
checking for Expat XML Parser headers in /usr/include... found
checking for Expat XML Parser libraries... found
checking for Expat XML Parser... yes
checking for a Python interpreter with version >= 2.7... python
checking for python... /usr/sbin/python
checking for python version... 3.6
checking for python platform... linux
checking for python script directory... ${prefix}/lib/python3.6/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python3.6/site-packages
checking for python3.6... (cached) /usr/sbin/python
checking for a version of Python >= '2.1.0'... yes
checking for a version of Python == '3.6.5'... yes
checking for the distutils Python package... yes
checking for Python include path... -I/usr/include/python3.6m
checking for Python library path... -L/usr/lib -lpython3.6m
checking for Python site-packages path... /usr/lib/python3.6/site-packages
checking python extra libraries... -lpthread -ldl -lutil -lm
checking python extra linking flags... -Xlinker -export-dynamic
checking consistency of all components of python development environment... yes
checking for boostlib >= 1.55.0 (105500)... yes
checking whether the Boost::Python library is available... yes
checking whether boost_python is the correct library... no
checking whether boost_python is the correct library... (cached) no
checking whether boost_python27 is the correct library... no
checking whether boost_python27 is the correct library... (cached) no
checking whether boost_python27 is the correct library... (cached) no
checking whether boost_python3 is the correct library... yes
checking whether the Boost::IOStreams library is available... yes
checking for exit in -lboost_iostreams... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex... no
checking for exit in -lboost_regex... (cached) no
checking for exit in -lboost_regex... (cached) no
configure: error: Could not link against boost_regex !
==> ERROR: A failure occurred in prepare().
Aborting...
The command '/bin/sh -c makepkg PKGBUILD --needed CXXFLAGS="-mtune=generic -O3 -pipe -flto=4 -ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections"' returned a non-zero code: 4
shlomi@mechona-una:~/work/tech/graph-tool/3$
shlomi@mechona-una:~/work/tech/graph-tool/3$
Also, from within the docker image (modified the Dockerfile to stop before the makepkg),searched for libboost_regex*:
-rwxr-xr-x 1 root root 1126048 Jun 6 2018 /usr/lib/libboost_regex.so.1.67.0
lrwxrwxrwx 1 root root 24 Jun 6 2018 /usr/lib/libboost_regex.so -> libboost_regex.so.1.67.0
-rw-r--r-- 1 root root 2959098 Jun 6 2018 /usr/lib/libboost_regex.a
and
-rwxr-xr-x 1 root root 1126048 Jun 6 2018 /usr/lib64/libboost_regex.so.1.67.0
lrwxrwxrwx 1 root root 24 Jun 6 2018 /usr/lib64/libboost_regex.so -> libboost_regex.so.1.67.0
-rw-r--r-- 1 root root 2959098 Jun 6 2018 /usr/lib64/libboost_regex.a