Re: APBuild
Justin Karneges <[email protected]> Tue, 11 Nov 2008 09:05:29 -0800
| Newsgroups | gmane.comp.autopackage.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tuesday 11 November 2008 05:58:27 Isak Savo wrote: > On Tue, Nov 11, 2008 at 1:28 AM, Justin Karneges <[email protected]> wrote: > > On Friday 07 November 2008 18:45:17 Justin Karneges wrote: > >> 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. > > > > 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? > > You can probably just switch off the particular optimization that > causes this. Is the problem visible on -O1 and -O2 too? Yes, it's visible on -O1 and -O2. It took me awhile to figure out that ~/.local/include/apbuild/ctype.h is being used in place of my system ctype.h. If I comment out the optimization in that file, then it builds. That's all well and good, but how should this be solved in Autopackage? Now for the next trouble symbol... undefined reference to `__ctype_b@GLIBC_2.0' The __ctype_b reference seems to come from stuff like isalnum(), and I can confirm it in my test program. Unfortunately this one doesn't seem to be triggered by an optimization, so I don't know how to solve it. FWIW, I'm on a 64-bit machine. Maybe I don't have any glibc_2.0 stuff? -Justin --------------------------------------------------------------------- To unsubscribe, e-mail: autopackage-dev-unsubscribe-OfajU3CKLf1/[email protected] For additional commands, e-mail: autopackage-dev-help-OfajU3CKLf1/[email protected]