FTBFS with gcc 4.4

Bug #434142 reported by Andrew Starr-Bochicchio
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pygpiv (Debian)
Fix Released
Unknown
pygpiv (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

http://launchpadlibrarian.net/32003043/buildlog_ubuntu-karmic-amd64.pygpiv_1.0.0-1_FAILEDTOBUILD.txt.gz

Toolchain package versions: libc6-dev_2.10.1-0ubuntu12 make_3.81-6 dpkg-dev_1.15.3.1ubuntu1 g++-4.4_4.4.1-4ubuntu1 gcc-4.4_4.4.1-4ubuntu1 binutils_2.19.91.20090910-0ubuntu1 libstdc++6_4.4.1-4ubuntu1 libstdc++6-4.4-dev_4.4.1-4ubuntu1
------------------------------------------------------------------------------
gpg: new configuration file `/home/buildd/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/buildd/.gnupg/gpg.conf' are not yet active during this run
gpg: Signature made Sat Apr 4 09:40:46 2009 UTC using DSA key ID F22A794E
gpg: Can't check signature: public key not found
dpkg-source: extracting pygpiv in pygpiv-1.0.0
dpkg-source: unpacking pygpiv_1.0.0.orig.tar.gz
dpkg-source: applying /home/buildd/build-1228577-2592614/pygpiv_1.0.0-1.diff.gz
dpkg-buildpackage: set CFLAGS to default value: -g -O2
dpkg-buildpackage: set CPPFLAGS to default value:
dpkg-buildpackage: set LDFLAGS to default value: -Wl,-Bsymbolic-functions
dpkg-buildpackage: set FFLAGS to default value: -g -O2
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
dpkg-buildpackage: source package pygpiv
dpkg-buildpackage: source version 1.0.0-1
dpkg-buildpackage: host architecture amd64
 /usr/bin/fakeroot debian/rules clean
dpatch deapply-all
01_gpivrc not applied to ./ .
rm -rf patch-stamp patch-stampT debian/patched
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
rm -r debian/python-gpiv
rm: cannot remove `debian/python-gpiv': No such file or directory
make: [clean] Error 1 (ignored)
rm -r build pygpiv.py pygpiv_wrap.c
rm: cannot remove `build': No such file or directory
rm: cannot remove `pygpiv.py': No such file or directory
rm: cannot remove `pygpiv_wrap.c': No such file or directory
make: [clean] Error 1 (ignored)
dh_clean
 debian/rules build
dh_testdir
# Add here commands to compile the package.
python ./setup.py build -b debian/python-gpiv
running build
running build_ext
building '_pygpiv' extension
swigging pygpiv.i to pygpiv_wrap.c
swig -python -modern -cpperraswarn -I/usr/include -I/usr/local/include -o pygpiv_wrap.c pygpiv.i
/usr/include/glib-2.0/glib/gtypes.h:410: Warning(205): CPP #error "unknown ENDIAN type".
creating debian/python-gpiv
creating debian/python-gpiv/temp.linux-x86_64-2.6
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fPIC -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.6 -c pygpiv_wrap.c -o debian/python-gpiv/temp.linux-x86_64-2.6/pygpiv_wrap.o
In file included from /usr/include/png.h:481,
                 from /usr/include/gpiv.h:203,
                 from pygpiv_wrap.c:2550:
/usr/include/pngconf.h:335: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
/usr/include/pngconf.h:336: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'include'
error: command 'gcc' failed with exit status 1
make: *** [build-stamp] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Tags: ftbfs

Related branches

Artur Rona (ari-tczew)
tags: added: ftbfs
Marcin Wider (mwider)
Changed in pygpiv (Ubuntu):
status: New → Confirmed
Revision history for this message
Niall Creech (sevenmachines-deactivatedaccount) wrote :

this seems to be a problem with including png.h after setjmp.h in the code 'swigged' from pygpiv.i. Python.h is included first, and it includes setjmp.h, whereas including gpiv.h then draws in png.h, causing the error.

#include <Python.h> //includes setjmp.h
#include <gpiv.h> //includes png.h

Reversing the order of the includes 'solves' the problem. or including png.h before python.
essentially, you are not allowed to include png.h if setjmp.h has already been included, this is by design apparently

Revision history for this message
Niall Creech (sevenmachines-deactivatedaccount) wrote :

not sure about the best way to fix this, its swig that inserts the python include into pygpiv_wrap.c

Revision history for this message
Niall Creech (sevenmachines-deactivatedaccount) wrote :

well, if #define PNG_SKIP_SETJMP_CHECK is added then pngconf.h will ignore the check and assume multiple setjmp.h inclusion isn't a problem, i think this is ok in this case (probably true in a lot of cases) so if that seems reasonable we could just do that?

Revision history for this message
Niall Creech (sevenmachines-deactivatedaccount) wrote :

from pngconf.h, on PNG_SKIP_SETJMP_CHECK

"You can bypass this test if you know that your application uses exactly
the same setjmp.h that was included when libpng was built."

Revision history for this message
Niall Creech (sevenmachines-deactivatedaccount) wrote :
Revision history for this message
Niall Creech (sevenmachines-deactivatedaccount) wrote :

There doesn't seem to be a better way solve this in this specific case. the problem is
1. swig automatically generates a #include <Python.h> call before any of pygpiv's code, this brings in setjmp.h
2. pygpiv then includes gpiv.h which in turn includes png.h, this brings in pngconf.h
3. pngvonf.h fails if setjmp.h is already included, as it already is

The only solution i can find is to define PNG_SKIP_SETJMP_CHECK so that pngconf ignores the check.

i've included the previous debdiff for lucid in the ppa below
https://launchpad.net/~sevenmachines/+archive/release+1/+packages

Revision history for this message
Niall Creech (sevenmachines-deactivatedaccount) wrote :

this isnt a problem for debian unstable, libpng-dev contains the same test but builds against python 2.5 so perhaps its a result of using 2.6 in ubuntu.

Revision history for this message
Benjamin Drung (bdrung) wrote :

Thanks for the patch. I have uploaded it. Please forward the changes to Debian if it does not do any harm to the Debian package. They may have the same problem once they use Python 2.6.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygpiv - 2.0.0-1ubuntu1

---------------
pygpiv (2.0.0-1ubuntu1) lucid; urgency=low

   * pygpiv.i: add #define PNG_SKIP_SETJMP_CHECK to fix a multiple setjmp.h
     inclusion problem due to swig including Python.h before we add gpiv.h
     (LP: #434142)
 -- SevenMachines <email address hidden> Wed, 09 Dec 2009 14:24:55 +0000

Changed in pygpiv (Ubuntu):
status: Confirmed → Fix Released
Changed in pygpiv (Debian):
status: Unknown → New
Changed in pygpiv (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.