freetype
[Top][All Lists]
Advanced

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

Re: [ft] core dumps with freetype 2.1.9 and AIX 5.2


From: Mark Frost
Subject: Re: [ft] core dumps with freetype 2.1.9 and AIX 5.2
Date: Wed, 23 Mar 2005 15:40:55 -0500
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Werner,

Well I feel like a complete idiot.  Sorry about that.  Yes, you're right, it is from autoconf/configure (trimmed a bit by me).  I guess I assumed that if the parameters didn't line up I'd get a compiler error.  Hadn't occured to me that it wasn't meant to run.

I do still believe I'm having problems, however, but I need to find another (better/appropriate) example.

Perhaps I can redeem myself with another issue I have with AIX 5.2.  The configure process for freetype-2.1.9 does not set $wl (should be "-Wl,") properly.  This results in the creation of a freetype-config file that looks like this:

...
wl=
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:<pathstuff>

which won't compile (and of course causes libgd to fail to detect freetype because it's test to compile the program I included below fails).

I've inched through the builds/unix/configure program as best I can.  I can see that $lt_prog_compiler_wl is set correctly earlier in the script.  This looks like it's supposed to get passed to the $wl variable (which later gets written to config.status and ultimately freetype-config) via the line

wl=$lt_prog_compiler_wl

However, this line never gets executed.  I can see there's a section where it checks the $host_os and sets an $archive_cmd variable.  It does not have a section for 'aix5*', but even so, it doesn't look like the aix4* section would manage to run the 'wl=...' line above.  It just can never run.

My workaround is just to edit config.status after doing the configure and change the line

s,@wl@,,;t t

to

s,@wl@,-Wl,,;t t

which seems to work fine.

Thanks

Mark

Werner LEMBERG wrote:
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char FT_Init_FreeType ();
int main ()
{
FT_Init_FreeType ();
return 0;
}

I compile that using:

/opt/www/bin/gcc -o ct -g -O2 -DFT_DEBUG_LEVEL_TRACE=1
-I/opt/www/include/freetype2 -I/opt/www/include -L/opt/www/lib
-Wl,-blibpath:/opt/www/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.3:/opt/www/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.3/../../..:/usr/lib:/lib
-L/opt/www/lib test.c -lfreetype  -lpng -lz -lm  -liconv

and it compiles fine.  When I run it I get the infamous "Segmentation
fault (core dumped)".
    

How shall this work?  FT_Init_FreeType needs an argument, but you are
faking it with an incorrect declaration.  The above test (probably
taken from an autoconf snippet) can be *only* used to test whether the
function `FT_Init_FreeType' is available in the library to be checked
for.  It is *not* meant to ever get a working executable.


    Werner
  

reply via email to

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