Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Fedora 29 upgrade

by JRBJhawk (Novice)
on Aug 07, 2019 at 20:43 UTC ( #11104114=perlquestion: print w/replies, xml ) Need Help??

JRBJhawk has asked for the wisdom of the Perl Monks concerning the following question:

I recently upgraded both of my Linux systems from Fedora 28 to 29. A Perl program which previously worked fine on both system now aborts with this error

Can't load '/home/john/perl5/lib/perl5/x86_64-linux-thread-multi/auto/ +XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: libperl.so. +5.26: cannot open shared object file: No such file or directory at /u +sr/lib64/perl5/DynaLoader.pm line 193. at /home/john/perl5/lib/perl5/x86_64-linux-thread-multi/XML/Parser.pm + line 18. Compilation failed in require at /home/john/perl5/lib/perl5/x86_64-lin +ux-thread-multi/XML/Parser.pm line 18. BEGIN failed--compilation aborted at /home/john/perl5/lib/perl5/x86_64 +-linux-thread-multi/XML/Parser.pm line 22. Compilation failed in require at /home/john/perl5/lib/perl5/XML/Twig.p +m line 151. BEGIN failed--compilation aborted at /home/john/perl5/lib/perl5/XML/Tw +ig.pm line 151. Compilation failed in require at /home/john/perl5/lib/perl5/OpenOffice +/OODoc/XPath.pm line 14. BEGIN failed--compilation aborted at /home/john/perl5/lib/perl5/OpenOf +fice/OODoc/XPath.pm line 14. Compilation failed in require at /home/john/perl5/lib/perl5/OpenOffice +/OODoc/Meta.pm line 14. BEGIN failed--compilation aborted at /home/john/perl5/lib/perl5/OpenOf +fice/OODoc/Meta.pm line 14. Compilation failed in require at /home/john/perl5/lib/perl5/OpenOffice +/OODoc.pm line 11. BEGIN failed--compilation aborted at /home/john/perl5/lib/perl5/OpenOf +fice/OODoc.pm line 11. Compilation failed in require at ./cvt_ref_pay.pl line 4. BEGIN failed--compilation aborted at ./cvt_ref_pay.pl line 4.

The file in question (Expat.so) exists in the proper directory. All of my other Perl programs work with no problems after the upgrade. Do the Perl Monks have any ideas?

Replies are listed 'Best First'.
Re: Fedora 29 upgrade
by syphilis (Archbishop) on Aug 08, 2019 at 01:16 UTC
    The file in question (Expat.so) exists in the proper directory

    However, the file that's not being found is libperl.so.5.26 (though it, too, will presumably still be where it always was).

    Which perl are you wanting to execute - the system perl-5.28.2 ? ... or the perl-5.26 that's in /home/john/perl5/ ?
    I would recommend staying with the perl in /home/john/perl5, but it seems you are currently using a mixture of both - which is not going to work.

    Could you provide full output of perl -V (that's an uppercase V).

    Update: Also the output of echo $PATH might be helpful.
    I suspect that all you really needed to do was to first run:
    export PATH=/home/john/perl5/bin:$PATH
    and everything would have still worked.
    However, there's now the issue of which XML::Parser was removed. (Nothing that can't be fixed.)

    Cheers,
    Rob

      Sorry it's taken me so long to respond. Here's the perl -V output

      Summary of my perl5 (revision 5 version 28 subversion 2) configuration +: Platform: osname=linux osvers=4.20.13-200.fc29.x86_64 archname=x86_64-linux-thread-multi uname='linux buildhw-06.phx2.fedoraproject.org 4.20.13-200.fc29.x8 +6_64 #1 smp wed feb 27 19:42:55 utc 2019 x86_64 x86_64 x86_64 gnulinu +x ' config_args='-des -Doptimize=none -Dccflags=-O2 -g -pipe -Wall -We +rror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTION +S -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs= +/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/re +dhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fs +tack-clash-protection -fcf-protection -Dldflags=-Wl,-z,relro -Wl,-z +,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Dccdlflags=-Wl,-- +enable-new-dtags -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat +/redhat-hardened-ld -Dlddlflags=-shared -Wl,-z,relro -Wl,-z,now -sp +ecs=/usr/lib/rpm/redhat/redhat-hardened-ld -Dshrpdir=/usr/lib64 -DDEB +UGGING=-g -Dversion=5.28.2 -Dmyhostname=localhost -Dperladmin=root@lo +calhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dprefix=/usr -Dvendorprefix=/ +usr -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl5 -Dsitear +ch=/usr/local/lib64/perl5 -Dprivlib=/usr/share/perl5 -Dvendorlib=/usr +/share/perl5/vendor_perl -Darchlib=/usr/lib64/perl5 -Dvendorarch=/usr +/lib64/perl5/vendor_perl -Darchname=x86_64-linux-thread-multi -Dlibpt +h=/usr/local/lib64 /lib64 /usr/lib64 -Duseshrplib -Dusethreads -Dusei +threads -Dusedtrace=/usr/bin/dtrace -Duselargefiles -Dd_semctl_semun +-Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseper +lio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/ +bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_setho +stent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_end +servent_r_proto -Ud_setservent_r_proto -Dscriptdir=/usr/bin -Dusesite +customize -Duse64bitint' hint=recommended useposix=true d_sigaction=define useithreads=define usemultiplicity=define use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='gcc' ccflags ='-D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=fo +rmat-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexc +eptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/li +b/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-an +nobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-cl +ash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/lo +cal/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' optimize=' -g' cppflags='-D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=fo +rmat-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexc +eptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/li +b/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-an +nobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-cl +ash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/lo +cal/include' ccversion='' gccversion='8.3.1 20190223 (Red Hat 8.3.1-2)' gccosandvers='' intsize=4 longsize=8 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long' ivsize=8 nvtype='double' nvsize=8 Off_t='off_t' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='gcc' ldflags ='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redha +t-hardened-ld -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib64 /lib64 /usr/lib64 /usr/local/lib /usr/lib +/lib/../lib64 /usr/lib/../lib64 /lib libs=-lpthread -lresolv -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -l +gdbm_compat perllibs=-lpthread -lresolv -ldl -lm -lcrypt -lutil -lc libc=libc-2.28.so so=so useshrplib=true libperl=libperl.so gnulibc_version='2.28' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=so d_dlsymun=undef ccdlflags='-Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -specs=/ +usr/lib/rpm/redhat/redhat-hardened-ld' cccdlflags='-fPIC' lddlflags='-lpthread -shared -Wl,-z,relro -Wl,-z,now -specs=/usr/l +ib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -fstack-protector-s +trong' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API USE_SITECUSTOMIZE Locally applied patches: Fedora Patch1: Removes date check, Fedora/RHEL specific Fedora Patch2: support for libdir64 Fedora Patch3: use libresolv instead of libbind Fedora Patch4: USE_MM_LD_RUN_PATH Fedora Patch5: Provide MM::maybe_command independently (bug #11294 +43) Fedora Patch6: Dont run one io test due to random builder failures Fedora Patch8: Define SONAME for libperl.so Fedora Patch9: Install libperl.so to -Dshrpdir value Fedora Patch10: Document Math::BigInt::CalcEmu requires Math::BigI +nt (CPAN RT#85015) Fedora Patch11: Make *DBM_File desctructors thread-safe (RT#61912) Fedora Patch12: Replace EU::MakeMaker dependency with EU::MM::Util +s in IPC::Cmd (bug #1129443) Fedora Patch13: Fix executing arybase::_tie_it() in Safe compartem +ent (RT#131588) Fedora Patch14: Link XS modules to pthread library to fix linking +with -z defs Fedora Patch17: Fix printing a warning about a wide character when + matching a regular expression while ISO-8859-1 locale is in effect Fedora Patch18: Fix invoking a check for wide characters while ISO +-8859-1 locale is in effect Fedora Patch20: Fix build conditions in locale.c Fedora Patch21: Fix a file descriptor leak in in-place edits (RT#1 +33314) Fedora Patch23: Fix a buffer overrun in deprecated S_is_utf8_commo +n() Fedora Patch24: Fix a time race in Time-HiRes/t/itimer.t test Fedora Patch26: Fix Time::Piece to handle objects in overloaded me +thods correctly Fedora Patch27: Fix an assignment to a lexical variable in multico +ncatenation expressions (RT#133441) Fedora Patch28: Fix a spurious warning about uninitialized value i +n warn (RT#132683) Fedora Patch30: Pass the correct CFLAGS to dtrace Fedora Patch33: Fix PathTools tests to cope with ESTALE error (RT# +133534) Fedora Patch34: Fix an undefined behaviour in S_hv_delete_common() Fedora Patch38: Fix compiling regular expressions that contain bot +h compile- and run-time compiled code blocks (RT#133687) Fedora Patch39: Adjust tests to gdbm-1.15 (RT#133295) Fedora Patch44: Fix reporting a line number for non-terminated pro +totypes (RT#133524) Fedora Patch45: Fix first eof() return value (RT#133721) Fedora Patch49: Prevent long jumps from clobbering local variables + (RT#133575) Fedora Patch50: Fix a mismatch with a case-insesitive regular expr +ession on a text with ligatures (RT#133756) Fedora Patch53: Fix setting magic when changing $^R (RT#133782) Fedora Patch54: Fix a race when loading XS modules Fedora Patch56: Fix a leak when compiling a typed hash dereference Fedora Patch58: Fix a buffer overread when handling a scope error +in qr/\(?{/ (RT#133879) Fedora Patch59: Fix a buffer overread when parsing a regular expre +ssion with an unknown character name (RT#133880) Fedora Patch60: Fix mbstate_t initialization in POSIX::mblen (RT#1 +33928) Fedora Patch61: Fix a memory leak when cloning a regular expressio +n Fedora Patch62: Fix a memory leak when spawning threads in a BEGIN + phase Fedora Patch63: Fix a memory leak when assigning a regular express +ion to a non-copy-on-write string Fedora Patch64: Fix a memory leak when assignig to a localized ${^ +WARNING_BITS} Fedora Patch65: Fix a memory leak when parsing misindented here-do +cuments Fedora Patch66: Fix a memory leak in package name lookup (RT#13397 +7) Fedora Patch68: Fix a memory leak when deletion in a tied hash die +s Fedora Patch69: Fix a crash when matching case insensitively (RT#1 +33892) Fedora Patch70: Fix a memory leak when warning about malformed UTF +-8 string Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder o +n Linux Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linu +x Built under linux Compiled at Apr 23 2019 08:44:49 %ENV: PERL5LIB="/home/john/perl5/lib/perl5:/home/john/perl5/lib/perl5" PERL_LOCAL_LIB_ROOT="/home/john/perl5:/home/john/perl5" PERL_MB_OPT="--install_base "/home/john/perl5"" PERL_MM_OPT="INSTALL_BASE=/home/john/perl5" @INC: /home/john/perl5/lib/perl5/x86_64-linux-thread-multi /home/john/perl5/lib/perl5 /home/john/perl5/lib/perl5/x86_64-linux-thread-multi /home/john/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5

      And here's the $PATH:

      /home/john/perl5/bin:./:/home/john/perl5/bin:./:/usr/lib64/qt-3.3/bin: +/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/john/bin +:/opt/go/bin:/home/john/.local/bin:/home/john/bin:/home/john/bin:/opt +/go/bin

      Thanks

        Here's the perl -V output

        It's quite different to what I was expecting
        That looks like a system perl, but it's in your home directory. How does that come about ?
        It also seems odd to me that an upgrade from Fedora 28 to Fedora 29 should touch anything that's in your home directory - yet it apparently has. (Not that I'm expert in linux in general or fedora in particular).

        Anyway - it does indeed demonstrate that you need to rebuild XML::Parser, as already recommended by others.
        Maybe cpan -fi XML::Parser will achieve that.

        Cheers,
        Rob
Re: Fedora 29 upgrade
by Paladin (Vicar) on Aug 07, 2019 at 20:59 UTC
    Fedora 28 came with Perl 5.26. Fedora 29 comes with Perl 5.28. The module (XML::Parser and any other XS modules) will need to be recompiled for the new version of Perl.

      Thanks for the quick reply. When I tried to recompile (using the cpan command "install XML::Parser", I got:

      XML::Parser is up to date (2.44)

      I am indeed running the v5.28.2 verions of Perl. Should I do something different to recompile XML::Parser?

        Try cpanm -U XML::Parser. That'll prompt you to remove the distribution. After that's done, try reinstalling as normal.

Re: Fedora 29 upgrade
by bliako (Monsignor) on Aug 08, 2019 at 09:36 UTC

    If you do not have perlbrew installed then this is a good time to install it. It is really simple to install and even simpler to tell it to fetch a perl you want, compile it (itself, not you) and switch to using it.

    In this way you leave system perl alone. There are a lot of system processes which depend on perl and possibly specific perl version. If you upgrade a package because a user needs it, then that system process can break. If you upgrade as root you override already existing versions. If you upgrade/install as user in your local dirs then the probability of damage is much less but you then depending on @INC and the paths order, you get this "unexplained" behaviour.

    The benefits of perlbrew (or any other similar "alternatives" system) are obvious and the procedure is painless, as it is the learning curve (none basically).

    If you must debug this issue, then try to get more information:

    perl -MXML::Parser::Expat -e 'print qq/success/'

    perl -MXML::Twig -e 'print qq/success/'

    perl -e 'print qq/@INC/'

    which perl

    which cpanm

    which cpan

    and finally find any Expat installations (may take some time):

    find / -type f -name 'Expat.so'

      Seconding this advice. The effort is more worth it when you're not scrambling because your application doesn't break when the OS' perl gets changed underneath it because the corporate IT people pushed a newer package to your systems without consulting you.

      Not that I speak from experience here or anything . . . *cough*

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.

        I am at the moment starting some fresh fedora install and I am doing just that with the additional twist that I want perlbrew-managed perls to be installed by superuser(=root) so that all users can use them without each installing their own. Additionally I want root to install a good deal of common modules (e.g. LWP) for all users. After that, if users need to install obscure modules in their own private/home dirs, it is up to them. Or they ask superuser to install it for everybody in public dir.

        I have found that this setup entails some danger.

        Because I do not want root to have in their login/startup script all those perlbrew-related variables. Perhaps that's a purist view but I opted for creating a script for root to use whenever is going to need to do perlbrew-housekeeping and not having that same commands in root's .bashrc. Something like:

        #!/bin/sh # this is bin/use-perlbrew.sh (not part of ~/.bashrc) export PERLBREW_ROOT=/opt/perlbrew export PERLBREW_HOME=${HOME}/.perlbrew source ${PERLBREW_ROOT}/etc/bashrc CMD="perlbrew use perl-5.30.0" echo "$0 : executing: ${CMD}" eval ${CMD} if [ $? -ne 0 ]; then echo "$0 : command has failed ${CMD}"; exit 1; f +i

        So, on login, root uses system perl and does not know about any perlbrew stuff. If root has to install perlbrew-wise modules then runs above script first (EDIT: via source ~/bin/use-perlbrew.sh). I find this cleaner than staffing root's .bashrc with tom, dick and harry.

        I am aware that perlbrew can manage the system perl as well with just a symlink - no need of re-installing it (thanks to https://stackoverflow.com/questions/25188575/switching-to-the-system-perl-using-perlbrew). So one can suggest adding the perlbrew variables+source in root's .bashrc and immediately after that add perlbrew use system.

        I suspect my dislike of that is cargo-culting. Anyone knows better? (I think I will SOPW this)

        45 min EDIT: gaining root access via plain su inherits all env vars from current shell. Which includes all the perlbrew variables the calling user had. su --login stops that and is the proper way to gain root access if not doing it from the login screen.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11104114]
Approved by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2022-07-06 01:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?