Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#31 modperl does not compile on OpenBSD 4.0

closed
nobody
None
5
2007-07-06
2007-06-16
Anonymous
No

g++ -D_GNU_SOURCE -fPIC -Wall -s -O2 -fomit-frame-pointer -DHAVE_LIBSSL -D_MODULES -D_MODDIR_=\"/usr/local/libexec/znc\" -I.. -c -o modperl.o
modperl.cpp -DHAVE_PERL `/usr/bin/perl -MExtUtils::Embed -e perl_inc`
modperl.cpp:498: error: syntax error before `__attribute__'
modperl.cpp:500: error: register name not specified for `SV**mark'
modperl.cpp:500: error: `sp' was not declared in this scope
modperl.cpp:501: error: syntax error before `if'
modperl.cpp:1:1: unterminated #ifdef
gmake[1]: *** [modperl.o] Error 1
gmake[1]: Leaving directory `/home/pk/znc-0.047/modules'
gmake: *** [modules] Error 2

Reported at http://sourceforge.net/tracker/index.php?func=detail&aid=1723997&group_id=115828&atid=672822

Discussion

  • Logged In: NO

    Problem is fixed in OpenBSD 4.1.

    http://archives.neohapsis.com/archives/openbsd/cvs/2007-02/0002.html

    "Ignore HASATTRIBUTE_UNUSED for C++ as our g++ does not grok
    the __unused__ attribute. Also give XS functions C linkage.
    Patch taken from perl-current."

    http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/usr.bin/perl/XSUB.h.diff?r1=1.9&r2=1.10

    RCS file: /usr/OpenBSD/cvs/src/gnu/usr.bin/perl/XSUB.h,v
    retrieving revision 1.9
    retrieving revision 1.10
    diff -u -r1.9 -r1.10
    --- src/gnu/usr.bin/perl/XSUB.h 2006/03/28 19:22:56 1.9
    +++ src/gnu/usr.bin/perl/XSUB.h 2007/02/01 12:00:51 1.10
    @@ -91,10 +91,14 @@
    #if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
    # define XS(name) __declspec(dllexport) void name(pTHX_ CV* cv)
    #else
    -# ifdef HASATTRIBUTE_UNUSED
    +# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
    # define XS(name) void name(pTHX_ CV* cv __attribute__unused__)
    # else
    -# define XS(name) void name(pTHX_ CV* cv)
    +# ifdef __cplusplus
    +# define XS(name) extern "C" void name(pTHX_ CV* cv)
    +# else
    +# define XS(name) void name(pTHX_ CV* cv)
    +# endif
    # endif
    #endif

     
  • Psychon
    Psychon
    2007-07-06

    • status: open --> closed