bugGNU Octave - Bugs: bug #57228, [octave forge] (nan) fails to...

 
 

bug #57228: [octave forge] (nan) fails to build with undefined references in Octave 5 when LDFLAGS is set

Submitter:  Mike Miller <mtmiller>
Submitted:  Wed 13 Nov 2019 09:55:59 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 19 Nov 2019 12:49:38 AM UTC, comment #3: 

Yes, building from the repository fixes this for me, thanks. Closing as fixed.

Mike Miller <mtmiller>
Group Member
Sat 16 Nov 2019 10:00:25 PM UTC, comment #2: 

thanks for the report. I've addressed these in the repository.

I'm following your suggestion to remove option '-Wl,--no-undefined' . In order to address your suggestion "not to overwrite but probagate" the option, I'm using the += operator now for LDFLAGS.

you can check this now
  pkg install http://pub.ist.ac.at/~schloegl/matlab/NaN/nan-3.4.4.tar.gz

If this is fine with you, I'll upload this to octave-forge.

Alois Schlögl <schloegl>
Thu 14 Nov 2019 06:55:56 AM UTC, comment #1: 

Attaching a patch from bug #57231.

(file #47865)

Mike Miller <mtmiller>
Group Member
Wed 13 Nov 2019 09:55:59 PM UTC, original submission:  

The NaN package fails to build its mex files with Octave 5.1.0 or later when the user has LDFLAGS set in the environment. The value of the user's LDFLAGS doesn't matter. The existence of this variable causes the NaN package makefile to export its own value of LDFLAGS into all calls to mkoctfile. And the option '-Wl,--no-undefined' doesn't work when building mex or oct files with Octave 5. Example error:


/tmp/oct-CQVa7c/nan-3.4.3/src/histo_mex.cpp:171: undefined reference to `mexErrMsgTxt'


My recommendation would be to delete the LDFLAGS variable entirely from src/Makefile.in.

As a secondary issue, if the user has LDFLAGS in the environment, it would be better if those options were propagated to the build tools instead of overwritten.

Attached is a full verbose build log when LDFLAGS was set to "-L/usr/local/lib" in the shell before starting Octave. The specific value of LDFLAGS doesn't matter, only that it exists in the environment when make runs.

Mike Miller <mtmiller>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by schloegl (Posted a comment)
  • -email is unavailable- added by mtmiller
  •  

    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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-19 mtmiller StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2019-11-14 mtmiller Dependencies- bugs #57231 is dependent
    2019-11-14 mtmiller Attached File- Added drop-no-undefined-ldflags.patch, #47865
    2019-11-13 mtmiller Carbon-CopyRemoved 80942 -
    2019-11-13 mtmiller Attached File- Added nan-undefined-errors.log, #47863
        Carbon-Copy- Added schloegl

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code