Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 363595 - sys-devel/llvm-2.8-r3, dev-libs/libffi-3.0.9-r2 - lli not linked against libffi
Summary: sys-devel/llvm-2.8-r3, dev-libs/libffi-3.0.9-r2 - lli not linked against libffi
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-14 13:41 UTC by T6n9naYMKJ
Modified: 2011-04-15 17:42 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description T6n9naYMKJ 2011-04-14 13:41:20 UTC
I installed llvm with +libffi. The log shows, that "--enable-libffi" is active in ./configure step:
--
./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-shared --enable-optimized --disable-assertions --disable-expensive-checks --enable-targets=host-only --with-llvmgccdir=/dev/null --with-llvmgcc=nope --with-llvmgxx=nope --enable-bindings=none --enable-libffi
--

and -lffi is in the compiler options, but the headers are not found:
--
checking for library containing ffi_call... -lffi
checking ffi.h usability... no
checking ffi.h presence... no
checking for ffi.h... no
checking ffi/ffi.h usability... no
checking ffi/ffi.h presence... no
checking for ffi/ffi.h... no
--

and lli isn't dyn. linked against libffi:
--
>ldd /usr/bin/lli
	linux-gate.so.1 =>  (0xb7861000)
	libLLVM-2.8.so => /usr/lib/llvm/libLLVM-2.8.so (0xb6d80000)
	libpthread.so.0 => /lib/libpthread.so.0 (0xb6d59000)
	libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/4.4.5/libstdc++.so.6 (0xb6c65000)
	libc.so.6 => /lib/libc.so.6 (0xb6b20000)
	libdl.so.2 => /lib/libdl.so.2 (0xb6b1b000)
	libm.so.6 => /lib/libm.so.6 (0xb6af6000)
	libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.4.5/libgcc_s.so.1 (0xb6ad8000)
	/lib/ld-linux.so.2 (0xb7862000)
--

"lli -force-interpreter" is unusable without ffi.

Reproducible: Always
Comment 1 Bernard Cafarelli gentoo-dev 2011-04-14 18:06:53 UTC
Hello, thanks for the report!

I did not have the problem, as it found gcc's libffi (both headers and linked library). I thought it was not installed anymore now that libffi USE flag is masked, but apparently it's still here

Apparently, the problem is that llvm does not use libffi pkg-config, I'll look into it
Comment 2 T6n9naYMKJ 2011-04-14 18:59:12 UTC
(In reply to comment #1)
> I did not have the problem, as it found gcc's libffi (both headers and linked
> library).
That might be the problem:
--
sys-devel/gcc-4.4.5  USE="fortran mudflap nptl (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -graphite -gtk (-hardened) (-libffi) (-multilib) -multislot (-n32) (-n64) -nls -nocxx -nopie -nossp -objc -objc++ -objc-gc -openmp -test -vanilla"
--

> Apparently, the problem is that llvm does not use libffi pkg-config, I'll look
> into it
Thank you, I appreciate it.
Comment 3 Bernard Cafarelli gentoo-dev 2011-04-15 16:00:00 UTC
OK I had the gcc libffi because of USE=gcj (bug #354903)

I have added 2.9-r1 in tree which adds the correct include path for system libffi. Thanks for the report!
Comment 4 T6n9naYMKJ 2011-04-15 16:13:47 UTC
(In reply to comment #3)
> I have added 2.9-r1 in tree which adds the correct include path for system
> libffi.
You mean llvm-2.9-r1? I'm tied to 2.8 because of software which uses the LLVM-API but isn't compatible with 2.9 at the moment.

Is it possible to fix llvm-2.8 also? Thanks for your work.
Comment 5 Bernard Cafarelli gentoo-dev 2011-04-15 17:42:36 UTC
(In reply to comment #4)
> Is it possible to fix llvm-2.8 also? Thanks for your work.

Sure! it will be llvm-2.8-r4 (same changes as 2.9-r1). If it works fine, I'll keep it in tree as stable 2.8