GNOME Bugzilla – Bug 342456
jpeg plug-in has multiply-defined symbols
Last modified: 2006-05-24 20:18:50 UTC
Please describe the problem: When building with -fno-common, the linker chokes on the following multiply-defined symbols in plug-ins/jpeg/: multiple definition of `display_ID' multiple definition of `drawable_ID_global' multiple definition of `drawable_global' multiple definition of `exif_data' multiple definition of `image_ID_global' multiple definition of `image_comment' multiple definition of `jsvals' multiple definition of `layer_ID_global' multiple definition of `load_interactive' multiple definition of `orig_image_ID_global' multiple definition of `undo_touched' These symbols are erroneously declared as non-static and non-extern in jpeg-save.h and jpeg.h. Steps to reproduce: Build GIMP with -fno-common. Actual results: Expected results: Does this happen every time? Other information:
The jpeg plug-in needs some cleanup. The split into multiple files wasn't done very cleanly. The global variables should be avoided or at least be declared correctly and in a proper namespace.
This could still be cleaned up by de-globalizing things, but I have made the declarations proper. I think it is not necessary to backport this to 2.2. 2006-05-24 Bill Skaggs <weskaggs@primate.ucdavis.edu> * plug-ins/jpeg/gimpexif.c * plug-ins/jpeg/jpeg-load.c * plug-ins/jpeg/jpeg-save.h * plug-ins/jpeg/jpeg.c * plug-ins/jpeg/jpeg.h: fix multiply-defined linker symbols; fixes bug #342456. Thank you for pointing this out.