[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 |
URL:
<http://savannah.nongnu.org/bugs/?40981>
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
_______________________________________________________
Details:
Compilation on OmniOS (illumos, which is derived from OpenSolaris) using
autoconf fails due to a few different issues.
First:
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
-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LARGE_FILES -g -O0
-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'
[-Werror=implic
it-function-declaration]
mv -f .deps/wee-upgrade-file.Tpo .deps/wee-upgrade-file.Po
wee-network.c:1151:12: error: 'struct msghdr' has no member named
'msg_control'
wee-network.c:1152:12: error: 'struct msghdr' has no member named
'msg_controllen'
[ 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
-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LARGE_FILES -g -O0
"-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
.libs/irc-protocol.o
irc-protocol.c:25:0: warning: "_XOPEN_SOURCE" redefined [enabled by
default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from
/opt/gcc-4.7.2/lib/gcc/i386-pc-solaris2.11/4.7.2/include-fixed/iso/stdlib_iso.h:57:0,
from /usr/include/stdlib.h:34,
from irc-protocol.c:32:
/opt/gcc-4.7.2/lib/gcc/i386-pc-solaris2.11/4.7.2/include-fixed/sys/feature_tests.h:360:2:
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
a
reason for this? It might be simpler to have the build system define feature
macros for the standards the application requires instead
(-D_XOPEN_SOURCE=600
-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
strings.h:
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
-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LARGE_FILES -g -O0
"-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'
[-Werror=implicit-function-declaration]
[ 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:
<http://savannah.nongnu.org/bugs/?40981>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [Weechat-dev] [bug #40981] illumos compilation issues,
Lauri Tirkkonen <=
- [Weechat-dev] [bug #40981] illumos compilation issues, Sebastien Helleu, 2013/12/20
- [Weechat-dev] [bug #40981] illumos compilation issues, Sebastien Helleu, 2013/12/21
- [Weechat-dev] [bug #40981] illumos compilation issues, Lauri Tirkkonen, 2013/12/21
- [Weechat-dev] [bug #40981] illumos compilation issues, Lauri Tirkkonen, 2013/12/23
- [Weechat-dev] [bug #40981] illumos compilation issues, Sebastien Helleu, 2013/12/23
- [Weechat-dev] [bug #40981] illumos compilation issues, Lauri Tirkkonen, 2013/12/23
- [Weechat-dev] [bug #40981] illumos compilation issues, Sebastien Helleu, 2013/12/23