bugGNU Octave - Bugs: bug #48757, build failure with --without-z due...

 
 

bug #48757: build failure with --without-z due to missing unistd.h

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Thu 11 Aug 2016 05:44:15 AM UTC  
 
Category: Configuration and Build SystemSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 11 Aug 2016 04:53:59 PM UTC, comment #2:

WFM, thanks!

Mike Miller <mtmiller>
Project Administrator
Thu 11 Aug 2016 04:37:30 PM UTC, comment #1:

We used to include unistd.h unconditionally because of gnulib. But now that we are avoiding gnulib headers in Octave, we should really only use functions from unistd via wrappers. But I don't see a clean way to do that at the moment for oct-procbuf.cc, so I just included unistd.h, conditionally. For the toplev.cc problem, I created a new wrapper function.

The following changeset should fix both problems:

http://hg.savannah.gnu.org/hgweb/octave/rev/9b78fda78300

John W. Eaton <jwe>
Project Administrator
Thu 11 Aug 2016 05:44:15 AM UTC, original submission:

Building Octave with the --without-z option specified, build fails in oct-procbuf.cc and toplev.cc with the following:

I believe this is because zlib.h is pulled in through one of the corefcn header files, and unistd.h must be pulled in as an implicit dependency of that normally.

Adding a simple include of unistd.h fixes the build errors for me, but this probably needs the appropriate #if conditional logic.

I see a mix of conditionals on WIN32, CYGWIN, MSC_VER, MINGW32, not sure which of these to use for choosing whether to include unistd.h or not.

Mike Miller <mtmiller>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mtmiller (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 11 Aug 2016 04:53:59 PM UTCmtmillerStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 11 Aug 2016 04:37:30 PM UTCjweStatusNone=>Ready For Test

    Back to the top


    Powered by Savane 3.1-cleanup1