What you state below is true for DirectFB. However, it does not hold for
"DirectFB example code".
When building the sample code it looks for the DirectFB library
----------------------------
mkdir .libs
mipsel-uclibc-gcc -I/usr/local/include -g -o df_knuckles df_knuckles.o
matrix.o -L/usr/local/lib -ldirectfb -lpthread -ldl -lm
/opt/toolchains/mips/lib/gcc-lib/mipsel-linux/3.1/../../../../mipsel-linux/bin/ld:
cannot find -ldirectfb
collect2: ld returned 1 exit status
make[2]: *** [df_knuckles] Error 1
--------------------------------
It is not going to find it in /usr/local/lib because I put it in
/rootfs/usr/local/lib via DESTDIR on my host system.
If I add -L/rootfs/usr/local/lib to my gcc I see the following in
df_dok:
Dynamic segment at offset 0x140 contains 24 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library:
[libdirectfb-0.9.so.9]
0x00000001 (NEEDED) Shared library:
[libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libdl.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.0]
0x0000000f (RPATH) Library rpath:
[/rootfs/usr/local/lib] ****************
This is not right because in my target root file system /rootfs does not
exist only /usr/...
I am not sure how RPATH is used... but I suspect when I go to run df_dok
it will fail to find libdirectfb.
Here is how I configure:
autoconf
./configure --host=mipsel-unknown-linux-gnu \
--prefix=/usr/local \
--enable-debug \
--enable-shared=yes
# --enable-static=yes
echo "***Building DirectFB examples"
make -e
echo "***Installing DirectFB examples"
make -e DESTDIR=/rootfs install
------------------------------------------------------------
Am I forced to create rootfs as a link to /?
(i.e. this just a fact of life when cross compiling executables?)
Thanks,
Scott
Sven Neumann wrote:
>
> Hi,
>
> Scott A McConnell <[EMAIL PROTECTED]> writes:
>
> > I am trying to figure out what needs to be changed in configuration to
> > support cross compilation.
>
> I don't think DirectFB needs to be changed at all. We use the standard
> tools autoconf/automake/make that provide support for cross
> compilation and we have successfully cross-compiled it.
>
> > At first glance I thought 'DESTDIR' was the solution to my problems but
> > I have not been able to figure out how to use it.
>
> DESTDIR is the standard way to solve your problem. Just configure and
> build the packages with the target-prefix, then install into the
> directory <dir> by using
>
> make DESTDIR=<dir> install
--
Info: To unsubscribe send a mail to [EMAIL PROTECTED] with
"unsubscribe directfb-users" as subject.