ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

freebsd-x11 mailing list
I'll first note:

# /usr/bin/ld -v
LLD 6.0.1 (FreeBSD 335540-1300000) (compatible with GNU linkers)

and that I use:

CFLAGS.clang+= -mcpu=cortex-a7
CXXFLAGS.clang+= -mcpu=cortex-a7
CPPFLAGS.clang+= -mcpu=cortex-a7

in the src.conf like ~/src.configs/src.conf.armv7-clang-bootstrap.armv7-host
file that I used.

The error reports were:

--- libpixman-1.la ---
/bin/sh ../libtool  --tag=CC    --mode=link cc   -O -pipe -mcpu=cortex-a7  -g -fno-strict-aliasing  -Wall -Wdeclaration-after-statement -Wno-unused-local-typedefs -fno-strict-aliasing -fvisibility=hid
den -version-info 34:0:34  -no-undefined   -pthread       -o  libpixman-1.la -rpath /usr/local/lib pixman.lo pixman-access.lo pixman-access-accessors.lo  pixman-bits-image.lo pixman-combine32.lo  pixm
an-combine-float.lo pixman-conical-gradient.lo  pixman-filter.lo pixman-x86.lo pixman-mips.lo pixman-arm.lo  pixman-ppc.lo pixman-edge.lo pixman-edge-accessors.lo  pixman-fast-path.lo pixman-glyph.lo
pixman-general.lo  pixman-gradient-walker.lo pixman-image.lo  pixman-implementation.lo pixman-linear-gradient.lo  pixman-matrix.lo pixman-noop.lo pixman-radial-gradient.lo  pixman-region16.lo pixman-r
egion32.lo pixman-solid-fill.lo  pixman-timer.lo pixman-trap.lo pixman-utils.lo  -lm   -lm       libpixman-arm-simd.la libpixman-arm-neon.la     -lm
libtool: link: cc -shared  -fPIC -DPIC  .libs/pixman.o .libs/pixman-access.o .libs/pixman-access-accessors.o .libs/pixman-bits-image.o .libs/pixman-combine32.o .libs/pixman-combine-float.o .libs/pixma
n-conical-gradient.o .libs/pixman-filter.o .libs/pixman-x86.o .libs/pixman-mips.o .libs/pixman-arm.o .libs/pixman-ppc.o .libs/pixman-edge.o .libs/pixman-edge-accessors.o .libs/pixman-fast-path.o .libs
/pixman-glyph.o .libs/pixman-general.o .libs/pixman-gradient-walker.o .libs/pixman-image.o .libs/pixman-implementation.o .libs/pixman-linear-gradient.o .libs/pixman-matrix.o .libs/pixman-noop.o .libs/
pixman-radial-gradient.o .libs/pixman-region16.o .libs/pixman-region32.o .libs/pixman-solid-fill.o .libs/pixman-timer.o .libs/pixman-trap.o .libs/pixman-utils.o  -Wl,--whole-archive ./.libs/libpixman-
arm-simd.a ./.libs/libpixman-arm-neon.a -Wl,--no-whole-archive  -lm  -O -mcpu=cortex-a7 -g -pthread   -pthread -Wl,-soname -Wl,libpixman-1.so.0 -o .libs/libpixman-1.so.0.34.0
/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-simd.a(pixman-arm-simd-asm-scaled.o)
>>> referenced by pixman-arm-simd-asm-scaled.o:(.text+0x1B8) in archive ./.libs/libpixman-arm-simd.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-simd.a(pixman-arm-simd-asm-scaled.o)
>>> referenced by pixman-arm-simd-asm-scaled.o:(.text+0x374) in archive ./.libs/libpixman-arm-simd.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x17AC) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x1814) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x1A38) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x1AFC) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x21C8) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x2294) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x84E0) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x85C4) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x9720) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x9834) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0xA7B0) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0xA8CC) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x105A0) in archive ./.libs/libpixman-arm-neon.a
/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x10DB8) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x11274) in archive ./.libs/libpixman-arm-neon.a
/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>> referenced by pixman-arm-neon-asm.o:(.text+0x11808) in archive ./.libs/libpixman-arm-neon.a
/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm-bilinear.o)
>>> referenced by pixman-arm-neon-asm-bilinear.o:(.text+0x4F0) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm-bilinear.o)
>>> referenced by pixman-arm-neon-asm-bilinear.o:(.text+0xABC) in archive ./.libs/libpixman-arm-neon.a

/usr/bin/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)
*** [libpixman-1.la] Error code 1

make[3]: stopped in /wrkdirs/usr/ports/x11/pixman/work/pixman-0.34.0/pixman
1 error

make[3]: stopped in /wrkdirs/usr/ports/x11/pixman/work/pixman-0.34.0/pixman
*** [all-recursive] Error code 1


FreeBSD context details:

# uname -apKU
FreeBSD OPiP2E 13.0-CURRENT FreeBSD 13.0-CURRENT #5 r340287M: Sat Nov 10 22:40:25 PST 2018     markmi@FBSDFSSD:/usr/obj/armv7_clang/arm.armv7/usr/src/arm.armv7/sys/GENERIC-NODBG  arm armv7 1300003 1300003


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

freebsd-x11 mailing list
[Added: The original cross-build via poudriere-devel and qemu-user-static
did not get this problem. I give details later. Sumamry: Looks like -O2
was used for the cross build and -O was used for armv7 native. The
difference is likely(?) from my materials but not supporting both ways of
building is likely a problem with the port(?).]

On 2018-Nov-14, at 10:10, Mark Millard <marklmi at yahoo.com> wrote:

> I'll first note:
>
> # /usr/bin/ld -v
> LLD 6.0.1 (FreeBSD 335540-1300000) (compatible with GNU linkers)
>
> and that I use:
>
> CFLAGS.clang+= -mcpu=cortex-a7
> CXXFLAGS.clang+= -mcpu=cortex-a7
> CPPFLAGS.clang+= -mcpu=cortex-a7
>
> in the src.conf like ~/src.configs/src.conf.armv7-clang-bootstrap.armv7-host
> file that I used.
>
> The error reports were:
>
> --- libpixman-1.la ---
> /bin/sh ../libtool  --tag=CC    --mode=link cc   -O -pipe -mcpu=cortex-a7  -g -fno-strict-aliasing  -Wall -Wdeclaration-after-statement -Wno-unused-local-typedefs -fno-strict-aliasing -fvisibility=hid
> den -version-info 34:0:34  -no-undefined   -pthread       -o  libpixman-1.la -rpath /usr/local/lib pixman.lo pixman-access.lo pixman-access-accessors.lo  pixman-bits-image.lo pixman-combine32.lo  pixm
> an-combine-float.lo pixman-conical-gradient.lo  pixman-filter.lo pixman-x86.lo pixman-mips.lo pixman-arm.lo  pixman-ppc.lo pixman-edge.lo pixman-edge-accessors.lo  pixman-fast-path.lo pixman-glyph.lo
> pixman-general.lo  pixman-gradient-walker.lo pixman-image.lo  pixman-implementation.lo pixman-linear-gradient.lo  pixman-matrix.lo pixman-noop.lo pixman-radial-gradient.lo  pixman-region16.lo pixman-r
> egion32.lo pixman-solid-fill.lo  pixman-timer.lo pixman-trap.lo pixman-utils.lo  -lm   -lm       libpixman-arm-simd.la libpixman-arm-neon.la     -lm
> libtool: link: cc -shared  -fPIC -DPIC  .libs/pixman.o .libs/pixman-access.o .libs/pixman-access-accessors.o .libs/pixman-bits-image.o .libs/pixman-combine32.o .libs/pixman-combine-float.o .libs/pixma
> n-conical-gradient.o .libs/pixman-filter.o .libs/pixman-x86.o .libs/pixman-mips.o .libs/pixman-arm.o .libs/pixman-ppc.o .libs/pixman-edge.o .libs/pixman-edge-accessors.o .libs/pixman-fast-path.o .libs
> /pixman-glyph.o .libs/pixman-general.o .libs/pixman-gradient-walker.o .libs/pixman-image.o .libs/pixman-implementation.o .libs/pixman-linear-gradient.o .libs/pixman-matrix.o .libs/pixman-noop.o .libs/
> pixman-radial-gradient.o .libs/pixman-region16.o .libs/pixman-region32.o .libs/pixman-solid-fill.o .libs/pixman-timer.o .libs/pixman-trap.o .libs/pixman-utils.o  -Wl,--whole-archive ./.libs/libpixman-
> arm-simd.a ./.libs/libpixman-arm-neon.a -Wl,--no-whole-archive  -lm  -O -mcpu=cortex-a7 -g -pthread   -pthread -Wl,-soname -Wl,libpixman-1.so.0 -o .libs/libpixman-1.so.0.34.0
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-simd.a(pixman-arm-simd-asm-scaled.o)
>>>> referenced by pixman-arm-simd-asm-scaled.o:(.text+0x1B8) in archive ./.libs/libpixman-arm-simd.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-simd.a(pixman-arm-simd-asm-scaled.o)
>>>> referenced by pixman-arm-simd-asm-scaled.o:(.text+0x374) in archive ./.libs/libpixman-arm-simd.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x17AC) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x1814) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x1A38) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x1AFC) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x21C8) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x2294) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x84E0) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x85C4) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x9720) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x9834) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0xA7B0) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0xA8CC) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x105A0) in archive ./.libs/libpixman-arm-neon.a
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x10DB8) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x11274) in archive ./.libs/libpixman-arm-neon.a
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>> referenced by pixman-arm-neon-asm.o:(.text+0x11808) in archive ./.libs/libpixman-arm-neon.a
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm-bilinear.o)
>>>> referenced by pixman-arm-neon-asm-bilinear.o:(.text+0x4F0) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm-bilinear.o)
>>>> referenced by pixman-arm-neon-asm-bilinear.o:(.text+0xABC) in archive ./.libs/libpixman-arm-neon.a
>
> /usr/bin/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)
> *** [libpixman-1.la] Error code 1
>
> make[3]: stopped in /wrkdirs/usr/ports/x11/pixman/work/pixman-0.34.0/pixman
> 1 error
>
> make[3]: stopped in /wrkdirs/usr/ports/x11/pixman/work/pixman-0.34.0/pixman
> *** [all-recursive] Error code 1
>
>
> FreeBSD context details:
>
> # uname -apKU
> FreeBSD OPiP2E 13.0-CURRENT FreeBSD 13.0-CURRENT #5 r340287M: Sat Nov 10 22:40:25 PST 2018     markmi@FBSDFSSD:/usr/obj/armv7_clang/arm.armv7/usr/src/arm.armv7/sys/GENERIC-NODBG  arm armv7 1300003 1300003


