[Pkg-phototools-devel] Bug#546034: Bug#546034: Bug#546034: pfstools: FTBFS with gcc 4.4 in pfspanoramic.cpp
Sebastian Harl
sh at tokkee.org
Tue Sep 15 08:27:36 UTC 2009
Hi Fabrice,
On Tue, Sep 15, 2009 at 07:21:24AM +0200, fabrice wrote:
> Sebastian Harl escribió:
> > Uhm … I've misread that on the first try. It's not that that function is
> > called with a non-const argument, but rather the argument is passed
> > along to another function. Line 198 of pfspanoramic.cpp reads:
> >
> > if(opts = strchr(name, '/'))
> >
> > … where 'name' is the argument of the surrounding function:
> >
> > static Projection *getProjection(const char *name)
> >
> > According to POSIX (and that's how it's defined on Debian), strchr() is
> > defined as:
> >
> > char *strchr(const char *s, int c);
>
> In gcc 4.4 headers (string.h), strchr is defined in 2 ways:
Hrm … talking about headers is a good point. Are you talking about
/usr/include/string.h? That'd be provided by libc (rather than GCC). As
you might know, Debian has recently switched to eglibc. Did Ubuntu do so
as well? Which version of libc do you use?
> when __OPTIMIZE__ is set
> char *strchr (char *__s, int __c)
> __const char *strchr (__const char *__s, int __c)
*Both* definitions are active at the same time? Unfortunately, neither
of those is POSIX-compliant :-/
> otherwise:
> char *strchr (__const char *__s, int __c)
This one is, though.
> > So, there's nothing wrong with that. If this causes a build-failure on
> > Ubuntu, something's wrong with the build environment.
>
> Also, it doesn't seems to be a problem with the build environment, as
> it's failing to build in the buildd of Ubuntu
> (https://edge.launchpad.net/ubuntu/+source/pfstools/1.8.1-1build1/+build/1207611/+files/buildlog_ubuntu-karmic-i386.pfstools_1.8.1-1build1_FAILEDTOBUILD.txt.gz).
Sorry, I was a bit unclear on that. I was talking about the environment
in general, i.e. including the tool chain, etc.
> So, rather a problem with gcc 4.4?
So, yes, this does look like a problem in GCC / libc to me (or some
missing defines to ask for POSIX-compliant features).
> Anyway, as upstream proposed the fix (if I am correct), I'll patch the
> source in Ubuntu to be able to build pfstools.
Yes, the "fix" was proposed by upstream. I'd rather call that a work-
around for strange compiler behavior though, but I might be a bit
"extreme" in that respect (i.e. standard-compliance) ;-)
Anyway, I guess, I'll include the fix in the next upload as well (if
that happens before the next upstream release). I'm a bit busy at the
moment, though, so that won't happen within the next few days.
Thanks for the follow-up!
Cheers,
Sebastian
--
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/
Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-phototools-devel/attachments/20090915/ec1b5440/attachment.pgp>
More information about the Pkg-phototools-devel
mailing list