Dmitry, am I right that this:
> openat(AT_FDCWD, 
> "/usr/local/lib/x86_64-linux-gnu/perl/5.34.0/auto/Prima/Prima.so", 
> O_RDONLY|O_CLOEXEC) = 5
was output from your locally running the strace command?

I believe Ingo thought that was a snippet of Perl he was supposed to run, but I 
think it’s instead strace’s output in (close to) C.

Best regards,
Ed

________________________________
From: Dmitry Karasik <dmi...@karasik.eu.org>
Sent: Wednesday, May 29, 2024 9:51:32 PM
To: Ingo Schmid <ingo...@gmx.at>
Cc: Ed . <ej...@hotmail.com>; pdl-devel <pdl-devel@lists.sourceforge.net>; 
perldl <pdl-gene...@lists.sourceforge.net>
Subject: Re: [Pdl-devel] PDL::Drawing::Prima

On Wed, May 29, 2024 at 05:12:42PM +0200, Ingo Schmid wrote:
> Hi Dimitry,
> perl Makefile.PL DL_LOAD_FLAGS=1
> was the solution! No reinstall or anything needed.
> Thank you so much!

Great! I'm really curious what was than system... could you possibly send me 
(ok if personally, too)
output of `uname -a` and `cc -v` ?

> PS: I got syntax errors with this (even when using the right location of 
> Prima.so). Is this to be run in bash or perl?
> openat(AT_FDCWD, 
> "/usr/local/lib/x86_64-linux-gnu/perl/5.34.0/auto/Prima/Prima.so", 
> O_RDONLY|O_CLOEXEC) = 5

I'm not sure I follow the question. Do I understand correctly that if you run 
this from bash

$ perl -Iblib/arch -Iblib/lib -MPDL::Drawing::Prima -e 1

you get syntax errors?

/dk

>
>
> On 29.05.24 3:17 PM, Dmitry Karasik wrote:
> > Hi all
> >
> > Sorry no clue either. But I'd do this:
> >
> > 1) remove all prima and P:D:P stuff, make sure no lingering .so files, then 
> > clean reinstall.
> > 2) nm won't help you here because the linking is done by dlopen() during 
> > runtime, so
> > try this instead:
> >
> > $ strace perl -Iblib/arch -Iblib/lib -MPDL::Drawing::Prima -e 1 2>&1 | grep 
> > Prima.so
> > openat(AT_FDCWD, 
> > "/usr/local/lib/x86_64-linux-gnu/perl/5.34.0/auto/Prima/Prima.so", 
> > O_RDONLY|O_CLOEXEC) = 5
> >
> > if it cannot find Prima.so then there's something wrong with the 
> > installation.
> >
> > If however it can but cannot bind dynamically it might be that the system 
> > is so old that
> > Prima couldn't detect that it needs an explicit RTLD_GLOBAL flag. Check 
> > this then:
> >
> > $ grep dl_load_flags Prima/Config.pm
> > dl_load_flags => 1,
> >
> > so if it is not 1, you can try to recompile Prima with this:
> >
> > perl Makefile.PL DL_LOAD_FLAGS=1
> >
> > (but this is a really ancient stuff, I think I only used it on Sun/IRIX 
> > back then..)
> >
> > /dk
> >
> >
> > On Mon, May 27, 2024 at 10:06:00AM +0000, Ed . wrote:
> >> Hi Ingo,
> >>
> >> I don’t know either. Dmitry, any ideas? I re-attach the nm output files.
> >>
> >> Best regards,
> >> Ed
> >>
> >> ________________________________
> >> From: Ingo Schmid<ingo...@gmx.at>
> >> Sent: Monday, May 27, 2024 10:49:04 AM
> >> To: Ed .<ej...@hotmail.com>; pdl-devel<pdl-devel@lists.sourceforge.net>; 
> >> perldl<pdl-gene...@lists.sourceforge.net>; David 
> >> Mertens<dcmertens.p...@gmail.com>
> >> Subject: Re: [Pdl-devel] PDL::Drawing::Prima
> >>
> >>
> >> Hi Ed,
> >>
> >> after further investigation, I think the Makefile is OK. I have 
> >> essentially to environments where I need this to run.
> >>
> >> 1) modern regularly updated linux boxes
> >>
> >> 2) servers with older stable releases (many kind of different software 
> >> running, not easily updated)
> >>
> >> Both have perlbreew installations using perl-5.36.0 (with different 
> >> aliases.
> >>
> >> On the modern boxes, P:D:P works fine, while on the server it complains 
> >> about unresolved symbols (gimme_the_mate) during make test or 
> >> apc_get_core_version when perl -Mblib -e "use PDL::Drawing::Prima;", Both 
> >> have Prima 1.73 installed.
> >>
> >> The build log is inconspicuous, I can load the Utils module.
> >>
> >> Checking if you have Prima 1.57 ... Yes (1.73)
> >> Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.64)
> >> Checking if you have Test::More 0.88 ... Yes (1.302190)
> >> Checking if you have PDL 2.037 ... Yes (2.089)
> >> Building and testing PDL-Drawing-Prima-0.18
> >>
> >> I am at a complete loss here. I attached the output of nm
> >>
> >> On 24.05.24 5:59 PM, Ed . wrote:
> >>
> >> Hi Ingo,
> >>
> >>
> >>
> >> I think the relevant part of the attached Makefile.PL is (as changed by 
> >> you):
> >>
> >>
> >>
> >> if ($Prima::Config::Config{dlname}){
> >>
> >>              my ($primalib, 
> >> $primapath)=fileparse($Prima::Config::Config{dlname});
> >>
> >>              $hash{LIBS}->[0] = " -L$primapath -lPrima "
> >>
> >> }
> >>
> >>
> >>
> >> You’ve changed it from an append (.=) to an assign, which might explain 
> >> why it doesn’t work. Is there a reason you did that? Also, why did you 
> >> remove the existing code below?
> >>
> >>
> >>
> >> $hash{LIBS}[0] .= " $Prima::Config::Config{libs}"
> >>
> >>          if $Prima::Config::Config{libs};
> >>
> >>
> >>
> >> What errors did you get? Are you on Ubuntu? Because I’m using Ubuntu, and 
> >> building P:D:Prima here doesn’t need to link Prima - the dynamic linker 
> >> takes care of it at runtime.
> >>
> >>
> >>
> >> Best regards,
> >>
> >> Ed
> >>
> >>
> >>
> >> ________________________________
> >> From: Ingo Schmid via 
> >> pdl-devel<pdl-devel@lists.sourceforge.net><mailto:pdl-devel@lists.sourceforge.net>
> >> Sent: Thursday, May 23, 2024 1:05:37 PM
> >> To: 
> >> pdl-devel<pdl-devel@lists.sourceforge.net><mailto:pdl-devel@lists.sourceforge.net>;
> >>  
> >> perldl<pdl-gene...@lists.sourceforge.net><mailto:pdl-gene...@lists.sourceforge.net>;
> >>  David Mertens<dcmertens.p...@gmail.com><mailto:dcmertens.p...@gmail.com>
> >> Subject: [Pdl-devel] PDL::Drawing::Prima
> >>
> >>
> >> Hi,
> >>
> >> this module does not find Prima.so (from Prima).
> >>
> >> Makefile.PL needs to lock at Prima::Config::Config{dlname} and set the 
> >> correct LIBS field. I failed to make it work.
> >>
> >> I got the parts necessary extracted, but make seems to ignore it. This 
> >> results in unresolved symbols from Prima.
> >>
> >> Ingo
> >
> >
> >

--
Sincerely,
        Dmitry Karasik

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

Reply via email to