bugGNU Screen - Bugs: bug #42246, 4.2.1 regression: compile error...

 
 

bug #42246: 4.2.1 regression: compile error with Sun Studio 12 on Solaris 10

Submitter:  Rob Levandowski <macwhiz>
Submitted:  Wed 30 Apr 2014 02:43:28 PM UTC
   
 
Category:  Build/Install Severity:  3 - Normal
Priority:  * 5 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  4.2.1
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 24 Apr 2015 02:57:01 AM UTC, comment #3: 

#if defined(_XPG4_2) || defined(_KERNEL)
        void            msg_control;           / ancillary data */
        socklen_t       msg_controllen;         /* ancillary data buffer len */
        int             msg_flags;              /* flags on received message */
#else


./configure --enable-pam --enable-use-locale --enable-colors256 CPPFLAGS="-D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1"^

Will let you build it without issue.
 -- lundman

Anonymous
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.

Rob Levandowski <macwhiz>
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.

Rob Levandowski <macwhiz>
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

Rob Levandowski <macwhiz>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by macwhiz (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code