Hi Zaki,

thank you for the suggestion. Yes, that is exactly the issue. The
question to me is rather, if this is desired. Who runs an X session as
root ?

Isn't using cpanm the way to maintain Perl modules these days? I will
open an issue and I have a hunch this could easily be caught during build.

Ingo

On 2/12/2022 12:59 AM, Zakariyya Mughal wrote:
> On 2022-02-11 at 10:49:12 +0100, Ingo Schmid wrote:
>> Hi,
>>
>> the other mail made me aware of P:G:S, now I was doing
>>
>> #> sudo cpanm PDL::Graphics::Simple
>>
>> on Debian testing and during make test I received this error after the
>> label plot is shown:
>>
>> Gnuplot error: "QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to
>> '/tmp/runtime-root'" while sending final multiplot command. at
>> /usr/local/share/perl/5.32.1/PDL/Graphics/Gnuplot.pm line 4346, <STDIN>
>> line 7.
>>     PDL::Graphics::Gnuplot::multiplot(undef, "layout",
>> ARRAY(0x55c8040dbb08)) called at
>> /root/.cpanm/work/1644572352.1118703/PDL-Graphics-Simple-1.007/blib/lib/PDL/Graphics/Simple/Gnuplot.pm
>> line 360
>>  
>> PDL::Graphics::Simple::Gnuplot::plot(PDL::Graphics::Simple::Gnuplot=HASH(0x55c8040e2378),
>>  HASH(0x55c8040f5910), ARRAY(0x55c80410c888)) called at 
>> /root/.cpanm/work/1644572352.1118703/PDL-Graphics-Simple-1.007/blib/lib/PDL/Graphics/Simple.pm
>>  line 1044
>>  PDL::Graphics::Simple::plot(PDL::Graphics::Simple=HASH(0x55c8040ede58), 
>> "with", "image", PDL=SCALAR(0x55c8040d3e58)) called at 
>> /root/.cpanm/work/1644572352.1118703/PDL-Graphics-Simple-1.007/blib/lib/PDL/Graphics/Simple.pm
>>  line 1127
>>     PDL::Graphics::Simple::_convenience_plot("image",
>> PDL::Graphics::Simple=HASH(0x55c8040ede58), PDL=SCALAR(0x55c8040d3e58),
>> HASH(0x55c8040edae0), HASH(0x55c8040d3e88)) called at
>> /root/.cpanm/work/1644572352.1118703/PDL-Graphics-Simple-1.007/blib/lib/PDL/Graphics/Simple.pm
>> line 1143
>>  PDL::Graphics::Simple::image(PDL::Graphics::Simple=HASH(0x55c8040ede58), 
>> PDL=SCALAR(0x55c8040d3e58), HASH(0x55c8040edae0)) called at t/simple.t line 
>> 145
>>
>> Have you got any ideas?
>> Ingo
>
> Hello Ingo,
>
> Since you are using `sudo` to install, it is using the root user's
> environment (actually a reduced environment that `sudo` creates*) which
> does not have `XDG_RUNTIME_DIR` set. Gnuplot needs to have
> `XDG_RUNTIME_DIR` set in order to run during the dist's tests. You can
> set the variable to a temporary directory:
>
>   sudo bash -c 'XDG_RUNTIME_DIR=$(mktemp -d) cpanm --test-only 
> PDL::Graphics::Simple'
>
> I would recommend installing packages to a `local::lib` instead of using 
> `sudo`.
>
> Best regards,
> - Zaki Mughal
>
> * Run `sudo env` to see what is set.
>
>> _______________________________________________
>> pdl-devel mailing list
>> pdl-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pdl-devel


_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel

Reply via email to