Menu

#543 Multiple definition of "OpenModule" (etc) when cross-compiling shared

v1.0_(example)
closed-fixed
None
2
2018-01-31
2018-01-27
No

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

Discussion

  • Bob Friesenhahn

    Bob Friesenhahn - 2018-01-30

    On Sat, 27 Jan 2018, John Warburton wrote:

    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.

    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

     
    • Bob Friesenhahn

      Bob Friesenhahn - 2018-01-30

      I believe that I see a mis-match in the pre-processor conditions used
      so I should be able to fix this soon.

      Bob

       
  • Bob Friesenhahn

    Bob Friesenhahn - 2018-01-31
    • status: open --> closed-fixed
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2018-01-31

    This problem should be fixed by Mercurial changeset 15355:dfda2c94f25e. Thank you for reporting the problem.

     

Log in to post a comment.

MongoDB Logo MongoDB