I went back and looked at the amd64 -> armv7 cross-build
( that used teh poudriere-built /nxb-bin/usr/bin/ ) and it
did not complain:

--- libpixman-1.la ---
/bin/sh ../libtool  --tag=CC    --mode=link /nxb-bin/usr/bin/cc   -O2 -pipe -mcpu=cortex-a7  -g -fno-strict-aliasing  -Wall -Wdeclaration-after-statement -Wno-unused-local-typedefs -fno-strict-aliasing -fvisibility=hidden -version-info 34:0:34  -no-undefined  -Wl,--no-threads  -pthread      -Wl,--no-threads -o  libpixman-1.la -rpath /usr/local/lib pixman.lo pixman-access.lo pixman-access-accessors.lo  pixman-bits-image.lo pixman-combine32.lo  pixman-combine-float.lo pixman-conical-gradient.lo  pixman-filter.lo pixman-x86.lo pixman-mips.lo pixman-arm.lo  pixman-ppc.lo pixman-edge.lo pixman-edge-accessors.lo  pixman-fast-path.lo pixman-glyph.lo pixman-general.lo  pixman-gradient-walker.lo pixman-image.lo  pixman-implementation.lo pixman-linear-gradient.lo  pixman-matrix.lo pixman-noop.lo pixman-radial-gradient.lo  pixman-region16.lo pixman-region32.lo pixman-solid-fill.lo  pixman-timer.lo pixman-trap.lo pixman-utils.lo  -lm   -lm       libpixman-arm-simd.la libpixman-arm-neon.la     -l
 m
libtool: link: /nxb-bin/usr/bin/cc -shared  -fPIC -DPIC  .libs/pixman.o .libs/pixman-access.o .libs/pixman-access-accessors.o .libs/pixman-bits-image.o .libs/pixman-combine32.o .libs/pixman-combine-float.o .libs/pixman-conical-gradient.o .libs/pixman-filter.o .libs/pixman-x86.o .libs/pixman-mips.o .libs/pixman-arm.o .libs/pixman-ppc.o .libs/pixman-edge.o .libs/pixman-edge-accessors.o .libs/pixman-fast-path.o .libs/pixman-glyph.o .libs/pixman-general.o .libs/pixman-gradient-walker.o .libs/pixman-image.o .libs/pixman-implementation.o .libs/pixman-linear-gradient.o .libs/pixman-matrix.o .libs/pixman-noop.o .libs/pixman-radial-gradient.o .libs/pixman-region16.o .libs/pixman-region32.o .libs/pixman-solid-fill.o .libs/pixman-timer.o .libs/pixman-trap.o .libs/pixman-utils.o  -Wl,--whole-archive ./.libs/libpixman-arm-simd.a ./.libs/libpixman-arm-neon.a -Wl,--no-whole-archive  -lm  -O2 -mcpu=cortex-a7 -g -Wl,--no-threads -pthread -Wl,--no-threads   -pthread -Wl,-soname -Wl,libpixman-1.so.0 -o
  .libs/libpixman-1.so.0.34.0
libtool: link: (cd ".libs" && rm -f "libpixman-1.so.0" && ln -s "libpixman-1.so.0.34.0" "libpixman-1.so.0")
libtool: link: (cd ".libs" && rm -f "libpixman-1.so" && ln -s "libpixman-1.so.0.34.0" "libpixman-1.so")
libtool: link: (cd .libs/libpixman-1.lax/libpixman-arm-simd.a && ar x "/wrkdirs/usr/ports/x11/pixman/work/pixman-0.34.0/pixman/./.libs/libpixman-arm-simd.a")
libtool: link: (cd .libs/libpixman-1.lax/libpixman-arm-neon.a && ar x "/wrkdirs/usr/ports/x11/pixman/work/pixman-0.34.0/pixman/./.libs/libpixman-arm-neon.a")
libtool: link: ar cru .libs/libpixman-1.a  pixman.o pixman-access.o pixman-access-accessors.o pixman-bits-image.o pixman-combine32.o pixman-combine-float.o pixman-conical-gradient.o pixman-filter.o pixman-x86.o pixman-mips.o pixman-arm.o pixman-ppc.o pixman-edge.o pixman-edge-accessors.o pixman-fast-path.o pixman-glyph.o pixman-general.o pixman-gradient-walker.o pixman-image.o pixman-implementation.o pixman-linear-gradient.o pixman-matrix.o pixman-noop.o pixman-radial-gradient.o pixman-region16.o pixman-region32.o pixman-solid-fill.o pixman-timer.o pixman-trap.o pixman-utils.o  .libs/libpixman-1.lax/libpixman-arm-simd.a/pixman-arm-simd-asm-scaled.o .libs/libpixman-1.lax/libpixman-arm-simd.a/pixman-arm-simd-asm.o .libs/libpixman-1.lax/libpixman-arm-simd.a/pixman-arm-simd.o  .libs/libpixman-1.lax/libpixman-arm-neon.a/pixman-arm-neon-asm-bilinear.o .libs/libpixman-1.lax/libpixman-arm-neon.a/pixman-arm-neon-asm.o .libs/libpixman-1.lax/libpixman-arm-neon.a/pixman-arm-neon.o
libtool: link: ranlib .libs/libpixman-1.a
libtool: link: rm -fr .libs/libpixman-1.lax
libtool: link: ( cd ".libs" && rm -f "libpixman-1.la" && ln -s "../libpixman-1.la" "libpixman-1.la" )
===========================================================================
=======================<phase: run-depends    >============================
===========================================================================
=======================<phase: stage          >============================
. . .


So I diff'd the logs and found the following (selective extraction):
(- for amd64 -> armv7; + for armv7)

-Poudriere version: 3.2.99.20180601
+Poudriere version: 3.2.99.20181024

This is was expected but may mean that I need to wait
until the armv7 has 3.2.99.20181024 and I try via
it.

-SHELL=/bin/csh
-UNAME_p=armv7
-UNAME_m=arm
-ABI_FILE=/usr/lib/crt1.o
+SHELL=/bin/sh

The SHELL's I expected but the other 3 lines I did not.
But the 3 lines may only occur under qemu-user-static
style use.

-QEMU_EMULATING=1

Expected.

In CONFIGURE_ENV:

amd64 -> armv7: CCASFLAGS having -O2
armv7:          CCASFLAGS having -O

In MAKE_ENV:

amd64 -> armv7: CFLAGS having -O2
armv7:          CFLAGS having -O


(The -O2 vs. -O context differences may well be important
to the behavior.)

(I'll not list /nxb-bin/. . . path use vs. not.)

Later:

-MACHINE=arm
-MACHINE_ARCH=armv7
-ARCH=${MACHINE_ARCH}

-.if ${LDFLAGS:M-fuse-ld=*lld*} || ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld
-LDFLAGS+=      -Wl,--no-threads
-.endif

(That last was part of an experiment with avoiding a
user-arm-static hangup.)

-_SMP_CPUS=28
+_SMP_CPUS=4

I'll stop with that. It looks to me like -O2 vs. -O
would be the likely distinction. While my materials
probably caused that difference(?), the port likely
should support both ways of building(?).


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

freebsd-x11 mailing list
[Tracking down -O2 vs. -O lead to share/mk/sys.mk instead of
to my materials. It in turn leads back to poudriere-devel with
qemu-user-static in use defining MACHINE_ARCH but without it
instead not doing so. share/mk/sys.mk behaves differently
for with vs. without the definition, leading to -O2 vs -O
differences in the two build contexts. Details later below.]

On 2018-Nov-14, at 13:05, Mark Millard <marklmi at yahoo.com> wrote:

> [Added: The original cross-build via poudriere-devel and qemu-user-static
> did not get this problem. I give details later. Sumamry: Looks like -O2
> was used for the cross build and -O was used for armv7 native. The
> difference is likely(?) from my materials but not supporting both ways of
> building is likely a problem with the port(?).]
>
> On 2018-Nov-14, at 10:10, Mark Millard <marklmi at yahoo.com> wrote:
>
>> I'll first note:
>>
>> # /usr/bin/ld -v
>> LLD 6.0.1 (FreeBSD 335540-1300000) (compatible with GNU linkers)
>>
>> and that I use:
>>
>> CFLAGS.clang+= -mcpu=cortex-a7
>> CXXFLAGS.clang+= -mcpu=cortex-a7
>> CPPFLAGS.clang+= -mcpu=cortex-a7
>>
>> in the src.conf like ~/src.configs/src.conf.armv7-clang-bootstrap.armv7-host
>> file that I used.
>>
>> The error reports were:
>>
>> --- libpixman-1.la ---
>> /bin/sh ../libtool  --tag=CC    --mode=link cc   -O -pipe -mcpu=cortex-a7  -g -fno-strict-aliasing  -Wall -Wdeclaration-after-statement -Wno-unused-local-typedefs -fno-strict-aliasing -fvisibility=hid
>> den -version-info 34:0:34  -no-undefined   -pthread       -o  libpixman-1.la -rpath /usr/local/lib pixman.lo pixman-access.lo pixman-access-accessors.lo  pixman-bits-image.lo pixman-combine32.lo  pixm
>> an-combine-float.lo pixman-conical-gradient.lo  pixman-filter.lo pixman-x86.lo pixman-mips.lo pixman-arm.lo  pixman-ppc.lo pixman-edge.lo pixman-edge-accessors.lo  pixman-fast-path.lo pixman-glyph.lo
>> pixman-general.lo  pixman-gradient-walker.lo pixman-image.lo  pixman-implementation.lo pixman-linear-gradient.lo  pixman-matrix.lo pixman-noop.lo pixman-radial-gradient.lo  pixman-region16.lo pixman-r
>> egion32.lo pixman-solid-fill.lo  pixman-timer.lo pixman-trap.lo pixman-utils.lo  -lm   -lm       libpixman-arm-simd.la libpixman-arm-neon.la     -lm
>> libtool: link: cc -shared  -fPIC -DPIC  .libs/pixman.o .libs/pixman-access.o .libs/pixman-access-accessors.o .libs/pixman-bits-image.o .libs/pixman-combine32.o .libs/pixman-combine-float.o .libs/pixma
>> n-conical-gradient.o .libs/pixman-filter.o .libs/pixman-x86.o .libs/pixman-mips.o .libs/pixman-arm.o .libs/pixman-ppc.o .libs/pixman-edge.o .libs/pixman-edge-accessors.o .libs/pixman-fast-path.o .libs
>> /pixman-glyph.o .libs/pixman-general.o .libs/pixman-gradient-walker.o .libs/pixman-image.o .libs/pixman-implementation.o .libs/pixman-linear-gradient.o .libs/pixman-matrix.o .libs/pixman-noop.o .libs/
>> pixman-radial-gradient.o .libs/pixman-region16.o .libs/pixman-region32.o .libs/pixman-solid-fill.o .libs/pixman-timer.o .libs/pixman-trap.o .libs/pixman-utils.o  -Wl,--whole-archive ./.libs/libpixman-
>> arm-simd.a ./.libs/libpixman-arm-neon.a -Wl,--no-whole-archive  -lm  -O -mcpu=cortex-a7 -g -pthread   -pthread -Wl,-soname -Wl,libpixman-1.so.0 -o .libs/libpixman-1.so.0.34.0
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-simd.a(pixman-arm-simd-asm-scaled.o)
>>>>> referenced by pixman-arm-simd-asm-scaled.o:(.text+0x1B8) in archive ./.libs/libpixman-arm-simd.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-simd.a(pixman-arm-simd-asm-scaled.o)
>>>>> referenced by pixman-arm-simd-asm-scaled.o:(.text+0x374) in archive ./.libs/libpixman-arm-simd.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x17AC) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x1814) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x1A38) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x1AFC) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x21C8) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x2294) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x84E0) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x85C4) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x9720) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x9834) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0xA7B0) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0xA8CC) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x105A0) in archive ./.libs/libpixman-arm-neon.a
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x10DB8) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x11274) in archive ./.libs/libpixman-arm-neon.a
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm.o)
>>>>> referenced by pixman-arm-neon-asm.o:(.text+0x11808) in archive ./.libs/libpixman-arm-neon.a
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm-bilinear.o)
>>>>> referenced by pixman-arm-neon-asm-bilinear.o:(.text+0x4F0) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC
>>>>> defined in ./.libs/libpixman-arm-neon.a(pixman-arm-neon-asm-bilinear.o)
>>>>> referenced by pixman-arm-neon-asm-bilinear.o:(.text+0xABC) in archive ./.libs/libpixman-arm-neon.a
>>
>> /usr/bin/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)
>> *** [libpixman-1.la] Error code 1
>>
>> make[3]: stopped in /wrkdirs/usr/ports/x11/pixman/work/pixman-0.34.0/pixman
>> 1 error
>>
>> make[3]: stopped in /wrkdirs/usr/ports/x11/pixman/work/pixman-0.34.0/pixman
>> *** [all-recursive] Error code 1
>>
>>
>> FreeBSD context details:
>>
>> # uname -apKU
>> FreeBSD OPiP2E 13.0-CURRENT FreeBSD 13.0-CURRENT #5 r340287M: Sat Nov 10 22:40:25 PST 2018     markmi@FBSDFSSD:/usr/obj/armv7_clang/arm.armv7/usr/src/arm.armv7/sys/GENERIC-NODBG  arm armv7 1300003 1300003
>
>
> I went back and looked at the amd64 -> armv7 cross-build
> ( that used teh poudriere-built /nxb-bin/usr/bin/ ) and it
> did not complain:
>
> --- libpixman-1.la ---
> /bin/sh ../libtool  --tag=CC    --mode=link /nxb-bin/usr/bin/cc   -O2 -pipe -mcpu=cortex-a7  -g -fno-strict-aliasing  -Wall -Wdeclaration-after-statement -Wno-unused-local-typedefs -fno-strict-aliasing -fvisibility=hidden -version-info 34:0:34  -no-undefined  -Wl,--no-threads  -pthread      -Wl,--no-threads -o  libpixman-1.la -rpath /usr/local/lib pixman.lo pixman-access.lo pixman-access-accessors.lo  pixman-bits-image.lo pixman-combine32.lo  pixman-combine-float.lo pixman-conical-gradient.lo  pixman-filter.lo pixman-x86.lo pixman-mips.lo pixman-arm.lo  pixman-ppc.lo pixman-edge.lo pixman-edge-accessors.lo  pixman-fast-path.lo pixman-glyph.lo pixman-general.lo  pixman-gradient-walker.lo pixman-image.lo  pixman-implementation.lo pixman-linear-gradient.lo  pixman-matrix.lo pixman-noop.lo pixman-radial-gradient.lo  pixman-region16.lo pixman-region32.lo pixman-solid-fill.lo  pixman-timer.lo pixman-trap.lo pixman-utils.lo  -lm   -lm       libpixman-arm-simd.la libpixman-arm-neon.la    
 -lm
