1 stop scons trying to create directories in hosts rootfs
3 * since 1522f09a4d serf: cleanup recipe
4 serf.do_install fails in builds with multilib enabled (with
5 libdir=/usr/lib64 on host where /usr/lib64 doesn't exist)
7 DEBUG: Executing shell function do_install
8 scons: Reading SConscript files ...
9 PermissionError: [Errno 13] Permission denied: '/usr/lib64':
10 File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 158:
12 File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Environment.py", line 965:
13 variables.Update(self)
14 File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/__init__.py", line 227:
15 option.validator(option.key, env.subst('${%s}'%option.key), env)
16 File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 60:
17 return PathVariable.PathIsDirCreate(key, val, env)
18 File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/PathVariable.py", line 101:
20 File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/lib/python3.7/os.py", line 221:
22 ERROR: scons install execution failed.
24 * I don't know how exactly --install-sandbox is supposed to work but
25 in this case it's trying to mkdir /usr/lib64 on the host rootfs
26 which is clearly wrong and if I set LIBDIR together with
27 --install-sandbox then the install paths are prefixed with $D twice
28 in some cases (not for includedir and empty libdir at the end).
29 So in the end I think it was an issue caused by the custom path
30 validator in serf's SConstruct, removing that stops touching host
31 and the installed paths (including the paths inside libserf*.pc)
34 Upstream-Status: Pending
36 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
38 --- serf-1.3.9/SConstruct 2019-06-18 15:49:19.968961108 +0000
39 +++ serf-1.3.9b/SConstruct 2019-06-18 18:53:21.412337151 +0000
42 return (key, '%s' % (help), default, None, lambda val: _converter(val))
44 -# Custom path validator, creates directory when a specified option is set.
45 -# To be used to ensure a PREFIX directory is only created when installing.
46 -def createPathIsDirCreateWithTarget(target):
47 - def my_validator(key, val, env):
48 - build_targets = (map(str, BUILD_TARGETS))
49 - if target in build_targets:
50 - return PathVariable.PathIsDirCreate(key, val, env)
52 - return PathVariable.PathAccept(key, val, env)
56 if sys.platform == 'win32':
59 PathVariable('PREFIX',
60 'Directory to install under',
62 - createPathIsDirCreateWithTarget('install')),
63 + PathVariable.PathAccept),
64 PathVariable('LIBDIR',
65 'Directory to install architecture dependent libraries under',
67 - createPathIsDirCreateWithTarget('install')),
68 + PathVariable.PathAccept),
70 "Path to apr-1-config, or to APR's install area",