public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/30721] New: 2.38 build fails for  --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others
@ 2023-08-04 19:43 dilfridge at gentoo dot org
  2023-08-04 19:43 ` [Bug libc/30721] " dilfridge at gentoo dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dilfridge at gentoo dot org @ 2023-08-04 19:43 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30721

            Bug ID: 30721
           Summary: 2.38 build fails for  --disable-multiarch
                    --enable-fortify-source , undefined reference to
                    `__GI___memset_chk' and others
           Product: glibc
           Version: 2.38
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: dilfridge at gentoo dot org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

This is a clone of https://bugs.gentoo.org/911580 , please see the original
report for more information. 

Build fails for --disable-multiarch --enable-fortify-source with e.g.


x86_64-pc-linux-gnu-gcc -m64 -march=nocona -mtune=native -pipe -O2
-fcf-protection=none -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed  -shared
-static-libgcc -Wl,-O1  -Wl,-z,defs
-Wl,-dynamic-linker=/lib64/ld-linux-x86-64.so.2 -Wl,-z,pack-relative-relocs 
-B/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/csu/

-Wl,--version-script=/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/libc.map
-Wl,-soname=libc.so.6 -Wl,-z,relro -Wl,-z,now -nostdlib -nostartfiles -e
__libc_main
-L/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl
-L/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/math
-L/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf
-L/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/dlfcn
-L/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/nss
-L/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/nis
-L/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/rt
-L/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/resolv
-L/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/mathvec
-L/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/support
-L/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/nptl
-Wl,-rpath-link=/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl:/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/math:/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf:/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/dlfcn:/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/nss:/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/nis:/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/rt:/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/resolv:/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/mathvec:/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/support:/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/nptl
-o
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/libc.so
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/csu/abi-note.o
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/libc_pic.os.clean
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/interp.os
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/ld.so
-lgcc
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/sofini.os
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/libc_pic.os.clean:
in function `__GI___gconv_open':
(.text+0x9a7): undefined reference to `__GI___memset_chk'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/libc_pic.os.clean:
in function `add_module':
gconv_conf.c:(.text+0x298e): undefined reference to `__GI___memcpy_chk'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/libc_pic.os.clean:
in function `add_alias2.part.0':
gconv_conf.c:(.text+0x2b19): undefined reference to `__GI___memcpy_chk'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/libc_pic.os.clean:
in function `__gconv_find_shlib':
(.text+0xb113): undefined reference to `__GI___memcpy_chk'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/libc_pic.os.clean:
in function `new_composite_name':
setlocale.c:(.text+0xb85c): undefined reference to `__GI___memcpy_chk'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/libc_pic.os.clean:
in function `_nl_find_locale':
(.text+0xc289): undefined reference to `__GI___memcpy_chk'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/libc_pic.os.clean:
in function `_nl_intern_locale_data':
(.text+0xca53): undefined reference to `__GI___memset_chk'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/portage/sys-libs/glibc-2.38/work/build-amd64-x86_64-pc-linux-gnu-nptl/libc_pic.os.clean:
in function `newlocale':
(.text+0xde42): undefined reference to `__GI___memcpy_chk'
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/30721] 2.38 build fails for  --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others
  2023-08-04 19:43 [Bug libc/30721] New: 2.38 build fails for --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others dilfridge at gentoo dot org
@ 2023-08-04 19:43 ` dilfridge at gentoo dot org
  2023-08-04 19:48 ` sam at gentoo dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dilfridge at gentoo dot org @ 2023-08-04 19:43 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30721

Andreas K. Huettel <dilfridge at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.gentoo.org/sho
                   |                            |w_bug.cgi?id=911580

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/30721] 2.38 build fails for  --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others
  2023-08-04 19:43 [Bug libc/30721] New: 2.38 build fails for --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others dilfridge at gentoo dot org
  2023-08-04 19:43 ` [Bug libc/30721] " dilfridge at gentoo dot org
@ 2023-08-04 19:48 ` sam at gentoo dot org
  2023-08-04 19:50 ` sam at gentoo dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sam at gentoo dot org @ 2023-08-04 19:48 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30721

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/30721] 2.38 build fails for  --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others
  2023-08-04 19:43 [Bug libc/30721] New: 2.38 build fails for --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others dilfridge at gentoo dot org
  2023-08-04 19:43 ` [Bug libc/30721] " dilfridge at gentoo dot org
  2023-08-04 19:48 ` sam at gentoo dot org
@ 2023-08-04 19:50 ` sam at gentoo dot org
  2023-08-05 11:35 ` siddhesh at sourceware dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sam at gentoo dot org @ 2023-08-04 19:50 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30721

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |siddhesh at sourceware dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/30721] 2.38 build fails for  --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others
  2023-08-04 19:43 [Bug libc/30721] New: 2.38 build fails for --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others dilfridge at gentoo dot org
                   ` (2 preceding siblings ...)
  2023-08-04 19:50 ` sam at gentoo dot org
@ 2023-08-05 11:35 ` siddhesh at sourceware dot org
  2023-08-08 16:22 ` siddhesh at sourceware dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: siddhesh at sourceware dot org @ 2023-08-05 11:35 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30721

Siddhesh Poyarekar <siddhesh at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fberat at redhat dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/30721] 2.38 build fails for  --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others
  2023-08-04 19:43 [Bug libc/30721] New: 2.38 build fails for --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others dilfridge at gentoo dot org
                   ` (3 preceding siblings ...)
  2023-08-05 11:35 ` siddhesh at sourceware dot org
@ 2023-08-08 16:22 ` siddhesh at sourceware dot org
  2023-08-08 20:23 ` adhemerval.zanella at linaro dot org
  2023-08-08 21:02 ` [Bug libc/30721] 2.38 build fails for --disable-multi-arch " sam at gentoo dot org
  6 siblings, 0 replies; 8+ messages in thread
