public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* ld cannot find -lffi
       [not found] <CAKObCao=vTWDD_chBr9vV2UB8MqMOqxLq5_03yzYfqbKzkV-1A@mail.gmail.com>
@ 2013-08-17  4:23 ` Jason Gross
  2013-08-17  9:08   ` Andrew Haley
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Gross @ 2013-08-17  4:23 UTC (permalink / raw)
  To: libffi-discuss

I have installed libffi-3.0.13 from source.  The generated Makefile
tells me "toolexeclibdir = $(libdir)/../lib64", and the libraries seem
to have installed there.  However, the .pc file that gets installed
tells pkg-config to tell ld to look in "libdir=${exec_prefix}/lib".
Hence, ld cannot find -lffi when I go to compile something with "gcc
`pkg-config --libs --cflags libffi`".  I can workaround this by
copying the contents of lib64 to lib, but this seems silly and broken.
 In addition to wanting this bug to be fixed, I'm curious to know
where the Makefile gets lib64 from, because "grep lib64 *" tells me
that the only other appearance is  configure:
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" (also
makefiles.out~, but I figure that's a temporary).  If it's relevant,
uname -a tells me "Linux cagnode17 2.6.32-5-xen-amd64 #1 SMP Sun Sep
23 13:49:30 UTC 2012 x86_64 GNU/Linux"

Thanks,
Jason

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ld cannot find -lffi
  2013-08-17  4:23 ` ld cannot find -lffi Jason Gross
@ 2013-08-17  9:08   ` Andrew Haley
  2013-08-17  9:28     ` Jason Gross
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Haley @ 2013-08-17  9:08 UTC (permalink / raw)
  To: Jason Gross; +Cc: libffi-discuss

On 08/17/2013 05:22 AM, Jason Gross wrote:
> I have installed libffi-3.0.13 from source.  The generated Makefile
> tells me "toolexeclibdir = $(libdir)/../lib64", and the libraries seem
> to have installed there.  However, the .pc file that gets installed
> tells pkg-config to tell ld to look in "libdir=${exec_prefix}/lib".
> Hence, ld cannot find -lffi when I go to compile something with "gcc
> `pkg-config --libs --cflags libffi`".  I can workaround this by
> copying the contents of lib64 to lib, but this seems silly and broken.
>  In addition to wanting this bug to be fixed, I'm curious to know
> where the Makefile gets lib64 from, because "grep lib64 *" tells me
> that the only other appearance is  configure:
> sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" (also
> makefiles.out~, but I figure that's a temporary).  If it's relevant,
> uname -a tells me "Linux cagnode17 2.6.32-5-xen-amd64 #1 SMP Sun Sep
> 23 13:49:30 UTC 2012 x86_64 GNU/Linux"

When you configured, what was your --libdir argument?

Andrew.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ld cannot find -lffi
  2013-08-17  9:08   ` Andrew Haley
@ 2013-08-17  9:28     ` Jason Gross
  2013-08-17 10:16       ` Andrew Haley
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Gross @ 2013-08-17  9:28 UTC (permalink / raw)
  To: Andrew Haley; +Cc: libffi-discuss

I did not pass --libdir.  I ran `./configure
--prefix="$HOME/.local64/" && make -j16 && make install -j16`

-Jason

On Saturday, August 17, 2013, Andrew Haley wrote:
>
> On 08/17/2013 05:22 AM, Jason Gross wrote:
> > I have installed libffi-3.0.13 from source.  The generated Makefile
> > tells me "toolexeclibdir = $(libdir)/../lib64", and the libraries seem
> > to have installed there.  However, the .pc file that gets installed
> > tells pkg-config to tell ld to look in "libdir=${exec_prefix}/lib".
> > Hence, ld cannot find -lffi when I go to compile something with "gcc
> > `pkg-config --libs --cflags libffi`".  I can workaround this by
> > copying the contents of lib64 to lib, but this seems silly and broken.
> >  In addition to wanting this bug to be fixed, I'm curious to know
> > where the Makefile gets lib64 from, because "grep lib64 *" tells me
> > that the only other appearance is  configure:
> > sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" (also
> > makefiles.out~, but I figure that's a temporary).  If it's relevant,
> > uname -a tells me "Linux cagnode17 2.6.32-5-xen-amd64 #1 SMP Sun Sep
> > 23 13:49:30 UTC 2012 x86_64 GNU/Linux"
>
> When you configured, what was your --libdir argument?
>
> Andrew.
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ld cannot find -lffi
  2013-08-17  9:28     ` Jason Gross
@ 2013-08-17 10:16       ` Andrew Haley
  2013-08-17 13:40         ` Jason Gross
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Haley @ 2013-08-17 10:16 UTC (permalink / raw)
  To: Jason Gross; +Cc: libffi-discuss

On 08/17/2013 10:27 AM, Jason Gross wrote:
>>
>> When you configured, what was your --libdir argument?
>>
> I did not pass --libdir.  I ran `./configure
> --prefix="$HOME/.local64/" && make -j16 && make install -j16`

And what does

   gcc -print-multi-os-directory

say?

Andrew.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ld cannot find -lffi
  2013-08-17 10:16       ` Andrew Haley
@ 2013-08-17 13:40         ` Jason Gross
  2013-08-19  7:54           ` Andrew Haley
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Gross @ 2013-08-17 13:40 UTC (permalink / raw)
  To: Andrew Haley; +Cc: libffi-discuss

Ah, indeed, that gives "../lib64".  So I guess the .pc file should be
set up to use multi_os_directory or toolexeclibdir?

-Jason

On Sat, Aug 17, 2013 at 6:16 AM, Andrew Haley <aph@redhat.com> wrote:
> On 08/17/2013 10:27 AM, Jason Gross wrote:
>>>
>>> When you configured, what was your --libdir argument?
>>>
>> I did not pass --libdir.  I ran `./configure
>> --prefix="$HOME/.local64/" && make -j16 && make install -j16`
>
> And what does
>
>    gcc -print-multi-os-directory
>
> say?
>
> Andrew.
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ld cannot find -lffi
  2013-08-17 13:40         ` Jason Gross
@ 2013-08-19  7:54           ` Andrew Haley
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Haley @ 2013-08-19  7:54 UTC (permalink / raw)
  To: Jason Gross; +Cc: libffi-discuss

On 08/17/2013 02:40 PM, Jason Gross wrote:

> On Sat, Aug 17, 2013 at 6:16 AM, Andrew Haley <aph@redhat.com> wrote:
>>
>> And what does
>>
>>    gcc -print-multi-os-directory
>>
>> say?
>>
> Ah, indeed, that gives "../lib64".  So I guess the .pc file should be
> set up to use multi_os_directory or toolexeclibdir?

Yes.  I don't thunk anything good can happen if your libdir
doesn't correspond with your multi-os-directory.  This is all
really to do with autoconf and libtool; there's nothing much
libffi can do about it.

Andrew.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-19  7:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAKObCao=vTWDD_chBr9vV2UB8MqMOqxLq5_03yzYfqbKzkV-1A@mail.gmail.com>
2013-08-17  4:23 ` ld cannot find -lffi Jason Gross
2013-08-17  9:08   ` Andrew Haley
2013-08-17  9:28     ` Jason Gross
2013-08-17 10:16       ` Andrew Haley
2013-08-17 13:40         ` Jason Gross
2013-08-19  7:54           ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).