> libtool: link: /nxb-bin/usr/bin/cc -shared  -fPIC -DPIC  .libs/pixman.o .libs/pixman-access.o .libs/pixman-access-accessors.o .libs/pixman-bits-image.o .libs/pixman-combine32.o .libs/pixman-combine-float.o .libs/pixman-conical-gradient.o .libs/pixman-filter.o .libs/pixman-x86.o .libs/pixman-mips.o .libs/pixman-arm.o .libs/pixman-ppc.o .libs/pixman-edge.o .libs/pixman-edge-accessors.o .libs/pixman-fast-path.o .libs/pixman-glyph.o .libs/pixman-general.o .libs/pixman-gradient-walker.o .libs/pixman-image.o .libs/pixman-implementation.o .libs/pixman-linear-gradient.o .libs/pixman-matrix.o .libs/pixman-noop.o .libs/pixman-radial-gradient.o .libs/pixman-region16.o .libs/pixman-region32.o .libs/pixman-solid-fill.o .libs/pixman-timer.o .libs/pixman-trap.o .libs/pixman-utils.o  -Wl,--whole-archive ./.libs/libpixman-arm-simd.a ./.libs/libpixman-arm-neon.a -Wl,--no-whole-archive  -lm  -O2 -mcpu=cortex-a7 -g -Wl,--no-threads -pthread -Wl,--no-threads   -pthread -Wl,-soname -Wl,libpixman-1.so.0
 -o .libs/libpixman-1.so.0.34.0

> libtool: link: (cd ".libs" && rm -f "libpixman-1.so.0" && ln -s "libpixman-1.so.0.34.0" "libpixman-1.so.0")
> libtool: link: (cd ".libs" && rm -f "libpixman-1.so" && ln -s "libpixman-1.so.0.34.0" "libpixman-1.so")
> libtool: link: (cd .libs/libpixman-1.lax/libpixman-arm-simd.a && ar x "/wrkdirs/usr/ports/x11/pixman/work/pixman-0.34.0/pixman/./.libs/libpixman-arm-simd.a")
> libtool: link: (cd .libs/libpixman-1.lax/libpixman-arm-neon.a && ar x "/wrkdirs/usr/ports/x11/pixman/work/pixman-0.34.0/pixman/./.libs/libpixman-arm-neon.a")
> libtool: link: ar cru .libs/libpixman-1.a  pixman.o pixman-access.o pixman-access-accessors.o pixman-bits-image.o pixman-combine32.o pixman-combine-float.o pixman-conical-gradient.o pixman-filter.o pixman-x86.o pixman-mips.o pixman-arm.o pixman-ppc.o pixman-edge.o pixman-edge-accessors.o pixman-fast-path.o pixman-glyph.o pixman-general.o pixman-gradient-walker.o pixman-image.o pixman-implementation.o pixman-linear-gradient.o pixman-matrix.o pixman-noop.o pixman-radial-gradient.o pixman-region16.o pixman-region32.o pixman-solid-fill.o pixman-timer.o pixman-trap.o pixman-utils.o  .libs/libpixman-1.lax/libpixman-arm-simd.a/pixman-arm-simd-asm-scaled.o .libs/libpixman-1.lax/libpixman-arm-simd.a/pixman-arm-simd-asm.o .libs/libpixman-1.lax/libpixman-arm-simd.a/pixman-arm-simd.o  .libs/libpixman-1.lax/libpixman-arm-neon.a/pixman-arm-neon-asm-bilinear.o .libs/libpixman-1.lax/libpixman-arm-neon.a/pixman-arm-neon-asm.o .libs/libpixman-1.lax/libpixman-arm-neon.a/pixman-arm-neon.o
> libtool: link: ranlib .libs/libpixman-1.a
> libtool: link: rm -fr .libs/libpixman-1.lax
> libtool: link: ( cd ".libs" && rm -f "libpixman-1.la" && ln -s "../libpixman-1.la" "libpixman-1.la" )
> ===========================================================================
> =======================<phase: run-depends    >============================
> ===========================================================================
> =======================<phase: stage          >============================
> . . .
>
>
> So I diff'd the logs and found the following (selective extraction):
> (- for amd64 -> armv7; + for armv7)
>
> -Poudriere version: 3.2.99.20180601
> +Poudriere version: 3.2.99.20181024
>
> This is was expected but may mean that I need to wait
> until the armv7 has 3.2.99.20181024 and I try via
> it.
>
> -SHELL=/bin/csh
> -UNAME_p=armv7
> -UNAME_m=arm
> -ABI_FILE=/usr/lib/crt1.o
> +SHELL=/bin/sh
>
> The SHELL's I expected but the other 3 lines I did not.
> But the 3 lines may only occur under qemu-user-static
> style use.
>
> -QEMU_EMULATING=1
>
> Expected.
>
> In CONFIGURE_ENV:
>
> amd64 -> armv7: CCASFLAGS having -O2
> armv7:          CCASFLAGS having -O
>
> In MAKE_ENV:
>
> amd64 -> armv7: CFLAGS having -O2
> armv7:          CFLAGS having -O
>
>
> (The -O2 vs. -O context differences may well be important
> to the behavior.)
>
> (I'll not list /nxb-bin/. . . path use vs. not.)
>
> Later:
>
> -MACHINE=arm
> -MACHINE_ARCH=armv7
> -ARCH=${MACHINE_ARCH}
>
> -.if ${LDFLAGS:M-fuse-ld=*lld*} || ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld
> -LDFLAGS+=      -Wl,--no-threads
> -.endif
>
> (That last was part of an experiment with avoiding a
> user-arm-static hangup.)
>
> -_SMP_CPUS=28
> +_SMP_CPUS=4
>
> I'll stop with that. It looks to me like -O2 vs. -O
> would be the likely distinction. While my materials
> probably caused that difference(?), the port likely
> should support both ways of building(?).


/usr/src/share/mk/sys.mk has:

.if !defined(%POSIX)
#
# MACHINE_CPUARCH defines a collection of MACHINE_ARCH.  Machines with
# the same MACHINE_ARCH can run each other's binaries, so it necessarily
# has word size and endian swizzled in.  However, the source files for
# these machines often are shared amongst all combinations of size
# and/or endian.  This is called MACHINE_CPU in NetBSD, but that's used
# for something different in FreeBSD.
#
__TO_CPUARCH=C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/
MACHINE_CPUARCH=${MACHINE_ARCH:${__TO_CPUARCH}}
.endif
. . .
.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
CFLAGS          ?=      -O -pipe
.else
CFLAGS          ?=      -O2 -pipe
.endif
. . .

So with qemu-user-static involved MACHINE_ARCH was defined as armv7
and MACHINE_CPUARCH was too. (See the earlier "-MACHINE_ARCH=armv7"
line of the log differences.)

But without qemu-user-static involved MACHINE_ARCH was not defined
and MACHINE_CPUARCH was defined as just arm . (No "+" line to
match.)

Overall result: the two contexts differ for -O2 vs. -O use in CFLAGS.


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

Bryan Drewery-6
On 11/14/18 2:35 PM, Mark Millard wrote:
> [Looking at package fallout logs: the official armv6 and armv7
> builds are using -O2 because of MACHINE_ARCH being defined
> because of qemu-user-static use. (mips too?) The logic in
> share/mk/sys.mk is not causing -O . An implication
> is that -O2 for armv6 and armv7 is probably far more tested
> than people generally expect. The share/mk/sys.mk change
> goes back to -r319861 2017-Jun-12 . Previously the logic
> would have caused -O use for armv6 or armv7 in MACHINE_ARCH .]

r319861 doesn't look related here.

--
Regards,
Bryan Drewery


signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

freebsd-x11 mailing list
On 2018-Nov-14, at 14:38, Bryan Drewery <bdrewery at FreeBSD.org> wrote:

> On 11/14/18 2:35 PM, Mark Millard wrote:
>> [Looking at package fallout logs: the official armv6 and armv7
>> builds are using -O2 because of MACHINE_ARCH being defined
>> because of qemu-user-static use. (mips too?) The logic in
>> share/mk/sys.mk is not causing -O . An implication
>> is that -O2 for armv6 and armv7 is probably far more tested
>> than people generally expect. The share/mk/sys.mk change
>> goes back to -r319861 2017-Jun-12 . Previously the logic
>> would have caused -O use for armv6 or armv7 in MACHINE_ARCH .]
>
> r319861 doesn't look related here.

I think that you are right.

The fallout logs do show the -O2 for armv6 and armv7
use though, not the -O use.


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

freebsd-x11 mailing list
In reply to this post by Bryan Drewery-6
[Evidence from inside poudriere bulk -j... -i ports-mgmt/pkg .
Use of native /nxb-bin/. . . leads to MACHINE_ARCH being amd64
instead of armv7 or the like. See later supporting material.]

On 2018-Nov-14, at 14:38, Bryan Drewery <[hidden email]> wrote:

> On 11/14/18 2:35 PM, Mark Millard wrote:
>> [Looking at package fallout logs: the official armv6 and armv7
>> builds are using -O2 because of MACHINE_ARCH being defined
>> because of qemu-user-static use. (mips too?) The logic in
>> share/mk/sys.mk is not causing -O . An implication
>> is that -O2 for armv6 and armv7 is probably far more tested
>> than people generally expect. The share/mk/sys.mk change
>> goes back to -r319861 2017-Jun-12 . Previously the logic
>> would have caused -O use for armv6 or armv7 in MACHINE_ARCH .]
>
> r319861 doesn't look related here.

# more /etc/make.conf
.sinclude "/etc/make.nxb.conf"
USE_PACKAGE_DEPENDS=yes
BATCH=yes
WRKDIRPREFIX=/wrkdirs
PORTSDIR=/usr/ports
PACKAGES=/packages
DISTDIR=/distfiles
FORCE_PACKAGE=yes
PACKAGE_BUILDING=yes
PACKAGE_BUILDING_FLAVORS=yes
MACHINE=arm
MACHINE_ARCH=armv7
ARCH=${MACHINE_ARCH}
#### /usr/local/etc/poudriere.d/make.conf ####
#### /usr/ports/Mk/Scripts/ports_env.sh ####
_CCVERSION_9d218390=FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: /nxb-bin/usr/bin
_ALTCCVERSION_9d218390=none
_CXXINTERNAL_9c45a5b1=FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: /nxb-bin/usr/bin "/nxb-bin/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1" "--hash-style=both" "--enable-new-dtags" "-o" "a.out" "/usr/lib/crt1.o" "/usr/lib/crti.o" "/usr/lib/crtbegin.o" "-L/usr/lib" "/dev/null" "-lc++" "-lm" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "/usr/lib/crtend.o" "/usr/lib/crtn.o"
CC_OUTPUT_9d218390_58173849=yes
CC_OUTPUT_9d218390_9bdba57c=yes
CC_OUTPUT_9d218390_6a4fe7f5=yes
CC_OUTPUT_9d218390_6bcac02b=yes
CC_OUTPUT_9d218390_67d20829=yes
CC_OUTPUT_9d218390_bfa62e83=yes
CC_OUTPUT_9d218390_f0b4d593=yes
CC_OUTPUT_9d218390_308abb44=yes
CC_OUTPUT_9d218390_f00456e5=yes
CC_OUTPUT_9d218390_65ad290d=yes
CC_OUTPUT_9d218390_f2776b26=yes
CC_OUTPUT_9d218390_b2657cc3=yes
CC_OUTPUT_9d218390_380987f7=yes
CC_OUTPUT_9d218390_160933ec=yes
CC_OUTPUT_9d218390_fb62803b=yes
_OBJC_CCVERSION_9d218390=FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: /nxb-bin/usr/bin
_OBJC_ALTCCVERSION_9d218390=none
ARCH=armv7
OPSYS=FreeBSD
_OSRELEASE=13.0-CURRENT
OSREL=13.0
OSVERSION=1300003
PYTHONBASE=/usr/local
_SMP_CPUS=32
CONFIGURE_MAX_CMD_LEN=262144
HAVE_PORTS_ENV=1
#### Misc Poudriere ####
GID=0
UID=0
PACKAGES=/packages

# more /etc/src.conf
/etc/src.conf: No such file or directory

# more Makefile
all:
        echo ${MACHINE_ARCH}
        echo ${MACHINE_CPUARCH}
        echo ${CFLAGS}

# make
echo armv7
armv7
echo arm
arm
echo -O2 -pipe
-O2 -pipe

# grep -r "\-O2" /usr/src/share/mk/
/usr/src/share/mk/sys.mk:CFLAGS ?= -O2 -pipe

# grep -r "\-pipe" /usr/src/share/mk/
/usr/src/share/mk/sys.mk:CFLAGS ?= -O -pipe
/usr/src/share/mk/sys.mk:CFLAGS ?= -O2 -pipe

Those lines come from:

.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
CFLAGS          ?=      -O -pipe
.else
CFLAGS          ?=      -O2 -pipe
.endif

So I used:

# make -dA 2>2mmjnk.txt 1>1mmjnk.txt

and looked for the first -pipe in 2mmjnk.txt. (It is also
the first -O , in this case -O2 .)

. . .
Got 'C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/' from '${__TO_CPUARCH}'}
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "mips(n32|64)?(el)?(hf)?"
Modifier pattern: "mips"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "arm(v[67])?(eb)?"
Modifier pattern: "arm"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "powerpc(64|spe)"
Modifier pattern: "powerpc"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "riscv64(sf)?"
Modifier pattern: "riscv"
Result[MACHINE_ARCH] of :C is "amd64"
lhs = "amd64", rhs = "arm", op = ==
Got 'C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/' from '${__TO_CPUARCH}'}
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "mips(n32|64)?(el)?(hf)?"
Modifier pattern: "mips"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "arm(v[67])?(eb)?"
Modifier pattern: "arm"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "powerpc(64|spe)"
Modifier pattern: "powerpc"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "riscv64(sf)?"
Modifier pattern: "riscv"
Result[MACHINE_ARCH] of :C is "amd64"
lhs = "amd64", rhs = "mips", op = ==
ParseReadLine (172): 'CFLAGS            ?=      -O2 -pipe'
Global:CFLAGS = -O2 -pipe

