Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 284925 - net-mail/offlineimap crashes on startup because of problems with _locale.so and corefoundation
Summary: net-mail/offlineimap crashes on startup because of problems with _locale.so a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL: http://openradar.appspot.com/7209349
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-14 13:14 UTC by Martin Hauser
Modified: 2010-01-07 11:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
PATCH for net-mail/offlineimap-6.2 (offlineimap-6.2.0_os_X_10.6.patch,329 bytes, patch)
2009-09-14 13:15 UTC, Martin Hauser
Details | Diff
patched offlineimap-6.2.0.ebuild including proposed patch by submitter (offlineimap-6.2.0.patch,3.67 KB, patch)
2009-10-19 22:52 UTC, Ramon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Hauser 2009-09-14 13:14:35 UTC
After upgrading to Mac Os X 10.6, I've noticed that offlineimap was crashing with a tracetrap with python 2.6 on the new Mac Os X. Aparrently (according to: http://pogma.com/2009/09/09/snow-leopard-and-offlineimap/) this is related to _locale.so being loaded not in the main thread but in a spun-off thread and is easily fixed by patching offlineimap to 'import locale from *'. Maybe it'd be a good Idea to patch offlineimap in gentoo prefix until this issue is resolved upstream ?

I'll append the patch for net-mail/offlineimap-6.2.0

Reproducible: Always
Comment 1 Martin Hauser 2009-09-14 13:15:59 UTC
Created attachment 204045 [details, diff]
PATCH for net-mail/offlineimap-6.2
Comment 2 Fabian Groffen gentoo-dev 2009-09-14 13:18:07 UTC
what version of python are you using exactly?
Comment 3 Martin Hauser 2009-09-14 13:37:00 UTC
python 2.6.2 (according to python --version )


dev-lang/python 2.6.2-r01.3(2.6)(12:22:25 09/14/2009)(aqua ipv6 ncurses readline ssl threads xml -berkdb -build -doc -elibc_uclibc -examples -gdbm -sqlite -tk -ucs2 -wininst)  (according to eix )

sorry, forgot to include those in the report.
Comment 4 Fabian Groffen gentoo-dev 2009-09-14 13:42:11 UTC
ok, I see, python 2.4, 2.5 and 2.6 are on my system all linked against CoreFoundation
Comment 5 Martin Hauser 2009-09-14 13:48:19 UTC
I'm using the standard ones you've get pushed via the gentoo emerge... not sure if those are linked against CoreFoundation, but the problem rather seems to be with code initialisation (which needs to be done before threading) for CoreFoundation rather than a pure linker issue (everything builds fine and as long as the thing does not start threading it does not crash as well).
Comment 6 Fabian Groffen gentoo-dev 2009-09-14 15:04:58 UTC
sorry to say, but that's one crappy patch; you didn't patch in the source tree it seems.
Comment 7 Martin Hauser 2009-09-14 15:14:44 UTC
Yeah, sorry for that. I didn't exactly have the time nor possibility to get the sources and patch against them from here. Rather I just included the patch just for the Reason someone might be able to easier understand how to circumvent the problem. I can attach a 'real' patch for you in the evening, but got no access to the sources from work (bandwidth limitations).
Comment 8 Fabian Groffen gentoo-dev 2009-09-25 15:42:06 UTC
If you can come up with a patch, I'm happy to apply it.
Comment 9 Ramon 2009-10-19 22:52:00 UTC
Created attachment 207612 [details, diff]
patched offlineimap-6.2.0.ebuild including proposed patch by submitter
Comment 10 Ramon 2009-10-19 22:53:03 UTC
Added patched ebuild, including patch proposed by submitter.
Can someone comment on the preferred way to apply only on osx 10.6 ?
Comment 11 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-10-20 01:55:22 UTC
(In reply to comment #10)
> Added patched ebuild, including patch proposed by submitter.
> Can someone comment on the preferred way to apply only on osx 10.6 ?
> 

The preferred way is to not have conditional patches. If you have to, do a CHOST check for *darwin* or so. You can find examples of this by grepping the portage tree, or use qgrep from portage-utils.
Comment 12 Fabian Groffen gentoo-dev 2009-10-20 07:14:09 UTC
it's python, but it looks to me that patch is going to hurt noone, so it can just be applied unconditionally.
Comment 13 Fabian Groffen gentoo-dev 2010-01-07 11:03:15 UTC
hmmmm, I had this patch laying around in my tree but never committed it.  Did that now.