Build fails with MinGW / ImageMagick++ (rev. 375)

Bug #327660 reported by Yury V. Zaytsev
2
Affects Status Importance Assigned to Milestone
Cuneiform for Linux
New
High
Unassigned

Bug Description

Build fails on Windows Vista SP1 / MinGW / latest CMake / latest binary installation of ImageMagick++. I am using ImageMagick++ detection patch which is not currently in trunk. At the same time, everything builds just fine with MSVC 2008 SP1. It breaks on the last stage right after "Linking CXX executable ..\..\cuneiform.exe". See error message below:

CMakeFiles\cuneiform.dir\cuneiform-cli.cpp.obj:cuneiform-cli.cpp:(.text+0xf61): undefined reference to `Magick::Blob::Blob()'
CMakeFiles\cuneiform.dir\cuneiform-cli.cpp.obj:cuneiform-cli.cpp:(.text+0xfa5): undefined reference to `Magick::Image::Image(std::string const&)'
CMakeFiles\cuneiform.dir\cuneiform-cli.cpp.obj:cuneiform-cli.cpp:(.text+0x1004): undefined reference to `Magick::Image::write(Magick::Blob*, std::string const&)'
CMakeFiles\cuneiform.dir\cuneiform-cli.cpp.obj:cuneiform-cli.cpp:(.text+0x1032): undefined reference to `Magick::Image::~Image()'
CMakeFiles\cuneiform.dir\cuneiform-cli.cpp.obj:cuneiform-cli.cpp:(.text+0x1048): undefined reference to `Magick::Blob::length() const'
CMakeFiles\cuneiform.dir\cuneiform-cli.cpp.obj:cuneiform-cli.cpp:(.text+0x1067): undefined reference to `Magick::Blob::data() const'
CMakeFiles\cuneiform.dir\cuneiform-cli.cpp.obj:cuneiform-cli.cpp:(.text+0x109f): undefined reference to `Magick::Blob::~Blob()'
CMakeFiles\cuneiform.dir\cuneiform-cli.cpp.obj:cuneiform-cli.cpp:(.text+0x1679): undefined reference to `Magick::Blob::~Blob()'
CMakeFiles\cuneiform.dir\cuneiform-cli.cpp.obj:cuneiform-cli.cpp:(.text+0x177e): undefined reference to `Magick::Image::~Image()'
collect2: ld returned 1 exit status
mingw32-make.EXE[2]: *** [cuneiform.exe] Error 1
mingw32-make.EXE[1]: *** [cuneiform_src/Kern/CMakeFiles/cuneiform.dir/all] Error 2
mingw32-make.EXE: *** [all] Error 2

Yury V. Zaytsev (zyv)
Changed in cuneiform-linux:
importance: Undecided → High
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

At least some time ago MinGW could not use C++ shared libraries made with MSVC and vice versa. Is there an IM release built with MinGW available?

Revision history for this message
Yury V. Zaytsev (zyv) wrote :

I didn't find anything on the website, but I have found the following stuff on the net:

---
http://www.darkseoprogramming.com/2008/08/04/gocr-for-windows-from-linux/

Download the ImageMagick for MinGW install. It’s listed under the unix binaries but runs on windows. No idea why. Anyway this will install a directory with some libraries in it. Libraries are files that have an .a extension like libMagick.a.
---

It appears that he's talking about this: http://www.imagemagick.org/download/binaries/ImageMagick-i686-pc-mingw32.tar.gz ... I am going to download this release now. Is there anything I have to correct it the CMakeList.txt to point it to this alternative distribution?

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

If it does not find it automatically you can set the paths and libraries manually with CMake's gui.

Revision history for this message
Polevoy Dmitry (openocr-polevoy) wrote :

Current version find installed ImageMagick (for Win32) and I can build MSVC version.
With ImageMagick under MinGW I have troubles: I download ImageMagick-i686-pc-mingw32.tar.gz and set path for CMake scripts, but linker gives many errors (AFIK libpng, libtif and so on should be installed).

Revision history for this message
Yury V. Zaytsev (zyv) wrote :

I have a long-standing plan to finally get it sorted out, but will be unable to try it at least until next week :-(

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.