It looks like the poudriere builds based on /nxb-bin/. . .
See the amd64 MACHINE_ARCH in the context that shows:

# uname -apKU
FreeBSD FBSDamd64TR 13.0-CURRENT FreeBSD 13.0-CURRENT arm armv7 1300003 1300003





===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

freebsd-x11 mailing list
[Looks like there are 2 stages involved in that
2mmjnk.txt file that I generated. Before
MACHINE_ARCH is explicitly assigned and after.]

On 2018-Nov-14, at 15:40, Mark Millard <marklmi at yahoo.com> wrote:

> [Evidence from inside poudriere bulk -j... -i ports-mgmt/pkg .
> Use of native /nxb-bin/. . . leads to MACHINE_ARCH being amd64
> instead of armv7 or the like. See later supporting material.]
>
> On 2018-Nov-14, at 14:38, Bryan Drewery <[hidden email]> wrote:
>
>> On 11/14/18 2:35 PM, Mark Millard wrote:
>>> [Looking at package fallout logs: the official armv6 and armv7
>>> builds are using -O2 because of MACHINE_ARCH being defined
>>> because of qemu-user-static use. (mips too?) The logic in
>>> share/mk/sys.mk is not causing -O . An implication
>>> is that -O2 for armv6 and armv7 is probably far more tested
>>> than people generally expect. The share/mk/sys.mk change
>>> goes back to -r319861 2017-Jun-12 . Previously the logic
>>> would have caused -O use for armv6 or armv7 in MACHINE_ARCH .]
>>
>> r319861 doesn't look related here.
>
> # more /etc/make.conf
> .sinclude "/etc/make.nxb.conf"
> USE_PACKAGE_DEPENDS=yes
> BATCH=yes
> WRKDIRPREFIX=/wrkdirs
> PORTSDIR=/usr/ports
> PACKAGES=/packages
> DISTDIR=/distfiles
> FORCE_PACKAGE=yes
> PACKAGE_BUILDING=yes
> PACKAGE_BUILDING_FLAVORS=yes
> MACHINE=arm
> MACHINE_ARCH=armv7
> ARCH=${MACHINE_ARCH}
> #### /usr/local/etc/poudriere.d/make.conf ####
> #### /usr/ports/Mk/Scripts/ports_env.sh ####
> _CCVERSION_9d218390=FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: /nxb-bin/usr/bin
> _ALTCCVERSION_9d218390=none
> _CXXINTERNAL_9c45a5b1=FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: /nxb-bin/usr/bin "/nxb-bin/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1" "--hash-style=both" "--enable-new-dtags" "-o" "a.out" "/usr/lib/crt1.o" "/usr/lib/crti.o" "/usr/lib/crtbegin.o" "-L/usr/lib" "/dev/null" "-lc++" "-lm" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "/usr/lib/crtend.o" "/usr/lib/crtn.o"
> CC_OUTPUT_9d218390_58173849=yes
> CC_OUTPUT_9d218390_9bdba57c=yes
> CC_OUTPUT_9d218390_6a4fe7f5=yes
> CC_OUTPUT_9d218390_6bcac02b=yes
> CC_OUTPUT_9d218390_67d20829=yes
> CC_OUTPUT_9d218390_bfa62e83=yes
> CC_OUTPUT_9d218390_f0b4d593=yes
> CC_OUTPUT_9d218390_308abb44=yes
> CC_OUTPUT_9d218390_f00456e5=yes
> CC_OUTPUT_9d218390_65ad290d=yes
> CC_OUTPUT_9d218390_f2776b26=yes
> CC_OUTPUT_9d218390_b2657cc3=yes
> CC_OUTPUT_9d218390_380987f7=yes
> CC_OUTPUT_9d218390_160933ec=yes
> CC_OUTPUT_9d218390_fb62803b=yes
> _OBJC_CCVERSION_9d218390=FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: /nxb-bin/usr/bin
> _OBJC_ALTCCVERSION_9d218390=none
> ARCH=armv7
> OPSYS=FreeBSD
> _OSRELEASE=13.0-CURRENT
> OSREL=13.0
> OSVERSION=1300003
> PYTHONBASE=/usr/local
> _SMP_CPUS=32
> CONFIGURE_MAX_CMD_LEN=262144
> HAVE_PORTS_ENV=1
> #### Misc Poudriere ####
> GID=0
> UID=0
> PACKAGES=/packages
>
> # more /etc/src.conf
> /etc/src.conf: No such file or directory
>
> # more Makefile
> all:
>        echo ${MACHINE_ARCH}
>        echo ${MACHINE_CPUARCH}
>        echo ${CFLAGS}
>
> # make
> echo armv7
> armv7
> echo arm
> arm
> echo -O2 -pipe
> -O2 -pipe
>
> # grep -r "\-O2" /usr/src/share/mk/
> /usr/src/share/mk/sys.mk:CFLAGS ?= -O2 -pipe
>
> # grep -r "\-pipe" /usr/src/share/mk/
> /usr/src/share/mk/sys.mk:CFLAGS ?= -O -pipe
> /usr/src/share/mk/sys.mk:CFLAGS ?= -O2 -pipe
>
> Those lines come from:
>
> .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
> CFLAGS          ?=      -O -pipe
> .else
> CFLAGS          ?=      -O2 -pipe
> .endif
>
> So I used:
>
> # make -dA 2>2mmjnk.txt 1>1mmjnk.txt
>
> and looked for the first -pipe in 2mmjnk.txt. (It is also
> the first -O , in this case -O2 .)
>
> . . .
> Got 'C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/' from '${__TO_CPUARCH}'}
> Applying[MACHINE_ARCH] :C to "amd64"
> Modifier pattern: "mips(n32|64)?(el)?(hf)?"
> Modifier pattern: "mips"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Modifier pattern: "arm(v[67])?(eb)?"
> Modifier pattern: "arm"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Modifier pattern: "powerpc(64|spe)"
> Modifier pattern: "powerpc"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Modifier pattern: "riscv64(sf)?"
> Modifier pattern: "riscv"
> Result[MACHINE_ARCH] of :C is "amd64"
> lhs = "amd64", rhs = "arm", op = ==
> Got 'C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/' from '${__TO_CPUARCH}'}
> Applying[MACHINE_ARCH] :C to "amd64"
> Modifier pattern: "mips(n32|64)?(el)?(hf)?"
> Modifier pattern: "mips"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Modifier pattern: "arm(v[67])?(eb)?"
> Modifier pattern: "arm"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Modifier pattern: "powerpc(64|spe)"
> Modifier pattern: "powerpc"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Modifier pattern: "riscv64(sf)?"
> Modifier pattern: "riscv"
> Result[MACHINE_ARCH] of :C is "amd64"
> lhs = "amd64", rhs = "mips", op = ==
> ParseReadLine (172): 'CFLAGS            ?=      -O2 -pipe'
> Global:CFLAGS = -O2 -pipe
>
> It looks like the poudriere builds based on /nxb-bin/. . .
> See the amd64 MACHINE_ARCH in the context that shows:
>
> # uname -apKU
> FreeBSD FBSDamd64TR 13.0-CURRENT FreeBSD 13.0-CURRENT arm armv7 1300003 1300003


