GNOME Bugzilla – Bug 444964
Empty SCHEME_EXPORT causes duplicate symbol definition
Last modified: 2007-06-08 15:33:26 UTC
Please describe the problem: I was building GIMP with -fno-common (i.e. "bork on multiply-defined symbols"), and encountered a build error: "ts_output_routine" was being multiply defined. Now, in script-fu/tinyscheme/scheme.c:387, we have void (*ts_output_routine) (const char *, int) = NULL; which is where this symbol normally lives. Now, in scheme.h:118... SCHEME_EXPORT void (*ts_output_routine) (const char *, int); What is SCHEME_EXPORT? Look in scheme.h:16: #ifndef _MSC_VER # ifndef USE_STRLWR # define USE_STRLWR 1 # endif # define SCHEME_EXPORT #else # define USE_STRLWR 0 # ifdef _SCHEME_SOURCE # define SCHEME_EXPORT __declspec(dllexport) # else # define SCHEME_EXPORT __declspec(dllimport) # endif #endif Non-Windows systems use an empty SCHEME_EXPORT. See the problem with this? Forthcoming patch defines SCHEME_EXPORT to "extern". Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 89526 [details] [review] Patch against current SVN
The patch looks correct to me and should be considered before the 2.4 release.
2007-06-08 Kevin Cozens <kcozens@cvs.gnome.org> * plug-ins/script-fu/tinyscheme/scheme.h: Applied patch from Daniel Richard G. that defines SCHEME_EXPORT as extern for non-Windows systems. Fixes bug #444964.