Hello Carsten,

Thank you for your reply.

You are right, I should have mention use of pkg-config, it is the better
way to set compile/link flags.
I will correct that in my further explanations.

But this is not the heart of the problem I face.
Finding the right pkg-config package is just a little less tedious since
linker cannot automatically solve shared libraries dependencies...
So adding -lecore_x, lX11, -lxau - and more - to gcc is as painful as
adding ecore X11 xau - and more - to pkg-config.
I'm too lazy to spend hours manually searching for dependencies. ^^

The problem was only that my toolchain linker was unable to resolve
libecore_evas and libecore dependencies since it does not know where to
find all needed libs.
So add -rpath option to the linker did the trick :

$ ROOTFS=/opt/targetdir/targetdir_mini2440
$ PKG_CONFIG_SYSROOT=/opt/targetdirs/targetdir_mini2440/
$ PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabi/pkg-config
$ PKG_CONFIG_PATH=/usr/lib/pkgconfig/
$ arm-linux-gnueabi-gcc test_efl_fb.c -o test_efl_fb --sysroot=${ROOTFS}
-Wl,-rpath,${ROOTFS}/usr/lib/arm-linux-gnueabi/
-Wl,-rpath,${ROOTFS}/lib/arm-linux-gnueabi/ -Wl,-rpath,${ROOTFS}/usr/lib/
-Wl,-rpath,${ROOTFS}/lib/ $(pkg-config --libs --cflags ecore-evas ecore)

It is solved then and I can start discovering EFL.

Thanks,
Gilles


2015-01-13 1:06 GMT+01:00 Carsten Haitzler <[email protected]>:

