bugGNU Octave - Bugs: bug #53564, Can't use a different gl2ps...

 
 

bug #53564: Can't use a different gl2ps library than the standard one without LD_PRELOAD

Submitter:  Pantxo Diribarne <pantxo>
Submitted:  Thu 05 Apr 2018 11:59:48 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Invalid / Not an Octave Bug 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
   

Fri 06 Apr 2018 08:35:48 AM UTC, comment #4: 

Ok, from your comments I guess the fact that it used to work without any LD* environment variable was incidental. I'll close this report as invalid and use LD_LIBRAY_PATH from now on.

@Mike: the "-R DIR" options doesn't work for me with gcc 6.3 and the error message is not quite helpful:


configure:6521: gcc -I/home/pd218333/Documents/On/gl2ps/gl2ps/  -L/home/pd218333/Documents/On/gl2ps/gl2ps/ -lgl2ps -R /home/pd218333/Documents/On/gl2ps/gl2ps/ conftest.c  >&5
gcc: error: unrecognized command line option '-R'; did you mean '-R'?


Note the difference between '-R' and '-R' :-)

Pantxo Diribarne <pantxo>
Group Member
Thu 05 Apr 2018 04:14:40 PM UTC, comment #3: 

I think the '-R /home/somewhere/gl2ps' option can be passed to libtool via LDFLAGS to force it to add the directory as an RPATH option when building the shared libraries and executables.

I'm not sure how well documented this is, but it shows up with 'libtool --mode=link --help'.

Mike Miller <mtmiller>
Group Member
Thu 05 Apr 2018 03:56:35 PM UTC, comment #2: 

I'm running Mint 18.1 (build atop Ubuntu 16.04) and I also have a default copy of gl2ps (1.3.8) installed by the packaging system.  I built a copy of 1.4.0 which I chose to install in /usr/local.  Since /usr/local is on the default LD_LIBRARY_PATH I pick up the new version without having to resort to exceptional measures.

If you really want to put the new gl2ps in an out-of-the-way location then I think you are stuck having to tell the program at runtime where you have put the library using LD_LIBRARY_PATH.  You can semi-automate it by setting up the LD_LIBRARY_PATH variable in your .profile or .cshrc file.

Alternatively, you could create a file in /etc/ld.so.conf.d which contains the extra path that ldconf should search.  This, however, will make most applications switch over to the new library.

Rik <rik5>
Group administrator
Thu 05 Apr 2018 03:44:31 PM UTC, comment #1: 

I would think that LD_LIBRARY_PATH would be necessary to add /home/somewhere/gl2ps to the runtime library load path. This is how I typically work when I'm building against a non-default copy of some dependency. LD_PRELOAD is a more forceful approach to the same result.

Libtool does have some rules for turning -L/path options into RPATH directories that get encoded into the shared objects at install time, but I'm not clear on when that is or isn't done, so I always use LD_LIBRARY_PATH.

Mike Miller <mtmiller>
Group Member
Thu 05 Apr 2018 11:59:48 AM UTC, original submission:  

I have the stable gl2ps installed in a standard location by my package manager (I am on debian stretch) and I routinely use the dev version of gl2ps for building dev Octave using the following configure flags:


./configure --prefix=/home/pd218333/Documents/On/octavebuild/local \
CFLAGS="-I/home/somewhere/gl2ps/" \
CXXFLAGS="-I/home/somewhere/gl2ps/" \
LDFLAGS="-L/home/somewhere/gl2ps/ -lgl2ps" \
...


The first problem, which has always (to my knowledge) been there, is that I need to preload the right version of libgl2ps.so in order to execute run-octave or the system gl2ps is loaded


LD_PRELOAD="/home/somewhere/gl2ps/libgl2ps.so" ./run-octave


This trick used to not be necessary (up to when ???) for running an installed version of dev octave. IOW


make install
/my/prefix/bin/octave ## previously worked
LD_PRELOAD="/home/somewhere/gl2ps/libgl2ps.so" /my/prefix/bin/octave ## currently necessary


Pantxo Diribarne <pantxo>
Group Member

 

(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 mtmiller (Posted a comment)
  • -email is unavailable- added by pantxo (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-06 pantxo StatusNeed Info Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2018-04-05 rik5 StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code