Bug #1055
closedstatic build produces dynamic executable
0%
Description
When configured for a static build (configure --disable-shared --enable-static), a dynamic executable is produced without error or warning. This is with current stable-1.4 branch on Fedora 23 x86_64.
$ git describe --all --long
heads/stable-1.4-0-g09c9a6e8d4ec
$ ./bootstrap && ./configure --disable-shared --enable-static
[ ... complete output attached ... ]
$ make
[ ... ]
$ file converter/babeltrace
converter/babeltrace: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=af3ef2edcc6d6475a1eacab62c1f7d1622a2133d, not stripped
$ rm converter/babeltrace && make V=1
/bin/sh ../libtool --tag=CC --mode=link gcc -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wall -Wformat -I../include -g -O2 -pthread -I/usr/include/uuid -Wl,--no-as-needed -o babeltrace babeltrace.o ../lib/libbabeltrace.la ../formats/ctf/libbabeltrace-ctf.la ../compat/libcompat.la ../formats/ctf-text/libbabeltrace-ctf-text.la ../formats/ctf-metadata/libbabeltrace-ctf-metadata.la ../formats/bt-dummy/libbabeltrace-dummy.la ../formats/lttng-live/libbabeltrace-lttng-live.la ../lib/libdebug-info.la -ldw -lelf -lpopt -luuid -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0
libtool: link: gcc -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wall -Wformat -I../include -g -O2 -pthread -I/usr/include/uuid -Wl,--no-as-needed -o babeltrace babeltrace.o -Wl,--export-dynamic -pthread ../lib/.libs/libbabeltrace.a ../formats/ctf/.libs/libbabeltrace-ctf.a ../compat/.libs/libcompat.a ../formats/ctf-text/.libs/libbabeltrace-ctf-text.a /home/nathanl/src/babeltrace/formats/ctf/.libs/libbabeltrace-ctf.a ../formats/ctf-metadata/.libs/libbabeltrace-ctf-metadata.a ../formats/bt-dummy/.libs/libbabeltrace-dummy.a ../formats/lttng-live/.libs/libbabeltrace-lttng-live.a ../lib/.libs/libdebug-info.a /home/nathanl/src/babeltrace/lib/.libs/libbabeltrace.a -ldw -lelf -lpopt -luuid -lgmodule-2.0 -lglib-2.0 -pthread
I think the LTTng CI is seeing this too; see for example:
Files