On Thu, Jan 12, 2017 at 12:34 PM, Jon Loeliger <[email protected]> wrote:

>
>
> So, this is classically some form of library location using some
> combination of -L, -l, rpath, DESTDIR-style options.  Another
> classic issue might be ld config related.  The other option that
> I think might be at work here is that it is timing related due to
> the use of -j and parallel builds.  Timing could be different on
> computers with different CPU abilities; specifically the library
> might not actually be available at the requested link time.
>
> Dunno.
>
> Yet.
>

OK.  I hacked VPP's makefile to limit all builds to be done serially.
No -j anywhere in the picture.

Once linearized, it is pretty clear to see this failure:
make[5]: Entering directory `/home/jdl/workspace/vpp/
build-root/build-vpp-native/vpp'
 /usr/bin/mkdir -p '/home/jdl/workspace/vpp/build-root/install-vpp-native/
vpp/lib64'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libsvm.la
libsvmdb.la libvlib.la libvlibapi.la libvlibmemory.la libvlibmemoryclient.la
libvlibsocket.la libvatplugin.la '/home/jdl/workspace/vpp/
build-root/install-vpp-native/vpp/lib64'
libtool: install: warning: relinking `libsvm.la'
libtool: install: (cd /home/jdl/workspace/vpp/build-root/build-vpp-native/vpp;
/bin/sh /home/jdl/workspace/vpp/build-root/build-vpp-native/vpp/libtool
 --silent --tag CC --mode=relink gcc -Wall -g -O2 -DFORTIFY_SOURCE=2
-march=corei7 -mtune=corei7-avx -fstack-protector -fPIC -Werror -g -O2
-DFORTIFY_SOURCE=2 -march=corei7 -mtune=corei7-avx -fstack-protector -fPIC
-Werror -L/home/jdl/workspace/vpp/build-root/install-vpp-native/dpdk/lib
-Wl,-rpath -Wl,/home/jdl/workspace/vpp/build-root/install-vpp-native/dpdk/lib
-o libsvm.la -rpath /home/jdl/workspace/vpp/build-
root/install-vpp-native/vpp/lib64 svm/svm.lo svm/ssvm.lo libvppinfra.la
-lrt -lpthread )
/usr/bin/ld: cannot find -lvppinfra
collect2: error: ld returned 1 exit status
libtool: install: error: relink `libsvm.la' with the above command before
installing it
make[5]: *** [install-libLTLIBRARIES] Error 1
make[5]: Leaving directory `/home/jdl/workspace/vpp/
build-root/build-vpp-native/vpp'
make[4]: *** [install-am] Error 2
make[4]: Leaving directory `/home/jdl/workspace/vpp/
build-root/build-vpp-native/vpp'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/jdl/workspace/vpp/
build-root/build-vpp-native/vpp'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/home/jdl/workspace/vpp/
build-root/build-vpp-native/vpp'
make[1]: *** [vpp-install] Error 2
make[1]: Leaving directory `/home/jdl/workspace/vpp/build-root'
make: *** [build-release] Error 2


So, this:

jdl@localhost $ pwd
/home/jdl/workspace/vpp

jdl@localhost $ find . -name libvppinfra\*
./build-root/build-tool-native/tools/.libs/libvppinfra.so.0.0.0
./build-root/build-tool-native/tools/.libs/libvppinfra.so.0
./build-root/build-tool-native/tools/.libs/libvppinfra.so
./build-root/build-tool-native/tools/.libs/libvppinfra.a
./build-root/build-tool-native/tools/.libs/libvppinfra.lai
./build-root/build-tool-native/tools/.libs/libvppinfra.la
./build-root/build-tool-native/tools/libvppinfra.la
./build-root/tools/lib64/libvppinfra.so.0.0.0
./build-root/tools/lib64/libvppinfra.so.0
./build-root/tools/lib64/libvppinfra.so
./build-root/tools/lib64/libvppinfra.la
./build-root/tools/lib64/libvppinfra.a
./build-root/build-vpp-native/vpp/.libs/libvppinfra.so.0.0.0
./build-root/build-vpp-native/vpp/.libs/libvppinfra.so.0
./build-root/build-vpp-native/vpp/.libs/libvppinfra.so
./build-root/build-vpp-native/vpp/.libs/libvppinfra.a
./build-root/build-vpp-native/vpp/.libs/libvppinfra.lai
./build-root/build-vpp-native/vpp/.libs/libvppinfra.la
./build-root/build-vpp-native/vpp/libvppinfra.la

And looking at that last link line with libtool:

libtool: install: (cd /home/jdl/workspace/vpp/build-root/build-vpp-native/vpp;
/bin/sh /home/jdl/workspace/vpp/build-root/build-vpp-native/vpp/libtool
 --silent --tag CC --mode=relink gcc -Wall -g -O2 -DFORTIFY_SOURCE=2
-march=corei7 -mtune=corei7-avx -fstack-protector -fPIC -Werror -g -O2
-DFORTIFY_SOURCE=2 -march=corei7 -mtune=corei7-avx -fstack-protector -fPIC
-Werror -L/home/jdl/workspace/vpp/build-root/install-vpp-native/dpdk/lib
-Wl,-rpath -Wl,/home/jdl/workspace/vpp/build-root/install-vpp-native/dpdk/lib
-o libsvm.la -rpath /home/jdl/workspace/vpp/build-
root/install-vpp-native/vpp/lib64 svm/svm.lo svm/ssvm.lo libvppinfra.la
-lrt -lpthread )

Separate out the library crude for readability:

-L/home/jdl/workspace/vpp/build-root/install-vpp-native/dpdk/lib
-Wl,-rpath
-Wl,/home/jdl/workspace/vpp/build-root/install-vpp-native/dpdk/lib
 -o libsvm.la
 -rpath /home/jdl/workspace/vpp/build-root/install-vpp-native/vpp/lib64
 svm/svm.lo
 svm/ssvm.lo
 libvppinfra.la
 -lrt
 -lpthread

Where is that -lvppinfra supposed to come from?

Thanks,
jdl
_______________________________________________
vpp-dev mailing list
[email protected]
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to