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 (Christian Ramseyer)
2. Re: undefined symbol: PL_current_contex (Stuart Kendrick)
--- Begin Message ---
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/XS/LibYAML/LibYAML.so' for module YAML::XS::LibYAML:/home/netdisco/perl5/lib/perl5/x86_64-linux-thread-multi/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
--- End Message ---
--- Begin Message ---
Hi Christian,
- That was a copy/paste error; the undefined symbol is reported as
'PL_current_context', rather than as 'PL_current_contex', as I report below
- This is a brand-new Rocky 9.3 installation, on bare metal. The bits I copied
over from the old install are:
~/environments/deployment.yml
- Reinstalling YAML::XS
[netdisco@ganesh perl5]$ whoami
netdisco
[netdisco@ganesh perl5]$ pwd
/home/netdisco/perl5
[netdisco@ganesh perl5]$ ./bin/cpanm --reinstall -v YAML::XS
cpanm (App::cpanminus) 1.7047 on perl 5.038000 built for x86_64-linux-thread-mul
ti
Work directory is /home/netdisco/.cpanm/work/1702378538.44783
You have make /bin/make
You have LWP 6.72
You have /bin/tar: tar (GNU tar) 1.34
[...]
All tests successful.
Files=45, Tests=368, 7 wallclock secs ( 0.21 usr 0.09 sys + 5.93 cusr 0.85
csys = 7.08 CPU)
Result: PASS
make[1]: Entering directory
'/home/netdisco/.cpanm/work/1702378538.44783/YAML-LibYAML-0.88/LibYAML'
"/opt/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- LibYAML.bs
../blib/arch/auto/YAML/XS/LibYAML/LibYAML.bs 644
Manifying 1 pod document
make[1]: Leaving directory '/home/netdisco/.cpanm/work/1702378538.44783/YAML-Lib
YAML-0.88/LibYAML'
Manifying 2 pod documents
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Appending installation info to
/home/netdisco/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
OK
Successfully reinstalled YAML-LibYAML-0.88
Installing
/home/netdisco/perl5/lib/perl5/x86_64-linux-thread-multi/.meta/YAML-LibYAML-0.88/install.json
1 distribution installed
[netdisco@ganesh perl5]$
==> Looks like success
[netdisco@ganesh perl5]$ PERLLIB=./lib/perl5/:./lib/perl5/aarch64-linux-thread-m
ulti perl -MYAML::XS -E 'say YAML::XS::LibYAML::libyaml_version();'
Can't locate YAML/XS.pm in @INC (you may need to install the YAML::XS module) (@
INC entries checked: ./lib/perl5/ ./lib/perl5/aarch64-linux-thread-multi /opt/lo
cal/lib/perl5/site_perl/5.38.0/x86_64-linux-thread-multi /opt/local/lib/perl5/si
te_perl/5.38.0 /opt/local/lib/perl5/5.38.0/x86_64-linux-thread-multi /opt/local/
lib/perl5/5.38.0).
BEGIN failed--compilation aborted.
[netdisco@ganesh perl5]$
==> Does the above tell me something useful?
[netdisco@ganesh perl5]$ find . | grep XS.pm
./lib/perl5/x86_64-linux-thread-multi/List/SomeUtils/XS.pm
./lib/perl5/x86_64-linux-thread-multi/URL/Encode/XS.pm
./lib/perl5/x86_64-linux-thread-multi/Template/Stash/XS.pm
./lib/perl5/x86_64-linux-thread-multi/YAML/XS.pm
./lib/perl5/x86_64-linux-thread-multi/HTTP/Parser/XS.pm
./lib/perl5/x86_64-linux-thread-multi/Math/Random/ISAAC/XS.pm
[netdisco@ganesh perl5]$
==> OK, wait a minute ... looks like I've been hurting myself with systemd here
...
==> this works ... although starman isn't running, but let's ignore that for
the moment
[netdisco@ganesh ~]$ bin/netdisco-backend start
config watcher: watching /home/netdisco/environments for updates.
Netdisco Backend [Started]
[netdisco@ganesh ~]$ bin/netdisco-web start
config watcher: watching /home/netdisco/environments for updates.
Netdisco Web [Started]
[netdisco@ganesh ~]$
[netdisco@ganesh ~]$ ps -ef | grep -e web -e starman
netdisco 49916 1 0 03:58 ? 00:00:00 perl bin/netdisco-web start
netdisco 49917 49916 0 03:58 ? 00:00:00 [starman] <defunct>
[netdisco@ganesh ~]$
==> So this is a systemd issue ...
[root@ganesh system]# pwd
/etc/systemd/system
[root@ganesh system]#
[root@ganesh system]# cat netdisco-daemon.service
[Unit]
Description=Netdisco Device Management Back-End
AssertFileIsExecutable=/home/netdisco/bin/netdisco-daemon
After=syslog.target network-online.target
[Service]
Type=forking
ExecStart=/home/netdisco/bin/netdisco-daemon start
ExecStop=/home/netdisco/bin/netdisco-daemon stop
User=netdisco
Group=netdisco
[Install]
WantedBy=multi-user.target
[root@ganesh system]#
==> Ok, so this is a systemd problem ... what am I missing in that [Service]
stanza?
==> After some fiddling, I find that if I add the following Path definition
that things work (mostly, again, ignoring the starman issue)
[Service]
Type=forking
ExecStart=/home/netdisco/bin/netdisco-daemon start
ExecStop=/home/netdisco/bin/netdisco-daemon stop
Path=/opt/local/bin
User=netdisco
Group=netdisco
==> Then 'systemctl start netdisco-daemon' works ... /opt/local/bin contains a
local version of perl that I use for my own code ... I would prefer if Netdisco
relied on the Rocky-provided perl distribution ...
==> OK, how does ~/bin/netdisco-backend set environment variables ...
==> OK, this is a bit better ...
[Service]
Type=forking
ExecStart=/home/netdisco/bin/netdisco-daemon start
ExecStop=/home/netdisco/bin/netdisco-daemon stop
Environment=PERL_LOCAL_LIB_ROOT=/home/netdisco/perl5:/home/netdisco/perl5/lib/perl5:/home/netdisco/perl5/lib/perl5/x86_64-linux-thread-multiUser=netdisco
User=netdisco
Group=netdisco
[root@ganesh system]# systemctl start netdisco-daemon
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?
--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/XS
> /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
--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
netdisco-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netdisco-users