Date: Fri, 16 Nov 2018 11:39:55 -0800 From: Mark Millard <marklmi@yahoo.com> To: Jan Beich <jbeich@FreeBSD.org>, ports-list freebsd <freebsd-ports@freebsd.org> Subject: 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 Message-ID: <A76D7D49-E36E-4665-AA4B-D083CCF7D57B@yahoo.com>
next in thread | raw e-mail | index | archive | help
Jan Beich jbeich at FreeBSD.org wrote on Fri Nov 16 02:15:57 UTC 2018 : > Mark Millard via freebsd-x11 <freebsd-x11 at freebsd.org> writes: >=20 > > [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(?).] >=20 > x11/pixman builds fine on armv7 even with -O. Tested both Clang/LLD = 6.0 > and 7.0 after forcing MACHINE_CPUARCH=3Darm on command line. Interesting. My context was a poudriere build that was rebuilding all my normal ports for the armv7 context (414 total). (poudriere is still running, still having 12 to go, including llvm60, llvm70, and gcc8.) This was/is under: # 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/GENER= IC-NODBG arm armv7 1300003 1300003 and is tied to my jump from before openssl was updated( -r339076 ) to after. It was using system clang and lld, not devel/llvm* . The only other thing to have failed so far is multimedia/libpvx but it failed built both ways ( native and cross-build with /nxb-bin/. . . ). Do you have a log that would show the commands that were used to produce the things that were listed in my original report for the "R_ARM_V4BX against local in readonly segment": pixman-arm-simd-asm-scaled.o pixman-arm-neon-asm.o pixman-arm-neon-asm-bilinear.o --- libpixman-1.la --- (for where the use of the .o's was attempted via = a library) ? If yes we might be able to compare for differences to explain the variation. I do have the logs from the poudriere build attempts in both contexts ( native and cross-build with /nxb-bin/. . . ). It might be possible that my -mcpu use mixed with -O is part of what is required to have the problem. (Only difference?) It looks to be a long time (days) before the armv7 poudriere run will complete. So testing alternatives in that environment is delayed. For now comparing commands in log files is all I've got to work with initially (if we can). Next would be to look at the .S files. My failing-context's commands: (The 3 sources are .S files. The -o .libs/*.o commands do list -fPIC and = -DPIC but I'm not sure how those would apply to .S files.) --- pixman-arm-simd-asm-scaled.lo --- libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -mcpu=3Dcortex-a7 -O = -pipe -mcpu=3Dcortex-a7 -g -fno-strict-aliasing -no-integrated-as -MT = pixman-arm-simd-asm-scaled.lo -MD -MP -MF = .deps/pixman-arm-simd-asm-scaled.Tpo -c pixman-arm-simd-asm-scaled.S = -fPIC -DPIC -o .libs/pixman-arm-simd-asm-scaled.o --- pixman-arm-simd-asm-scaled.lo --- libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -mcpu=3Dcortex-a7 -O = -pipe -mcpu=3Dcortex-a7 -g -fno-strict-aliasing -no-integrated-as -MT = pixman-arm-simd-asm-scaled.lo -MD -MP -MF = .deps/pixman-arm-simd-asm-scaled.Tpo -c pixman-arm-simd-asm-scaled.S -o = pixman-arm-simd-asm-scaled.o >/dev/null 2>&1 --- libpixman-arm-simd.la --- libtool: link: ar cru .libs/libpixman-arm-simd.a .libs/pixman-arm-simd.o = .libs/pixman-arm-simd-asm.o .libs/pixman-arm-simd-asm-scaled.o=20 libtool: link: ranlib .libs/libpixman-arm-simd.a libtool: link: ( cd ".libs" && rm -f "libpixman-arm-simd.la" && ln -s = "../libpixman-arm-simd.la" "libpixman-arm-simd.la" ) --- pixman-arm-neon-asm.lo --- libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -mcpu=3Dcortex-a7 -O = -pipe -mcpu=3Dcortex-a7 -g -fno-strict-aliasing -no-integrated-as -MT = pixman-arm-neon-asm.lo -MD -MP -MF .deps/pixman-arm-neon-asm.Tpo -c = pixman-arm-neon-asm.S -fPIC -DPIC -o .libs/pixman-arm-neon-asm.o --- pixman-arm-neon-asm.lo --- libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -mcpu=3Dcortex-a7 -O = -pipe -mcpu=3Dcortex-a7 -g -fno-strict-aliasing -no-integrated-as -MT = pixman-arm-neon-asm.lo -MD -MP -MF .deps/pixman-arm-neon-asm.Tpo -c = pixman-arm-neon-asm.S -o pixman-arm-neon-asm.o >/dev/null 2>&1 --- libpixman-arm-neon.la --- /bin/sh ../libtool --tag=3DCC --mode=3Dlink cc -O -pipe = -mcpu=3Dcortex-a7 -g -fno-strict-aliasing -Wall = -Wdeclaration-after-statement -Wno-unused-local-typedefs = -fno-strict-aliasing -fvisibility=3Dhidden -o libpixman-arm-neon.la = pixman-arm-neon.lo pixman-arm-neon-asm.lo = pixman-arm-neon-asm-bilinear.lo -lm libtool: link: ar cru .libs/libpixman-arm-neon.a .libs/pixman-arm-neon.o = .libs/pixman-arm-neon-asm.o .libs/pixman-arm-neon-asm-bilinear.o=20 libtool: link: ranlib .libs/libpixman-arm-neon.a libtool: link: ( cd ".libs" && rm -f "libpixman-arm-neon.la" && ln -s = "../libpixman-arm-neon.la" "libpixman-arm-neon.la" ) --- pixman-arm-neon-asm-bilinear.lo --- . . . libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -mcpu=3Dcortex-a7 -O = -pipe -mcpu=3Dcortex-a7 -g -fno-strict-aliasing -no-integrated-as -MT = pixman-arm-neon-asm-bilinear.lo -MD -MP -MF = .deps/pixman-arm-neon-asm-bilinear.Tpo -c pixman-arm-neon-asm-bilinear.S = -fPIC -DPIC -o .libs/pixman-arm-neon-asm-bilinear.o libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -mcpu=3Dcortex-a7 -O = -pipe -mcpu=3Dcortex-a7 -g -fno-strict-aliasing -no-integrated-as -MT = pixman-arm-neon-asm-bilinear.lo -MD -MP -MF = .deps/pixman-arm-neon-asm-bilinear.Tpo -c pixman-arm-neon-asm-bilinear.S = -o pixman-arm-neon-asm-bilinear.o >/dev/null 2>&1 --- libpixman-arm-neon.la --- /bin/sh ../libtool --tag=3DCC --mode=3Dlink cc -O -pipe = -mcpu=3Dcortex-a7 -g -fno-strict-aliasing -Wall = -Wdeclaration-after-statement -Wno-unused-local-typedefs = -fno-strict-aliasing -fvisibility=3Dhidden -o libpixman-arm-neon.la = pixman-arm-neon.lo pixman-arm-neon-asm.lo = pixman-arm-neon-asm-bilinear.lo -lm libtool: link: ar cru .libs/libpixman-arm-neon.a .libs/pixman-arm-neon.o = .libs/pixman-arm-neon-asm.o .libs/pixman-arm-neon-asm-bilinear.o=20 libtool: link: ranlib .libs/libpixman-arm-neon.a libtool: link: ( cd ".libs" && rm -f "libpixman-arm-neon.la" && ln -s = "../libpixman-arm-neon.la" "libpixman-arm-neon.la" ) --- libpixman-1.la --- /bin/sh ../libtool --tag=3DCC --mode=3Dlink cc -O -pipe = -mcpu=3Dcortex-a7 -g -fno-strict-aliasing -Wall = -Wdeclaration-after-statement -Wno-unused-local-typedefs = -fno-strict-aliasing -fvisibility=3Dhid 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=20 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=3Dcortex-a7 -g -pthread -pthread -Wl,-soname = -Wl,libpixman-1.so.0 -o .libs/libpixman-1.so.0.34.0 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A76D7D49-E36E-4665-AA4B-D083CCF7D57B>