cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problems compiling simple.c on AIX with Visual Age compiler (xlc)

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 17 Feb 2004 23:33:23 +0100 (CET)

On Tue, 17 Feb 2004, Hicham Bahi wrote:

> I tried to compile the sample program simple.c on AIX 5.1 using IBM's Visual
> Age compiler, and I got the following error at the linking stage:
>
> > xlc -I/usr/local/include -L/usr/local/lib simple.c
> -lcurl -lz
>
> ld : 0711-317 ERREUR : Symbole non defini : .__umoddi3
> ld : 0711-317 ERREUR : Symbole non defini : .__udivdi3
> ld : 0711-317 ERREUR : Symbole non defini :
> .__floatdidf
> ld : 0711-345 Pour plus de dÈtails, utilisez
> l'option -bloadmap ou -bnoquiet.
>
> By the way "Symbole non defini" means "Undefined symbol" in french.
>
> After some research, I found that the missing symbols come from libgcc.

Indeed, those symbols look like them.

> I was able to get hold of the library by downloading the runtime version of
> gcc from http://aixpdslib.seas.ucla.edu/packages/gccruntime.html and
> extracted the libgcc.a. I recompiled with that library but the compiler
> complained that the library is not in the correct format. What is the
> problem?

With your build of libgcc that your compiler claims is not the correct format?
I really can't tell.

> Can't the xlc compiler understand libraries generated with gcc?

I think it can, libraries are made in a way that is not depending on what
compiler that made it. If you couldn't, you'd get lots of more warnings about
all the curl-related symbols in the simple.c file that libcurl.a provides.

> Any ideas? Do I need to recompile libcurl with xlc.

That would certainly remove the dependency on libgcc!

> I tried but it seems like the build procedure is designed to work only with
> gcc.

No, that's wrong. Tor Arntsen for example, builds curl automaticly on AIX with
xlc several times every day and it works for him: http://curl.haxx.se/auto/

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
Received on 2004-02-17