tools icon indicating copy to clipboard operation
tools copied to clipboard

22.7: build of /usr/bin/awk fails on aarch64

Open turboproc opened this issue 2 years ago • 5 comments

So swtched yesterday to 22.7 and while making a first build attempt (native aarch64) building fails a show below:

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in proctab.o
>>> referenced by proctab.c
>>>               proctab.o:(printname)

ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- awk ---
*** [awk] Error code 1

make[4]: stopped in /usr/src/usr.bin/awk
--- everything ---

make[1]: stopped in /usr/src
--- buildworld ---

make: stopped in /usr/src
*** Error code 2

turboproc avatar Jul 21 '22 07:07 turboproc

Yes seeing the same issue but with an emulated aarch64 build

wilmardo avatar Jul 22 '22 08:07 wilmardo

It's in fact a recurring issue. Once I'd fixed the àwk` build by changing the Makefile, the next one appeared.

Had to fix in the end the following programs:

  • ngctl
  • bsnmpd
  • sort
  • systat
  • mandoc
  • awk

turboproc avatar Jul 22 '22 09:07 turboproc

Any tips on the patching of the Makefiles? I gave adding -fPIC to the CFLAGS in the Makefiles a try but that didn't help.

wilmardo avatar Sep 26 '22 08:09 wilmardo

If I remember well you have to remove the *.o files such that compilation will happen again.

turboproc avatar Sep 26 '22 17:09 turboproc

...same issue here on amd64 build here...on usr.sbin/wpa/src/tls (all) defined in encoding.o referenced by encoding.c

...hmm removing .o files and practically a rebuild appears to have worked for amd

rm -f -r /usr/obj/usr/src/amd64.amd64

jdpc86 avatar Oct 10 '22 22:10 jdpc86

Timeout.

fichtner avatar Aug 04 '23 06:08 fichtner

Can confirm that this has been fixed upstream. I haven't had issues in a long time now. By closing this I remembered it was at some point haha, that long without this issue

wilmardo avatar Aug 04 '23 07:08 wilmardo

@wilmardo happy to hear :)

fichtner avatar Aug 04 '23 07:08 fichtner