After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 444964 - Empty SCHEME_EXPORT causes duplicate symbol definition
Empty SCHEME_EXPORT causes duplicate symbol definition
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Script-Fu
git master
Other All
: Normal minor
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2007-06-07 02:21 UTC by Daniel Richard G.
Modified: 2007-06-08 15:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch against current SVN (414 bytes, patch)
2007-06-07 02:21 UTC, Daniel Richard G.
committed Details | Review

Description Daniel Richard G. 2007-06-07 02:21:07 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:
Comment 1 Daniel Richard G. 2007-06-07 02:21:46 UTC
Created attachment 89526 [details] [review]
Patch against current SVN
Comment 2 Sven Neumann 2007-06-07 07:33:24 UTC
The patch looks correct to me and should be considered before the 2.4 release.
Comment 3 Kevin Cozens 2007-06-08 15:33:26 UTC
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.