* [gentoo-dev] Linking Stage, building a ebuild
@ 2011-12-02 3:22 Willian Vale da Rocha
2011-12-02 3:32 ` Brian Dolbec
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Willian Vale da Rocha @ 2011-12-02 3:22 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 491 bytes --]
I'm writing a ebuild for GNU Radio, just to learn how to write and i
doesn't found any where(or i was looking for wrong) how to define a LDFLAGS
for the linking stage. GNU Radio need this because they use their library.
If i don't explain correct, i going to show the line command that i trying
to explain
<pre>
./configure --prefix=$HOME/image LDFLAGS="-L$HOME/image/lib64
<\pre>
If i need to define prefix, how can i do it, and How can i use the LDFLAGS
in ebuild
Sorry about the english
[-- Attachment #2: Type: text/html, Size: 550 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] Linking Stage, building a ebuild
2011-12-02 3:22 [gentoo-dev] Linking Stage, building a ebuild Willian Vale da Rocha
@ 2011-12-02 3:32 ` Brian Dolbec
2011-12-02 3:37 ` Nathan Phillip Brink
2011-12-02 13:50 ` James Broadhead
2 siblings, 0 replies; 4+ messages in thread
From: Brian Dolbec @ 2011-12-02 3:32 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
On Fri, 2011-12-02 at 00:22 -0300, Willian Vale da Rocha wrote:
> I'm writing a ebuild for GNU Radio, just to learn how to write and i
> doesn't found any where(or i was looking for wrong) how to define a
> LDFLAGS for the linking stage. GNU Radio need this because they use
> their library.
> If i don't explain correct, i going to show the line command that i
> trying to explain
> <pre>
> ./configure --prefix=$HOME/image LDFLAGS="-L$HOME/image/lib64
> <\pre>
> If i need to define prefix, how can i do it, and How can i use the
> LDFLAGS in ebuild
>
> Sorry about the english
Sorry, this is the wrong mail list for that kind of help.
You want the gentoo-devhelp mail list and/or the #gentoo-dev-help IRC
channel.
--
Brian Dolbec <dolsen@gentoo.org>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] Linking Stage, building a ebuild
2011-12-02 3:22 [gentoo-dev] Linking Stage, building a ebuild Willian Vale da Rocha
2011-12-02 3:32 ` Brian Dolbec
@ 2011-12-02 3:37 ` Nathan Phillip Brink
2011-12-02 13:50 ` James Broadhead
2 siblings, 0 replies; 4+ messages in thread
From: Nathan Phillip Brink @ 2011-12-02 3:37 UTC (permalink / raw
To: Willian Vale da Rocha; +Cc: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1931 bytes --]
On Fri, Dec 02, 2011 at 12:22:30AM -0300, Willian Vale da Rocha wrote:
> I'm writing a ebuild for GNU Radio, just to learn how to write and i
> doesn't found any where(or i was looking for wrong) how to define a LDFLAGS
> for the linking stage. GNU Radio need this because they use their library.
> If i don't explain correct, i going to show the line command that i trying
> to explain
> <pre>
> ./configure --prefix=$HOME/image LDFLAGS="-L$HOME/image/lib64
> <\pre>
> If i need to define prefix, how can i do it, and How can i use the LDFLAGS
> in ebuild
>
> Sorry about the english
Just so you know, such questions generally belong on the
gentoo-devhelp mailing list or in
irc://chat.freenode.net/gentoo-dev-help.
In an attempt to answer your question, you should use the flag-o-matic
eclass to append directives to LDFLAGS. For example:
inherit flag-o-matic multilib
src_configure() {
append-ldflags -L"${EPREFIX}"/usr/$(get_libdir)/special_package \
-Wl,-rpath,"${EPREFIX}"/usr/$(get_libdir)/special_package
econf
}
But you appear to be trying to link to something outside of a normal
Gentoo install. If a user wanted to link a program against his own
compiled copy of the library, he would instead just invoke emerge with
the proper LDFLAGS:
# LDFLAGS=-L"${HOME}"/image/lib64\ -Wl,-rpath,"${HOME}"/images/lib64 emerge -v my_package
If you are writing your ebuild to compile against a package/library
which is not available in portage, your first step should be to write
an ebuild for _that_ package. I.e., write the ebuild for the library
your program needs before writing the ebuild for the program. Then the
library would be properly installed into /usr/$(get_libdir) and appear
in GCC's normal searchpaths.
If this does not help, please ask again in #gentoo-dev-help or the
gentoo-devhelp ML :-).
--
binki
Look out for missing or extraneous apostrophes!
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] Linking Stage, building a ebuild
2011-12-02 3:22 [gentoo-dev] Linking Stage, building a ebuild Willian Vale da Rocha
2011-12-02 3:32 ` Brian Dolbec
2011-12-02 3:37 ` Nathan Phillip Brink
@ 2011-12-02 13:50 ` James Broadhead
2 siblings, 0 replies; 4+ messages in thread
From: James Broadhead @ 2011-12-02 13:50 UTC (permalink / raw
To: gentoo-dev
On 2 December 2011 03:22, Willian Vale da Rocha <will.vdr@gmail.com> wrote:
> I'm writing a ebuild for GNU Radio, just to learn how to write and i doesn't
> found any where(or i was looking for wrong) how to define a LDFLAGS for the
> linking stage. GNU Radio need this because they use their library.
> If i don't explain correct, i going to show the line command that i trying
> to explain
> <pre>
> ./configure --prefix=$HOME/image LDFLAGS="-L$HOME/image/lib64
> <\pre>
> If i need to define prefix, how can i do it, and How can i use the LDFLAGS
> in ebuild
>
> Sorry about the english
Additionally,m there is a GNU Radio ebuild in bugzilla.
https://bugs.gentoo.org/show_bug.cgi?id=90667
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-02 13:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 3:22 [gentoo-dev] Linking Stage, building a ebuild Willian Vale da Rocha
2011-12-02 3:32 ` Brian Dolbec
2011-12-02 3:37 ` Nathan Phillip Brink
2011-12-02 13:50 ` James Broadhead
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox