[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Weechat-dev] [bug #40981] illumos compilation issues

From: Lauri Tirkkonen
Subject: [Weechat-dev] [bug #40981] illumos compilation issues
Date: Fri, 20 Dec 2013 14:26:51 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131030 Firefox/17.0 Iceweasel/17.0.10


                 Summary: illumos compilation issues
                 Project: WeeChat
            Submitted by: lotheac
            Submitted on: Fri 20 Dec 2013 02:26:50 PM GMT
                Category: compilation
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 0.4.2
                IRC nick: lotheac



Compilation on OmniOS (illumos, which is derived from OpenSolaris) using
autoconf fails due to a few different issues.


    gcc -DHAVE_CONFIG_H -I. -I../..  -DLOCALEDIR=\"/opt/niksula/share/locale\"
-I/opt/niksula/include   -I/opt/niksula/include -D_REENTRANT  -Wall -W
-Werror-implicit-function-declaration -D_FILE_OFFSET_BITS=64
-DWEECHAT_VERSION=\"0.4.2\" -DWEECHAT_LICENSE=\"GPL3\" -MT wee-network.o -MD
-MP -MF .deps/wee-network.Tpo -c -o wee-network.o wee-network.c
    wee-network.c: In function 'network_connect_child':
    wee-network.c:721:5: error: implicit declaration of function 'CMSG_SPACE'
    mv -f .deps/wee-upgrade-file.Tpo .deps/wee-upgrade-file.Po
    wee-network.c:1151:12: error: 'struct msghdr' has no member named
    wee-network.c:1152:12: error: 'struct msghdr' has no member named
    [ omitting more messages caused by the same issue ]

This is because CMSG_* and the control members require at least XPG4v2. I am
able to work around this by appending -D_XOPEN_SOURCE=600 to CPPFLAGS and
-std=c99 to CFLAGS (compiling as POSIX-1.2001 application). This breaks some
other stuff though:

    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../..
"-DLOCALEDIR=\"/opt/niksula/share/locale\"" -I/opt/niksula/include
-D_XOPEN_SOURCE=600 -I/opt/niksula/include -D_REENTRANT -Wall -W
-Werror-implicit-function-declaration -std=c99 -D_FILE_OFFSET_BITS=64
"-DWEECHAT_VERSION=\"0.4.2\"" "-DWEECHAT_LICENSE=\"GPL3\"" -MT irc-protocol.lo
-MD -MP -MF .deps/irc-protocol.Tpo -c irc-protocol.c  -fPIC -DPIC -o
    irc-protocol.c:25:0: warning: "_XOPEN_SOURCE" redefined [enabled by
    <command-line>:0:0: note: this is the location of the previous definition
    In file included from
                     from /usr/include/stdlib.h:34,
                     from irc-protocol.c:32:
error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications
        and pre-2001 POSIX applications"

which is because of the _XOPEN_SOURCE definition in the source file. Is there
reason for this? It might be simpler to have the build system define feature
macros for the standards the application requires instead
-std=c99 for POSIX-1.2001) (as a side note illumos does not yet support
POSIX-1.2008 so _XOPEN_SOURCE=700 breaks stuff)

Second, plugins/charset/charset.c uses strcasecmp but does not include

    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../..
"-DLOCALEDIR=\"/opt/niksula/share/locale\"" -D_XOPEN_SOURCE=500
-I/opt/niksula/include -D_REENTRANT -Wall -W
-Werror-implicit-function-declaration -D_FILE_OFFSET_BITS=64
"-DWEECHAT_VERSION=\"0.4.2\"" "-DWEECHAT_LICENSE=\"GPL3\"" -MT charset.lo -MD
-MP -MF .deps/charset.Tpo -c charset.c  -fPIC -DPIC -o .libs/charset.o
    charset.c: In function 'charset_config_init':
    charset.c:212:5: error: implicit declaration of function 'strcasecmp'
    [ omitting more messages caused by the same issue ]

This is fixed by including strings.h (just string.h is not enough).

There might be more issues, I haven't finished looking into this yet.

As a side note, a generated configure script should be included in release
tarballs (although I do understand autoconf is secondary to you)


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]