IRATI / stack

RINA implementation for OS/Linux
http://irati.github.io/stack
73 stars 39 forks source link

stack build fails on latest Raspbian (Buster based), caused by library build problem #1337

Open TRIA opened 4 years ago

TRIA commented 4 years ago

When attempting to build the stack on the most recent Raspberry Pi Raspbian Buster on a Pi4, the build fails. The cause is that the Makefile for iporinad calls for a library -liporina that it has not built. Details of key differences below.

The config.log file from the stack/build/rina-tools directory and the Makefile from the stack/build/rina-tools/src/rlite directory for the 3 systems (tagged with raz1 for Jesse, raz4 for Buster, and ubuntu for Ubuntu 18.04) are attached in a zip file. logs.zip Also attached is the configure/make install output log for the Raspberry Pi Buster system for the failed build. configlog.txt

Note that there are differences in the automake tools in Buster vs. older releases, and in Ubuntu 18.04 that might be relevant: Raspbian Jesse: automake (GNU automake) 1.14.1 libtool (GNU libtool) 2.4.2 autoconf (GNU Autoconf) 2.69 Ubuntu 18.04: automake (GNU automake) 1.15.1 libtool (GNU libtool) 2.4.6 autoconf (GNU Autoconf) 2.69 Raspbian Buster: automake (GNU automake) 1.16.1 libtool (GNU libtool) 2.4.6 autoconf (GNU Autoconf) 2.69

This hints that automake changes might be causing this, or there could be some other system difference (e.g., linker options?) detected by configure? Or perhaps a missing (implicit) dependency in the makefile templates that didn't matter before?
Updates to automake: 1.15.x -> 1.16 https://lists.gnu.org/archive/html/info-gnu/2018-02/msg00008.html 1.16 -> 1.16.1 https://lists.gnu.org/archive/html/info-gnu/2018-03/msg00002.html_ Nothing glaring to me in the list.

The built Makefiles are different, as noted below in the description of what each does. The following are copied from build logs. See attached files for further information.

This is the failure observed on Raspbian Buster:

/bin/bash ../../libtool --tag=CXX --mode=link g++ -g -O2 -o iporinad iporinad-iporinad.o iporinad-fdfwd.o iporinad-cdap.o -L/usr/irati/lib -lrina-api -lrina -lprotobuf -pthread -liporina libtool: link: g++ -g -O2 -o iporinad iporinad-iporinad.o iporinad-fdfwd.o iporinad-cdap.o -pthread -L/usr/irati/lib /usr/irati/lib/librina-api.so /usr/irati/lib/librina.so -lprotobuf -liporina -pthread -Wl,-rpath -Wl,/usr/irati/lib -Wl,-rpath -Wl,/usr/irati/lib /usr/bin/ld: cannot find -liporina collect2: error: ld returned 1 exit status

There has been no attempt to build the library iporina by that point, so the build fails.

When building successfully on other releases (this is from Raspbian jessie), the corresponding line looked like this:

/bin/bash ../../libtool --tag=CXX --mode=link g++ -g -O2 -o iporinad iporinad-iporinad.o iporinad-fdfwd.o iporinad-cdap.o -L/usr/local/irati/lib -lrina-api -lrina -lprotobuf -pthread -lpthread -liporina libtool: link: g++ -g -O2 -o iporinad iporinad-iporinad.o iporinad-fdfwd.o iporinad-cdap.o -pthread -L/usr/local/irati/lib /usr/local/irati/lib/librina-api.so /usr/local/irati/lib/librina.so -lprotobuf -lpthread /stack/build/rina-tools/src/rlite/.libs/libiporina.a -pthread -Wl,-rpath -Wl,/usr/local/irati/lib -Wl,-rpath -Wl,/usr/local/irati/lib

Note that in those successful builds, the library /stack/build/rina-tools/src/rlite/.libs/libiporina.a was built earlier in the makefile, and libtool picked up that it had been created, and resolved -liporina to that library reference. The library was built here:

