Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 103538 - [multilib-strict] x11-plugins/gaim-latex needs -fPIC loving
Summary: [multilib-strict] x11-plugins/gaim-latex needs -fPIC loving
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High enhancement (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-23 18:48 UTC by Tom Samstag
Modified: 2005-09-08 07:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes fPIC and multilib-strict (gaim-latex-0.3.ebuild.diff,959 bytes, patch)
2005-09-07 15:14 UTC, Jim Laflin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Samstag 2005-08-23 18:48:21 UTC
I was just working on getting this plugin to compile from source when I realized
that it's in portage (yay gentoo!). Below are the changes I made to get this
plugin to compile and run on amd64 with a 64b compile of gaim.

# diff -u /usr/portage/x11-plugins/gaim-latex/gaim-latex-0.3.ebuild
/usr/local/portage/x11-plugins/gaim-latex/gaim-latex-0.3.ebuild 
--- /usr/portage/x11-plugins/gaim-latex/gaim-latex-0.3.ebuild   2005-06-17
06:06:05.000000000 -0400
+++ /usr/local/portage/x11-plugins/gaim-latex/gaim-latex-0.3.ebuild    
2005-08-23 21:41:35.000000000 -0400
@@ -2,13 +2,15 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header:
/var/cvsroot/gentoo-x86/x11-plugins/gaim-latex/gaim-latex-0.3.ebuild,v 1.2
2005/06/17 09:53:24 dholm Exp $
 
+inherit flag-o-matic
+
 DESCRIPTION="Gaim plugin that renders latex formulae"
 HOMEPAGE="http://sourceforge.net/projects/gaim-latex"
 SRC_URI="mirror://sourceforge/gaim-latex/${P}.tar.bz2"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~ppc ~x86"
+KEYWORDS="~ppc ~x86 ~amd64"
 IUSE=""
 
 DEPEND="net-im/gaim"
@@ -17,6 +19,7 @@
 
 src_compile()
 {
+       use amd64 && append-flags -fPIC
        emake || die "emake failed"
 }


Reproducible: Always
Steps to Reproduce:
Comment 1 Luis Medinas (RETIRED) gentoo-dev 2005-08-28 10:14:24 UTC
You should NEVER add -fPIC into your CFLAGS because it will break your system.
Patch the Makefile to build only with -fPIC the piece of code that needs that
and never the whole code.
Comment 2 Tom Samstag 2005-08-28 11:16:10 UTC
well, the package only makes a .so from a single .c file... 

I wasn't aware this was such a big problem. Is the -fPIC thing something that
should be looked at more because that exact line is currently in many ebuilds.
Comment 3 Jim Laflin 2005-09-03 07:58:16 UTC
Tom, in this case I think you're OK to use -fPIC for the whole package, as you
said, it only builds one file

What do you think Luis? :)

Jim
Comment 4 Jim Laflin 2005-09-07 15:13:32 UTC
It also fails multilib-strict (hence the change in summary) (CCing blubb)

OK. I guess the best way to handle this is...

Appending -fPIC to CFLAGS (a shared library is the only file built by this package)
Making sure the file makes its way to the correct libdir

Diff for ebuild attached
Jim
Comment 5 Jim Laflin 2005-09-07 15:14:17 UTC
Created attachment 67873 [details, diff]
Fixes fPIC and multilib-strict
Comment 6 Simon Stelling (RETIRED) gentoo-dev 2005-09-08 03:04:32 UTC
keyworded and fixed, thanks
fatboyjim: i had to add multilib to the inherit line, other than that it worked
fine :)
Comment 7 Jim Laflin 2005-09-08 07:09:44 UTC
Sorry about that, must have forgotten to test it :)

Jim