Skip to contentSkip to conversation

New: glibc build fails

Buildroot [email protected] 1 participant 9 messages Jan 31, 2023 – Mar 12, 2023

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=15306

Bug ID: 15306
Summary: glibc build fails
Product: buildroot
Version: unspecified
Hardware: Macintosh
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---

I'm trying to build glibc in a [Docker Container](https://github.com/batocera-linux/batocera.linux/blob/master/Dockerfile) and I'm getting two error.

The first happens on a clean build, and it *looks like* a path is being munged. The file tdgppitrmssgwsgadebug/backtrace.os is specified and doesn't exist, although debug/backtrace.os does exist:

```
...
/bcm2837/host/lib/gcc/aarch64-buildroot-linux-gnu/12.2.0/../../../../aarch64-buildroot-linux-gnu/bin/ar:
tdgppitrmssgwsgadebug/backtrace.os: No such file or directory
make[3]: *** [../o-iterator.mk:9:
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/libc_nonshared.a]
Error 1
make[3]: *** Waiting for unfinished jobs....
sed -e 's@
/bcm2837/build/glibc-2\.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/@
$(common-objpfx)@g' -e
's@^/bcm2837/build/glibc-2\.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/@$(common-objpfx)@g'
-e 's@  *\.\.\/\([^     \]*\)@ $(..)\1@g' -e 's@^\.\.\/\([^    
\]*\)@$(..)\1@g' \
   
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/dl-link.h.dT
>
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/dl-link.h.dT2
rm -f
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/dl-link.h.dT
mv -f
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/dl-link.h.dT2
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/dl-link.h.d
mv -f
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/dl-link.hT
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/dl-link.h
make[3]: Leaving directory
'/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/elf'
make[2]: *** [Makefile:484: elf/subdir_lib] Error 2
make[2]: Leaving directory
'/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca'
make[1]: *** [Makefile:9: all] Error 2
make[1]: Leaving directory
'/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build'
make: *** [package/pkg-generic.mk:293:
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/.stamp_built]
Error 2
make: Leaving directory '/build/buildroot'
make: *** [bcm2837-build] Error 2
```

If I resume the build after that error, building progresses but I get a second error which I guess might be caused by the first:

```
builder@92c3583543fb:/bcm2837/build$
/bcm2837/host/bin/aarch64-buildroot-linux-gnu-gcc   -nostdlib -nostartfiles
-shared -o
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/elf/ld.so.new
-Wl,-z,relro -Wl,-z,defs
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/elf/librtld.os
-Wl,--version-script=/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/ld.map
-Wl,-soname=ld-linux-aarch64.so.1
/bcm2837/host/lib/gcc/aarch64-buildroot-linux-gnu/12.2.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/elf/librtld.os:
in function `_dl_make_stacks_executable':
(.text+0x24b0): undefined reference to `__lll_lock_wake_private'
/bcm2837/host/lib/gcc/aarch64-buildroot-linux-gnu/12.2.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:
(.text+0x24c0): undefined reference to `__lll_lock_wait_private'
/bcm2837/host/lib/gcc/aarch64-buildroot-linux-gnu/12.2.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/elf/librtld.os:
in function `__thread_gscope_wait':
(.text+0xe500): undefined reference to `__lll_lock_wake_private'
/bcm2837/host/lib/gcc/aarch64-buildroot-linux-gnu/12.2.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:
(.text+0xe508): undefined reference to `__lll_lock_wait_private'
/bcm2837/host/lib/gcc/aarch64-buildroot-linux-gnu/12.2.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:
/bcm2837/build/glibc-2.36-66-ga1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca/build/elf/librtld.os:
in function `_dl_init_static_tls':
(.text+0xf594): undefined reference to `__lll_lock_wait_private'
/bcm2837/host/lib/gcc/aarch64-buildroot-linux-gnu/12.2.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:
(.text+0xf5b0): undefined reference to `__lll_lock_wake_private'
```

I have tried (with the same result):
- An older version of glibc
- An older version of ubuntu (20.04)

I also see the exact same symptom reported here
https://homematic-forum.de/forum/viewtopic.php?f=65&t=71547

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

[Buildroot] [Bug 15306] glibc build fails in Docker container

https://bugs.busybox.net/show_bug.cgi?id=15306

Russ <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|glibc build fails           |glibc build fails in Docker
                   |                            |container
Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

[Buildroot] [Bug 15306] glibc build fails in Docker container

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=15306

Russ <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

           Severity|normal                      |blocker
           Priority|P5                          |P3
Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

[Buildroot] [Bug 15306] glibc build fails in Docker container

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=15306

Yann E. MORIN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Yann E. MORIN <[email protected]> --- Russ, All,

I have been unable to reproduce such an error with the current master branch, running Ubuntu 22.04 in a docker container, with this defconfig:
BR2_aarch64=y

Please provide a *minimalist* defconfig that exhibits the issue.

Regards,
Yann E. MORIN.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

[Buildroot] [Bug 15306] glibc build fails in Docker container

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=15306

--- Comment #2 from Russ <[email protected]> --- Yann,

Can you provide comprehensive instruction on how I can reproduce your success? I'm happy to see if I can reproduce in my environment, and if your setup works for me as well I'll look for what's different when building the reported target.

I'm not super familiar with batocera nor buildroot, so it'd be hard for me to pare it down to a minimal example.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

[Buildroot] [Bug 15306] glibc build fails in Docker container

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=15306

--- Comment #3 from Peter Korsgaard <[email protected]> ---

Quoted 1 line

I'm not super familiar with batocera nor buildroot, so it'd be hard for me to pare

Ahh, so you are not using upstream Buildroot? Possibly your issue is in one of the buildroot modifications done by the batocera project, so perhaps check there?

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

[Buildroot] [Bug 15306] glibc build fails in Docker container

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=15306

Peter Korsgaard <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #4 from Peter Korsgaard <[email protected]> --- Unable to reproduce with upstream Buildroot

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

[Buildroot] [Bug 15306] glibc build fails in Docker container

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=15306

--- Comment #5 from Russ <[email protected]> ---
Yep sorry I didn't close the loop on this -- I was able to repro with upstream, *but* I found that I could only repro when using a bind mount. I'm not sure what the root cause is, but I assume it's an issue with the Docker bind mounting mechanism.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw

[Buildroot] [Bug 15306] glibc build fails in Docker container

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=15306

--- Comment #6 from Yann E. MORIN <[email protected]> --- Russ, All,

Quoted 1 line

I could only repro when using a bind mount

That would be very strang if that were the issue. We have utils/docker-run in Buildroot, that allows running a container using the same Docker image we use in the CI, and that script does use a bind mount to make the Buildroot available in the container. And surely this works (I just tested).

Regards,
Yann E. MORIN.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot