Seg fault on Mac OS 10.6.2

Bug #483950 reported by Tax Man on 2009-11-17
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cuneiform for Linux

Bug Description

Hi, cuneiform builds nicely on Mac OS, but on running it with the basic command line
cuneiform -o 0001.txt 0001.jpg
for an image with English text fails with only the error Segmentation fault.
I could try attaching an image, but it does the same thing with various image formats, tiff, jpg, and the included test bmp's.
I built with a debug build type, but I still don't get any more information. Let me know if there is anything I can do to provide more information.

Also a small separate note. On Debian and Debian derived Linux distributions, the needed ImageMagick libraries are in a separate package from ImageMagick. It would be good to note in the readme that libmagick++-dev needs to be installed as well.

Tax Man (taxman457f) wrote :

Oh, I get the same behavior after building the same version - 0.8.0 - on Ubuntu. Just shoot me if it's user error.

Tax Man (taxman457f) wrote :

Jason said: "I would suggest rebuilding it with debugging symbols and running it in gdb to get a backtrace for the developers."
So I did that on my Ubuntu and Mac systems and attached the results, they are both in the file. Sorry I'm not really familiar with GDB and coding, but I can supply any information that someone gives me some hints on how to obtain.

It gives no debug information available errors for the Mac build even though I built both of them with the
cmake -DCMAKE_BUILD_TYPE=debug ..
config option.

Yury V. Zaytsev (zyv) wrote :

This is correct, sorry I've just noticed that I replied to Jason directly instead of posting to the bug. The backtrace does not look particularly helpfull, maybe you can do a full backtrace (I guess it's bf or something like this) and also run it through strace...

Tax Man (taxman457f) wrote :

Sure. I've attached the full gdb backtrace along with some extra stuff suggested here: in case it's helpful. I'll also attach the strace output, but it seems I can't attach two files at once, so I'll do that in a second.

Tax Man (taxman457f) wrote :
Tax Man (taxman457f) wrote :

Now I've had a chance to grab the full backtrace on the Mac. Let me know if you want to see the dtrace output on the Mac, and if so, what options.

Yury V. Zaytsev (zyv) wrote :

Wow, that looks funny. Thanks! Hopefully Jussi can look into this.

Jussi Pakkanen (jpakkane) wrote :

Snow Leopard by default builds 64 bit binaries. Can you try building 32-bit version and seeing if it crashes too? Unfortunately I don't remember the switches you need for that, you have to search Apple's documentation.

Yury V. Zaytsev (zyv) wrote :

Didn't Apple guys strip all the supporting 32-bit binaries from Snow Leopard?

Jussi Pakkanen (jpakkane) wrote :

No, because that would mean that every 32 bit binary (which is to say roughly 99% of all third party applications ever produced for OS X) would break.

Tax Man (taxman457f) wrote :

I'm not sure I did enough, but I put -arch i386 in the following places in CMakeCache.txt. It was indicated by this:

//Flags used by the compiler during all build types.

//Flags used by the compiler during all build types.

However, seems to imply there needs to be more of a crossbuild. Maybe that is specific to that project.

Anyway, I still get the seg fault. Do you want to see the backtrace?

Also, the linux build I tested on above is a 32 bit Ubuntu 9.04 machine and it is also seg faulting.

Jussi Pakkanen (jpakkane) wrote :

Please attach the image. Also post all the exact commands you execute to build and run Cuneiform starting from checking out the source.

inye (avanie) wrote :

Just experienced same issue on OS X 10.6.2. Overcame it with 32bit gcc-4.0 from 10.5 compatibity layer:

CXX=g++-4.0 CC=gcc-4.0 cmake -DCMAKE_BUILD_TYPE=Debug ..

works perfect.

Cosimo Lupo (lupocos) wrote :

Hello everybody,
It seems that @inye at least managed to compile and run cuneiform on Mac.
However I’m still getting the segmentation fault...
I don’t know how to build Cuneiform from source, therefore I have installed it via MacPorts

# sudo port install cuneiform

Now, whenever I run it, I get "Segmentation fault" error:

# cuneiform -f hocr test.html test.tif
# Cuneiform for Linux 1.0.0
# Segmentation fault

I’ve got XCode and all the tools in order to build the application from its source files, but I don’t know how to do...
By the way, I’m using the latest 13" MacBook Air with OS X 10.6.7 — could anybody tell me how I can compile Cuneifrom?
Or better, if it is possible, send me his/her binary builds?

Thank you in advance,
Best wishes.

Cosimo Lupo

tristank (tristank) wrote :

$ ./configure
$ make
$ sudo make install

It's as simple as that. Worked for me at Lion.

Yury V. Zaytsev (zyv) wrote :

Where did you get the ./configure thing from? Cuneiform build system is generated using CMake, your instructions are arbitrary. See example in the README file.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers