Summary: | dev-python/matplotlib-0.99.1.1 fails to plot masked data | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Paweł Rumian <gorkypl> |
Component: | [OLD] Development | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
testfig.pdf
testfig.png matplotlib-0.99.3.ebuild Log of building from source tar.gz Log of installing from source tar.gz Log of build and install from portage |
Description
Paweł Rumian
2010-01-15 08:20:12 UTC
I've just built and installed matplotlib from the tarball and it works flawlessly. So it is certainly a bug in Gentoo. I don't experiment this on my ~amd64 box, it works fine with the package in the tree, and the demo gives the same result as in the web page mentioned or in other linux boxes. Could someone else confirm? Chcecked another machine and the problem still exists. It was, however, x86 - like all the previous boxes with this problem. Anyway, I don't suppose architecture, but who knows? I can not reproduce this bug on ~amd64. Could one of the x86 team try it out? Thanks (In reply to comment #4) > I can not reproduce this bug on ~amd64. Could one of the x86 team try it out? Reproducable as the green line is not shown, the blue (masked?) dots are there. I've tried to debug this, but with no effect. As far as I can tell this bug is independent of the patches - disbaling them makes no effect. Commenting out the FHS parts of the ebuild also didn't help. I'd like to help finding the reasons of this strange behaviour, but I don't know where to seek now. It is probably not an architecture problem, but from dependencies of matplotlib, may be in the backend. Could you try with different backends and report, so we could point out which dependency causes trouble? Thanks Paweł, could you try with matplotlib-0.99.1.1-r2? Thanks. (In reply to comment #8) > Paweł, could you try with matplotlib-0.99.1.1-r2? > Thanks. Unfortunately the bug still persits with -r2. I'm finishing my thesis now and have very little time for debugging, but I've tried with other backends and: - there's no difference with GTKAgg, GTKCairo, TkAgg, WXAgg (green line not being plotted) - the situation is even worse with GTK, GTKCairo, WX (no only the green line is not plotted but also part of the blue dots) - it also doesn't work with savefig() and backends like PDF, SVG, PS, Cairo - I'm attaching an example PDF and PNG file. I'm constantly working with matplotlib built from sources and it works OK, so I'm wondering if it can be the backend causing this strange behaviour. Created attachment 233735 [details]
testfig.pdf
Created attachment 233737 [details]
testfig.png
Created attachment 234025 [details]
matplotlib-0.99.3.ebuild
please try matplotlib-0.99.3 just bumped in portage, and if it does not work, could you give a try with this one attached, which uses the pycxx bundled into matplotlib instead of the system one?
I'm afraid that they still doesn't work - neither the 0.99.3 from portage, nor the attached one... Hmm I wonder where that come from. Could you build it from scratch as you now do and post your build log, something like python setup.py build &> build.log? Also post your build log from the one in portage. Thanks. (In reply to comment #14) > Hmm I wonder where that come from. You're not alone :) I'm attaching the build logs... Created attachment 234037 [details]
Log of building from source tar.gz
Matplotlib built this way plots masked data with no problems.
Created attachment 234039 [details]
Log of installing from source tar.gz
This is what I get after building from source tar.gz and doing python setup.py install
After this I get working (==plotting masked data) matplotlib.
Created attachment 234041 [details]
Log of build and install from portage
This is what I get after doing simple 'emerge matplotlib'.
After this matplotlib WON'T plot masked data.
Could you try those two things: * build from source using the same flags as in your make.conf (both CFLAGS and CXXFLAGS)? and see if masking still works * comment out the sed test in matplotlib ebuild: sed -i \ -e "s/check_for_gtk()/$(use gtk && echo True || echo False)/" \ -e "s/check_for_tk()/$(use tk && echo True || echo False)/" \ setup.py || die "sed setup.py failed" (In reply to comment #19) > Could you try those two things: > * build from source using the same flags as in your make.conf (both CFLAGS and > CXXFLAGS)? and see if masking still works That was it! The silent-killing '-O2' flag! After compiling from source with CFLAGS and CXXFLAGS set the problem occured, so I was adding and removing flags one by one, and found that it was the '-O2' flag that caused the problem... Of course I probably would never debug this by myself, so thank you very much Sébastien! I still wonder why -O2 would make it fail on x86 and not amd64. May be it is also something to deal with numpy version. One last test, could you try with numpy-1.4.1? I need to lower down optimization flags for matplotlib on x86, so one last check: test it with -O1. Thanks for your contribution! Yup, -O1 works, -O2 does not. One more thing - may it be a gcc issue? If it is possible I can try with another gcc version. I will also try numpy 1.4.1, but - if you wouldn't mind - tommorow :) Could you check which flag enabled by -O2 causes this problem? `info gcc` from GCC 4.4.3 says: `-O2' turns on all optimization flags specified by `-O'. It also turns on the following optimization flags: -fthread-jumps -falign-functions -falign-jumps -falign-loops -falign-labels -fcaller-saves -fcrossjumping -fcse-follow-jumps -fcse-skip-blocks -fdelete-null-pointer-checks -fexpensive-optimizations -fgcse -fgcse-lm -findirect-inlining -foptimize-sibling-calls -fpeephole2 -fregmove -freorder-blocks -freorder-functions -frerun-cse-after-loop -fsched-interblock -fsched-spec -fschedule-insns -fschedule-insns2 -fstrict-aliasing -fstrict-overflow -ftree-switch-conversion -ftree-pre -ftree-vrp After one of the last world updates it started to work. I couldn't remember what exactly was upgraded in two last weeks, but today I've rebuilt matplotlib to debug it further, and immediately all the masked lines started to be plotted correctly. Now both matplotlib-0.99.3 and 1.0.0 plot masked lines without any problem. I've tried downgrading to numpy-1.3.0 to see if this was not the case, but the lines are still there. So I think this ticket can be closed -- seeking for the reasons of a bug that is not valid anymore seems like an overkill to me. Thanks for the support! (In reply to comment #25) > Thanks for the support! We find solutions to problems by doing something completely different. :) Thanks for your feedback, closing. |