Lukas
Lukas

Reputation: 17

Error concerning an " undefined reference to `__dso_handle' " when complinging Glibc

I am working on a Linux from Scratch system for the first time.

Background Info:

Book version - 10.1

Host distrobution - EndeavorOS

Problem occurs in step 5.5.1 https://www.linuxfromscratch.org/lfs/view/stable/chapter05/glibc.html

I begin to compile Glibc, but then about a minute or so in it ends the process. It appears things start to go downhill here:

/mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../x86_64-lfs-lin
ux-gnu/bin/ld: /mnt/lfs/sources/glibc-2.33/build/nptl/libpthread_pic.a(old_pt
hread_atfork.os): in function `__dyn_pthread_atfork':
/mnt/lfs/sources/glibc-2.33/nptl/pthread_atfork.c:51: undefined reference to
`__dso_handle'
/mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../x86_64-lfs-lin
ux-gnu/bin/ld: /mnt/lfs/sources/glibc-2.33/build/nptl/libpthread_pic.a(old_pt
hread_atfork.os): relocation R_X86_64_PC32 against undefined hidden symbol `_
_dso_handle' can not be used when making a shared object
/mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../x86_64-lfs-lin
ux-gnu/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [../Makerules:536: /mnt/lfs/sources/glibc-2.33/build/nptl/libpth
read.so] Error 1
make[2]: Leaving directory '/mnt/lfs/sources/glibc-2.33/nptl'
make[1]: *** [Makefile:479: nptl/others] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/glibc-2.33'
make: *** [Makefile:9: all] Error 2
[lfs@Endeavour build]$

(The full non-shortened output can be found here: https://pastebin.com/7Qk40xr2)

Multiple times it mentions `__dso_handle'

I have tried using "make -j4", "make", and "make -j1", but they all lead to the same problem.

If any assistance could be provided, I would be grateful.

Upvotes: 0

Views: 1358

Answers (0)

Related Questions