scipy.weave.inline compilation fails with gcc 4.3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| SciPy |
New
|
Unknown
|
||
| blitz++ (Debian) |
Fix Released
|
Unknown
|
||
| python-scipy (Debian) |
Fix Released
|
Unknown
|
||
| python-scipy (Ubuntu) |
Medium
|
Sameer Morar | ||
| Lucid |
Low
|
Sameer Morar |
Bug Description
Binary package hint: python-scipy
The compiler fails with the following error:
<weave: compiling>
In file included from /usr/lib/
/usr/lib/
/usr/lib/
In file included from /usr/lib/
/usr/lib/
/usr/lib/
/usr/include/
/usr/include/
/usr/include/
/usr/lib/
/usr/lib/
This problem can be worked around by changing /usr/bin/g++ from g++-4.3 to point to g++-4.2
I am using Intrepid
root@spider:
ii python-scipy 0.6.0-11 scientific tools for Python
Sameer Morar (smorar) wrote : | #1 |
description: | updated |
Matthias Klose (doko) wrote : | #2 |
an include of cstdlib seems to be missing.
Benjamin Horstman (yodenss) wrote : | #3 |
I can confirm the bug and workaround of linking g++-4.2.
For reference, here is the upstream ticket:
http://
What Matthias has noted is present in the debian patch.
And the original (as far as I can tell) mention of this problem on the debian list, more than a year ago:
http://
Changed in scipy: | |
status: | Unknown → Fix Released |
Luca Falavigna (dktrkranz) wrote : | #4 |
Fixed upstream with new 0.7.0.
Changed in python-scipy: | |
importance: | Undecided → Medium |
status: | New → Fix Committed |
Launchpad Janitor (janitor) wrote : | #5 |
This bug was fixed in the package python-scipy - 0.7.0-0ubuntu1
---------------
python-scipy (0.7.0-0ubuntu1) jaunty; urgency=low
* New upstream version (LP: #285936, #299375, #302649).
* Apply changes from Debian's python-modules team, thanks!
* debian/rules: make python-scipy ready for Python 2.6 (LP: #336239):
- Include /usr/share/
- Pass $(py_setup_
- Remove some files present in new dist-packages directory too.
-- Luca Falavigna <email address hidden> Mon, 02 Mar 2009 17:28:08 +0100
Changed in python-scipy: | |
status: | Fix Committed → Fix Released |
Changed in python-scipy: | |
status: | Unknown → Fix Released |
Benjamin Horstman (yodenss) wrote : | #6 |
Note that according to the scipy bug tracker, this isn't going to be fixed until scipy 0.7.1, which means that this bug still exists in ubuntu 9.04.
Sameer Morar (smorar) wrote : | #7 |
This bug also exists in ubuntu 9.10:
smorar@spud:~/$ dpkg -l|grep scipy
ii python-scipy 0.7.0-2
Changed in python-scipy (Ubuntu): | |
status: | Fix Released → Incomplete |
Sameer Morar (smorar) wrote : | #8 |
I have changed the status in python-scipy (ubuntu) to incomplete, as it should only be tagged as fixed when scipy 0.7.1 is available in the ubuntu repository.
Jakob Runge (jakobrunge) wrote : | #9 |
The weave bug seems to be still present in scipy 0.7.1
I am running Ubuntu 9.10 (Karmic) and have scipy installed from source (since it is not in the repos) without problems, the required Atlas, ... libraries were installed using synaptic
ipython:
In [2]: scipy.__version__
Out[2]: '0.7.1'
Running a weave.blitz test routine:
"...
weave.inline(code, vars, type_converters = weave.converter
..."
Output is:
starting weavefunc..
In file included from /usr/local/
/usr/local/
/usr/local/
In file included from /usr/local/
/usr/local/
/usr/local/
/usr/include/
/usr/include/
/usr/include/
/usr/local/
/usr/local/
In file included from /usr/local/
Jakob Runge (jakobrunge) wrote : | #10 |
changing the compiler to g++-4.2 it works... Karmic comes with g++-4.4 though
Changed in scipy: | |
status: | Fix Released → New |
Sameer Morar (smorar) wrote : | #11 |
This bug still exists in ubuntu 10.10:
smorar@spud:~/$ dpkg -l|grep scipy
ii python-scipy 0.7.2-2
Changed in python-scipy (Ubuntu): | |
status: | Incomplete → Confirmed |
Matthias Klose (doko) wrote : | #12 |
Sameer, Stefano, what is the problem in maverick?
Changed in python-scipy (Ubuntu): | |
status: | Confirmed → Incomplete |
Stefano Rivera (stefanor) wrote : | #13 |
Matthias: Haven't had a proper look at these headers, but the test case attached to this bug seems to show up some bugs in them.
Full output attached
In file included from /usr/lib/
/usr/lib/
/usr/lib/
Changed in python-scipy (Ubuntu): | |
status: | Incomplete → Confirmed |
Stefano Rivera (stefanor) wrote : | #14 |
Err, meant to add, obviously this is now an issue with 4.4
Sameer Morar (smorar) wrote : | #15 |
The fix for this bug is simple. As per the debian patch linked to below, one needs to add an include for cstdlib above the BZ_NAMESPACE(blitz) call in the following files:
/usr/share/
/usr/share/
http://
This fix works for me by manually editing those files.
Sameer Morar (smorar) wrote : | #16 |
Patch to fix this bug
Changed in python-scipy (Ubuntu): | |
assignee: | nobody → Stefano Rivera (stefanor) |
Sameer Morar (smorar) wrote : | #17 |
Updated patch - added an cstdlib include to prettyprint.h
Change reference to launchpad bug number.
Updated the Patch Tags to only use a description and bug-ubuntu fields.
Stefano Rivera (stefanor) wrote : | #18 |
Thanks for the patch, I'll forward this to Debian
Changed in python-scipy (Ubuntu): | |
assignee: | Stefano Rivera (stefanor) → Sameer Morar (smorar) |
status: | Confirmed → Fix Committed |
Changed in python-scipy (Ubuntu Lucid): | |
assignee: | nobody → Sameer Morar (smorar) |
Sameer Morar (smorar) wrote : | #19 |
Here is a patch for lucid
Sameer Morar (smorar) wrote : | #20 |
Here is a patch for lucid
affects: | python-scipy (Debian) → blitz++ (Debian) |
tags: | added: patch |
Launchpad Janitor (janitor) wrote : | #21 |
This bug was fixed in the package python-scipy - 0.7.2-2ubuntu1
---------------
python-scipy (0.7.2-2ubuntu1) maverick; urgency=low
* debian/
- Fix scipy.weave.inline compilations (LP: #302649)
-- Sameer Morar <email address hidden> Wed, 29 Sep 2010 13:42:10 +0200
Changed in python-scipy (Ubuntu): | |
status: | Fix Committed → Fix Released |
Stefano Rivera (stefanor) wrote : | #22 |
Uploaded to lucid-proposed, pending SRU team verification.
Changed in python-scipy (Ubuntu Lucid): | |
importance: | Undecided → Low |
status: | New → Fix Committed |
Accepted python-scipy into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https:/
tags: | added: verification-needed |
Sameer Morar (smorar) wrote : | #24 |
The new package works for me.
Sameer Morar (smorar) wrote : | #25 |
Addendum to comment 24:
To verify the fix, python-dev needs to be installed. Will open this as a separate bug, as python-scipy does not recommend or suggest python-dev to be installed.
tags: |
added: verification-done removed: verification-needed |
Changed in python-scipy (Debian): | |
status: | Unknown → Fix Committed |
Launchpad Janitor (janitor) wrote : | #26 |
This bug was fixed in the package python-scipy - 0.7.0-2ubuntu0.1
---------------
python-scipy (0.7.0-2ubuntu0.1) lucid-proposed; urgency=low
* Fix scipy.weave.inline compilations (LP: #302649)
-- Sameer Morar <email address hidden> Thu, 30 Sep 2010 15:32:13 +0200
Changed in python-scipy (Ubuntu Lucid): | |
status: | Fix Committed → Fix Released |
Changed in python-scipy (Debian): | |
status: | Fix Committed → Fix Released |
Attached is some python code which demonstrates the bug. To reproduce, please follow the following steps:
1) Ensure that gcc-4.3 is installed:
root@spider: /usr/bin# ls -la g++
lrwxrwxrwx 1 root root 7 2008-11-27 02:37 g++ -> g++-4.3
2) Remove pre-compiled python snippets
smorar@spider:~$ rm -rf /home/smorar/ .python25_ compiled/
3) Run code
smorar@spider:~$ python weave_test.py
The compilation will fail with the above error.
To demonstrate that this is related to the latest gcc:
1) Ensure that gcc-4.2 is installed
root@spider: /usr/bin# rm g++ /usr/bin# ln -s g++-4.2 g++
root@spider:
2) Remove pre-compiled python snippets
smorar@spider:~$ rm -rf /home/smorar/ .python25_ compiled/
3) Run code
smorar@spider:~$ python weave_test.py
The compilation will succeed (with many compiler warnings), and the python / c code produces the expected output.