Re: Differences in screen and printed plots

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Differences in screen and printed plots

Rik-4
On 07/04/2017 09:00 AM, [hidden email] wrote:
Subject:
Re: Differences in screen and printed plots
From:
"Dmitri A. Sergatskov" [hidden email]
Date:
07/03/2017 06:23 PM
To:
JuanPi [hidden email]
CC:
Help GNU Octave [hidden email], Maintainers GNU Octave [hidden email]
List-Post:
[hidden email]
Precedence:
list
MIME-Version:
1.0
References:
[hidden email]
In-Reply-To:
[hidden email]
Message-ID:
[hidden email]
Content-Type:
multipart/alternative; boundary="f403045fc05aadbc50055373b9a1"
Message:
4



On Mon, Jul 3, 2017 at 5:10 PM, JuanPi <[hidden email]> wrote:
Hi all,

Since a while I have been suffering the difference between what we get
in the screen when we plot (really nice lately!) and what we get when
we use print or saveof.

​I suspect your gl2ps is too old. You can get the latest (1.4.0) compile in your
home directory and LD_PRELOAD the resulting library prior to starting octave
to verify if this is indeed the case.

I'm pretty sure Dmitri is correct.  Your example plot prints correctly for me, but I am running the latest development code with gl2ps-1.4.0.

--Rik
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Differences in screen and printed plots

JuanPi
> I'm pretty sure Dmitri is correct.  Your example plot prints correctly for me, but I am running the latest development code with gl2ps-1.4.0.

Thanks

Indeed Ubuntu LTS has gl2ps 1.3.8 and no backport. I built the latest
gl2ps and the LD_PRELOAD doesn't solve the issue.
I am now trying to compile and build against it with

In the meanwhile, I tried in another system (Ubuntu 17.04 with gl2ps
1.3.9) and indeed the problem is not present.




--
JuanPi Carbajal
https://goo.gl/ayiJzi
Public GnuPG key: 9C5B72BF
-----
"Why is thought, being a secretion of the brain, more wonderful than
gravity, a property of matter?"
- C. Darwin

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Differences in screen and printed plots

JuanPi
> I am now trying to compile and build against it with

Done! yes, confirmed linking against 1.4.0 solves the issue.
Now, I think I managed to do this in a rather hacky way. I configured using

configure LDFLAGS='-L/home/juanpi/Resources/gl2ps -lgl2ps1'
CPPFLAGS='-I/home/juanpi/Resources/gl2ps'

(I have created a simbolic link in gl2ps folder: 'ln -s
libgl2ps.so.1.4.0 libgl2ps1.so')

After make, I run

$./run-octave
src/.libs/lt-octave-cli: error while loading shared libraries:
libgl2ps.so.1: cannot open shared object file: No such file or
directory

and the same with

$ PRE_LOAD=/home/juanpi/Resources/gl2ps/libgl2ps.so.1.4.0 ./run-octave

So I copied /home/juanpi/Resources/gl2p/libgl2ps.so.1 to the
compilation folder and the first command worked, i.e. the change to
the configure flags did not work as I was expecting (i.e. linking
using another version of gl2ps), but apparently I managed to prevent
octave to find the system's gl2ps, so the copied symbolic link solve
the issue and made octave use gl2ps 1.4.0

What's the right way of recompiling octave to include and link against
a different (but co-existing) version of a library?


Thank you very much
--
JuanPi Carbajal
https://goo.gl/ayiJzi
Public GnuPG key: 9C5B72BF
-----
"Why is thought, being a secretion of the brain, more wonderful than
gravity, a property of matter?"
- C. Darwin

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Differences in screen and printed plots

Mike Miller-4
On Wed, Jul 05, 2017 at 10:43:37 +0200, JuanPi wrote:
> What's the right way of recompiling octave to include and link against
> a different (but co-existing) version of a library?

I would use

  CPPFLAGS=-I/path/to/headers
  LDFLAGS="-L/path/to/libraries -R/path/to/libraries"

The -R option informs libtool to add the path to the library to the
dynamic loader runtime search path.

The equivalent alternative is adding LD_LIBRARY_PATH=/path/to/libraries
in your shell environment every time you run Octave.

--
mike

Loading...