[opensuse] problem with static linking. of util-linux utils meant to be statically linkable...
Was trying the rc1 version of util-linux 2.33, and it has an option to link several of its utils statically. It works for the maintainer on redhat, and I was wondering why I'm having problems on opensuse...
$ ./configure --enable-static-programs=mount,umount $ make mount.static umount.static .....
so I see... Except I got: CC sys-utils/mount_static-mount.o CCLD mount.static libtool: warning: complete static linking is impossible in this configuration /usr/bin/ld: total time in link: 0.038189 CC sys-utils/umount_static-umount.o CCLD umount.static libtool: warning: complete static linking is impossible in this configuration /usr/bin/ld: total time in link: 0.039017 with ldd: Ishtar:tools/util-linux/util-linux-2.33-rc1> ldd mount.static linux-vdso.so.1 (0x00007ffc38d78000) librt.so.1 => /lib64/librt.so.1 (0x0000003001c00000) libc.so.6 => /lib64/libc.so.6 (0x0000003000800000) libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003000c00000) /lib64/ld-linux-x86-64.so.2 (0x00007f81b9262000) So why would it work on redhat but not opensuse? Any ideas? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
So I should file this as a bug against factory or tumbleweed? There was some disagreement about whether or not they should be treated the same? Because these utils 'should' be statically linkable and *are* on redhat (which I thought opensuse was based on). So how did static linking get broken for us but still work for redhat? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
07.10.2018 00:44, Linda Walsh пишет:
So I should file this as a bug against factory or tumbleweed? There was some disagreement about whether or not they should be treated the same?
For a start you should install glibc-devel-static or at least make it clear that you are aware of its existence, have installed it and it did not help.
Because these utils 'should' be statically linkable and *are* on redhat (which I thought opensuse was based on). So how did static linking get broken for us but still work for redhat?
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 10/6/2018 10:08 PM, Andrei Borzenkov wrote:
07.10.2018 00:44, Linda Walsh пишет:
So I should file this as a bug against factory or tumbleweed? There was some disagreement about whether or not they should be treated the same?
For a start you should install glibc-devel-static or at least make it clear that you are aware of its existence, have installed it and it did not help.
Sorry didn't forward this earlier. Was a bit put off by some bad attitude -- so far as to even call repetition of RedHat maintainer's, Karel Zak, confirming that his mount.static was indeed "fully static", as "fake news" (it did give warnings similar to those posted in os-fctry: ( ex: /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld:
./.libs/libmount.a(libmount_la-utils.o): in function `mnt_get_gid': /dev/shm/util-linux-2.33-rc1/libmount/src/utils.c:614: warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ) but still linked down to 1 binary w/no runtime libs needed.
Anyway, didn't feel like feeding the troll(s) so was going to wait until I had more information -- but did decide to forward the below from a few days ago. I suppose it might be of interest that 'gcc8' *doesn't* give the warnings about the config disallowing a fully static link (nor the other warnings as in the above example), yet still creates a non-static binary. -l -------- Original Message -------- Subject: Re: [ANNOUNCE] util-linux v2.33-rc1 Date: Sun, 07 Oct 2018 09:58:36 -0700 From: L A Walsh To: Bernhard Voelker CC: Karel Zak util-linux On 10/7/2018 7:57 AM, Bernhard Voelker wrote:
$ zypper install glibc-devel-static
make V=1 mount.static /bin/sh ./libtool --tag=CC --mode=link /usr/bin/gcc -fsigned-char -fno-common -Wall -Werror=sequence-point -Wextra -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wno-missing-field-initializers -Wredundant-decls -Wsign-compare -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Wnested-externs -Wpointer-arith -Wstrict-prototypes -Wimplicit-function-declaration -Wdiscarded-qualifiers -I./libmount/src -fpic -march=native -pipe -O2 -all-static -fpic -march=native -pipe -O2 -Wl,--stats -o mount.static sys-utils/mount_static-mount.o
---- Already had 2.27-4.1 installed, which I just bumped to 2.27-6.1. Same problem, unfortunately. *sigh* libcommon.la libmount.la libtool: warning: complete static linking is impossible in this configuration libtool: link: /usr/bin/gcc -fsigned-char -fno-common -Wall -Werror=sequence-point -Wextra -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wno-missing-field-initializers -Wredundant-decls -Wsign-compare -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Wnested-externs -Wpointer-arith -Wstrict-prototypes -Wimplicit-function-declaration -Wdiscarded-qualifiers -I./libmount/src -fpic -march=native -pipe -O2 -fpic -march=native -pipe -O2 -Wl,--stats -o mount.static sys-utils/mount_static-mount.o ./.libs/libcommon.a ./.libs/libmount.a /home/tools/util-linux/util-linux-2.33-rc1/.libs/libblkid.a /home/tools/util-linux/util-linux-2.33-rc1/.libs/libuuid.a -lrt /usr/bin/ld: total time in link: 0.038702 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Andrei Borzenkov
-
L A Walsh
-
Linda Walsh