bugGNU Octave - Bugs: bug #56876, configure with...

 
 

bug #56876: configure with --libdir=/octave///lib leads to errors in load path construction

Submitter:  Martin K <grisu86>
Submitted:  Mon 09 Sep 2019 03:14:53 PM UTC
   
 
Category:  Configuration and Build System Severity:  2 - Minor
Priority:  3 - Low Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 5.1.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 16 Sep 2019 06:36:50 PM UTC, comment #6: 

Nice that the patch was really rather simple, just a change to a regular expression to do the right thing.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Fri 13 Sep 2019 10:28:07 PM UTC, comment #5: 

This is fixed on the default branch, and works for me with some minimal testing

https://hg.savannah.gnu.org/hgweb/octave/rev/b7d9a2658771

Mike Miller <mtmiller>
Group Member
Tue 10 Sep 2019 03:51:40 PM UTC, comment #4: 

Thank you, that helps. I can confirm, if I build Octave with '--prefix=${PREFIX} --libdir='${PREFIX}//lib', then several directory variables look like absolute directories rather than relative directories under OCTAVE_HOME.

This can be easily worked around by calling configure with properly normalized file names, but I agree that the build system should be resistant to this kind of unusual input.

Updating summary description.

Mike Miller <mtmiller>
Group Member
Tue 10 Sep 2019 07:53:58 AM UTC, comment #3: 

I reconginzed that I added the --libdir option in the configure script in order to avoid lib64 directories.


With

  --libdir=/opt/octave-5.1/lib

it works. If the outside build script adds the / to the prefix it inserts the additional / as well and I configure octave with

  --libdir=/opt/octave-5.1//lib

and than the wrong path is inserted in libinterp/corefcn/default-defs.h

So derivation of libdir from the prefix works but if the libdir is set directly a dubling / is not removed.

Martin K <grisu86>
Mon 09 Sep 2019 04:47:26 PM UTC, comment #2: 

I have run configure and make in two different builds of Octave 5.1.0 now, one with --prefix=/a/octave and one with --prefix=/a/octave/. I have two identical libinterp/corefcn/default-defs.h, so I can't see where this is originating from on your system.

Mike Miller <mtmiller>
Group Member
Mon 09 Sep 2019 04:08:37 PM UTC, comment #1: 

I can't reproduce this by setting the environment variable OCTAVE_HOME. So this is possibly something going on in the build system rather than in Octave's runtime determination of its default paths. Are you able to be more specific as to where the difference exactly occurs? A specific makefile or source file that differs between the two build trees?

Mike Miller <mtmiller>
Group Member
Mon 09 Sep 2019 03:14:53 PM UTC, original submission:  

I recognized the following strange behavior when installing octave-5.1.0 from scratch.

My build scripts added a "/" to the end of the desired prefix and thus configure was called like

./configure --prefix=/opt/octave-5.1/

afterwards some commands are missing like the qr decomposition or plotting although everything was found by the configure script. A look into the output of "path" inside octave afterwards showed that the following paths are missing:
- PREFIX/lib/octave/5.1.0/site/oct/x86_64-pc-linux-gnu
- PREFIX/lib/octave/site/oct/api-v53/x86_64-pc-linux-gnu
- PREFIX/lib/octave/site/oct/x86_64-pc-linux-gnu
and some others. I found out that configure replaces some paths in
libinterp/corefcn/default-defs.h.in with a leading "/" and some of the not. This leads to the problem that the  prepend_home_dir function in libinterp/corefcn/defaults.cc detects an absolute path and does not prepend the correct prefix.  It seems to affect the following variables:
- OCTAVE_LOCALVEROCTFILEDIR
- OCTAVE_LOCALAPIOCTFILEDIR
- OCTAVE_LOCALOCTFILEDIR
- OCTAVE_OCTFILEDIR

If I call the configure script without the trailing "/", like

./configure --prefix=/opt/octave-5.1

the leading "/" in OCTAVE_OCTFILEDIR etc. is gone and prepend_home_dir returns the correct path.


Martin K <grisu86>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by grisu86 (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-09-16 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2019-09-13 mtmiller StatusConfirmed Ready For Test
    2019-09-10 mtmiller Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        Item GroupNone Build Failure
        StatusNeed Info Confirmed
        SummaryPrefix ending with &quot;/&quot; leads to missing .oct and .m search paths. configure with --libdir=/octave///lib leads to errors in load path construction
    2019-09-09 mtmiller StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code