Bug 196033 - multimedia/libx264: Missing symbols on armv6
Summary: multimedia/libx264: Missing symbols on armv6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Many People
Assignee: Kubilay Kocak
URL:
Keywords: patch, patch-ready
Depends on:
Blocks: 213443
  Show dependency treegraph
 
Reported: 2014-12-16 17:56 UTC by Mikael Urankar
Modified: 2016-10-17 11:59 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback+


Attachments
armv6 fix (1.07 KB, patch)
2014-12-16 17:56 UTC, Mikael Urankar
no flags Details | Diff
patch for libx264 (580 bytes, patch)
2014-12-20 17:23 UTC, Mikael Urankar
no flags Details | Diff
patch for x264 (311 bytes, patch)
2014-12-20 17:24 UTC, Mikael Urankar
no flags Details | Diff
full patch (1007 bytes, patch)
2014-12-20 18:17 UTC, Mikael Urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Urankar freebsd_committer freebsd_triage 2014-12-16 17:56:18 UTC
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
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-12-16 17:56:18 UTC
Auto-assigned to maintainer koobs@FreeBSD.org
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2014-12-18 11:14:50 UTC
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
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2014-12-20 17:24:38 UTC
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!
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2014-12-20 18:17:43 UTC
Created attachment 150816 [details]
full patch
Comment 6 Sean Bruno freebsd_committer freebsd_triage 2014-12-20 20:42:04 UTC
(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.
Comment 7 commit-hook freebsd_committer freebsd_triage 2014-12-31 06:20:26 UTC
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
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2014-12-31 06:25:04 UTC
Committed, thanks Mikael!