[opensuse-factory] Fwd: Bug? Re: problem with static linking. of util-linux utils meant to be statically linkable...
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? -------- Original Message -------- Subject: problem with static linking. of util-linux utils meant to be statically linkable... Date: Sat, 06 Oct 2018 12:30:59 -0700 From: L A Walsh <suse@tlinx.org> To: SuSE Linux <opensuse@opensuse.org> 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-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Sat, Oct 6, 2018 at 6:17 PM L A Walsh <suse@tlinx.org> wrote:
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?
This is a bug against Factory, but for reference: Factory and Tumbleweed are one and 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?
While it is true that SuSE Linux was very similar to Red Hat Linux (and openSUSE today is somewhat similar to Fedora), there is technically no common ancestry. SuSE Linux (which is the common ancestor of openSUSE and SUSE Linux Enterprise) is technically a derivative of Slackware. Over the course of the 90s, SuSE adopted many characteristics from Red Hat Linux (including the RPM package manager, then known as the Red Hat Package Manager), which led to the relatively compatible platform setup. There is some collaboration today between Fedora and openSUSE as we're both friends, but there are definitely differences in the platforms. Unfortunately, I'm not sure what causes your specific problem, though I can say that the openSUSE packaging for this is much more complex than the Fedora one. That makes it harder for me to pin down what's going wrong. It's probably something to do with the different compile flags. There may be a subtle incompatibility in the default openSUSE flags breaking static compilation. -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am 07.10.18 um 04:07 schrieb Neal Gompa:
Unfortunately, I'm not sure what causes your specific problem, though
Linda's setup is broken, it works just fine for me on plain Factory/Tumbleweed. Of course, as we all know from her past report, Linda's setup probably has not much in common with a "plain Factory" setup.
I can say that the openSUSE packaging for this is much more complex than the Fedora one. That makes it harder for me to pin down what's going wrong. It's probably something to do with the different compile flags. There may be a subtle incompatibility in the default openSUSE flags breaking static compilation. The only thing I can imagine is a missing glibc-devel-static package, but OTOH I really cannot imagine Linda making such a simple mistake. It's not like she does not know how to do such things and a missing devel package is thus practically out of question. I'd guess she somehow tweaked / changed / improved compiler and binutils (the output is different than on my system...) and managed to sublty break it. -- Stefan Seyfried
"For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am 07.10.18 um 00:17 schrieb L A 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?
Tumbleweed == Factory.
Because these utils 'should' be statically linkable and *are* on redhat> (which I thought opensuse was based on).
Where do you get your alternative facts from?
So how did static linking get broken for us but still work for redhat?
It did not get broken. seife@strolchi:/dev/shm/util-linux-2.33-rc1> ./configure --enable-static-programs=mount,umount checking for gcc... gcc [...] checking if gcc static flag -static works... yes [...] checking whether to build shared libraries... yes checking whether to build static libraries... yes [...] configure: enable static build: mount. configure: enable static build: umount. [...] Type 'make' or 'make <utilname>' to compile. seife@strolchi:/dev/shm/util-linux-2.33-rc1> make -j8 mount.static \ umount.static CC lib/libuuid_la-randutils.lo CC lib/libuuid_la-md5.lo CC lib/libuuid_la-sha1.lo CC sys-utils/umount_static-umount.o CC sys-utils/mount_static-mount.o [...] CCLD libblkid.la copying selected object files to avoid basename conflicts... CCLD libmount.la CCLD mount.static CCLD umount.static /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 /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_uid': /dev/shm/util-linux-2.33-rc1/libmount/src/utils.c:587: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /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_username': /dev/shm/util-linux-2.33-rc1/libmount/src/utils.c:566: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /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 /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_uid': /dev/shm/util-linux-2.33-rc1/libmount/src/utils.c:587: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /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_username': /dev/shm/util-linux-2.33-rc1/libmount/src/utils.c:566: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking seife@strolchi:/dev/shm/util-linux-2.33-rc1> file mount.static mount.static: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=13f8198ac488c2c3f689c37a141adfbc63ec3af4, with debug_info, not stripped seife@strolchi:/dev/shm/util-linux-2.33-rc1> ldd mount.static not a dynamic executable The bug is thus "RESOLVED WORKSFORME"
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
ld is not giving this output for me, do you use some strange options that might interfere?
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?
You are doing it wrong. -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Sun, Oct 07, Stefan Seyfried wrote:
/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 /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_uid': /dev/shm/util-linux-2.33-rc1/libmount/src/utils.c:587: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /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_username': /dev/shm/util-linux-2.33-rc1/libmount/src/utils.c:566: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /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 /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_uid': /dev/shm/util-linux-2.33-rc1/libmount/src/utils.c:587: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /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_username': /dev/shm/util-linux-2.33-rc1/libmount/src/utils.c:566: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
The bug is thus "RESOLVED WORKSFORME"
No, the bug is, that the code is not designed for static linking, as all the warnings show. And the upstream author should get the same warnings as you abvoe. So the result is even worse: while normally, the same or any newer version of glibc will work with this utils, in this case, the exactly same version of glibc as used for the "static linking" is required for runtime. The binaries are by no way static linked, they will load glibc dynamically at first if one of the above functions is called. So this "static linking" should be avoided if you want to have stable working binaries. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & CaaSP SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
El 07-10-2018 a las 5:44, Stefan Seyfried escribió:
CCLD umount.static /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
..And there you go.. the static executable will still require shared libraries.. so there is no point on having it around. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am 08.10.18 um 02:14 schrieb Cristian Rodríguez:
El 07-10-2018 a las 5:44, Stefan Seyfried escribió:
CCLD umount.static /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
..And there you go.. the static executable will still require shared libraries.. so there is no point on having it around.
Yes, but that is an entirely different problem to Linda's question. -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (5)
-
Cristian Rodríguez
-
L A Walsh
-
Neal Gompa
-
Stefan Seyfried
-
Thorsten Kukuk