Bug 221766

Summary: arabic/libitl: build invokes linker with unintended commandline arguments
Product: Ports & Packages Reporter: Ed Maste <emaste>
Component: Individual Port(s)Assignee: freebsd-ports-bugs mailing list <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: cpm
Priority: --- Keywords: patch, patch-ready
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 214864    
Attachments:
Description Flags
patch-libitl-0.8.0
none
patch-libitl-0.8.0 none

Description Ed Maste freebsd_committer 2017-08-24 14:38:27 UTC
From http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2017-08-22_08h39m11s/logs/errors/ar-libitl-0.7.0_1.log when attempting to link with lld:

==> Create symbolic links for library generation...
test -d ../../build/itl/  || mkdir -p ../../build/itl/  || exit 1;
ln -sf ../../prayertime/src/prayer.h ../../build/itl/prayer.h
ln -sf ../prayertime/src/prayer.o ../../build/prayer.o
ln -sf ../prayertime/src/astro.o ../../build/astro.o
ld build/*.o -fstack-protector -shared -lm -lc -soname=libitl.so.0 -o build/libitl.so.0.0.7
ld: error: unknown argument: -fstack-protector
ld: error: unable to find library -lm
ld: error: unable to find library -lc
*** Error code 1

This package's build invokes ld with -fstack-protector, a flag intended to be passed to the compiler. GNU linkers interpret -fstack-protector as a command to create an auxiliary filter library for "stack-protector":

0x000000007ffffffd AUXILIARY            Auxiliary library: [stack-protector]

The link commandline should omit -fstack-protector, and could also pass in -L/usr/lib for future compatibility with LLD
Comment 1 Carlos J. Puga Medina freebsd_committer 2017-11-04 23:12:16 UTC
Created attachment 187745 [details]
patch-libitl-0.8.0

patch to update libitl to 0.8.0 (code refactoring and several bug fixes)

Upstream switched to cmake to build libitl.

https://github.com/arabeyes-org/ITL/releases/tag/v0.8.0
Comment 2 Carlos J. Puga Medina freebsd_committer 2017-11-17 22:30:19 UTC
Ed, does the libitl update solve the issue?

Waiting to hear from you soon,

Cheers
Comment 3 Carlos J. Puga Medina freebsd_committer 2017-12-09 16:58:01 UTC
Created attachment 188660 [details]
patch-libitl-0.8.0

- Add DOCS option
Comment 4 commit-hook freebsd_committer 2017-12-09 17:36:01 UTC
A commit references this bug:

Author: cpm
Date: Sat Dec  9 17:35:52 UTC 2017
New revision: 455868
URL: https://svnweb.freebsd.org/changeset/ports/455868

Log:
  - Update to 0.8.0
  - Switch to USE_GITHUB
  - Switch to USES=cmake
  - Drop unneeded patches
  - Add DOCS option
  - Update comment and WWW in pkg-descr
  - Take maintainership

  Changelog: https://github.com/arabeyes-org/ITL/releases/tag/v0.8.0

  PR:		221766
  Submitted by:	cpm

Changes:
  head/arabic/libitl/Makefile
  head/arabic/libitl/distinfo
  head/arabic/libitl/files/patch-CMakeLists.txt
  head/arabic/libitl/files/patch-Makefile.in
  head/arabic/libitl/files/patch-hijri_Makefile
  head/arabic/libitl/files/patch-prayertime_Makefile
  head/arabic/libitl/pkg-descr
  head/arabic/libitl/pkg-plist
Comment 5 Ed Maste freebsd_committer 2017-12-18 16:18:35 UTC
Yes, 0.8.0 builds for me with lld as /usr/bin/ld, thank you.