ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [LTIB] Cross-compiling external project with gnueabi


From: Stuart Hughes
Subject: Re: [LTIB] Cross-compiling external project with gnueabi
Date: Fri, 09 Apr 2010 08:51:08 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Hi Franz,

The point of using LTIB is to make the cross compile environment
simpler.  If you cross compile outside that environment things quickly
become complicated as you end up linking with the wrong thing, or not
finding libraries.

I would politely suggest it's simpler just to make a .spec file and add
the package to LTIB.

Regards, Stuart

Franz Trierweiler wrote:
> Hello,
> 
> LTIB uses by default on the host the gnueabi toolchain. I do not know if
> this is really the right place to post such a request, so please be
> indulgent if this is not relevant but it relates to cross-compilation
> for the i.MX25. If by chance you know where to post the request to a
> better place, please tell me.
> 
> I have been for a while using the gnueabi toolchain for my own C
> projects (in this case, I do not prepare a LTIB package but generate on
> my own a makefile). For this, I always set myself the right path to the
> gnueabi gcc compiler an other tools in the Makefile
> (arm-none-linux-gnueabi-gcc) and this works fine.
> 
> Recently, I have been trying to compile sources taken from a software
> repo and which is not included by default in the LTIB packages. As many
> open-source configurable projects, it is required to first configure the
> Makefiles before launching the first "make". The sources I am trying to
> build are the project "Image Magick".
> 
> Thus, I have configured the sources with the typical ./configure command
> in order to build the right Makefiles.
> 
> 6 years ago, a contributor to the Image Magick mailing list advised to
> configure like this:
> 
> ./configure CC=arm-linux-gcc CFLAGS="" CXX=arm-linux-g++
> CXXFLAGS="" LDFLAGS="-L/usr/local/arm/2.95.3/arm-linux/lib"
> --without-x --host=arm --without-gs-font-dir --without-perl --without-zlib
> 
> I have changed the CC and LDFALGS for adaptation to my Freescale cross
> chain:
> 
> For example, I have set: 
> 
> CC=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/rm-none-linux-gnueabi-gcc
> 
> There happens that the project seems to compile properly but I got HUGE
> binary files. For example, the convert command is about 4.5 MB whereas
> it is very very smaller with shared libs on Ubuntu. I guess that shared
> libraries have not been used during the build! (the file command told me
> it is a bin with static libs) I am unable to instruct the configure
> process to use shared libraries. Is there a way of doing it? Do I have
> to build those shared libraries somewhere and from which sources?
> 
> Moreover, I noticed that the command is not able to convert a rgb file
> to a jpeg file on the ARM whereas this works fine on the Ubuntu. Every
> rgb file is converted into a... rgb file this why I suspect some missing
> libraries not to be called without any warning from the app.
> 
> My cross system bins are located here as you might know:
> 
> address@hidden:/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin$
> ls -all
> total 7896
> drwxr-xr-x  2 root root   4096 2010-03-31 23:17 .
> drwxr-xr-x 11 root root   4096 2010-03-31 23:17 ..
> -rwxr-xr-x  1 root root 465401 2007-05-09 20:27
> arm-none-linux-gnueabi-addr2line
> -rwxr-xr-x  2 root root 436451 2007-05-09 20:27 arm-none-linux-gnueabi-ar
> -rwxr-xr-x  2 root root 746982 2007-05-09 20:27 arm-none-linux-gnueabi-as
> -rwxr-xr-x  2 root root 136447 2007-05-09 20:27 arm-none-linux-gnueabi-c++
> -rwxr-xr-x  1 root root 464829 2007-05-09 20:27
> arm-none-linux-gnueabi-c++filt
> -rwxr-xr-x  1 root root 132718 2007-05-09 20:27 arm-none-linux-gnueabi-cpp
> -rwxr-xr-x  2 root root 136447 2007-05-09 20:27 arm-none-linux-gnueabi-g++
> -rwxr-xr-x  2 root root 132335 2007-05-09 20:27 arm-none-linux-gnueabi-gcc
> -rwxr-xr-x  2 root root 132335 2007-05-09 20:27
> arm-none-linux-gnueabi-gcc-4.1.2
> -rwxr-xr-x  1 root root  16302 2007-05-09 20:25
> arm-none-linux-gnueabi-gccbug
> -rwxr-xr-x  1 root root  27379 2007-05-09 20:27 arm-none-linux-gnueabi-gcov
> -rwxr-xr-x  1 root root 526172 2007-05-09 20:27 arm-none-linux-gnueabi-gprof
> -rwxr-xr-x  2 root root 733879 2007-05-09 20:27 arm-none-linux-gnueabi-ld
> -rwxr-xr-x  2 root root 476345 2007-05-09 20:27 arm-none-linux-gnueabi-nm
> -rwxr-xr-x  1 root root 621110 2007-05-09 20:27
> arm-none-linux-gnueabi-objcopy
> -rwxr-xr-x  2 root root 717557 2007-05-09 20:27
> arm-none-linux-gnueabi-objdump
> -rwxr-xr-x  2 root root 436451 2007-05-09 20:27
> arm-none-linux-gnueabi-ranlib
> -rwxr-xr-x  1 root root 238367 2007-05-09 20:27
> arm-none-linux-gnueabi-readelf
> -rwxr-xr-x  1 root root 416980 2007-05-09 20:27 arm-none-linux-gnueabi-size
> -rwxr-xr-x  1 root root 416428 2007-05-09 20:27
> arm-none-linux-gnueabi-strings
> -rwxr-xr-x  2 root root 621110 2007-05-09 20:27 arm-none-linux-gnueabi-strip
> 
> I wonder whether the CXXFLAGS must be instructed with my g++ compiler
> bin or if gcc is smart enough to use g++ without this flag (the initial
> contributor to this list did not instruct this flag).
> 
> Thanks for your help,
> 
> Franz
> 
> By the way, is-not there another kind of rgb2jpeg conversion tool
> available in the LTIB packages? (please do not tell me "gstreamer" - the
> jpeg conversion does not work on  my i.MX25).
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> LTIB home page: http://ltib.org
> 
> Ltib mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/ltib




reply via email to

[Prev in Thread] Current Thread [Next in Thread]