bugmake - Bugs: bug #40515, Portability fixes for Tru64 V4.0G...


bug #40515: Portability fixes for Tru64 V4.0G (and also HP-UX)

Submitter:  Daniel Richard G. <iskunk>
Submitted:  Fri 08 Nov 2013 05:07:56 AM UTC
Severity:  3 - Normal Item Group:  Build/Install
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.0 Operating System:  POSIX-Based
Fixed Release:  4.1 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup

Sun 24 Nov 2013 03:44:04 AM UTC, comment #1: 

I fixed the various vsnprintf() issues with changes for bug #40361.  For this bug I added the #define for RTLD_GLOBAL.

Paul D. Smith <psmith>
Group administrator
Fri 08 Nov 2013 05:07:56 AM UTC, original submission:  

GNU Make 4.0 needed a bit of work to build and run on this platform. Everything is in the attached patch against git master; below are the issues addressed.

1. Tru64 doesn't know about RTLD_GLOBAL:

cc: Error: /tmp/make-4.0/load.c, line 51: In this statement, "RTLD_GLOBAL" is not declared. (undeclared)
      global_dl = dlopen (NULL, RTLD_NOW|RTLD_GLOBAL);
cc: Error: /tmp/make-4.0/load.c, line 68: In this statement, "RTLD_GLOBAL" is not declared. (undeclared)
        dlp = dlopen (concat (2, "./", ldname), RTLD_LAZY|RTLD_GLOBAL);

2. va_copy() does not exist on this platform (but the definition near the top of output.c works)

3. vsnprintf() segfaults when passed a NULL buffer

4. When the buffer passed to Tru64's vsnprintf() is too small, the function returns (buffer_size - 1). The code was erroneously interpreting this to mean that the buffer was large enough, resulting in truncated output.

I noticed bug #40361, and I also need to build GNU Make on HP-UX, so I rewrote the vfmtconcat() function to address the issues on both platforms.

(The initial value of fmtbuf.size can be adjusted, of course. I didn't want to set an overly large value as that would potentially mask problems in the subsequent vsnprintf() loop.)

It's worth noting that the Raptor library (librdf.org/raptor) handles vsnprintf() in a similar way; look at raptor/src/snprintf.c, specifically the VSNPRINTF_NOT_C99_BLOCK() macro.

Daniel Richard G. <iskunk>


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

Attach Files:

Attached Files
file #29567:  make-fixes.patch added by iskunk (2KiB - text/x-patch - Patch against git master)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by iskunk (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.


    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-24 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.1
    2013-11-08 iskunk Attached File- Added make-fixes.patch, #29567

    Back to the top

    Powered by Savane 3.13-12ab.
    Corresponding source code