Multiple definition of "OpenModule" (etc) when cross-compiling shared
Swiss army knife of image processing
Brought to you by:
bfriesen
Much appreciate GM. It's something I compile and use regularly.
When cross-compiling from Ubuntu to Windows on x86_64-w64-mingw32 target, as of commit "Use a lazy-loader for static modules" 1afb47, some multiple definition errors arise at the stage where libGraphicsMagick-3.dll is linked. They're reproduced below, and concern "DestroyMagickModules", "InitializeMagicModules", "OpenModule" and "OpenModules". The two files where these objects are defined are static.c and module.c.
Thanks for reading this.
JW
magick/.libs/magick_libGraphicsMagick_la-static.o:static.c:(.text+0x0): multiple definition of `DestroyMagickModules'
magick/.libs/magick_libGraphicsMagick_la-module.o:module.c:(.text+0x0): first defined here
magick/.libs/magick_libGraphicsMagick_la-static.o:static.c:(.text+0x6a): multiple definition of `InitializeMagickModules'
magick/.libs/magick_libGraphicsMagick_la-module.o:module.c:(.text+0xc2c): first defined here
magick/.libs/magick_libGraphicsMagick_la-static.o:static.c:(.text+0x71): multiple definition of `OpenModule'
magick/.libs/magick_libGraphicsMagick_la-module.o:module.c:(.text+0x1353): first defined here
magick/.libs/magick_libGraphicsMagick_la-static.o:static.c:(.text+0x3c0): multiple definition of `OpenModules'
magick/.libs/magick_libGraphicsMagick_la-module.o:module.c:(.text+0x18b3): first defined here
collect2: error: ld returned 1 exit status
Makefile:5635: recipe for target 'magick/libGraphicsMagick.la' failed
On Sat, 27 Jan 2018, John Warburton wrote:
Please provide the configure options you used (particularly,
'--enable-shared' and/or '--with-modules') so I can determine the
permutation which fails.
Thank you very much for testing the development version and reporting
the problem.
Bob
I believe that I see a mis-match in the pre-processor conditions used
so I should be able to fix this soon.
Bob
This problem should be fixed by Mercurial changeset 15355:dfda2c94f25e. Thank you for reporting the problem.