Bug 475903 - env.Append() seems to result in broken Unicode strings
env.Append() seems to result in broken Unicode strings
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: scons (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Gérard Milmeister
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-10 19:28 EST by Jon Burgess
Modified: 2009-08-08 08:18 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-08-08 08:18:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jon Burgess 2008-12-10 19:28:07 EST
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-10 19:46:52 EST
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 02:01:42 EST
Ok, let's wait for 1.2.0 and update then.
Comment 3 Alex Lancaster 2008-12-26 01:55:45 EST
(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 06:13:28 EDT
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 06:15:44 EDT
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.