bugGNU Screen - Bugs: bug #29255, build fails on HP-UX 11.31:...

 
 

bug #29255: build fails on HP-UX 11.31: loadav.c:279: error: conflicting types for `nlist64'

Submitter:  Alexander Gattin <xrgtn>
Submitted:  Thu 18 Mar 2010 10:49:08 AM UTC
   
 
Category:  Build/Install Severity:  3 - Normal
Priority:  * 5 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  Cur Dev Sources
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 18 Mar 2010 10:49:08 AM UTC, original submission:  

screen compilation fails on HP-UX:

gcc -c -I. -I.  -D_XOPEN_SOURCE=600 -DETCSCREENRC='"/comptel/ilink/xxx/etc/screenrc"' -DSCREENENCODINGS='"/comptel/ilink/xxx/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
             -D_XOPEN_SOURCE=600 loadav.c
loadav.c:279: error: conflicting types for `nlist64'
/usr/include/nlist.h:108: error: previous declaration of `nlist64'
make: * [loadav.o] Error 1

The HP-UX's nlist.h contains the next:
...
#ifdef __ia64
#define nlist nlist64
#endif

#ifdef __ia64
#pragma extern nlist
#endif 

#if defined(_STDC_) || defined(__cplusplus) || defined(_PROTOTYPES)
   extern int nlist(const char* file_name, struct nlist *nl);
#else /* not _STDC_ || __cplusplus || _PROTOTYPES */
   extern int nlist();
#endif /* not _STDC_ || __cplusplus || _PROTOTYPES */

#if defined(_LP64_) || ! defined(_STDC_32_MODE_)
#  if defined(_STDC_) || defined(__cplusplus) || defined(_PROTOTYPES)
      extern int nlist64(const char* filename, struct nlist64* nl);
#  else /* not _STDC_ || __cplusplus || _PROTOTYPES */
      extern int nlist64();
#  endif /* not _STDC_ || __cplusplus || _PROTOTYPES */
#endif 
...

line #108 is the one containing 2-arg nlist64 declaration.

If I append -DNLIST_DECLARED to CFLAGS, screen compiles OK. So I suspect there might be a problem in ./configure script...

P.S.

ilink@tunis:/tmp/screen/src > grep def.*NLIST config.h
/* #undef LOADAV_USE_NLIST64 */
/* #undef NLIST_DECLARED */
#define NLIST_STRUCT 1
/* #undef NLIST_NAME_UNION */
ilink@tunis:/tmp/screen/src > grep nlist xxx-configure.log
checking nlist.h usability... yes
checking nlist.h presence... yes
checking for nlist.h... yes
configure: checking n_un in struct nlist...
configure: checking for nlist declaration...
ilink@tunis:/tmp/screen/src >

Here you can see why AC_EGREP fails to find nlist function:

ilink@tunis:/tmp/screen/src > cat nlist.c
#define NLIST_STRUCT 1
#ifdef NLIST_STRUCT
# include <nlist.h>
#else
# include <a.out.h>
#endif
ilink@tunis:/tmp/screen/src > cpp nlist.c | egrep "nlist([[:space:]]+.*\(|\()"
ilink@tunis:/tmp/screen/src > cpp nlist.c | egrep "nlist([[:space:]]*.*\(|\()"
   extern int nlist64(const char* file_name, struct nlist64 *nl);
      extern int nlist64(const char* filename, struct nlist64* nl);
ilink@tunis:/tmp/screen/src >

Any suggestions? Can configure.in's AC_EGREP_CPP for nlist be fixed at all (replaced with a pair of regexps)?

Alexander Gattin <xrgtn>

 

(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 xrgtn (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-758e.
    Corresponding source code