Bug 256935 - multimedia/gstreamer1-libav: Fix build on aarch64
Summary: multimedia/gstreamer1-libav: Fix build on aarch64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Some People
Assignee: Mikael Urankar
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2021-07-02 10:42 UTC by pr
Modified: 2021-07-18 15:22 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (multimedia)
koobs: merge-quarterly?


Attachments
Patched multimedia/gstreamer1-libav/Makefile to include LDFLAGS for aarch64 (363 bytes, patch)
2021-07-02 10:42 UTC, pr
koobs: maintainer-approval+
Details | Diff
Patched multimedia/gstreamer1-libav/Makefile to include LDFLAGS for aarch64 when FFMPEG option is off (439 bytes, patch)
2021-07-16 10:23 UTC, pr
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pr 2021-07-02 10:42:56 UTC
Created attachment 226167 [details]
Patched multimedia/gstreamer1-libav/Makefile to include LDFLAGS for aarch64

multimedia/gstreamer1-libav fails with
ld: error: can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output

The proposed patch adds LDFLAGS_aarch64=-Wl,-z,notext and fixes the problem (clean build).
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-02 11:00:28 UTC
Comment on attachment 226167 [details]
Patched multimedia/gstreamer1-libav/Makefile to include LDFLAGS for aarch64

Pending QA confirmation:

Approved by: portmgr (blanket: build fix)
MFH: 2020Q2 (blanket: build fix)
Comment 3 pr 2021-07-15 14:58:01 UTC
(In reply to Mikael Urankar from comment #2)
The clusters are not reachable (no DNS entry) so I cannot see the logs.
> drill ampere1.nyi.freebsd.org @ns0.freebsd.org
returns nothing.

Here I have a failure without my patch under
Poudriere version: 3.3.6
Host OSVERSION: 1400024
Jail OSVERSION: 1400024

> uname -a
FreeBSD asn 14.0-CURRENT FreeBSD 14.0-CURRENT #0 n247726-2f514e6f13de: Sun Jul  4 06:36:33 CEST 2021     root@asn:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC-NODEBUG  arm64

Host and jail are ~2 weeks old.

If you want I can pastebin or something the whole poudriere log.
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2021-07-16 07:41:46 UTC
(In reply to pr from comment #3)
The cluster are IPv6 only.

I can't reproduce your issue locally either with poudriere qemu or native hw.
Host OSVERSION: 1400025
Jail OSVERSION: 1400025

Do you have anything in make.conf or specific ports options?
Comment 5 pr 2021-07-16 10:23:46 UTC
Created attachment 226495 [details]
Patched multimedia/gstreamer1-libav/Makefile to include LDFLAGS for aarch64 when FFMPEG option is off

(In reply to Mikael Urankar from comment #4)
You are right, I have FFMPEG option off.

The updated patch fixes build on aarch64 when FFMPEG option is off.

This might not be the best patch, possibly the linker option shall be enable only when building the internal libav, but cannot dig deeper into this as of now and the proposed patch is functional.

Please note that the port buils on amd64 with FFMPEG option either on or off and fails on aarch64 with FFMPEG off. The patch might be required on other ARCHs (not tested).
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-07-18 15:20:34 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=905dfe641b7045ca5b92dab3f11acda51d380134

commit 905dfe641b7045ca5b92dab3f11acda51d380134
Author:     Aoek <pr@aoek.com>
AuthorDate: 2021-07-18 15:14:44 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2021-07-18 15:14:44 +0000

    multimedia/gstreamer1-libav: Fix build on aarch64

    Fix build on aarch64 when FFMPEG option is off.
    This is similar to the fix in multimedia/ffmpeg: svn port r507608

    PR:             256935
    Approved by:    portmgr (build fix blanket)

 multimedia/gstreamer1-libav/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-07-18 15:20:35 UTC
A commit in branch 2021Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=385516904c1e1402e9a9ceb7327d8b9b1874732f

commit 385516904c1e1402e9a9ceb7327d8b9b1874732f
Author:     Aoek <pr@aoek.com>
AuthorDate: 2021-07-18 15:14:44 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2021-07-18 15:19:54 +0000

    multimedia/gstreamer1-libav: Fix build on aarch64

    Fix build on aarch64 when FFMPEG option is off.
    This is similar to the fix in multimedia/ffmpeg: svn port r507608

    PR:             256935
    Approved by:    portmgr (build fix blanket)

    (cherry picked from commit 905dfe641b7045ca5b92dab3f11acda51d380134)

 multimedia/gstreamer1-libav/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 8 Mikael Urankar freebsd_committer freebsd_triage 2021-07-18 15:22:12 UTC
Thanks!