LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Cross-compilation issue in Ubuntu 12.04 (http://www.linuxquestions.org/questions/ubuntu-63/cross-compilation-issue-in-ubuntu-12-04-a-4175449575/)

indarkness 02-10-2013 03:21 PM

Cross-compilation issue in Ubuntu 12.04
 
Hello !

I'm trying to cross-compile some C++ project in Ubuntu12.04 for an arm-mv5sft-linux-gnueabi processor,I have set the ./configure in this way

Code:

./configure --build=i686-linux --host=arm-mv5sft-linux-gnueabi --target=arm-mv5sft-linux-gnueabi CC=~/s/arm-mv5sft-linux-gnueabi/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc CXX=~/s/arm-mv5sft-linux-gnueabi/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-g++ LD=~/s/arm-mv5sft-linux-gnueabi/SW3.2p1/arm-mv5sft-linux-gnueabi/bin/arm-mv5sft-linux-gnueabi-ld LDFLAGS=-L/usr/include/libdaemon --with-sysroot=/home/thales/s/arm-mv5sft-linux-gnueabi/SW3.2p1/arm-mv5sft-linux-gnueabi --prefix=/justInstalled --disable-shared --enable-threads=posix --enable-long-long --enable-target-optspace --disable-nls --with-float=soft --disable-multilib --enable-symvers=gn
The configuration succeeded, however when I do make I got an inclusion error

Quote:

libtool: link: warning: library `/home/j/s/arm-mv5sft-linux-gnueabi/SW3.2p1/bin/../lib/gcc/arm-mv5sft-linux-gnueabi/4.3.2/../../../../arm-mv5sft-linux-gnueabi/lib/libstdc++.la' was moved.
CXX Main.o
Main.cpp:28:30: error: libdaemon/daemon.h: No such file or directory
Main.cpp: In function 'int __daemon_run()':
Main.cpp:175: error: 'daemon_retval_send' was not declared in this scope
.
.
.
make[1]: Leaving directory `/home/j/ibrdtn-svn/daemon'
make: *** [all-recursive] Error 1
If I go to the file Main.cpp to see what is going on, it's complains of the include of libdeamon

Code:

...
    #include "config.h"
    #include "Configuration.h"
    #include <ibrcommon/Logger.h>
    #include <ibrcommon/data/File.h>
   
    #ifdef HAVE_LIBDAEMON
    #include <libdaemon/daemon.h> //line 28
    #endif
   
    #include <string.h>
    #include <csignal>
    #include <set>
    ...

I've checked out that I have installed the libdeamon

Code:

@ubuntu:~$ pkg-config --libs libdaemon
    -ldaemon
    @ubuntu:~$locate libdaemon
    /usr/include/libdaemon
    /usr/include/libdaemon/daemon.h
    /usr/include/libdaemon/dexec.h
    /usr/include/libdaemon/dfork.h
    /usr/include/libdaemon/dlog.h
    /usr/include/libdaemon/dnonblock.h
    /usr/include/libdaemon/dpid.h
    /usr/include/libdaemon/dsignal.h
    /usr/lib/libdaemon.a
    /usr/lib/libdaemon.so
    /usr/lib/libdaemon.so.0
    /usr/lib/libdaemon.so.0.5.0
    /usr/lib/pkgconfig/libdaemon.pc

Why the inclusion is wrong?? I've tried to include using

Code:

./configure (as before) LDFLAGS=-llibdeamon (as before)
But the configure tell me that there's an error, and I have to read the conf.log, which says

Code:

/home/j/s/arm-mv5sft-linux-gnueabi/SW3.2p1/bin/../lib/gcc/arm-mv5sft-linux-gnueabi/4.3.2/../../../../arm-mv5sft-linux-gnueabi/bin/ld: cannot find -llibdeamon
    collect2: ld returned 1 exit status

Any idea would be very much appreciated!

Thanks in advance,

Regards


All times are GMT -5. The time now is 05:22 PM.