> On Mon, 12 Jan 2015 20:03:53 +0100 Gilles DOFFE <[email protected]> said:
>
> why are you not using pkg-config? you really really really do not want to
> ignore it as we update pc files as build needs change - they also take
> care of
> dependencies too eg for includes - yes - see - it's missing dependencies -
> did
> you read the error output?
>
> ... libecore_x.so.1, needed by ...
> ... libX11.so.6, needed by ...
>
> i can go on.
>
> is there a -lecore_x on your compile line? a -lX11 ? -lecore_ipc ... ? i
> can go
> on... that's why you use pkg-config. :)
>
> > Hi all,
> >
> > I already post this message on user mailing list but I think it was not
> the
> > right place.
> > So I post on this mailing list. Once solved I will mention this thread in
> > the old one.
> > Sorry for inconvenience.
> >
> > I cannot manage to cross-compile a simple test app for my mini2440 board.
> > Here is my test_efl_fb.c file :
> >
> > #include <Ecore.h>
> > #include <Ecore_Evas.h>
> > #include <Evas_Engine_FB.h>
> > #include <unistd.h>
> >
> > int
> > main(void)
> > {
> >    Ecore_Evas *ee;
> >    Evas *canvas;
> >    Evas_Object *bg;
> >    Eina_List *engines, *l;
> >    char *data;
> >
> >    if (ecore_evas_init() <= 0)
> >      return 1;
> >
> >    ee = ecore_evas_fb_new(NULL, 0, 400, 800);
> >    ecore_evas_title_set(ee, "Ecore Evas basics Example");
> >    ecore_evas_show(ee);
> >
> >    ecore_main_loop_begin();
> >
> >    ecore_evas_free(ee);
> >    ecore_evas_shutdown();
> >
> >    return 0;
> > }
> >
> > My build machine is a Ubuntu 14.04.1 64 bits.
> > To build it i use a staging dir (named targetdir_mini2440/) issued from
> > qemu-debootstrap which contains a full functionnal debian wheezy rootfs
> for
> > mini2440 board.
> > In that rootfs, I have installed all dev package and needed libraries for
> > efl (libelementary-dev, libevas1-engine-fb, libecore-evas1, ...)
> >
> > All files needed seems to be present.
> > To build my app, I chroot into that rootfs and build with the following
> > command :
> >
> > $ gcc test_efl_fb.c -o test_efl_fb -I/usr/include/ecore-1/
> > -I/usr/include/eina-1/ -I/usr/include/eina-1/eina/ -I/usr/include/evas-1/
> > -lecore_evas
> >
> > It works fine and it produces the wanted binary :
> >
> > $ file test_efl_fb
> > test_efl_fb: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
> dynamically
> > linked (uses shared libs), for GNU/Linux 2.6.26,
> > BuildID[sha1]=0x62514bc463ccc992f5149a765a97884ae9a6ea51, not stripped
> >
> > As it is using qemu, build could be very slow for bigger applications.
> So i
> > would like to cross-compile outside of the chroot, from the host system
> > (Ubuntu 14.04.1 64 bits) :
> >
> > $ export ROOTFS_PATH=$(readlink -f targetdir_mini2440/)
> > $ arm-linux-gnueabi-gcc test_efl_fb.c -o test_efl_fb
> > -I/usr/include/ecore-1/ -I/usr/include/eina-1/ -I/usr/include/eina-1/eina
> > -I/usr/include/evas-1 --sysroot ${ROOTFS_PATH} -lecore_evas
> >
> > But --sysroot option does not seem to work as expected, libecore_evas.so
> is
> > taken from the staging dir but other libs are searched on my build
> machine
> > path.
> >
> > arm-linux-gnueabi-gcc test_efl_fb.c -o test_efl_fb
> -I/usr/include/ecore-1/
> > -I/usr/include/eina-1/ -I/usr/include/eina-1/eina/ -I/usr/include/evas-1/
> > -lecore_evas --sysroot targetdir_mini2440/
> >
> /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld:
> > warning: libecore_x.so.1, needed by
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so, not found (try using -rpath
> > or -rpath-link)
> >
> /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld:
> > warning: libX11.so.6, needed by
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so, not found (try using -rpath
> > or -rpath-link)
> >
> /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld:
> > warning: libXext.so.6, needed by
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so, not found (try using -rpath
> > or -rpath-link)
> >
> /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld:
> > warning: libecore_fb.so.1, needed by
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so, not found (try using -rpath
> > or -rpath-link)
> >
> /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld:
> > warning: libecore_ipc.so.1, needed by
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so, not found (try using -rpath
> > or -rpath-link)
> >
> /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld:
> > warning: libecore_input.so.1, needed by
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so, not found (try using -rpath
> > or -rpath-link)
> >
> /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld:
> > warning: libecore_input_evas.so.1, needed by
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so, not found (try using -rpath
> > or -rpath-link)
> >
> /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld:
> > warning: libecore.so.1, needed by
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so, not found (try using -rpath
> > or -rpath-link)
> >
> /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld:
> > warning: libevas.so.1, needed by
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so, not found (try using -rpath
> > or -rpath-link)
> >
> /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld:
> > warning: libeina.so.1, needed by
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so, not found (try using -rpath
> > or -rpath-link)
> > /tmp/ccdvY8yv.o: dans la fonction « main »:
> > test_efl_fb.c:(.text+0x50): référence indéfinie vers «
> > ecore_main_loop_begin »
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so: référence indéfinie vers «
> > evas_render_updates »
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so: référence indéfinie vers «
> > ECORE_X_EVENT_WINDOW_DELETE_REQUEST »
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so: référence indéfinie vers «
> > ECORE_X_EVENT_CLIENT_MESSAGE »
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so: référence indéfinie vers «
> > ECORE_X_ATOM_CARDINAL »
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so: référence indéfinie vers «
> > evas_async_events_fd_get »
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so: référence indéfinie vers «
> > ecore_fb_input_device_window_set »
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so: référence indéfinie vers «
> > ecore_event_evas_init »
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so: référence indéfinie vers «
> > evas_event_feed_key_down »
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so: référence indéfinie vers «
> > eina_list_append »
> > ./usr/lib/arm-linux-gnueabi/libecore_evas.so: référence indéfinie vers «
> > ECORE_IPC_EVENT_CLIENT_DEL »
> > ....
> >
> > Can you point me on what am I missing to cross-compile my app please ?
> >
> > Thank you in advance,
> > Best Regards,
> > Gilles
> >
> ------------------------------------------------------------------------------
> > New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> > GigeNET is offering a free month of service with a new server in Ashburn.
> > Choose from 2 high performing configs, both with 100TB of bandwidth.
> > Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> > www.gigenet.com
> > _______________________________________________
> > enlightenment-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
> --
> ------------- Codito, ergo sum - "I code, therefore I am" --------------
> The Rasterman (Carsten Haitzler)    [email protected]
>
>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to