Wed 30 Apr 2014 03:15:04 PM UTC, comment #2:
Workaround, adapted from https://lists.isc.org/pipermail/dhcp-users/2007-June/003884.html :
Before running configure,
export CFLAGS="$CFLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__"
With that in place, I can at least compile screen on Solaris 10 using gcc 4.8.2.
|
Wed 30 Apr 2014 02:56:45 PM UTC, comment #1:
Hm, it may not be limited to Sun Studio. I tried compiling with GCC 4.8.2, and got similar errors:
/opt/LIBRgcc4/bin/gcc -c -I. -I. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
-mcpu=v9 -mno-vis -mno-vis2 -mno-vis3 -m64 socket.c
/bin/sh: git: not found
socket.c: In function 'ReceiveMsg':
socket.c:990:16: warning: assignment from incompatible pointer type [enabled by default]
iov.iov_base = &m;
^
socket.c:994:6: error: 'struct msghdr' has no member named 'msg_controllen'
msg.msg_controllen = sizeof(control);
^
socket.c:995:6: error: 'struct msghdr' has no member named 'msg_control'
msg.msg_control = &control;
^
socket.c:1007:14: error: 'struct msghdr' has no member named 'msg_controllen'
if (msg.msg_controllen)
^
socket.c:1010:14: warning: assignment makes pointer from integer without a cast [enabled by default]
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg))
^
socket.c:1010:48: warning: assignment makes pointer from integer without a cast [enabled by default]
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg))
^
socket.c:1016:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
cp = (char *)CMSG_DATA(cmsg);
^
socket.c: In function 'SendAttachMsg':
socket.c:1801:6: error: 'struct msghdr' has no member named 'msg_control'
msg.msg_control = buf;
^
socket.c:1802:6: error: 'struct msghdr' has no member named 'msg_controllen'
msg.msg_controllen = sizeof(buf);
^
socket.c:1803:8: warning: assignment makes pointer from integer without a cast [enabled by default]
cmsg = CMSG_FIRSTHDR(&msg);
^
socket.c:1807:3: warning: passing argument 2 of 'bcopy' makes pointer from integer without a cast [enabled by default]
bcopy(&fd, CMSG_DATA(cmsg), sizeof(int));
^
In file included from os.h:83:0,
from screen.h:30,
from socket.c:42:
/usr/include/strings.h:25:13: note: expected 'void *' but argument is of type 'int'
extern void bcopy(const void , void , size_t);
^
socket.c:1808:6: error: 'struct msghdr' has no member named 'msg_controllen'
msg.msg_controllen = cmsg->cmsg_len;
^
gmake: *** [socket.o] Error 1
This is with configure options --enable-pam, --enable-use-locale, and --enable-colors256 on Solaris 10 Update 11, kernel 150400-09.
|
Wed 30 Apr 2014 02:43:28 PM UTC, original submission:
screen 4.2.1 introduces a regression related to bug #27990. It does not compile on Solaris 10 using Sun Studio 12. That bug was marked as closed and fixed in release 4.1.0.
However, the relevant code has changed, and the exact error is not the same:
/opt/SUNWspro/SUNWspro/bin/cc -c -I. -I. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
-fast -m64 -xarch=sparc -xchip=generic -xcache=generic socket.c
/bin/sh: git: not found
"socket.c", line 990: warning: assignment type mismatch:
pointer to char "=" pointer to struct msg {int protocol_revision, int type, array[1024] of char m_tty, union {..} m}
"socket.c", line 994: undefined struct/union member: msg_controllen
"socket.c", line 995: undefined struct/union member: msg_control
"socket.c", line 995: warning: improper pointer/integer combination: op "="
"socket.c", line 1007: improper member use: msg_controllen
"socket.c", line 1010: warning: implicit function declaration: CMSG_FIRSTHDR
"socket.c", line 1010: warning: improper pointer/integer combination: op "="
"socket.c", line 1010: warning: implicit function declaration: CMSG_NXTHDR
"socket.c", line 1010: warning: improper pointer/integer combination: op "="
"socket.c", line 1016: warning: implicit function declaration: CMSG_DATA
"socket.c", line 1018: warning: implicit function declaration: CMSG_LEN
"socket.c", line 1791: warning: implicit function declaration: CMSG_SPACE
"socket.c", line 1801: undefined struct/union member: msg_control
"socket.c", line 1801: warning: improper pointer/integer combination: op "="
"socket.c", line 1802: undefined struct/union member: msg_controllen
"socket.c", line 1803: warning: improper pointer/integer combination: op "="
"socket.c", line 1807: warning: improper pointer/integer combination: arg #2
"socket.c", line 1808: improper member use: msg_controllen
cc: acomp failed for socket.c
gmake: *** [socket.o] Error 2
|