bugGNU Octave - Bugs: bug #48407, libinterp fails to link to libz

 
 

bug #48407: libinterp fails to link to libz

Submitter:  Marius Schamschula <mschamschula>
Submitted:  Tue 05 Jul 2016 12:22:14 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 06 Jul 2016 03:00:53 PM UTC, comment #9: 

For what it's worth, I pushed the fix to stable here (http://hg.savannah.gnu.org/hgweb/octave/rev/de18e547e99d).  Unfortunately unless you pull from Mercurial, or jwe makes a 4.0.4 release, this isn't going to be seen by many people.


Rik <rik5>
Group administrator
Wed 06 Jul 2016 02:30:31 PM UTC, comment #8: 

The problem with "TEXI2PDF octave.pdf" was due to a bad inpolygon.pdf. After regenerating that figure, octave.pdf was generated.

Ben Abbott <bpabbott>
Group Member
Wed 06 Jul 2016 02:16:10 PM UTC, comment #7: 

The ASAN problem is erratic, so by repeating "make", eventually the figures build. Unfortunately, octave.pdf does not.


make[3]: Entering directory '/Users/bpabbott/Development/mercurial/stable/build/doc/interpreter'
  TEXI2PDF octave.pdf
/sw/bin/texi2dvi: pdfetex exited with bad status, quitting.
Makefile:2161: recipe for target 'octave.pdf' failed


I've bypassed this by "make -i dist". I'm able to build the resulting tar-ball (but still get the octave.pdf error).


Ben Abbott <bpabbott>
Group Member
Wed 06 Jul 2016 11:26:29 AM UTC, comment #6: 

@Rik,

File #37727 allows the binary to be built. Unfortunately, I'm unable to build the docs due to an ASAN problem.


  GEN      plot3.pdf
ASAN:DEADLYSIGNAL
=================================================================
==66572==ERROR: AddressSanitizer: SEGV on unknown address 0x602017800062 (pc 0x7fff9133fa9b bp 0x7fff574b37b0 sp 0x7fff574b3798 T0)



Ben Abbott <bpabbott>
Group Member
Wed 06 Jul 2016 04:00:38 AM UTC, comment #5: 

I think that this was accidentally broken in this change made on the stable branch between 4.0.2 and 4.0.3:

http://hg.savannah.gnu.org/hgweb/octave/rev/44f7664689f2#l5.7

This is easily missed on GNU systems because libz is implicitly linked via several other system libraries.

This does not appear to be broken on the default branch, but would still appreciate some testing from someone on macOS to verify that default links liboctinterp appropriately.

Mike Miller <mtmiller>
Group Member
Tue 05 Jul 2016 10:16:20 PM UTC, comment #4: 

As Mike said, Octave 4.2.0 is set for release in two months and it is more interesting whether we need to change anything for that release.  I know when I build on Linux I have '-lz' inserted automatically.

The code on the development branch is in configure.ac which becomes configure.


if test $ENABLE_DYNAMIC_LINKING = yes; then
  LIBOCTINTERP_LINK_DEPS=""
else
  LIBOCTINTERP_LINK_DEPS="$DLDFCN_LIBS"
fi

LIBOCTINTERP_LINK_DEPS="$LIBOCTINTERP_LINK_DEPS $FT2_LIBS $HDF5_LIBS $MAGICK_LIBS $Z_LIBS $FFTW_XLIBS $OPENGL_LIBS $FONTCONFIG_LIBS $FREETYPE_LIBS $X11_LIBS $CARBON_LIBS $GL2PS_LIBS $LLVM_LIBS $JAVA_LIBS $LAPACK_LIBS"


As long as you have dynamic linking you should have Z_LIBS in your linking.


For stable, you can try the attached diff.  But you will need to have all the development tools as it will need to rebuild the configure script.  If you have it, then apply with


patch -p1 < Z_LIB.diff




(file #37727)

Rik <rik5>
Group administrator
Tue 05 Jul 2016 03:56:41 PM UTC, comment #3: 

Do you have a way to test default now? That would help us release a 4.2.0 that works for MacPorts right out of the gate.

Mike Miller <mtmiller>
Group Member
Tue 05 Jul 2016 03:51:28 PM UTC, comment #2: 

Mike,

I tried several other ways of adding -lz, but the only way I could get it to work was by patching the Makefile.in.

If 4.2.0 builds w/o any errors, this patch will be removed from the MacPorts Portfile at that time.

Marius Schamschula <mschamschula>
Tue 05 Jul 2016 03:44:24 PM UTC, comment #1: 

You can work around this by running configure with LIBS=-lz instead of needing to patch the makefile.

Since 4.0.3 is likely the last 4.0.x release, this will probably not be fixed on the stable branch.

Can you test whether such a change is needed on the default branch for your build?

Mike Miller <mtmiller>
Group Member
Tue 05 Jul 2016 12:22:14 PM UTC, original submission:  

When building octave 4.0.3 under MacPorts, the build fails, as symbols for lib are not being found. The attached patch solves this problem.

Marius Schamschula <mschamschula>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #37727:  Z_LIB.diff added by rik5 (336B - application/x-download)
file #37717:  patch-libinterp-Makefile.in.diff added by mschamschula (1KiB - application/octet-stream)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by mschamschula (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 group members can vote.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-19 rik5 Dependencies- bugs #48822 is dependent
    2016-07-06 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2016-07-06 bpabbott CategoryConfiguration and Build System Interpreter
        Summarylibinterp fails to link to libz on stable (4.0.3+) libinterp fails to link to libz
    2016-07-06 mtmiller CategoryInterpreter Configuration and Build System
        Summarylibinterp fails to link to libz libinterp fails to link to libz on stable (4.0.3+)
    2016-07-05 rik5 Attached File- Added Z_LIB.diff, #37727
    2016-07-05 mtmiller StatusNone Need Info
        Release4.0.3 dev
    2016-07-05 mschamschula Attached File- Added patch-libinterp-Makefile.in.diff, #37717

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code