_make install-am make[5]: Entering directory '/stack/build/rina-tools/src/rlite' /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/stack/rina-tools/src/rlite -I../../src -I./.. -I/stack/rina-tools/src/rlite/.. -Wno-unused-local-typedefs -Wall -Wformat -Wnon-virtual-dtor -Woverloaded-virtual -Werror -Wfatal-errors -g -O0 -fno-inline -g -O2 -MT libiporina_la-iporina.pb.lo -MD -MP -MF .deps/libiporina_la-iporina.pb.Tpo -c -o libiporina_la-iporina.pb.lo test -f 'iporina.pb.cc' || echo '/stack/rina-tools/src/rlite/'iporina.pb.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/stack/rina-tools/src/rlite -I../../src -I./.. -I/stack/rina-tools/src/rlite/.. -Wno-unused-local-typedefs -Wall -Wformat -Wnon-virtual-dtor -Woverloaded-virtual -Werror -Wfatal-errors -g -O0 -fno-inline -g -O2 -MT libiporina_la-iporina.pb.lo -MD -MP -MF .deps/libiporina_la-iporina.pb.Tpo -c iporina.pb.cc -fPIC -DPIC -o .libs/libiporina_la-iporina.pb.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/stack/rina-tools/src/rlite -I../../src -I./.. -I/stack/rina-tools/src/rlite/.. -Wno-unused-local-typedefs -Wall -Wformat -Wnon-virtual-dtor -Woverloaded-virtual -Werror -Wfatal-errors -g -O0 -fno-inline -g -O2 -MT libiporina_la-iporina.pb.lo -MD -MP -MF .deps/libiporina_la-iporina.pb.Tpo -c iporina.pb.cc -o libiporina_la-iporina.pb.o >/dev/null 2>&1 mv -f .deps/libiporina_la-iporina.pb.Tpo .deps/libiporina_la-iporina.pb.Plo /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/stack/rina-tools/src/rlite -I../../src -I./.. -I/stack/rina-tools/src/rlite/.. -Wno-unused-local-typedefs -Wall -Wformat -Wnon-virtual-dtor -Woverloaded-virtual -Werror -Wfatal-errors -g -O0 -fno-inline -g -O2 -MT libiporina_la-CDAP.pb.lo -MD -MP -MF .deps/libiporina_la-CDAP.pb.Tpo -c -o libiporina_la-CDAP.pb.lo test -f 'CDAP.pb.cc' || echo '/stack/rina-tools/src/rlite/'CDAP.pb.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/stack/rina-tools/src/rlite -I../../src -I./.. -I/stack/rina-tools/src/rlite/.. -Wno-unused-local-typedefs -Wall -Wformat -Wnon-virtual-dtor -Woverloaded-virtual -Werror -Wfatal-errors -g -O0 -fno-inline -g -O2 -MT libiporina_la-CDAP.pb.lo -MD -MP -MF .deps/libiporina_la-CDAP.pb.Tpo -c CDAP.pb.cc -fPIC -DPIC -o .libs/libiporina_la-CDAP.pb.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/stack/rina-tools/src/rlite -I../../src -I./.. -I/stack/rina-tools/src/rlite/.. -Wno-unused-local-typedefs -Wall -Wformat -Wnon-virtual-dtor -Woverloaded-virtual -Werror -Wfatal-errors -g -O0 -fno-inline -g -O2 -MT libiporina_la-CDAP.pb.lo -MD -MP -MF .deps/libiporina_la-CDAP.pb.Tpo -c CDAP.pb.cc -o libiporina_la-CDAP.pb.o >/dev/null 2>&1 mv -f .deps/libiporina_la-CDAP.pb.Tpo .deps/libiporina_la-CDAP.pb.Plo /bin/bash ../../libtool --tag=CXX --mode=link g++ -g -O2 -o libiporina.la libiporina_la-iporina.pb.lo libiporina_la-CDAP.pb.lo
libtool: link: ar cru .libs/libiporina.a .libs/libiporina_la-iporina.pb.o .libs/libiporinala-CDAP.pb.o libtool: link: ranlib .libs/libiporina.a