Send netdisco-users mailing list submissions to
        netdisco-users@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
        netdisco-users-requ...@lists.sourceforge.net

You can reach the person managing the list at
        netdisco-users-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:

   1. Re: undefined symbol: PL_current_contex (Oliver Gorwits)
--- Begin Message ---
No worries! Glad you got there in the end :)

On Wed, 20 Dec 2023 at 11:52, Stuart Kendrick <stua...@alleninstitute.org>
wrote:

> Turns out I had confused myself with multiple Perl installations
>
> Narrowing the environment down to the one provided by the OS, wiping
> /home/netdisco/*, and installing afresh resolved the issues
>
> Thank you for your assistance
>
> --sk
>
> -----Original Message-----
> From: Christian Ramseyer <ramse...@netnea.com>
> Sent: Tuesday, December 12, 2023 10:33 AM
> To: Stuart Kendrick <stua...@alleninstitute.org>;
> netdisco-users@lists.sourceforge.net
> Subject: Re: [Netdisco] undefined symbol: PL_current_contex
>
> CAUTION: This email originated from outside the Allen Institute. Please do
> not click links or open attachments unless you've validated the sender and
> know the content is safe.
> ________________________________
>
> Hi
>
>
> >
> > 2023-12-12T04:24:33.922371-08:00 ganesh netdisco-daemon[51448]: Can't
> locate Path/Class.pm in @INC (you may need to install the Path::Class
> module) (@INC contains: /usr/local/lib64/perl5/5.32
> /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl
> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at
> /home/netdisco/perl5/bin/netdisco-backend line 31.
> > 2023-12-12T04:24:33.922371-08:00 ganesh netdisco-daemon[51448]: BEGIN
> failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-backend
> line 31.
> > 2023-12-12T04:24:33.923416-08:00 ganesh systemd[1]:
> > netdisco-daemon.service: Control process exited, code=exited,
> > status=2/INVALIDARGUMENT
> > 2023-12-12T04:24:33.923650-08:00 ganesh systemd[1]:
> netdisco-daemon.service: Failed with result 'exit-code'.
> >
> > ==> So why isn't /usr/bin/perl finding Path::Class.pm?
> >
> > [netdisco@ganesh perl5]$ pwd
> > /home/netdisco/perl5
> > [netdisco@ganesh perl5]$ find . | grep Path | grep Class.pm
> > ./lib/perl5/Path/Class.pm [netdisco@ganesh perl5]$
> >
> > ==> Ahh, well, /usr/bin/perl isn't finding Path/Class.pm because @INC
> doesn't include /home/netops/perl5 ....
> >
> > ==> OK, I think I'm fuzzy on how to include library paths for perl ...
> does any of the above spark an insight from you around what I am missing?
>
> We're getting closer :)
>
> In theory all the binaries like netdisco-web have some setup code to
> arrange the environment, e.g:
>
>   head -50 perl5/bin/netdisco-web
> #!/usr/bin/env perl
>
> use strict;
> use warnings;
>
> our $home;
>
> BEGIN {
>    use FindBin;
>    FindBin::again();
>
>    my $me = File::Spec->catfile($FindBin::RealBin, $FindBin::RealScript);
>    my $uid = (stat($me))[4] || 0;
>
>    $home = ($ENV{NETDISCO_HOME} || (getpwuid($uid))[7] || $ENV{HOME});
>
>    # try to find a localenv if one isn't already in place.
>    if (!exists $ENV{PERL_LOCAL_LIB_ROOT}) {
>        use File::Spec;
>        my $localenv = File::Spec->catfile($FindBin::Bin, 'localenv');
>        exec($localenv, $0, @ARGV) if -f $localenv;
>        $localenv = File::Spec->catfile($home, 'perl5', 'bin', 'localenv');
>        exec($localenv, $0, @ARGV) if -f $localenv;
>
>        die "Sorry, can't find libs required for App::Netdisco.\n"
>          if !exists $ENV{PERLBREW_PERL};
>    }
> }
>
> BEGIN {
>    use Path::Class;
>
>    # stuff useful locations into @INC and $PATH
>    unshift @INC,
>      dir($FindBin::RealBin)->parent->subdir('lib')->stringify,
>      dir($FindBin::RealBin, 'lib')->stringify;
>
>    use Config;
>    $ENV{PATH} = $FindBin::RealBin . $Config{path_sep} . $ENV{PATH}; }
>
>
> But that seems to not work out in your case. The most direct way to tell
> Perl where the libraries are is via
>
>
> PERLLIB=/home/netdisco/perl5/lib:/home/netdisco/perl5/lib/perl5:/home/netdisco/perl5/lib/perl5/x86_64-linux-thread-multi
>
> Maybe set NETDISCO_HOME in the systemd unit as well. The
> PERL_LOCAL_LIB_ROOT should be /home/netdisco/perl5(/lib maybe) if anything,
> but I have this generally unset IIRC.
>
> Cheers
> Christian
>
>
>
>
> >
> > --sk
> >
> > -----Original Message-----
> > From: Christian Ramseyer <ramse...@netnea.com>
> > Sent: Monday, December 11, 2023 4:23 PM
> > To: netdisco-users@lists.sourceforge.net; Stuart Kendrick
> > <stua...@alleninstitute.org>
> > Subject: Re: [Netdisco] undefined symbol: PL_current_contex
> >
> > CAUTION: This email originated from outside the Allen Institute. Please
> do not click links or open attachments unless you've validated the sender
> and know the content is safe.
> > ________________________________
> >
> > Hi
> >
> > On 11.12.2023 21:24, Stuart Kendrick wrote:
> >> Hi folks,
> >>
> >> BRIEF
> >>
> >>    * I have NetDisco running on an old CentOS 7.9 box; I have built a
> new
> >>      Rocky 9.3 and am attempting to install NetDisco there
> >>
> >> Can't load
> >> '/home/netdisco/perl5/lib/perl5/x86_64-linux-thread-multi/auto/YAML/X
> >> S
> >> /LibYAML/LibYAML.so' for module
> >> YAML::XS::LibYAML:/home/netdisco/perl5/lib/perl5/x86_64-linux-thread-
> >> m
> >> ulti/auto/YAML/XS/LibYAML/LibYAML.so: undefined symbol:
> >> PL_current_contex
> >>
> >> DETAIL
> >
> >> [netdisco@new-server LibYAML]$ strings LibYAML.so | grep PL_current
> >>
> >> PL_current_context
> >>
> >> PL_current_context
> >
> > Your error says contex while the .so has contex*t*, copy/paste mishap or
> is that really the output?
> >
> >
> > To make matters worse, the LibYAML.so I quickly checked in a fresh
> docker image (aarch64, unfortuntately I can't run x86_64 right now) doesn't
> have this string at all:
> >
> > docker run --rm -it rockylinux:9.3  bash
> >
> > ... doing the App::Netdisco install, until after the cpanm step
> >
> > [root@a687675a099c perl5]# find . -name LibYAML.so
> > ./lib/perl5/aarch64-linux-thread-multi/auto/YAML/XS/LibYAML/LibYAML.so
> >
> > [root@a687675a099c perl5]# strings
> > ./lib/perl5/aarch64-linux-thread-multi/auto/YAML/XS/LibYAML/LibYAML.so |
> grep -i PL_curr || echo crickets....
> >
> > crickets....
> >
> > I checked another LibYAML.so on Suse x86_64 and that also doesn't have
> > it. Getting weird :)
> >
> > Maybe try reinstalling the module with -v and running the tests, see if
> that works or there are errors already there?
> >
> > [root@a687675a099c perl5]# ./bin/cpanm --reinstall -v YAML::XS
> >
> > You can also show which version of libyaml is used, but it seems to ship
> with the CPAN package so unlikely to get a surprise there:
> >
> > [root@a687675a099c perl5]#
> > PERLLIB=./lib/perl5/:./lib/perl5/aarch64-linux-thread-multi perl
> -MYAML::XS -E  'say YAML::XS::LibYAML::libyaml_version();'
> >
> > 0.2.4
> >
> > Is this a completely fresh install or did you restore any parts from a
> backup or upgrade from an older Rocky snapshot?
> >
> > Cheers
> > Christian
>
> --
> Christian Ramseyer, netnea ag
> Network Management. Security. OpenSource.
> https://www.netnea.com/
> Phone: +41 79 644 77 64
>
>
> _______________________________________________
> Netdisco mailing list
> netdisco-users@lists.sourceforge.net
> https://sourceforge.net/p/netdisco/mailman/netdisco-users/
>
>

--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
netdisco-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to