From: siddhesh at sourceware dot org @ 2023-08-08 16:22 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30721

--- Comment #1 from Siddhesh Poyarekar <siddhesh at sourceware dot org> ---
I can't reproduce this on my Fedora box using:

../configure CFLAGS="-march=nocona -mtune=native -O2 -pipe" --prefix=/usr
--disable-multiarch --enable-fortify-source

OR even

../configure CFLAGS="-march=nocona -mtune=native -O2 -pipe" CC="gcc -m32"
CXX="g++ -m32" --enable-stack-protector=strong --disable-cet
--enable-kernel=3.2.0 --without-selinux --disable-werror --enable-bind-now
--enable-fortify-source --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
--disable-profile --without-gd --with-headers=/usr/include --prefix=/usr
--disable-crypt --disable-multi-arch --disable-systemtap --disable-nscd
ac_cv_path_PERL=no libc_cv_aarch64_sve_asm=yes --disable-timezone-tools

Maybe the gentoo compiler driver is injecting something that I need to add to
this mix?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/30721] 2.38 build fails for  --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others
  2023-08-04 19:43 [Bug libc/30721] New: 2.38 build fails for --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others dilfridge at gentoo dot org
                   ` (4 preceding siblings ...)
  2023-08-08 16:22 ` siddhesh at sourceware dot org
@ 2023-08-08 20:23 ` adhemerval.zanella at linaro dot org
  2023-08-08 21:02 ` [Bug libc/30721] 2.38 build fails for --disable-multi-arch " sam at gentoo dot org
  6 siblings, 0 replies; 8+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2023-08-08 20:23 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30721

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #2 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Siddhesh Poyarekar from comment #1)
> I can't reproduce this on my Fedora box using:
> 
> ../configure CFLAGS="-march=nocona -mtune=native -O2 -pipe" --prefix=/usr
> --disable-multiarch --enable-fortify-source

It should be '--disable-multi-arch'.

> 
> OR even
> 
> ../configure CFLAGS="-march=nocona -mtune=native -O2 -pipe" CC="gcc -m32"
> CXX="g++ -m32" --enable-stack-protector=strong --disable-cet
> --enable-kernel=3.2.0 --without-selinux --disable-werror --enable-bind-now
> --enable-fortify-source --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
> --disable-profile --without-gd --with-headers=/usr/include --prefix=/usr
> --disable-crypt --disable-multi-arch --disable-systemtap --disable-nscd
> ac_cv_path_PERL=no libc_cv_aarch64_sve_asm=yes --disable-timezone-tools
> 
> Maybe the gentoo compiler driver is injecting something that I need to add
> to this mix?

As I noted my proposed fix [1] only x86 is affected.  It is the only
architecture that tries to optimize the fortify wrapper with assembly routines.

[1] https://sourceware.org/pipermail/libc-alpha/2023-August/150746.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/30721] 2.38 build fails for  --disable-multi-arch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others
  2023-08-04 19:43 [Bug libc/30721] New: 2.38 build fails for --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others dilfridge at gentoo dot org
                   ` (5 preceding siblings ...)
  2023-08-08 20:23 ` adhemerval.zanella at linaro dot org
@ 2023-08-08 21:02 ` sam at gentoo dot org
  6 siblings, 0 replies; 8+ messages in thread
From: sam at gentoo dot org @ 2023-08-08 21:02 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30721

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|2.38 build fails for        |2.38 build fails for
                   |--disable-multiarch         |--disable-multi-arch
                   |--enable-fortify-source ,   |--enable-fortify-source ,
                   |undefined reference to      |undefined reference to
                   |`__GI___memset_chk' and     |`__GI___memset_chk' and
                   |others                      |others

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-08 21:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-04 19:43 [Bug libc/30721] New: 2.38 build fails for --disable-multiarch --enable-fortify-source , undefined reference to `__GI___memset_chk' and others dilfridge at gentoo dot org
2023-08-04 19:43 ` [Bug libc/30721] " dilfridge at gentoo dot org
2023-08-04 19:48 ` sam at gentoo dot org
2023-08-04 19:50 ` sam at gentoo dot org
2023-08-05 11:35 ` siddhesh at sourceware dot org
2023-08-08 16:22 ` siddhesh at sourceware dot org
2023-08-08 20:23 ` adhemerval.zanella at linaro dot org
2023-08-08 21:02 ` [Bug libc/30721] 2.38 build fails for --disable-multi-arch " sam at gentoo dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).