Re: APBuild

Justin Karneges <[email protected]> Mon, 10 Nov 2008 16:28:52 -0800
Newsgroups gmane.comp.autopackage.devel
Message-ID <[email protected]>
On Friday 07 November 2008 18:45:17 Justin Karneges wrote:
> I just checked out SVN today and I'm also getting undefined symbols at link
> time, e.g.: undefined reference to `__ctype_toupper@GLIBC_2.0'
>
> I'm getting this both with Qt and OpenSSL (after futzing with their build
> systems to use apgcc/apg++, of course).  I'm using Ubuntu 8.04.
>
> I haven't figured out exactly what compile or linker flags are causing
> this, as if I make a test program that includes ctype.h and calls
> toupper(), and compile and link with apgcc, it works.

Found.  Optimization triggers it.

$ cat atest.c
#include <stdio.h>
#include <ctype.h>

int main(int argc, char **argv)
{
        printf("%c\n", toupper('a'));
        return 0;
}

Success:
$ apgcc atest.c -o atest
$

Fail:
$ apgcc -O3 atest.c -o atest
/tmp/cc6UgLDq.o: In function `main':
atest.c:(.text+0x7): undefined reference to `__ctype_toupper@GLIBC_2.0'
collect2: ld returned 1 exit status

Any ideas other than turning off optimization?

-Justin

---------------------------------------------------------------------
To unsubscribe, e-mail: autopackage-dev-unsubscribe-OfajU3CKLf1/[email protected]
For additional commands, e-mail: autopackage-dev-help-OfajU3CKLf1/[email protected]