Re: cross compile for arm problem

Peter Hermsdorf <[email protected]> Wed, 30 Apr 2003 12:56:52 +0200
Newsgroups gmane.comp.video.picogui.devel
Message-ID <[email protected]>
ok, the empty --prefix option in my configure statement caused the 
linker error.

now i have

arm-linux-gcc 
-I/home/peter/buildroot-neu/buildroot-oz/output/staging/include/ 
-I/usr/include/freetype2 -O3 -fomit-frame-pointer -Wl,-rpath 
/home/peter/buildroot-neu/buildroot-oz/output/rootfs/usr/lib -o pgserver 
pgmain.o  
-L/home/peter/buildroot-neu/buildroot-oz/output/staging/target/lib 
./.libs/libpgserver.a -lm -lm -lm -lz -lpng -lm /usr/lib/libfreetype.so 
/usr/lib/libjpeg.so
/usr/lib/libfreetype.so: could not read symbols: Invalid operation

..... i don`t know how to suppress the -lm /usr/lib/libfreetype.so 
/usr/lib/libjpeg.so ... haven`t found it in the makefile.
however, when entering the above command (manually) without -lm 
/usr/lib/libfreetype.so /usr/lib/libjpeg.so then the linker complains 
about undefined references, ala

./.libs/libpgserver.a(font_freetype.): In function `freetype_engine_init':
font_freetype.(.text+0x10): undefined reference to `FT_Init_FreeType'
font_freetype.(.text+0x80): undefined reference to `FTC_Manager_New'

but that seems not be an picogui specific issue. i would guess it has 
something to do with freetype version mismatch stuff .... dunno...
what a pain...... :)......

Peter Hermsdorf wrote:

> hi again,
>
> so i guess you ment, adding the
>
> INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include 
> $(DRIVER_CFLAGS)
>
> to the makefile under vidbase/ , since there is the font_freetype.c 
> file which caused the error. that worked for the compile.
>
> But:
> 1. now the problem is at the linking of libpgserver.la . the complete 
> message is:
>
> /bin/sh ./libtool --mode=link arm-linux-gcc  
> -I/home/peter/buildroot-neu/buildroot-oz/output/staging/include/ 
> -I/usr/include/freetype2 -O3 -fomit-frame-pointer 
> -L/home/peter/buildroot-neu/buildroot-oz/output/staging/target/lib 
> -Wl,-rpath-link,/home/peter/buildroot-neu/buildroot-oz/output/staging/target/lib 
> -o libpgserver.la -rpath --host=arm-linux/lib   
> net/libnet.la                       theme/libtheme.la               
> debug/libdebug.la      input/libinput.la                
> video/libvideo.la               gcore/libgcore.la               
> appmgr/libappmgr.la             widget/libwidget.la             
> vidwrap/libvidwrap.la           vidbase/libvidbase.la          
> formats/libformats.la            font/libfont.la                 
> os/libos.la                     -lm -lz -lpng -lfreetype 
> -lm             -lfreetype -ljpeg  -ljpeg
> libtool: link: only absolute run-paths are allowed
>
> any ideas how to solve this ?
>
>
> 2. i searched a little bit how to set include and link directives, 
> lets say the normal linux way. so i modified my ./configure statement 
> the following way:
> ( where
> /home/peter/buildroot-neu/buildroot-oz/output/staging/include/ is the 
> include directory of my target buildroot and
> /home/peter/buildroot-neu/buildroot-oz/output/staging/target/lib is 
> the librarys directory of my target buildroot )
>
> CFLAGS="-I/home/peter/buildroot-neu/buildroot-oz/output/staging/include/"
> LDFLAGS="-L/home/peter/buildroot-neu/buildroot-oz/output/staging/target/lib 
> -Wl,-rpath-link,/home/peter/buildroot-neu/buildroot-oz/output/staging/target/lib" 
>
> ./configure --prefix --host=arm-linux --build=`./config.guess` 
> --with-profile=profiles/profile.zaurus
> (all in one line ... mostly borrowed from openzaurus makefile for 
> pgserver)
>
> so this configure call makes it obsolete to modify the makefiles by 
> hand, but the link error of #1 is also there.
> this would maybe something to add to the documentation under the 
> crosscompile section......
>
> bye, peter
>
>
> Philippe Ney wrote:
>
>>> i don`t know exactly what you mean.
>>>   
>>
>>
>> I mean that --with-extra-... options of the configure is used only in 
>> format/
>> input/ and video/, try
>> bash-2.05a$ grep DRIVER_CFLAGS format/Makefile
>>
>> To solve your problem, you just have to modify the first line of
>> font/Makefile.am regarding format/Makefile.am
>>
>> But I don't think it's the correct way for standard headers.
>> The place they stand is normally known by the compiler and this is 
>> set with
>> the >> --host=... --build=`./config.guess` --with-prefix << options
>>
>> Mmmh... ah ok!
>> To compile freetype2 fonts for arm.
>> Just do what I said above, it ought to work.
>>
>> And if this do the trick I think it could be commited. Micah ?
>>
>> -philippe
>>
>>
>> -------------------------------------------------------
>> This sf.net email is sponsored by:ThinkGeek
>> Welcome to geek heaven.
>> http://thinkgeek.com/sf
>> _______________________________________________
>> Pgui-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/pgui-devel
>>
>>  
>>
>

-- 
Mit freundlichen Grüssen
Peter Hermsdorf
 
/ATG Automatisierungstechnik GERA GmbH /
Keplerstrasse 10-12
D-07549 Gera
Tel.: ++49 (0) 365 734 93 73
Fax: ++49 (0) 365 734 93 60
email: [email protected] <mailto:[email protected]>




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf