Bug 217688 - mail/libsrs2 linkfail: needs -fPIC
Summary: mail/libsrs2 linkfail: needs -fPIC
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: Kurt Jaeger
Depends on:
Reported: 2017-03-10 17:46 UTC by Larry Rosenman
Modified: 2017-04-24 17:21 UTC (History)
1 user (show)

See Also:
pi: maintainer-feedback+

patch (595 bytes, patch)
2017-03-10 19:18 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Larry Rosenman freebsd_committer 2017-03-10 17:46:22 UTC
cc -shared  srs2.lo sha1.lo   -Wl,-soname -Wl,libsrs2.so.0 -o .libs/libsrs2.so.0.0.0
/usr/bin/ld: sha1.lo: relocation R_X86_64_PC32 against `__stack_chk_guard@@FBSD_1.0' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)


I made a local mod just bumping PORTREVISION and adding


and it compiles fine.  I'm not sure if that's 100% correct.
Comment 1 Tijl Coosemans freebsd_committer 2017-03-10 19:18:55 UTC
Created attachment 180704 [details]

This patch fixes the real cause.

Disable separate build of libsrs2.a.  It is already built as part of libsrs2.la and the two targets step on each other's toes possibly causing link failures.
Comment 2 Kurt Jaeger freebsd_committer 2017-04-24 17:20:47 UTC
Committed, thanks!
Comment 3 commit-hook freebsd_committer 2017-04-24 17:21:14 UTC
A commit references this bug:

Author: pi
Date: Mon Apr 24 17:20:32 UTC 2017
New revision: 439335
URL: https://svnweb.freebsd.org/changeset/ports/439335

  mail/libsrs2: fix linking error...

  - ... by disabling separate build of libsrs2.a

  PR:		217688
  Reported by:	ler
  Submitted by:	tijl