Skip Menu |
 

This queue is for tickets about the Glib CPAN distribution.

Report information
The Basics
Id: 32883
Status: resolved
Priority: 0/
Queue: Glib

People
Owner: Nobody in particular
Requestors: dmacks [...] netspace.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Improved -I flag ordering
Date: Sat, 2 Feb 2008 11:40:58 -0500
To: bug-Glib [...] rt.cpan.org
From: Daniel Macks <dmacks [...] netspace.org>
Download (untitled) / with headers
text/plain 1.4k
I got some weird compile failures while compiling Glib-1.164 on my OS X 10.4 (perl-5.8.6) machine: cc -c -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I. -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -Os -DVERSION=\"1.164\" -DXS_VERSION=\"1.164\" -o Glib.o "-I/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE" Glib.c crashed with bad types and symbol declarations. The local issue was that I had some .h on my system that had the same names as those in the Glib distro but were not related to it (my fault, not Glib's). The "real" problem however is that the -I. flag came too late in the compiler call: local (source-distro) paths should always come before global (installed stuff) ones in order to assure that source-distro files are always found even if there are same-named global ones. The bug is in Makefile.PL, specifically: $glib->set_inc ($glibcfg{cflags} . $gthreadcfg{cflags} . ' -I. '); which appends "-I." to the flag list. Should prepend it instead: $glib->set_inc (' -I. ' . $glibcfg{cflags} . $gthreadcfg{cflags}); And now I get: cc -c -I. -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -Os -DVERSION=\"1.164\" -DXS_VERSION=\"1.164\" -o Glib.o "-I/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE" Glib.c and a successful package build. dan -- Daniel Macks dmacks@netspace.org http://www.netspace.org/~dmacks
RT-Send-CC: scott [...] asofyet.org
Download (untitled) / with headers
text/plain 1.5k
On Sat Feb 02 11:41:26 2008, dmacks@netspace.org wrote: Show quoted text
> I got some weird compile failures while compiling Glib-1.164 on my OS > X 10.4 (perl-5.8.6) machine: > > cc -c -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I. -g -pipe > -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing > -I/usr/local/include -Os -DVERSION=\"1.164\" > -DXS_VERSION=\"1.164\" -o Glib.o "- > I/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE" > Glib.c > > crashed with bad types and symbol declarations. The local issue was > that I had some .h on my system that had the same names as those in > the Glib distro but were not related to it (my fault, not Glib's). The > "real" problem however is that the -I. flag came too late in the > compiler call: local (source-distro) paths should always come before > global (installed stuff) ones in order to assure that source-distro > files are always found even if there are same-named global ones. The > bug is in Makefile.PL, specifically: > > $glib->set_inc ($glibcfg{cflags} . $gthreadcfg{cflags} . ' -I. '); > > which appends "-I." to the flag list. Should prepend it instead: > > $glib->set_inc (' -I. ' . $glibcfg{cflags} . $gthreadcfg{cflags}); > > And now I get: > > cc -c -I. -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -g -pipe > -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing > -I/usr/local/include -Os -DVERSION=\"1.164\" > -DXS_VERSION=\"1.164\" -o Glib.o "- > I/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE" > Glib.c > > and a successful package build.
Sounds good to me. muppet?
CC: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
Subject: Re: [rt.cpan.org #32883] Improved -I flag ordering
Date: Sun, 24 Feb 2008 10:14:10 -0500
To: bug-Glib [...] rt.cpan.org
From: muppet <scott [...] asofyet.org>
Download (untitled) / with headers
text/plain 861b
On Feb 24, 2008, at 8:03 AM, Torsten Schoenfeld via RT wrote: Show quoted text
> On Sat Feb 02 11:41:26 2008, dmacks@netspace.org wrote:
>> The bug is in Makefile.PL, specifically: >> >> $glib->set_inc ($glibcfg{cflags} . $gthreadcfg{cflags} . ' -I. '); >> >> which appends "-I." to the flag list. Should prepend it instead: >> >> $glib->set_inc (' -I. ' . $glibcfg{cflags} . $gthreadcfg{cflags}); >>
> Sounds good to me. muppet?
Sounds perfect. -- The Master in the art of living makes little distinction between his work and his play, his labor and his leisure, his mind and his body, his education and his recreation, his love and his religion. He hardly knows which is which. He simply pursues his vision of excellence in whatever he does, leaving others to decide whether he is working or playing. To him he is always doing both. -- Zen Philosophy
RT-Send-CC: scott [...] asofyet.org
Download (untitled) / with headers
text/plain 115b
On Sun Feb 24 10:15:06 2008, scott@asofyet.org wrote: Show quoted text
> > Sounds good to me. muppet?
> Sounds perfect.
Committed.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.