Commit 58a3efb3 authored by Jérome Perrin's avatar Jérome Perrin

Fix missing rpaths on components

Because of a bug in `slapos/testcase`, ldd check was not properly reporting several problems, because several components were using system libraries.

These are the changes to profiles, adding the missing rpath and other changes so that components do not use system libraries either by explicitly providing the libraries so that the configure script does not use system development libraries if they are available ( like for zstd ) or by disabling the features at compile time for features we don't use ( like the `--without-icu` for boost )

See merge request !732
parents 5770e533 573b8e26
Pipeline #9082 failed with stage
......@@ -4,6 +4,7 @@ parts = attr
[attr]
recipe = slapos.recipe.cmmi
shared = true
url = http://download.savannah.gnu.org/releases/attr/attr-2.4.47.src.tar.gz
md5sum = 84f58dec00b60f2dc8fd1c9709291cc7
configure-options =
......
......@@ -5,6 +5,7 @@ extends =
../bzip2/buildout.cfg
../gcc/buildout.cfg
../zlib/buildout.cfg
../xz-utils/buildout.cfg
[boost-lib]
recipe = slapos.recipe.cmmi
......@@ -12,14 +13,16 @@ shared = true
url = http://downloads.sourceforge.net/sourceforge/boost/boost_1_67_0.tar.bz2
md5sum = ced776cb19428ab8488774e1415535ab
location = @@LOCATION@@
configure-command = ./bootstrap.sh --prefix=${:location} --with-python=${python2.7:location}/bin/python2.7
configure-command = ./bootstrap.sh --prefix=${:location} --with-python=${python2.7:location}/bin/python2.7 --without-icu
make-binary =
make-options =
make-targets = for a in $MAKEFLAGS; do case $a in -j*) j=$a; break;; esac; done;
./b2 $j link=shared dll-path=${:location}/lib:${bzip2:location}/lib:${gcc:location}/lib:${gcc:location}/lib64:${zlib:location}/lib install
./b2 $j link=shared dll-path=${:location}/lib:${bzip2:location}/lib:${gcc:location}/lib:${gcc:location}/lib64:${zlib:location}/lib:${xz-utils:location}/lib install
environment =
PATH=${gcc:location}/bin:%(PATH)s
BZIP2_INCLUDE=${bzip2:location}/include
BZIP2_LIBPATH=${bzip2:location}/lib
ZLIB_INCLUDE=${zlib:location}/include
ZLIB_LIBPATH=${zlib:location}/lib
LZMA_INCLUDE=${xz-utils:location}/include
LZMA_LIBRARY_PATH=${xz-utils:location}/lib
\ No newline at end of file
......@@ -13,4 +13,4 @@ environment =
PATH=${sqlite3:location}/bin:%(PATH)s
CPPFLAGS=-I${openssl:location}/include -I${sqlite3:location}/include -I${libevent2:location}/include
CFLAGS=-I${libevent2:location}/include
LDFLAGS=-L${openssl:location}/lib -Wl,-rpath -Wl,${openssl:location}/lib -L${sqlite3:location}/lib -L${libevent2:location}/lib -Wl,-rpath -Wl,${libevent2:location}/lib
LDFLAGS=-L${openssl:location}/lib -Wl,-rpath -Wl,${openssl:location}/lib -L${sqlite3:location}/lib -Wl,-rpath -Wl,${sqlite3:location}/lib -L${libevent2:location}/lib -Wl,-rpath -Wl,${libevent2:location}/lib
......@@ -6,32 +6,23 @@ extends =
parts = libcap
[libcap2]
recipe = slapos.recipe.build
recipe = slapos.recipe.cmmi
shared = true
url = http://pkgs.fedoraproject.org/lookaside/pkgs/libcap/libcap-2.22.tar.bz2/ce64058bdb3f086ddbfca8ce6c919845/libcap-2.22.tar.bz2
md5sum = ce64058bdb3f086ddbfca8ce6c919845
attr-include = ${attr:location}/include/
attr-lib = ${attr:location}/lib/
slapos_promise =
directory:sbin
directory:include
statlib:lib/libcap.a
file:lib/libcap.so
file:sbin/getcap
file:sbin/setcap
install =
import os
url = self.download(options['url'], options['md5sum'])
extract_dir = self.extract(url)
workdir = guessworkdir(extract_dir)
cflags = '-I%(attr-include)s' % options
ldflags = '-L%(attr-lib)s -Wl,-rpath=%(attr-lib)s' % options
call(['make', 'CFLAGS=' + cflags, 'LDFLAGS=' + ldflags, 'DESTDIR=' + location, 'RAISE_SETFCAP=no', 'prefix=', 'install'],
cwd=workdir, env=self.environ)
lib64 = os.path.join(location, 'lib64')
lib = os.path.join(location, 'lib')
# XXX: Dirty if case
# if lib64 exists, then create a symlink from lib to lib64
os.path.exists(lib64) and os.symlink(lib64, lib)
location = @@LOCATION@@
configure-command = :
make-options =
RAISE_SETFCAP=no
prefix=${:location}
CFLAGS=-I${attr:location}/include/
LDFLAGS="-L${attr:location}/lib/ -Wl,-rpath=${attr:location}/lib/ -Wl,-rpath=${:location}/lib/"
install
# if lib64 exists, then create a symlink from lib to lib64
post-install =
cd ${:location}
[ -d lib64 ] && ln -s lib64 lib
[libcap]
<= libcap2
<= libcap2
\ No newline at end of file
......@@ -26,4 +26,4 @@ environment =
PATH=${cmake:location}/bin:%(PATH)s
CMAKE_INCLUDE_PATH=${zlib:location}/include:${bzip2:location}/include
CMAKE_LIBRARY_PATH=${zlib:location}/lib:${bzip2:location}/lib
LDFLAGS=-L${:location}/lib -Wl,-rpath=${:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
LDFLAGS=-L${:location}/lib -Wl,-rpath=${:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib
......@@ -5,6 +5,7 @@ parts =
[lz4]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/lz4/lz4/archive/v1.9.2.tar.gz
md5sum = 3898c56c82fb3d9455aefd48db48eaad
configure-command = true
......@@ -2,8 +2,9 @@
parts =
nano
extends =
extends =
../file/buildout.cfg
../zlib/buildout.cfg
../ncurses/buildout.cfg
[nano]
......@@ -17,8 +18,8 @@ location = @@LOCATION@@
environment=
PKG_CONFIG=false
NCURSESW_CONFIG=${ncurses:location}/bin/ncursesw6-config
CPPFLAGS=-I${file:location}/include
LDFLAGS=-L${file:location}/lib/ -Wl,-rpath=${file:location}/lib/
CPPFLAGS=-I${file:location}/include -I${zlib:location}/include
LDFLAGS=-L${file:location}/lib/ -Wl,-rpath=${file:location}/lib/ -L${zlib:location}/lib/ -Wl,-rpath=${zlib:location}/lib/
post-install =
cd ${:location} && mkdir etc &&
echo include "${:location}/share/nano/*.nanorc" > etc/nanorc
[buildout]
extends =
../zlib/buildout.cfg
parts = protobuf
[protobuf]
......@@ -6,9 +9,13 @@ recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/google/protobuf/releases/download/v3.4.0/protobuf-python-3.4.0.tar.gz
md5sum = 0820cc2e56d71aef8e99794fcbd184cd
environment =
LDFLAGS=-Wl,-rpath=${zlib:location}/lib
[protobuf-cpp]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/google/protobuf/releases/download/v3.4.0/protobuf-cpp-3.4.0.tar.gz
md5sum = 6d59dad503bea5ad420fd09ddad84481
environment =
LDFLAGS=-Wl,-rpath=${zlib:location}/lib
\ No newline at end of file
[buildout]
extends = ../zlib/buildout.cfg
extends =
../zlib/buildout.cfg
../xz-utils/buildout.cfg
../lz4/buildout.cfg
parts =
zstd
[zstd]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/facebook/zstd/releases/download/v${:version}/zstd-${:version}.tar.gz
version = 1.4.4
md5sum = 487f7ee1562dee7c1c8adf85e2a63df9
shared = true
location = @@LOCATION@@
configure-command = :
environment =
PREFIX=${:location}
LD_FLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
CFLAGS=-I${zlib:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${xz-utils:location}/lib -Wl,-rpath=${xz-utils:location}/lib -L${lz4:location}/lib -Wl,-rpath=${lz4:location}/lib
CFLAGS=-I${zlib:location}/include -I${xz-utils:location}/include -I${lz4:location}/include
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment