Bug 193438 - devel/bullet: Build with -fPIC (fixes linking with efl)
Summary: devel/bullet: Build with -fPIC (fixes linking with efl)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jose Alonso Cardenas Marquez
Keywords: needs-qa, patch
Depends on:
Reported: 2014-09-07 18:10 UTC by Grzegorz Blach
Modified: 2014-09-22 16:12 UTC (History)
3 users (show)

See Also:

Add CXXFLAGS+=-fPIC (508 bytes, patch)
2014-09-07 18:10 UTC, Grzegorz Blach
koobs: maintainer-approval? (acm)
Details | Diff
Alternate patch: build shared libs (1.87 KB, patch)
2014-09-08 10:08 UTC, Tijl Coosemans
tijl: maintainer-approval? (acm)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz Blach freebsd_committer 2014-09-07 18:10:03 UTC
Created attachment 147022 [details]

I'm working on devel/efl port (https://redports.org/browser/gblach/devel/efl).
On amd64 platform Efl can be linked with Bullet only if Bullet is build with -fPIC. On i386 -fPIC have no impact.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2014-09-08 02:05:41 UTC
Comment on attachment 147022 [details]

Thank you for your submission Grzegorz.

If possible please also include the following QA results to promote quick 

 * Attach successful poudriere testport, or redports.org build logs
 * portlint -AC output (after addressing any outstanding issues)
 * Attach a log showing the failed and then successful linking invocation (with your patch applied)
Comment 2 Tijl Coosemans freebsd_committer 2014-09-08 10:08:40 UTC
Created attachment 147053 [details]
Alternate patch: build shared libs
Comment 3 Tijl Coosemans freebsd_committer 2014-09-08 10:27:58 UTC
Comment on attachment 147053 [details]
Alternate patch: build shared libs

Adding -fPIC to CFLAGS/CXXFLAGS is a bad practice and we need to stop doing that (if possible!).  It is usually a sign that something else is wrong and it causes executables and static libraries to be compiled with -fPIC as well when normally only shared libraries need it.  In this case it can be avoided by enabling shared libraries in devel/bullet.  Can you test if this patch fixes devel/efl?
Comment 4 Grzegorz Blach freebsd_committer 2014-09-08 23:46:40 UTC
Patch which enables build of shared libs looks better in my opinion.

This is a log from redports with current bullet port

and this is a log with Tijl's patch applied: https://redports.org/~gblach/20140908215452-52737-242345/efl-1.11.1.log
Comment 5 tim 2014-09-22 12:00:55 UTC
This patch is required to build Fawkes on FreeBSD. The problem appears when linking against two (shared) libraries which again link against bullet's LinearMath. Any chance to get this integrated soonish?
Comment 6 commit-hook freebsd_committer 2014-09-22 16:11:56 UTC
A commit references this bug:

Author: tijl
Date: Mon Sep 22 16:11:11 UTC 2014
New revision: 368969
URL: http://svnweb.freebsd.org/changeset/ports/368969

  Build shared libraries needed by upcoming devel/efl

  PR:		193438
  Approved by:	maintainer timeout (2 weeks)