I was messing around with swig, its really a quite nifty. I wanted to see how simple it was to make a C++ library available to language of your choice, and really it is indeed quite simple. Everything was beautiful, until ... I hit a snag ... Whenever I sent data out cerr my application would segfault. Whenever I did _anything_ with cerr, my application would segfault. I googled like a mad man .... http://groups.google.com/group/hugin-ptx/browse_thread/thread/51bd6ca9ced92fc8 Damn near identical, except with python. I did the _exact_ same work around with vaccine.i, and sure as shit that worked! WTF! I started stripping off libraries (I have quite a few in my code), and killing ImageMagick did the trick. My segfault disappeared. So I started debugging what libraries ImageMagick was bringing in ...

imaginos@rosebud /home/work/tools $ Magick++-config --libs -L/usr/lib -lMagick++ -lMagickWand -lMagickCore -ltiff -ljpeg -lbz2 -lz -lm -lgomp -lpthread -lltdl imaginos@rosebud /home/work/tools $

And I noticed libgomp, that bastard. Putting all that back except libgomp, and everything ran perfectly. Dropping libgomp back in, and segfault returned. I googled some more .... [http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=16453](I was messing around with swig, its really a quite nifty. I wanted to see how simple it was to make a C++ library available to language of your choice, and really it is indeed quite simple. Everything was beautiful, until ... I hit a snag ... Whenever I sent data out cerr my application would segfault. Whenever I did anything with cerr, my application would segfault. I googled like a mad man .... http://groups.google.com/group/hugin-ptx/browse_thread/thread/51bd6ca9ced92fc8 Damn near identical, except with python. I did the exact same work around with vaccine.i, and sure as shit that worked! WTF! I started stripping off libraries (I have quite a few in my code), and killing ImageMagick did the trick. My segfault disappeared. So I started debugging what libraries ImageMagick was bringing in ... I was messing around with swig, its really a quite nifty. I wanted to see how simple it was to make a C++ library available to language of your choice, and really it is indeed quite simple. Everything was beautiful, until ... I hit a snag ... Whenever I sent data out cerr my application would segfault. Whenever I did anything with cerr, my application would segfault. I googled like a mad man .... http://groups.google.com/group/hugin-ptx/browse_thread/thread/51bd6ca9ced92fc8 Damn near identical, except with python. I did the exact same work around with vaccine.i, and sure as shit that worked! WTF! I started stripping off libraries (I have quite a few in my code), and killing ImageMagick did the trick. My segfault disappeared. So I started debugging what libraries ImageMagick was bringing in ... imaginos@rosebud /home/work/tools $ Magick++-config --libs -L/usr/lib -lMagick++ -lMagickWand -lMagickCore -ltiff -ljpeg -lbz2 -lz -lm -lgomp -lpthread -lltdl imaginos@rosebud /home/work/tools $ And I noticed libgomp, that bastard. Putting all that back except libgomp, and everything ran perfectly. Dropping libgomp back in, and segfault returned. I googled some more .... http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=16453) I tried the "solution" at the bottom ...

imaginos@rosebud /home/work/tools $ LD_PRELOAD=/usr/lib/gcc/i486-pc-linux-gnu/4.4.4/libgomp.so ./Unf.pl some data from cerr imaginos@rosebud /home/work/tools $

Damn, so It really is libgomp. Unfortunately, as of right now, I have no fix for this. My only workaround is to compile ImageMagick without openmp support. I don't need it, I don't need ImageMagick to need it. I don't need libgomp for anything else. The weird thing, is my laptop has a slightly more up-to-date installation of Gentoo, and its fine. Even with libgomp enabled. So there must be some other additional underlying issue that is causing this.