Bug 475903 - env.Append() seems to result in broken Unicode strings
Summary: env.Append() seems to result in broken Unicode strings
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: scons
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Gérard Milmeister
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-11 00:28 UTC by Jon Burgess
Modified: 2009-08-08 12:18 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-08 12:18:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jon Burgess 2008-12-11 00:28:07 UTC
Description of problem:
I tried to do a local rawhide mock build of Mapnik to replicate the recent Koji failures, e.g. http://koji.fedoraproject.org/koji/buildinfo?buildID=73723
My local build failed too. It appears that with python-2.6 some of the environment strings for things like CXXFLAGS are broken.

Version-Release number of selected component (if applicable):


How reproducible:
Every time

Steps to Reproduce:
I did a local rawhide mock build on my F10 machine of the Mapnik src.rpm
I suspect the problem is python-2.6 related so is probably rawhide only.

Actual results:
The build hung at the point of checking for libicuuc. This is the failure point for the koji build.

Looking at the process list shows that the GCC build line is broken:

jburgess 20018 19642  0 23:52 pts/8    00:00:00 rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/mapnik.spec
jburgess 22859 20018  0 23:53 pts/8    00:00:00 /bin/sh -e /var/tmp/rpm-tmp.q9Yml4
jburgess 22865 22859  2 23:53 pts/8    00:00:01 /usr/bin/python /usr/bin/scons PREFIX=/usr THREADING=multi XMLPARSER=libxml2 GDAL_INCLUDES=/usr/include/gdal INTERNAL_LIBAGG=False
jburgess 22972 22865  0 23:53 pts/8    00:00:00 g++ -o .sconf_temp/conftest_8.o -c - D H A V E _ C A I R O - D H A V E _ L I B X M L 2 -Itinyxml-Iinclude -I. -I/usr/include/agg2 -I/usr/include/freetype2 -I/usr/include -I/usr/local/include -I/usr/include/gdal -I/usr/include/cairomm-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/libxml2 .sconf_temp/conftest_8.cpp

The '-' from the string "- D H A V E _ C A I R O" string gets seen by the compiler as a request to build from STDIN. This looks like some bad UTF-16 double byte string conversion.

The SConstruct line set added this flag into the enviroment like:

env = Environment(ENV=os.environ, options=opts)
...
env.Append(CXXFLAGS = '-DHAVE_CAIRO');

Could it be that the Environment handling of SCons is broken by the unicode string changes in python-2.6?

Comment 1 Jon Burgess 2008-12-11 00:46:52 UTC
This looks pertinent: 

[ From http://www.scons.org/CHANGES.txt ]

RELEASE 1.1.0.d20081207 - Sun, 07 Dec 2008 19:17:23 -0800
...
    - Fix env.Append() and env.Prepend()'s ability to add a string to
      list-like variables like $CCFLAGS under Python 2.6.

    - Other Python2.6 portability:  don't use "as" (a Python 2.6 keyword).
      Don't use the deprecated Exception.message attribute.

Maybe an SCons upgrade is required for rawhide?

Comment 2 Gérard Milmeister 2008-12-12 07:01:42 UTC
Ok, let's wait for 1.2.0 and update then.

Comment 3 Alex Lancaster 2008-12-26 06:55:45 UTC
(In reply to comment #2)
> Ok, let's wait for 1.2.0 and update then.

Since this was causing broken deps in other packages (such as mapnik) and 1.2.0 is now officially out, I took the liberty of rebuilding scons 1.2.0:

https://koji.fedoraproject.org/koji/buildinfo?buildID=76444

Leaving bug open until confirmed fixed.

Comment 4 Bug Zapper 2009-06-09 10:13:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Thomas Spura 2009-08-03 10:15:44 UTC
mapnik is build.

Can someone close this bug? ;-)


Ping Alex, Jon


Note You need to log in before you can comment on or make changes to this bug.