http://www.politiker-stopp.de/gfx/politiker-stopp-print.png

Benjamin Schieder

FINDUTILS BREAKS WHEN LINKING IT STATICALLY TO GLIBC

2006 January 31 | 0 comments

I'm currently busy creating the next version of LVP and during that I noticed that findutils 4.2.26 breaks when linking it statically to glibc 2.3.6 with the following error:


i386-unknown-linux-gnu-gcc-34 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o find find.o fstype.o parser.o pred.o tree.o util.o version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a
pred.o: In function `pred_nogroup':pred.c:(.text+0x7b9): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
parser.o: In function `parse_group':parser.c:(.text+0x355): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
:parser.c:(.text+0x35c): warning: Using 'endgrent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
parser.o: In function `parse_user':parser.c:(.text+0xc85): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
pred.o: In function `pred_nouser':pred.c:(.text+0x7d2): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
parser.o: In function `parse_user':parser.c:(.text+0xc8c): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/src/lvp_0.5.2-dev/build/generic-TRUNK-x86-lvp/ROCK/tools.cross/i386-unknown-linux-gnu/lib/libc.a(regex.o):(.rodata+0x0): multiple definition of `__re_error_msgid_idx'
../gnulib/lib/libgnulib.a(regex.o):(.rodata+0x0): first defined here
/usr/src/lvp_0.5.2-dev/build/generic-TRUNK-x86-lvp/ROCK/tools.cross/i386-unknown-linux-gnu/lib/libc.a(regex.o):(.rodata+0x60): multiple definition of `__re_error_msgid'
../gnulib/lib/libgnulib.a(regex.o):(.rodata+0x60): first defined here
collect2: ld returned 1 exit status
make[3]: *** [find] Error 1
make[3]: Leaving directory `/usr/src/lvp_0.5.2-dev/src.findutils.1138697359.24411.3717604258/findutils-4.2.24/find'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/lvp_0.5.2-dev/src.findutils.1138697359.24411.3717604258/findutils-4.2.24/find'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/lvp_0.5.2-dev/src.findutils.1138697359.24411.3717604258/findutils-4.2.24'
make: *** [all] Error 2

After some short investigation I came up with this patch to fix it. It's not beautiful, but it works.

EOF

Category: blog

Tags:


Post a comment

All comments are held for moderation; basic HTML formatting is accepted.

Name: (required)
E-mail: (required, not published)
Website: (optional)
Comment: