Created attachment 150649 [details] armv6 fix 102 packages are currently broken on armv6 (multimedia/x264, multimedia/ffmpeg...) because of missing symbols in libx264.so: /nxb-bin/usr/bin/cc -L/usr/local/lib -Wl,--as-needed -Wl,-z,noexecstack -o /tmp/ffconf.LCQ0ocrJ /tmp/ffconf.sMcTyhSD.o -lx264 -lvpx -lvpx -lvpx -lvpx -lvorbisenc -lvorbis -logg -L/usr/local/lib -lv4l2 -ltheoraenc -ltheoradec -logg -L/usr/local/lib -lschroedinger-1.0 /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_imgproc.so -L/usr/local/lib -lfreetype -lfontconfig -L/usr/local/lib -lfreetype -/usr/local/lib -lgnutls -lm -lbz2 -lz -pthread -pthread /usr/local/lib/libx264.so: undefined reference to `x264_predict_8x8c_init_arm' /usr/local/lib/libx264.so: undefined reference to `x264_sub8x8_dct_dc_neon' /usr/local/lib/libx264.so: undefined reference to `x264_pixel_sad_x3_8x16_neon' /usr/local/lib/libx264.so: undefined reference to `x264_pixel_ssd_4x4_neon' ... The attached patch fixes that. I changed the cpu flag to arm1136jf-s so that it is compatible with the raspberry-pi (it defaults to cortex-a8 otherwise, which is armv7) multimedia/x264 needs the same 'cpu' treatment, it's a one line patch but I can provide it if needed. To apply the patch: cd /usr/ports/multimedia/libx264; patch < /path/to/patch build logs for libx264 and x264: http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/libx264-0.142.2455.log http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/x264-0.142.2455.log
Auto-assigned to maintainer koobs@FreeBSD.org
This feels like something that ought to be upstreamed long-term, though I'm happy to carry a patch locally in the meantime if it's tracked in an issue upstream pending commit. Thoughts? Comments? For additional review, I'd appreciated if you could also: - Attached a patch here for multimedia/x264 for review - Provide build logs for both ports on arm6
Created attachment 150810 [details] patch for libx264 The patch (files/patch-Makefile) is very FreeBSD specific, we already have the same patch for i386, amd64... I don't think it'll be accepted upstream. I've reworked the patch a bit: I've removed files/patch-configure, it is now replaced by "@${REINPLACE_CMD} -e 's|gcc|${CC}|' ${WRKSRC}/configure" in the ports Makefile. Here are the links to build logs for various arch/version: 8.4-amd64: http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/84-amd64_libx264-0.142.2455.log http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/84-amd64_x264-0.142.2455.log 9.3-amd64: http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/93-amd64_libx264-0.142.2455.log http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/93-amd64_x264-0.142.2455.log 10.1-amd64: http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/101-amd64_libx264-0.142.2455.log http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/101-amd64_x264-0.142.2455.log 11-armv6: http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/11-armv6_libx264-0.142.2455.log http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/11-armv6_x264-0.142.2455.log 11-mips: http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/11-mips32_libx264-0.142.2455.log http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/11-mips32_x264-0.142.2455.log
Created attachment 150811 [details] patch for x264 As requested, this is the patch for multimedia/x264, build logs are available in my previous message. Thanks!
Created attachment 150816 [details] full patch
(In reply to Kubilay Kocak from comment #2) > This feels like something that ought to be upstreamed long-term, though I'm > happy to carry a patch locally in the meantime if it's tracked in an issue > upstream pending commit. > > Thoughts? Comments? > > For additional review, I'd appreciated if you could also: > > - Attached a patch here for multimedia/x264 for review > - Provide build logs for both ports on arm6 Confirmed based on last patches. http://tasty.ysv.freebsd.org/build.html?mastername=11-armv6-11-armv6-ports&build=2014-12-20_18h44m07s Let me know if I should fire this off into ports or you are going to take care of it.
A commit references this bug: Author: koobs Date: Wed Dec 31 06:20:16 UTC 2014 New revision: 375870 URL: https://svnweb.freebsd.org/changeset/ports/375870 Log: multimedia/{lib}x264: Fix build on ARMv6 - Fix build for missing symbols on ARMv6 [1] - Backport upstream 9463ec00 to fix default AS on ARM [2] - Remove unecessary WRKSRC override (x264) - Whitespace alignment [2] http://git.videolan.org/?p=x264.git;a=patch;h=9463ec PR: 196033 [1] Submitted by: Mikael Urandar <mikael.urankar at gmail com> [1] Tested by: sbruno Changes: head/multimedia/libx264/Makefile head/multimedia/libx264/files/patch-Makefile head/multimedia/libx264/files/patch-common_cpu.c head/multimedia/libx264/files/patch-configure head/multimedia/x264/Makefile head/multimedia/x264/files/patch-Makefile head/multimedia/x264/files/patch-common_cpu.c head/multimedia/x264/files/patch-configure
Committed, thanks Mikael!