# grep "MACHINE_.*ARCH" 2mmjnk.txt
ParseReadLine (17): 'MACHINE_CPUARCH=${MACHINE_ARCH:${__TO_CPUARCH}}'
Global:MACHINE_CPUARCH = ${MACHINE_ARCH:${__TO_CPUARCH}}
Applying[MACHINE_ARCH] :C to "amd64"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Result[MACHINE_ARCH] of :C is "amd64"
ParseReadLine (12): 'MACHINE_ARCH=armv7'
Global:MACHINE_ARCH = armv7
ParseReadLine (13): 'ARCH=${MACHINE_ARCH}'
Global:ARCH = ${MACHINE_ARCH}
ParseReadLine (2): ' echo ${MACHINE_ARCH}'
ParseReadLine (3): ' echo ${MACHINE_CPUARCH}'
MACHINE_CPUARCH  = ${MACHINE_ARCH:${__TO_CPUARCH}}
MACHINE_ARCH     = armv7
Applying[MACHINE_ARCH] :C to "armv7"
Result[MACHINE_ARCH] of :C is "armv7"
Applying[MACHINE_ARCH] :C to "armv7"
Result[MACHINE_ARCH] of :C is "arm"
Applying[MACHINE_ARCH] :C to "arm"
Result[MACHINE_ARCH] of :C is "arm"
Applying[MACHINE_ARCH] :C to "arm"
Result[MACHINE_ARCH] of :C is "arm"
MACHINE_CPUARCH  = ${MACHINE_ARCH:${__TO_CPUARCH}}
MACHINE_ARCH     = armv7

Part of the issue is the ?= use from before the
explicit MACHINE_ARCH assignment blocks any later
?= attempt form changing the result.

I'll note that any of the following executing before the
explicitly MACHINE_ARCH assignment would apparently get
the amd64 value from the /nxb-bin/. . . context, just like
the .if conditional in under investigation:

