Bug 231524 - multimedia/smpeg: fails to link on i386 with lld as /usr/bin/ld
Summary: multimedia/smpeg: fails to link on i386 with lld as /usr/bin/ld
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jose Alonso Cardenas Marquez
URL:
Keywords:
Depends on:
Blocks: 214864
  Show dependency treegraph
 
Reported: 2018-09-20 18:38 UTC by Ed Maste
Modified: 2018-11-20 18:03 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (acm)


Attachments
Fix LLD on i386 (4.43 KB, patch)
2018-09-21 05:23 UTC, Nathan
no flags Details | Diff
Fix LLD on i386 (5.43 KB, patch)
2018-09-21 16:20 UTC, Nathan
no flags Details | Diff
LLD Fix; reorder variables; regen patches (5.42 KB, patch)
2018-10-04 03:42 UTC, Nathan
ndowens04: maintainer-approval? (acm)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2018-09-20 18:38:21 UTC
From http://package18.nyi.freebsd.org/data/headi386PR214864-default/2018-09-18_21h13m11s/logs/errors/x265-2.8_1.log

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against symbol: x265_pw_1 in readonly segment; recompile object files with -fPIC
>>> defined in common/CMakeFiles/common.dir/x86/const-a.asm.o
>>> referenced by common/x86/pixel-a.asm
>>>               common/CMakeFiles/common.dir/x86/pixel-a.asm.o:(.text+0x66B)

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against symbol: x265_pw_1 in readonly segment; recompile object files with -fPIC
>>> defined in common/CMakeFiles/common.dir/x86/const-a.asm.o
>>> referenced by common/x86/pixel-a.asm
>>>               common/CMakeFiles/common.dir/x86/pixel-a.asm.o:(.text+0x58BF)

...

adding LDFLAGS_i386=-Wl,-znotext appears to be insufficient (port does not honour LDFLAGS?)
Comment 1 Nathan 2018-09-21 05:23:59 UTC
Created attachment 197292 [details]
Fix LLD on i386

  multimedia/smpeg: Fix LLD for i386
 
  Log:
  - Remove included libtool
    Caused LLD issues
  - While here regenerate patches
 
  Submitted by:   Nathan <ndowens@yahoo.com>
  PR:             231524
Comment 2 Nathan 2018-09-21 05:26:53 UTC
(In reply to Nathan from comment #1)
Tested inside poudriere i386 jail with and without patch ; Patch fixed linker issue for me
Comment 3 Nathan 2018-09-21 16:20:50 UTC
Created attachment 197311 [details]
Fix LLD on i386
Comment 4 Ed Maste freebsd_committer freebsd_triage 2018-09-26 15:15:19 UTC
FYI:

nuc% git apply -p0 < ~/smpeg
<stdin>:87: trailing whitespace.
 
<stdin>:101: trailing whitespace.
 
<stdin>:104: trailing whitespace.
 
warning: 3 lines add whitespace errors.

build-testing now.
Comment 5 Ed Maste freebsd_committer freebsd_triage 2018-09-26 15:24:47 UTC
Patch works for me.
Comment 6 Nathan 2018-10-04 03:42:24 UTC
Created attachment 197767 [details]
LLD Fix; reorder variables; regen patches

 multimedia/smpeg:
 
 * Fix LLD for i386
 * Correct order variables, while here
 * Regenerate patches with makepatch
 
 PR:             231524
 Submitted by:   Nathan <ndowens@yahoo.com>
Comment 7 Nathan 2018-10-16 23:10:19 UTC
Can this be committed?
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-11-20 18:03:17 UTC
A commit references this bug:

Author: acm
Date: Tue Nov 20 18:03:14 UTC 2018
New revision: 485454
URL: https://svnweb.freebsd.org/changeset/ports/485454

Log:
  - Fix LLD for i386
  - Correct order variables, while here
  - Regenerate patches with makepatch
  - Bump PORTREVISION

  PR:		231524
  Submitted by:	Nathan <ndowens  _at_  yahoo.com>

Changes:
  head/multimedia/smpeg/Makefile
  head/multimedia/smpeg/files/patch-MPEGaudio.h
  head/multimedia/smpeg/files/patch-configure
  head/multimedia/smpeg/files/patch-gtv.c
  head/multimedia/smpeg/files/patch-smpeg.m4
  head/multimedia/smpeg/files/patch-video__video.h