NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/55594: Error creating shared library using gcc-7.5.0 on NetBSD 9.0_STABLE
>Number: 55594
>Category: toolchain
>Synopsis: Error creating shared library using gcc-7.5.0 on NetBSD 9.0_STABLE
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 20 07:50:00 +0000 2020
>Originator: Rajeev Pillai
>Release: NetBSD 9.0_STABLE
>Organization:
>Environment:
NetBSD x202e.localdomain 9.0_STABLE NetBSD 9.0_STABLE (GENERIC) #0: Mon Aug 17 14:38:32 UTC 2020 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
ld(1) from GCC 7.5.0 on NetBSD 9.0_STABLE (GENERIC) #0: Mon Aug 17 14:38:32 UTC 2020 fails to link a shared library (libncurses) with this error:
ld: /usr/lib/crt0.o: in function `__start':
(.text+0x29): undefined reference to `__fini_array_start'
ld: /usr/lib/crt0.o: relocation R_X86_64_PC32 against undefined hidden symbol `__fini_array_start' can not be used when making a shared object
ld: final link failed: bad value
*** Error code 1
$ echo $CC
gcc
$ echo $CFLAGS
-Wall -O2 -flto -fpie -fstack-protector-all -fstack-protector-strong -march=native -pipe
$ echo $LDFLAGS
-pie -s
$ $CC --version
gcc (nb4 20200810) 7.5.0
>How-To-Repeat:
1. Download ncurses from https://invisible-mirror.net/archives/ncurses/current/ncurses-6.2-20200817.tgz
2. Untar, configure.
./configure --prefix=/opt/ncurses --with-shared
3. make
...OUTPUT ELIDED...
ld: /usr/lib/crt0.o: in function `__start':
(.text+0x29): undefined reference to `__fini_array_start'
ld: /usr/lib/crt0.o: relocation R_X86_64_PC32 against undefined hidden symbol `__fini_array_start' can not be used when making a shared object
ld: final link failed: bad value
*** Error code 1
>Fix:
Home |
Main Index |
Thread Index |
Old Index