public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy
@ 2022-12-23 12:52 john.frankish at outlook dot com
2022-12-24 1:09 ` [Bug build/29938] " goldstein.w.n at gmail dot com
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: john.frankish at outlook dot com @ 2022-12-23 12:52 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
Bug ID: 29938
Summary: glibc-2.36 fails to build with Os with undefined
reference to strcpy
Product: glibc
Version: 2.36
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: john.frankish at outlook dot com
CC: carlos at redhat dot com
Target Milestone: ---
glibc-2.36 fails to build with Os, but builds without error with O2.
Built using:
echo "rootsbindir=/usr/sbin" > configparms
CC="gcc -mtune=generic -Os -pipe" ../configure --prefix=/usr --disable-werror
--enable-kernel=5.4.3 --enable-stack-protector=strong
--with-headers=/usr/include libc_cv_slibdir=/lib --enable-obsolete-rpc
--libexecdir=/usr/lib/glibc
find . -name config.make -type f -exec sed -i 's/-g -O2//g' {} \;
find . -name config.status -type f -exec sed -i 's/-g -O2//g' {} \;
find ../ -name Makeconfig -type f -exec sed -i 's/-g -O2//g' {} \;
make
/usr/lib/gcc/x86_64-tc-linux-gnu/12.2.0/../../../../x86_64-tc-linux-gnu/bin/ld:
/sources/glibc-2.36/build/elf/librtld.os: in function `_dl_start_profile':
(.text+0x9587): undefined reference to `strcpy'
/usr/lib/gcc/x86_64-tc-linux-gnu/12.2.0/../../../../x86_64-tc-linux-gnu/bin/ld:
/sources/glibc-2.36/build/elf/librtld.os: in function `_dl_load_cache_lookup':
(.text+0xe5fd): undefined reference to `strcpy'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1346: /sources/glibc-2.36/build/elf/ld.so] Error 1
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug build/29938] glibc-2.36 fails to build with Os with undefined reference to strcpy
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
@ 2022-12-24 1:09 ` goldstein.w.n at gmail dot com
2022-12-25 9:26 ` john.frankish at outlook dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: goldstein.w.n at gmail dot com @ 2022-12-24 1:09 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
Noah Goldstein <goldstein.w.n at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |goldstein.w.n at gmail dot com
--- Comment #1 from Noah Goldstein <goldstein.w.n at gmail dot com> ---
This is a duplicate of: https://sourceware.org/bugzilla/show_bug.cgi?id=29576
and was fixed by:
commit 9dc4e29f630c6ef8299120b275e503321dc0c8c7
Author: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Date: Wed Sep 21 10:51:08 2022 -0300
x86: Fix -Os build (BZ #29576)
Maybe we should backport the fix?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug build/29938] glibc-2.36 fails to build with Os with undefined reference to strcpy
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
2022-12-24 1:09 ` [Bug build/29938] " goldstein.w.n at gmail dot com
@ 2022-12-25 9:26 ` john.frankish at outlook dot com
2022-12-26 20:23 ` goldstein.w.n at gmail dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: john.frankish at outlook dot com @ 2022-12-25 9:26 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
--- Comment #2 from john.frankish at outlook dot com ---
If I understand correctly, backporting the commit
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=9dc4e29f630c6ef8299120b275e503321dc0c8c7
means deleting sysdeps/x86_64/multiarch/rtld-strcpy.S
..but the error remains the same with or without this file.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug build/29938] glibc-2.36 fails to build with Os with undefined reference to strcpy
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
2022-12-24 1:09 ` [Bug build/29938] " goldstein.w.n at gmail dot com
2022-12-25 9:26 ` john.frankish at outlook dot com
@ 2022-12-26 20:23 ` goldstein.w.n at gmail dot com
2022-12-27 14:17 ` john.frankish at outlook dot com
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: goldstein.w.n at gmail dot com @ 2022-12-26 20:23 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
--- Comment #3 from Noah Goldstein <goldstein.w.n at gmail dot com> ---
(In reply to john.frankish from comment #2)
> If I understand correctly, backporting the commit
> https://sourceware.org/git/?p=glibc.git;a=commitdiff;
> h=9dc4e29f630c6ef8299120b275e503321dc0c8c7 means deleting
> sysdeps/x86_64/multiarch/rtld-strcpy.S
>
> ..but the error remains the same with or without this file.
Do you have the following commit:
commit 302bc33bc53c787da6e74162a7092e9c0fb964a8
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date: Mon Aug 8 11:26:22 2022 +0800
elf: Replace `strcpy` call with `memcpy` [BZ #29454]
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug build/29938] glibc-2.36 fails to build with Os with undefined reference to strcpy
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
` (2 preceding siblings ...)
2022-12-26 20:23 ` goldstein.w.n at gmail dot com
@ 2022-12-27 14:17 ` john.frankish at outlook dot com
2022-12-27 14:18 ` john.frankish at outlook dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: john.frankish at outlook dot com @ 2022-12-27 14:17 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
--- Comment #4 from john.frankish at outlook dot com ---
Thanks - that appears to have solved the problem of compiling for i486 with
-Os.
Note that the glibc-2.36 tarball already contains the file added by commit
9dc4e29f630c6ef8299120b275e503321dc0c8c7
I'll check building for x86_64 with -Os in a day or two.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug build/29938] glibc-2.36 fails to build with Os with undefined reference to strcpy
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
` (3 preceding siblings ...)
2022-12-27 14:17 ` john.frankish at outlook dot com
@ 2022-12-27 14:18 ` john.frankish at outlook dot com
2022-12-29 12:59 ` adhemerval.zanella at linaro dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: john.frankish at outlook dot com @ 2022-12-27 14:18 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
--- Comment #5 from john.frankish at outlook dot com ---
Thanks - that appears to have solved the problem of compiling for i486 with
-Os.
Note that the glibc-2.36 tarball already contains the file added by commit
9dc4e29f630c6ef8299120b275e503321dc0c8c7
I'll check building for x86_64 with -Os in a day or two.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug build/29938] glibc-2.36 fails to build with Os with undefined reference to strcpy
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
` (4 preceding siblings ...)
2022-12-27 14:18 ` john.frankish at outlook dot com
@ 2022-12-29 12:59 ` adhemerval.zanella at linaro dot org
2022-12-29 13:00 ` adhemerval.zanella at linaro dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-12-29 12:59 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adhemerval.zanella at linaro dot o
| |rg
--- Comment #6 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
I back(In reply to john.frankish from comment #5)
> Thanks - that appears to have solved the problem of compiling for i486 with
> -Os.
>
> Note that the glibc-2.36 tarball already contains the file added by commit
> 9dc4e29f630c6ef8299120b275e503321dc0c8c7
>
> I'll check building for x86_64 with -Os in a day or two.
I just backported the required patch to build glibc with -Os for x86 on 2.36
and I also send some fixes for upstream to build for -Os/-O1 on all targets
[1].
[1] https://patchwork.sourceware.org/project/glibc/list/?series=15572
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug build/29938] glibc-2.36 fails to build with Os with undefined reference to strcpy
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
` (5 preceding siblings ...)
2022-12-29 12:59 ` adhemerval.zanella at linaro dot org
@ 2022-12-29 13:00 ` adhemerval.zanella at linaro dot org
2022-12-31 11:35 ` john.frankish at outlook dot com
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-12-29 13:00 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #7 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Mark as duplicated.
*** This bug has been marked as a duplicate of bug 29576 ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug build/29938] glibc-2.36 fails to build with Os with undefined reference to strcpy
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
` (6 preceding siblings ...)
2022-12-29 13:00 ` adhemerval.zanella at linaro dot org
@ 2022-12-31 11:35 ` john.frankish at outlook dot com
2022-12-31 13:32 ` adhemerval.zanella at linaro dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: john.frankish at outlook dot com @ 2022-12-31 11:35 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
--- Comment #8 from john.frankish at outlook dot com ---
glibc-2.36 fails to build with -Os for x86_64 with commit
302bc33bc53c787da6e74162a7092e9c0fb964a8
glibc-2.36 builds with -O2 for x86_64 and it builds with -Os for x86 (i486)
gcc -mtune=generic -Os -pipe -nostdlib -nostartfiles -shared -o
/usr/src/glibc-2.36/build/elf/ld.so.new \
-Wl,-z,relro -Wl,-z,defs \
-Wl,-z,pack-relative-relocs \
/usr/src/glibc-2.36/build/elf/librtld.os
-Wl,--version-script=/usr/src/glibc-2.36/build/ld.map \
-Wl,-soname=ld-linux-x86-64.so.2
/usr/local/bin/ld: /usr/src/glibc-2.36/build/elf/librtld.os: in function
`_dl_start_profile':
(.text+0x9643): undefined reference to `strcpy'
collect2: error: ld returned 1 exit status
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug build/29938] glibc-2.36 fails to build with Os with undefined reference to strcpy
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
` (7 preceding siblings ...)
2022-12-31 11:35 ` john.frankish at outlook dot com
@ 2022-12-31 13:32 ` adhemerval.zanella at linaro dot org
2022-12-31 15:50 ` john.frankish at outlook dot com
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-12-31 13:32 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
--- Comment #9 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to john.frankish from comment #8)
> glibc-2.36 fails to build with -Os for x86_64 with commit
> 302bc33bc53c787da6e74162a7092e9c0fb964a8
>
> glibc-2.36 builds with -O2 for x86_64 and it builds with -Os for x86 (i486)
>
> gcc -mtune=generic -Os -pipe -nostdlib -nostartfiles -shared -o
> /usr/src/glibc-2.36/build/elf/ld.so.new \
> -Wl,-z,relro -Wl,-z,defs \
> -Wl,-z,pack-relative-relocs \
> /usr/src/glibc-2.36/build/elf/librtld.os
> -Wl,--version-script=/usr/src/glibc-2.36/build/ld.map \
> -Wl,-soname=ld-linux-x86-64.so.2
> /usr/local/bin/ld: /usr/src/glibc-2.36/build/elf/librtld.os: in function
> `_dl_start_profile':
> (.text+0x9643): undefined reference to `strcpy'
> collect2: error: ld returned 1 exit status
Does it still happen with 2.36 branch [1]?
[1]
https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/release/2.36/master
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug build/29938] glibc-2.36 fails to build with Os with undefined reference to strcpy
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
` (8 preceding siblings ...)
2022-12-31 13:32 ` adhemerval.zanella at linaro dot org
@ 2022-12-31 15:50 ` john.frankish at outlook dot com
2023-01-03 15:13 ` adhemerval.zanella at linaro dot org
2023-01-03 16:28 ` john.frankish at outlook dot com
11 siblings, 0 replies; 13+ messages in thread
From: john.frankish at outlook dot com @ 2022-12-31 15:50 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
--- Comment #10 from john.frankish at outlook dot com ---
If you're referring to commit 4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c this
patch is already present in glibc-2.36.tar.xz
If you're referring to the entire branch [1], please excuse my ignorance, but
how do I clone branch [1] from glibc git?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug build/29938] glibc-2.36 fails to build with Os with undefined reference to strcpy
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
` (9 preceding siblings ...)
2022-12-31 15:50 ` john.frankish at outlook dot com
@ 2023-01-03 15:13 ` adhemerval.zanella at linaro dot org
2023-01-03 16:28 ` john.frankish at outlook dot com
11 siblings, 0 replies; 13+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2023-01-03 15:13 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
--- Comment #11 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to john.frankish from comment #10)
> If you're referring to commit 4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c this
> patch is already present in glibc-2.36.tar.xz
>
> If you're referring to the entire branch [1], please excuse my ignorance,
> but how do I clone branch [1] from glibc git?
I mean the git branch for 2.36, since glibc usually does not release minor
versions for the source packages release. And the process is described in the
'get started' pane [1]:
$ git clone https://sourceware.org/git/glibc.git
$ cd glibc
$ git checkout release/2.36/master
You can also accomplish the same with one command:
$ git clone -b release/2.36/master https://sourceware.org/git/glibc.git
[1] https://www.gnu.org/software/libc/started.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug build/29938] glibc-2.36 fails to build with Os with undefined reference to strcpy
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
` (10 preceding siblings ...)
2023-01-03 15:13 ` adhemerval.zanella at linaro dot org
@ 2023-01-03 16:28 ` john.frankish at outlook dot com
11 siblings, 0 replies; 13+ messages in thread
From: john.frankish at outlook dot com @ 2023-01-03 16:28 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29938
--- Comment #12 from john.frankish at outlook dot com ---
Thanks - I confirm that both x86 (i486) and x86_64 build with -Os
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-01-03 16:28 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23 12:52 [Bug build/29938] New: glibc-2.36 fails to build with Os with undefined reference to strcpy john.frankish at outlook dot com
2022-12-24 1:09 ` [Bug build/29938] " goldstein.w.n at gmail dot com
2022-12-25 9:26 ` john.frankish at outlook dot com
2022-12-26 20:23 ` goldstein.w.n at gmail dot com
2022-12-27 14:17 ` john.frankish at outlook dot com
2022-12-27 14:18 ` john.frankish at outlook dot com
2022-12-29 12:59 ` adhemerval.zanella at linaro dot org
2022-12-29 13:00 ` adhemerval.zanella at linaro dot org
2022-12-31 11:35 ` john.frankish at outlook dot com
2022-12-31 13:32 ` adhemerval.zanella at linaro dot org
2022-12-31 15:50 ` john.frankish at outlook dot com
2023-01-03 15:13 ` adhemerval.zanella at linaro dot org
2023-01-03 16:28 ` john.frankish at outlook dot com
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).