On Tue, April 1, 2008 1:45 am, Phil Dibowitz wrote:
> Stephen Warren wrote:
>> Phil Dibowitz wrote:
>>> It's so weird I don't get the same behavior...
>>> [variadic macros error from gcc]
>>
>> Yes indeed.
>>
>> I installed a Debian sid chroot on my Fedora 8 system using the
>> debootstrap utility, and installed the gcc-4.3 and g++-4.3 packages
>> using aptitude (Debian seems crazy fast downloading/installing
>> packages!) And, I get the same issue as I do on Fedora:
>>
>> [EMAIL PROTECTED]:~/cvs_wa/concordance/concordance# gcc-4.3 --version
>> gcc-4.3 (Debian 4.3.0-2) 4.3.1 20080321 (prerelease)
>>
>> gcc-4.3 -DHAVE_CONFIG_H -I.    -Wall -ansi -pedantic-errors
>> -I../libconcord -MT concordance-concordance.o -MD -MP -MF
>> .deps/concordance-concordance.Tpo -c -o concordance-concordance.o `test
>> -f 'concordance.c' || echo './'`concordance.c
>
> You get different compile options than I do:
>
> gcc-4.3 -DHAVE_CONFIG_H -I.    -Wall -ansi -pedantic-errors -g -O2 -MT
> concordance-concordance.o -MD -MP -MF .deps/concordance-concordance.Tpo -c
> -o concordance-concordance.o `test -f 'concordance.c' || echo
> './'`concordance.c
>
> You have an extra -I../libconcord which is triggering the error, I don't
> have that.

Yes; that's it.

Here's why: gcc is being evil.

If I "make install" in libconcord, libconcord.h gets put into
/usr/local/include/libconcord.h, which is a system compiler path. Compiles
against this location work fine.

If I simply copy libconcord to *any* directory other than the standard
paths, and use "-I the_directory", then it's in a user-specified path.
Builds fail this way.

So, it looks like gcc has some bug/quirk/feature that certain errors (such
as the variadic macro error) are ignored for headers found in system
compiler paths. In fact, if I replace "-I dir" with "-isystem dir", then
the build works fine, no matter whether dir is /home/swarren/myinc,
../libconcord, etc.

I guess this is to allow gcc/glibc/... to use C99/whatever features in
headers no matter what standard option the user requested for their own
code.

This of course means that if I install libconcord into e.g.
/home/swarren/tmp, then I'll have the same problem. I guess I'll just have
to use -isystem to point concordance at libconcord all the time...

Sigh.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to