build issue with out-of-tree builds and multiple mounts
Hi!
I'm trying to do a out-of-tree build of DPDK 2.0.0 (with make -C and O=), but failing with errors such as
In file included from
[...]/lib/librte_eal/common/include/rte_eal_memconfig.h:40:0,
[...]
rte_malloc_heap.h:39:26: fatal error: rte_spinlock.h: No such file or
directory
Looking in the include/ directory in my build directory, I see a lot of invalid symlinks to things like rte_spinlock.h:
lrwxrwxrwx 1 ska users 99 May 4 14:33 rte_spinlock.h ->
../[...]/dpdk/lib/librte_eal/common/include/arch/x86/rte_spinlock.h
and I believe that this is caused by my use of multiple mounts: I have my home directory and the source code on NFS, while the build directory is on local disk (under a build/-symlink from my home directory). So using ../ relative to the build directory will actually end up on the local disk, and not work.
I guess it should be possible to workaround this by building somewhere else, but perhaps there is some patch to be made in mk/? Any pointer to where to look?
// Simon
A message that is not in the archive (sent off-list or not yet received): 55476941.3030202-vI6UBbBVNY+JA8cjQkG2/[email protected]
Hi Simon,
Quoted 11 lines · Simon Kågström
Hi!
I'm trying to do a out-of-tree build of DPDK 2.0.0 (with make -C and O=), but failing with errors such as
In file included from
[...]/lib/librte_eal/common/include/rte_eal_memconfig.h:40:0,
[...]
rte_malloc_heap.h:39:26: fatal error:rte_spinlock.h: No such file or
directory
Quoted 5 lines
Looking in the
include/directory in my build directory, I see a lot of invalid symlinks to things likerte_spinlock.h:lrwxrwxrwx 1 ska users 99 May 4 14:33
rte_spinlock.h->
../[...]/dpdk/lib/librte_eal/common/include/arch/x86/rte_spinlock.h
Can you please send the full make command line that produces this issue?
Thanks,
Olivier
Quoted 14 lines
and I believe that this is caused by my use of multiple mounts: I have my home directory and the source code on NFS, while the build directory is on local disk (under a build/-symlink from my home directory). So using ../ relative to the build directory will actually end up on the local disk, and not work.
I guess it should be possible to workaround this by building somewhere else, but perhaps there is some patch to be made in mk/? Any pointer to where to look?
// Simon
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 14 lines · Olivier MATZ
Hi Simon,
Quoted 11 lines · Simon Kågström
Hi!
I'm trying to do a out-of-tree build of DPDK 2.0.0 (with make -C and O=), but failing with errors such as
In file included from
[...]/lib/librte_eal/common/include/rte_eal_memconfig.h:40:0,
[...]
rte_malloc_heap.h:39:26: fatal error:rte_spinlock.h: No such file or
directory
Quoted 8 lines
Quoted 5 lines
Looking in the
include/directory in my build directory, I see a lot of invalid symlinks to things likerte_spinlock.h:lrwxrwxrwx 1 ska users 99 May 4 14:33
rte_spinlock.h->
../[...]/dpdk/lib/librte_eal/common/include/arch/x86/rte_spinlock.hCan you please send the full make command line that produces this issue?
make -C /home/ska/devel/dpdk EXTRA_CFLAGS="-g -O0"
RTE_KERNELDIR=/tmp/ubuntu-14.04/usr/src/linux-headers-3.13.0-51-generic O=/home/ska/build/dpdk T=x86_64-default-linuxapp-gcc V=1
The config step works fine, but it fails on this step.
/home/ska
is mounted on NFS, and
/home/ska/build
is a symlink to
/lhome/ska/build
It appears to work if I build outside the symlink, i.e.., build with O=/lhome/ska/build/... instead.
// Simon
A message that is not in the archive (sent off-list or not yet received): 55476C37.8050702-vI6UBbBVNY+JA8cjQkG2/[email protected]
PATCH 1/1 scripts: fix relpath.sh output when build dir is a symlink
The script relpath.sh return the relative path of the first directory from the second directory. It is used to generate relative symlinks, which can be useful if the build directory is embedded in the dpdk
directory: the whole dpdk can be moved without breaking the links, which is helpful for an installation.
In case the build directory is a symlink, the script was not generating the proper relative path. Fix this by calling "readlink -f" on the arguments.
--- scripts/relpath.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
scripts/relpath.sh +7 -2
@@ -43,8 +43,13 @@ if [ $# -ne 2 ]; then exit 1 fi -REL1=${1#/} -REL2=${2#/} +# get the real absolute path, derefencing symlinks +ABS1=$(readlink -f $1) +ABS2=$(readlink -f $2) + +# remove leading slash +REL1=${ABS1#/} +REL2=${ABS2#/} left1=${REL1%%/*} right1=${REL1#*/}
Signature · 1 line
2.1.4
A message that is not in the archive (sent off-list or not yet received): 1430816409-6773-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org
Re: [PATCH] scripts: fix relpath.sh output when build dir is a symlink
Hi Simon,
Quoted 11 lines · Olivier Matz
The script
relpath.shreturn the relative path of the first directory from the second directory. It is used to generate relative symlinks, which can be useful if the build directory is embedded in the dpdk
directory: the whole dpdk can be moved without breaking the links, which is helpful for an installation.In case the build directory is a symlink, the script was not generating the proper relative path. Fix this by calling "readlink -f" on the arguments.
Signed-off-by Olivier Matz <[email protected]>
Can you have a try with this patch?
Regards,
Olivier
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH] scripts: fix relpath.sh output when build dir is a symlink
Quoted 7 lines · Olivier MATZ
Quoted 6 lines · Olivier Matz
The script
relpath.shreturn the relative path of the first directory from the second directory. It is used to generate relative symlinks, which can be useful if the build directory is embedded in the dpdk
directory: the whole dpdk can be moved without breaking the links, which is helpful for an installation.
Quoted 5 lines
Quoted 3 lines
In case the build directory is a symlink, the script was not generating the proper relative path. Fix this by calling "readlink -f" on the arguments.
Can you have a try with this patch?
Yes, this fixes my build issue, thanks!
// Simon
Thomas Monjalon
AppliedRe: [PATCH] scripts: fix relpath.sh output when build dir is a symlink
2015-05-05 11:14, Simon Kågström:
Quoted 12 lines · Olivier MATZ
Quoted 11 lines · Olivier Matz
Quoted 9 lines
The script
relpath.shreturn the relative path of the first directory from the second directory. It is used to generate relative symlinks, which can be useful if the build directory is embedded in the dpdk
directory: the whole dpdk can be moved without breaking the links, which is helpful for an installation.In case the build directory is a symlink, the script was not generating the proper relative path. Fix this by calling "readlink -f" on the arguments.
Quoted 5 lines
Quoted 1 line
Can you have a try with this patch?
Yes, this fixes my build issue, thanks!
Verified-by Simon Kagstrom <[email protected]>
Applied, thanks