# grep -r "^\..*MACHINE_ARCH" /usr/src/Makefile* /usr/src/share/mk/ /usr/ports/Mk/ | more
/usr/src/Makefile.inc1:.if ${MACHINE_ARCH} != ${BUILD_ARCH}
/usr/src/Makefile.inc1:.warning "To cross-build, set TARGET_ARCH ${MACHINE_ARCH} != ${BUILD_ARCH} ."
/usr/src/Makefile.inc1:.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE} || \
/usr/src/Makefile.inc1:.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BUILD_WITH_STRICT_TMPPATH} != 0
/usr/src/Makefile.inc1:.elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no"
/usr/src/Makefile.inc1:.if ${TARGET} == ${MACHINE} && ${TARGET_ARCH} == ${MACHINE_ARCH}
/usr/src/share/mk/bsd.arch.inc.mk:.elif exists(${.CURDIR}/Makefile.${MACHINE_ARCH})
/usr/src/share/mk/bsd.arch.inc.mk:.include "Makefile.${MACHINE_ARCH}"
/usr/src/share/mk/local.meta.sys.mk:.if empty(MACHINE_ARCH)
/usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "sparc64"
/usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "powerpc"
/usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "powerpcspe"
/usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "powerpc64"
/usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "sparc64"
/usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "powerpc"
/usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "sparc64"
/usr/src/share/mk/bsd.cpu.mk:. if ${MACHINE_ARCH:Mmips*el*} != ""
/usr/src/share/mk/bsd.cpu.mk:. if ${MACHINE_ARCH:Mmips64*} != ""
/usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH:Mmipsn32*} != ""
/usr/src/share/mk/bsd.cpu.mk:. if ${MACHINE_ARCH:Mmips*hf}
/usr/src/share/mk/bsd.cpu.mk:. if ${MACHINE_ARCH:Marmv6*} != ""
/usr/src/share/mk/bsd.cpu.mk:. if ${MACHINE_ARCH:Marmv7*} != ""
/usr/src/share/mk/bsd.cpu.mk:. if ${MACHINE_ARCH:Marmv[67]*} == ""
/usr/src/share/mk/bsd.cpu.mk:.if ${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != ""
/usr/src/share/mk/bsd.cpu.mk:.if ${MACHINE_ARCH} == "powerpcspe"
/usr/src/share/mk/bsd.cpu.mk:.if ${MACHINE_ARCH:Mriscv*sf}
/usr/src/share/mk/bsd.endian.mk:.if ${MACHINE_ARCH} == "aarch64" || \
/usr/src/share/mk/bsd.endian.mk:.elif ${MACHINE_ARCH} == "powerpc" || \
/usr/ports/Mk/Uses/gnustep.mk:.if ${MACHINE_ARCH} == "i386"

(I have not tried to figure out which have a chance of
executing before the MACHINE_ARCH explicit assignment.)

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

Bryan Drewery-6
On 11/14/18 5:24 PM, Mark Millard wrote:

> [Looks like there are 2 stages involved in that
> 2mmjnk.txt file that I generated. Before
> MACHINE_ARCH is explicitly assigned and after.]
>
> On 2018-Nov-14, at 15:40, Mark Millard <marklmi at yahoo.com> wrote:
>
>> [Evidence from inside poudriere bulk -j... -i ports-mgmt/pkg .
>> Use of native /nxb-bin/. . . leads to MACHINE_ARCH being amd64
>> instead of armv7 or the like. See later supporting material.]
>>
>> On 2018-Nov-14, at 14:38, Bryan Drewery <[hidden email]> wrote:
>>
>>> On 11/14/18 2:35 PM, Mark Millard wrote:
>>>> [Looking at package fallout logs: the official armv6 and armv7
>>>> builds are using -O2 because of MACHINE_ARCH being defined
>>>> because of qemu-user-static use. (mips too?) The logic in
>>>> share/mk/sys.mk is not causing -O . An implication
>>>> is that -O2 for armv6 and armv7 is probably far more tested
>>>> than people generally expect. The share/mk/sys.mk change
>>>> goes back to -r319861 2017-Jun-12 . Previously the logic
>>>> would have caused -O use for armv6 or armv7 in MACHINE_ARCH .]
>>>
>>> r319861 doesn't look related here.
>>
>> # more /etc/make.conf
>> .sinclude "/etc/make.nxb.conf"
>> USE_PACKAGE_DEPENDS=yes
>> BATCH=yes
>> WRKDIRPREFIX=/wrkdirs
>> PORTSDIR=/usr/ports
>> PACKAGES=/packages
>> DISTDIR=/distfiles
>> FORCE_PACKAGE=yes
>> PACKAGE_BUILDING=yes
>> PACKAGE_BUILDING_FLAVORS=yes
>> MACHINE=arm
>> MACHINE_ARCH=armv7
>> ARCH=${MACHINE_ARCH}
>> #### /usr/local/etc/poudriere.d/make.conf ####
>> #### /usr/ports/Mk/Scripts/ports_env.sh ####
>> _CCVERSION_9d218390=FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: /nxb-bin/usr/bin
>> _ALTCCVERSION_9d218390=none
>> _CXXINTERNAL_9c45a5b1=FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: /nxb-bin/usr/bin "/nxb-bin/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1" "--hash-style=both" "--enable-new-dtags" "-o" "a.out" "/usr/lib/crt1.o" "/usr/lib/crti.o" "/usr/lib/crtbegin.o" "-L/usr/lib" "/dev/null" "-lc++" "-lm" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "/usr/lib/crtend.o" "/usr/lib/crtn.o"
>> CC_OUTPUT_9d218390_58173849=yes
>> CC_OUTPUT_9d218390_9bdba57c=yes
>> CC_OUTPUT_9d218390_6a4fe7f5=yes
>> CC_OUTPUT_9d218390_6bcac02b=yes
>> CC_OUTPUT_9d218390_67d20829=yes
>> CC_OUTPUT_9d218390_bfa62e83=yes
>> CC_OUTPUT_9d218390_f0b4d593=yes
>> CC_OUTPUT_9d218390_308abb44=yes
>> CC_OUTPUT_9d218390_f00456e5=yes
>> CC_OUTPUT_9d218390_65ad290d=yes
>> CC_OUTPUT_9d218390_f2776b26=yes
>> CC_OUTPUT_9d218390_b2657cc3=yes
>> CC_OUTPUT_9d218390_380987f7=yes
>> CC_OUTPUT_9d218390_160933ec=yes
>> CC_OUTPUT_9d218390_fb62803b=yes
>> _OBJC_CCVERSION_9d218390=FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: /nxb-bin/usr/bin
>> _OBJC_ALTCCVERSION_9d218390=none
>> ARCH=armv7
>> OPSYS=FreeBSD
>> _OSRELEASE=13.0-CURRENT
>> OSREL=13.0
>> OSVERSION=1300003
>> PYTHONBASE=/usr/local
>> _SMP_CPUS=32
>> CONFIGURE_MAX_CMD_LEN=262144
>> HAVE_PORTS_ENV=1
>> #### Misc Poudriere ####
>> GID=0
>> UID=0
>> PACKAGES=/packages
>>
>> # more /etc/src.conf
>> /etc/src.conf: No such file or directory
>>
>> # more Makefile
>> all:
>>        echo ${MACHINE_ARCH}
>>        echo ${MACHINE_CPUARCH}
>>        echo ${CFLAGS}
>>
>> # make
>> echo armv7
>> armv7
>> echo arm
>> arm
>> echo -O2 -pipe
>> -O2 -pipe
>>
>> # grep -r "\-O2" /usr/src/share/mk/
>> /usr/src/share/mk/sys.mk:CFLAGS ?= -O2 -pipe
>>
>> # grep -r "\-pipe" /usr/src/share/mk/
>> /usr/src/share/mk/sys.mk:CFLAGS ?= -O -pipe
>> /usr/src/share/mk/sys.mk:CFLAGS ?= -O2 -pipe
>>
>> Those lines come from:
>>
>> .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
>> CFLAGS          ?=      -O -pipe
>> .else
>> CFLAGS          ?=      -O2 -pipe
>> .endif
>>
>> So I used:
>>
>> # make -dA 2>2mmjnk.txt 1>1mmjnk.txt
>>
>> and looked for the first -pipe in 2mmjnk.txt. (It is also
>> the first -O , in this case -O2 .)
>>
>> . . .
>> Got 'C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/' from '${__TO_CPUARCH}'}
>> Applying[MACHINE_ARCH] :C to "amd64"
>> Modifier pattern: "mips(n32|64)?(el)?(hf)?"
>> Modifier pattern: "mips"
>> Result[MACHINE_ARCH] of :C is "amd64"
>> Applying[MACHINE_ARCH] :C to "amd64"
>> Modifier pattern: "arm(v[67])?(eb)?"
>> Modifier pattern: "arm"
>> Result[MACHINE_ARCH] of :C is "amd64"
>> Applying[MACHINE_ARCH] :C to "amd64"
>> Modifier pattern: "powerpc(64|spe)"
>> Modifier pattern: "powerpc"
>> Result[MACHINE_ARCH] of :C is "amd64"
>> Applying[MACHINE_ARCH] :C to "amd64"
>> Modifier pattern: "riscv64(sf)?"
>> Modifier pattern: "riscv"
>> Result[MACHINE_ARCH] of :C is "amd64"
>> lhs = "amd64", rhs = "arm", op = ==
>> Got 'C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/' from '${__TO_CPUARCH}'}
>> Applying[MACHINE_ARCH] :C to "amd64"
>> Modifier pattern: "mips(n32|64)?(el)?(hf)?"
>> Modifier pattern: "mips"
>> Result[MACHINE_ARCH] of :C is "amd64"
>> Applying[MACHINE_ARCH] :C to "amd64"
>> Modifier pattern: "arm(v[67])?(eb)?"
>> Modifier pattern: "arm"
>> Result[MACHINE_ARCH] of :C is "amd64"
>> Applying[MACHINE_ARCH] :C to "amd64"
>> Modifier pattern: "powerpc(64|spe)"
>> Modifier pattern: "powerpc"
>> Result[MACHINE_ARCH] of :C is "amd64"
>> Applying[MACHINE_ARCH] :C to "amd64"
>> Modifier pattern: "riscv64(sf)?"
>> Modifier pattern: "riscv"
>> Result[MACHINE_ARCH] of :C is "amd64"
>> lhs = "amd64", rhs = "mips", op = ==
>> ParseReadLine (172): 'CFLAGS            ?=      -O2 -pipe'
>> Global:CFLAGS = -O2 -pipe
>>
>> It looks like the poudriere builds based on /nxb-bin/. . .
>> See the amd64 MACHINE_ARCH in the context that shows:
>>
>> # uname -apKU
>> FreeBSD FBSDamd64TR 13.0-CURRENT FreeBSD 13.0-CURRENT arm armv7 1300003 1300003
>
>
> # grep "MACHINE_.*ARCH" 2mmjnk.txt
> ParseReadLine (17): 'MACHINE_CPUARCH=${MACHINE_ARCH:${__TO_CPUARCH}}'
> Global:MACHINE_CPUARCH = ${MACHINE_ARCH:${__TO_CPUARCH}}
> Applying[MACHINE_ARCH] :C to "amd64"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Result[MACHINE_ARCH] of :C is "amd64"
> Applying[MACHINE_ARCH] :C to "amd64"
> Result[MACHINE_ARCH] of :C is "amd64"
> ParseReadLine (12): 'MACHINE_ARCH=armv7'
> Global:MACHINE_ARCH = armv7
> ParseReadLine (13): 'ARCH=${MACHINE_ARCH}'
> Global:ARCH = ${MACHINE_ARCH}
> ParseReadLine (2): ' echo ${MACHINE_ARCH}'
> ParseReadLine (3): ' echo ${MACHINE_CPUARCH}'
> MACHINE_CPUARCH  = ${MACHINE_ARCH:${__TO_CPUARCH}}
> MACHINE_ARCH     = armv7
> Applying[MACHINE_ARCH] :C to "armv7"
> Result[MACHINE_ARCH] of :C is "armv7"
> Applying[MACHINE_ARCH] :C to "armv7"
> Result[MACHINE_ARCH] of :C is "arm"
> Applying[MACHINE_ARCH] :C to "arm"
> Result[MACHINE_ARCH] of :C is "arm"
> Applying[MACHINE_ARCH] :C to "arm"
> Result[MACHINE_ARCH] of :C is "arm"
> MACHINE_CPUARCH  = ${MACHINE_ARCH:${__TO_CPUARCH}}
> MACHINE_ARCH     = armv7
>
> Part of the issue is the ?= use from before the
> explicit MACHINE_ARCH assignment blocks any later
> ?= attempt form changing the result.
>
> I'll note that any of the following executing before the
> explicitly MACHINE_ARCH assignment would apparently get
> the amd64 value from the /nxb-bin/. . . context, just like
> the .if conditional in under investigation:
>
> # grep -r "^\..*MACHINE_ARCH" /usr/src/Makefile* /usr/src/share/mk/ /usr/ports/Mk/ | more
> /usr/src/Makefile.inc1:.if ${MACHINE_ARCH} != ${BUILD_ARCH}
> /usr/src/Makefile.inc1:.warning "To cross-build, set TARGET_ARCH ${MACHINE_ARCH} != ${BUILD_ARCH} ."
> /usr/src/Makefile.inc1:.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE} || \
> /usr/src/Makefile.inc1:.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BUILD_WITH_STRICT_TMPPATH} != 0
> /usr/src/Makefile.inc1:.elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no"
> /usr/src/Makefile.inc1:.if ${TARGET} == ${MACHINE} && ${TARGET_ARCH} == ${MACHINE_ARCH}
> /usr/src/share/mk/bsd.arch.inc.mk:.elif exists(${.CURDIR}/Makefile.${MACHINE_ARCH})
> /usr/src/share/mk/bsd.arch.inc.mk:.include "Makefile.${MACHINE_ARCH}"
> /usr/src/share/mk/local.meta.sys.mk:.if empty(MACHINE_ARCH)
> /usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "sparc64"
> /usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "powerpc"
> /usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "powerpcspe"
> /usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "powerpc64"
> /usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "sparc64"
> /usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "powerpc"
> /usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH} == "sparc64"
> /usr/src/share/mk/bsd.cpu.mk:. if ${MACHINE_ARCH:Mmips*el*} != ""
> /usr/src/share/mk/bsd.cpu.mk:. if ${MACHINE_ARCH:Mmips64*} != ""
> /usr/src/share/mk/bsd.cpu.mk:. elif ${MACHINE_ARCH:Mmipsn32*} != ""
> /usr/src/share/mk/bsd.cpu.mk:. if ${MACHINE_ARCH:Mmips*hf}
> /usr/src/share/mk/bsd.cpu.mk:. if ${MACHINE_ARCH:Marmv6*} != ""
> /usr/src/share/mk/bsd.cpu.mk:. if ${MACHINE_ARCH:Marmv7*} != ""
> /usr/src/share/mk/bsd.cpu.mk:. if ${MACHINE_ARCH:Marmv[67]*} == ""
> /usr/src/share/mk/bsd.cpu.mk:.if ${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != ""
> /usr/src/share/mk/bsd.cpu.mk:.if ${MACHINE_ARCH} == "powerpcspe"
> /usr/src/share/mk/bsd.cpu.mk:.if ${MACHINE_ARCH:Mriscv*sf}
> /usr/src/share/mk/bsd.endian.mk:.if ${MACHINE_ARCH} == "aarch64" || \
> /usr/src/share/mk/bsd.endian.mk:.elif ${MACHINE_ARCH} == "powerpc" || \
> /usr/ports/Mk/Uses/gnustep.mk:.if ${MACHINE_ARCH} == "i386"
>
> (I have not tried to figure out which have a chance of
> executing before the MACHINE_ARCH explicit assignment.)
>
> ===
> Mark Millard
> marklmi at yahoo.com
> ( dsl-only.net went
> away in early 2018-Mar)
>
I think the real problem here is that Poudriere is setting MACHINE_ARCH
in make.conf and sys.mk loads make.conf *after* checking MACHINE_CPUARCH
(derived from MACHINE_ARCH) to determine CFLAGS; The .if is expanding
MACHINE_CPUARCH before make.conf is included.

We probably need a make-env.conf thing like src-env.conf to allow
modifying sys.mk earlier.


--
Regards,
Bryan Drewery


signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

freebsd-x11 mailing list
On 2018-Nov-14, at 17:45, Bryan Drewery <bdrewery at FreeBSD.org> wrote:

> I think the real problem here is that Poudriere is setting MACHINE_ARCH
> in make.conf and sys.mk loads make.conf *after* checking MACHINE_CPUARCH
> (derived from MACHINE_ARCH) to determine CFLAGS; The .if is expanding
> MACHINE_CPUARCH before make.conf is included.
>
> We probably need a make-env.conf thing like src-env.conf to allow
> modifying sys.mk earlier.

Cool.


We still get the result that arm[67], and possibly some mips,
have had a lot of -O2 use based on what has historically been
done by the qemu-user-static based official-build servers.

And that leads to questioning the need for -O instead of -O2
for armv[67] and possibly some mips contexts.

Or, going the other way: Should -O be forced and have an
exp run for, say armv7 ? An example of what would be found is
what I ran into for x11/pixman when its build used -O (native)
instead of -O2 (cross-build via qemu-user-static) and a link
command failed for -O use. (It was the failure that started my
looking for what was different from my prior cross-build that
had worked.)


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

freebsd-x11 mailing list
[My wording presumed some context not presented.]

On 2018-Nov-14, at 18:21, Mark Millard <marklmi at yahoo.com> wrote:

> On 2018-Nov-14, at 17:45, Bryan Drewery <bdrewery at FreeBSD.org> wrote:
>
>> I think the real problem here is that Poudriere is setting MACHINE_ARCH
>> in make.conf and sys.mk loads make.conf *after* checking MACHINE_CPUARCH
>> (derived from MACHINE_ARCH) to determine CFLAGS; The .if is expanding
>> MACHINE_CPUARCH before make.conf is included.
>>
>> We probably need a make-env.conf thing like src-env.conf to allow
>> modifying sys.mk earlier.
>
> Cool.
>
>
> We still get the result that arm[67], and possibly some mips,
> have had a lot of -O2 use based on what has historically been
> done by the qemu-user-static based official-build servers.
 
The reference to qemu-user-static was meant to be for
with /nxb-bin/. . . (or some form of native tools). It
is the native tools that initially have MACHINE_ARCH
being amd64 by default for the example contexts.

Absent that, qemu-arm-static would likely report armv6 for
all arm's until the explicit assignment. (The "armv6" is a
single compile-time constant in the qemu-arm-static
source at this time.) So this likely would behave as on
a native build: -O .

> And that leads to questioning the need for -O instead of -O2
> for armv[67] and possibly some mips contexts.
>
> Or, going the other way: Should -O be forced and have an
> exp run for, say armv7 ? An example of what would be found is
> what I ran into for x11/pixman when its build used -O (native)
> instead of -O2 (cross-build via qemu-user-static) and a link
> command failed for -O use. (It was the failure that started my
> looking for what was different from my prior cross-build that
> had worked.)


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

Jan Beich-5
In reply to this post by freebsd-x11 mailing list
Mark Millard via freebsd-x11 <[hidden email]> writes:

> [Added: The original cross-build via poudriere-devel and qemu-user-static
> did not get this problem. I give details later. Sumamry: Looks like -O2
> was used for the cross build and -O was used for armv7 native. The
> difference is likely(?) from my materials but not supporting both ways of
> building is likely a problem with the port(?).]

x11/pixman builds fine on armv7 even with -O. Tested both Clang/LLD 6.0
and 7.0 after forcing MACHINE_CPUARCH=arm on command line.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"