tango-controls/TangoTickets

tango_admin does not compile on Debian i386 architecture

sblanchet opened this issue · 4 comments

Tango-9.2.5a does not compile on Debian 9.5-i386.
There is a problem when linking tango_admin because __i686.get_pc_thunk.bx is missing.

Error message on Debian 9.5-i386

Making all in tango_admin
make[3]: Entering directory '/root/tango-9.2.5a/utils/tango_admin'
g++ -DHAVE_CONFIG_H -I. -I../..  -I../../lib/cpp/client -I../../lib/cpp/server -I/usr/local/include -I../../lib/cpp/log4tango/include -I../../lib/cpp/server -I../../lib/cpp/log4tango/include  -I/usr/local/include   -g -O2   -D_REENTRANT -DOMNI_UNLOADABLE_STUBS -MT tango_admin.o -MD -MP -MF .deps/tango_admin.Tpo -c -o tango_admin.o tango_admin.cpp
mv -f .deps/tango_admin.Tpo .deps/tango_admin.Po
/bin/bash ../../libtool  --tag=CXX   --mode=link g++  -g -O2   -D_REENTRANT -DOMNI_UNLOADABLE_STUBS   -o tango_admin tango_admin.o anyoption.o -L../../lib/cpp/client -ltango -L../../lib/cpp/log4tango/src -llog4tango -lzmq -lpthread -lnsl -ldl -L/usr/local/lib/* -lomniORB4 -lomniDynamic4 -lCOS4  -lpthread -lomnithread -lnsl -L/usr/local/lib/*  -lpthread -lomnithread -lpthread
libtool: link: g++ -g -O2 -D_REENTRANT -DOMNI_UNLOADABLE_STUBS -o .libs/tango_admin tango_admin.o anyoption.o  -L../../lib/cpp/client /root/tango-9.2.5a/lib/cpp/client/.libs/libtango.so -L../../lib/cpp/log4tango/src /root/tango-9.2.5a/lib/cpp/log4tango/src/.libs/liblog4tango.so -lzmq -ldl -L/usr/local/lib/* -lomniORB4 -lomniDynamic4 -lCOS4 -lnsl -lomnithread -lpthread
/root/tango-9.2.5a/lib/cpp/client/.libs/libtango.so: undefined reference to `__i686.get_pc_thunk.bx'
collect2: error: ld returned 1 exit status
Makefile:429: recipe for target 'tango_admin' failed
make[3]: *** [tango_admin] Error 1
make[3]: Leaving directory '/root/tango-9.2.5a/utils/tango_admin'

Steps to reproduce

wget ftp://ftp.esrf.eu/pub/cs/tango/tango-9.2.5a.tar.gz
tar xf tango-9.2.5a.tar.gz
cd tango-9.2.5a
./configure --disable-silent-rules
make

I use --disable-silent-rules to have a full error message when linking fails.

Compiler information Debian 9.5-i386

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18+deb9u1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=i686-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-i386/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-i386 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-i386 --with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-targets=all --enable-multiarch --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)```

The problem occurs also on Debian 8.11-i386.

A similar issue happened in 2012 with Tango-8.0.5.
But the trick with configure --disable-jpegmmx does not work this time.

Hi Sébastien,
Thanks for the bug report.
Are you sure you cleaned up the code correctly before trying with configure --disable-jpegmmx?
Can you try to do the following please?:

wget ftp://ftp.esrf.eu/pub/cs/tango/tango-9.2.5a.tar.gz
tar xf tango-9.2.5a.tar.gz
cd tango-9.2.5a
mkdir build
cd build
../configure --disable-silent-rules --disable-jpegmmx
make

jpeg_dct_mmx.cpp is as far as I know the only file containing a call to __i686.get_pc_thunk.bx so if you use configure with --disable-jpegmmx, this file should not be compiled and you should not get the error.

You are right: I had not cleaned up the code before trying with configure --disable-jpegmmx .
If I start a fresh build with the instructions below, Tango compiles without error.

Good news! Thanks for the feedback!