Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 703118 - app-emulation/libguestfs-1.38.6 : virt-sysprep: error while loading shared libraries: libcrypt.so.2: cannot open shared object file:
Summary: app-emulation/libguestfs-1.38.6 : virt-sysprep: error while loading shared li...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PullRequest
: 736862 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-16 15:10 UTC by Toralf Förster
Modified: 2021-06-16 23:29 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.04 KB, text/plain)
2019-12-16 15:10 UTC, Toralf Förster
Details
app-emulation:libguestfs-1.38.6:20191216-120905.log.bz2 (app-emulation:libguestfs-1.38.6:20191216-120905.log.bz2,44.43 KB, application/x-bzip)
2019-12-16 15:10 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,84.80 KB, text/plain)
2019-12-16 15:10 UTC, Toralf Förster
Details
environment (environment,170.85 KB, text/plain)
2019-12-16 15:10 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,12.04 KB, application/x-bzip)
2019-12-16 15:10 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,85.11 KB, application/x-bzip)
2019-12-16 15:10 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,84.11 KB, application/x-bzip)
2019-12-16 15:10 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2019-12-16 15:10:06 UTC
rm -f sysprep-extra-options.pod sysprep-extra-options.pod-t
../run virt-sysprep --dump-pod-options > sysprep-extra-options.pod-t
virt-sysprep: error while loading shared libraries: libcrypt.so.2: cannot open shared object file: No such file or directory
make[2]: *** [Makefile:2737: sysprep-extra-options.pod] Error 127
make[2]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.38.6/work/libguestfs-1.38.6/sysprep'
make[1]: *** [Makefile:2222: all-recursive] Error 1

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma_systemd-libressl-20191214-163313

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *

clang:
clang version 9.0.1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
llvm:
9.0.1
Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.6
  [3]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *

java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.13.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Mon, 16 Dec 2019 10:53:02 +0000

emerge -qpvO app-emulation/libguestfs
[ebuild  N    ] app-emulation/libguestfs-1.38.6  USE="fuse gtk ocaml perl -doc -erlang -inspect-icons -introspection -libvirt -lua -python -ruby (-selinux) -static-libs -systemtap -test" PYTHON_SINGLE_TARGET="python3_6 -python2_7 -python3_5" PYTHON_TARGETS="python2_7 python3_6 -python3_5"
Comment 1 Toralf Förster gentoo-dev 2019-12-16 15:10:09 UTC
Created attachment 599806 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-12-16 15:10:12 UTC
Created attachment 599808 [details]
app-emulation:libguestfs-1.38.6:20191216-120905.log.bz2
Comment 3 Toralf Förster gentoo-dev 2019-12-16 15:10:15 UTC
Created attachment 599810 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2019-12-16 15:10:18 UTC
Created attachment 599812 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2019-12-16 15:10:21 UTC
Created attachment 599814 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-12-16 15:10:24 UTC
Created attachment 599816 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2019-12-16 15:10:26 UTC
Created attachment 599818 [details]
temp.tbz2
Comment 8 Hank Leininger 2020-03-07 20:42:01 UTC
I ran into this after sys-libs/libxcrypt was upgraded from 2.4 to 4.x.

If you downgrade by emerge -1v =sys-libs/libxcrypt-2.4 first, then app-emulation/libguestfs-1.38.6 builds successfully.

I think this is because libxcrypt-4.x moved around where it dropped libraries, from /lib64/libxcrypt.so to /usr/lib64/xcrypt/libcrypt.so, without updating ld.so.conf.  IIRC the move was to avoid colliding with libcrypt.so provided by glibc.

There was a relevant gentoo-dev thread a few months ago, starting here:

https://marc.info/?l=gentoo-dev&m=157315635412793&w=4

I don't know if the right fix is for libguestfs to have dependency updates, or if newer stable (1.40.x) handles this any better, etc.
Comment 9 Eugene Shalygin 2020-05-03 14:52:29 UTC
app-emulation/libguestfs-1.38.6 can be built without sys-libs/libxcrypt installed.
Comment 10 Strong1983 2020-07-03 07:41:32 UTC
apparently It's not possible to build "app-emulation/libguestfs-1.38.6" whithout "sys-libs/libxcrypt" when you have activated the use flag "ocaml".

(In reply to Eugene Shalygin from comment 

#9)
> app-emulation/libguestfs-1.38.6 can be built without sys-libs/libxcrypt
> installed.
Comment 11 Strong1983 2020-07-03 09:36:50 UTC
(In reply to Hank Leininger from comment #8)
> I ran into this after sys-libs/libxcrypt was upgraded from 2.4 to 4.x.
> 
> If you downgrade by emerge -1v =sys-libs/libxcrypt-2.4 first, then
> app-emulation/libguestfs-1.38.6 builds successfully.
> 
> I think this is because libxcrypt-4.x moved around where it dropped
> libraries, from /lib64/libxcrypt.so to /usr/lib64/xcrypt/libcrypt.so,
> without updating ld.so.conf.  IIRC the move was to avoid colliding with
> libcrypt.so provided by glibc.
> 
> There was a relevant gentoo-dev thread a few months ago, starting here:
> 
> https://marc.info/?l=gentoo-dev&m=157315635412793&w=4
> 
> I don't know if the right fix is for libguestfs to have dependency updates,
> or if newer stable (1.40.x) handles this any better, etc.

Firstable let me say that I haven't experience using Makefiles.
I made the patches "/etc/portage/patches/app-emulation/libguestfs-1.38.6/ldPathsysprep-in.patch" and "/etc/portage/patches/app-emulation/libguestfs-1.38.6/ldPathsysprep-am.patch" with the following content:

---BOF-Do-not--include-this-line-in-the-file---------------------
--- libguestfs-1.38.6/sysprep/Makefile.in       2020-07-03 03:06:13.848360412 -0500
+++ libguestfs-1.38.6/sysprep/Makefile.in.new   2020-07-03 04:10:12.593041697 -0500
@@ -2734,12 +2734,12 @@

 @HAVE_OCAML_TRUE@sysprep-extra-options.pod: virt-sysprep
 @HAVE_OCAML_TRUE@      rm -f $@ $@-t
-@HAVE_OCAML_TRUE@      $(top_builddir)/run $< --dump-pod-options > $@-t
+@HAVE_OCAML_TRUE@      LD_LIBRARY_PATH=/usr/lib64/xcrypt $(top_builddir)/run $< --dump-pod-options > $@-t
 @HAVE_OCAML_TRUE@      mv $@-t $@

 @HAVE_OCAML_TRUE@sysprep-operations.pod: virt-sysprep
 @HAVE_OCAML_TRUE@      rm -f $@ $@-t
-@HAVE_OCAML_TRUE@      $(top_builddir)/run $< --dump-pod > $@-t
+@HAVE_OCAML_TRUE@      LD_LIBRARY_PATH=/usr/lib64/xcrypt $(top_builddir)/run $< --dump-pod > $@-t
 @HAVE_OCAML_TRUE@      mv $@-t $@

 @HAVE_OCAML_TRUE@check-valgrind:
---EOF-Do-not--include-this-line-in-the-file---------------------

---BOF-Do-not--include-this-line-in-the-file---------------------
--- libguestfs-1.38.6/sysprep/Makefile.am       2018-09-21 10:05:41.058638816 -0500
+++ libguestfs-1.38.6/sysprep/Makefile.am.new   2020-07-03 04:19:01.691961084 -0500
@@ -198,12 +198,12 @@

 sysprep-extra-options.pod: virt-sysprep
        rm -f $@ $@-t
-       $(top_builddir)/run $< --dump-pod-options > $@-t
+       LD_LIBRARY_PATH=/usr/lib64/xcrypt $(top_builddir)/run $< --dump-pod-options > $@-t
        mv $@-t $@

 sysprep-operations.pod: virt-sysprep
        rm -f $@ $@-t
-       $(top_builddir)/run $< --dump-pod > $@-t
+       LD_LIBRARY_PATH=/usr/lib64/xcrypt $(top_builddir)/run $< --dump-pod > $@-t
        mv $@-t $@

 # Tests.
---EOF-Do-not--include-this-line-in-the-file---------------------

I know that it's dirty, but it works!
Best regards.
Comment 12 SpikyAtLinux 2020-07-03 17:29:01 UTC
I´ve add the following code to /etc/ld.so.conf.d/99libguestfs.conf

/usr/lib64/xcrypt/

Then run

ldconfig;env-update

with this it builds without problems on my system

Regards
Comment 13 Rafael Kitover 2020-08-12 09:11:23 UTC
*** Bug 736862 has been marked as a duplicate of this bug. ***
Comment 14 Nikolay Kichukov 2020-10-12 14:10:31 UTC
(In reply to SpikyAtLinux from comment #12)
> I´ve add the following code to /etc/ld.so.conf.d/99libguestfs.conf
> 
> /usr/lib64/xcrypt/
> 
> Then run
> 
> ldconfig;env-update
> 
> with this it builds without problems on my system
> 
> Regards

Thanks, this allowed it to compile for me too.
Comment 15 Larry the Git Cow gentoo-dev 2021-03-13 16:14:35 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=865ff63a89b53de190d9ed9c7b8a4af920a0a25a

commit 865ff63a89b53de190d9ed9c7b8a4af920a0a25a
Author:     Hank Leininger <hlein@korelogic.com>
AuthorDate: 2021-01-24 01:37:21 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-03-13 16:13:44 +0000

    app-emulation/libguestfs: libxcrypt fix, restore and update py3, cleanup
    
    Current version won't build with libxcrypt 4.x, which has been
    stabilized. Added workaround. Also restored and bumped supported
    Python versions. Removed libguestfs-1.36 because it has been
    unbuildable ever since libguestfs-appliance-1.36 was removed in
    d0c2104377b00b4b6b029ba2e6390a00c58057b2.
    
    Signed-off-by: Hank Leininger <hlein@korelogic.com>
    Closes: https://bugs.gentoo.org/703118
    Bug: https://bugs.gentoo.org/734634
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Closes: https://github.com/gentoo/gentoo/pull/16965
    Signed-off-by: Sam James <sam@gentoo.org>

 app-emulation/libguestfs/Manifest                  |   1 -
 .../libguestfs/files/1.28/0000_bug_499150.patch    |  10 --
 .../1.28/0001_add_gentoo_names_to_configure.patch  |  15 --
 .../0002_add_gentooway_to_remove_la_files.patch    |  16 --
 ...gtk_docs_in_broken_autotools-utils-eclass.patch |  21 ---
 .../1.28/0103_disable_php_bindings_makefile.patch  |  13 --
 .../1.36/0001-Update-libtool-initialization.patch  |  29 ----
 ...port-for-Gentoo-in-distribution-detection.patch |  25 ---
 ...-failure-when-not-built-with-OCaml-suppor.patch |  40 -----
 ...ound-autotools-utils-detection-of-gtk-doc.patch |  42 -----
 ...build-time-requirement-on-bash-completion.patch |  45 ------
 .../libguestfs/libguestfs-1.36.15-r2.ebuild        | 175 ---------------------
 ...6-r102.ebuild => libguestfs-1.38.6-r103.ebuild} |  15 +-
 13 files changed, 11 insertions(+), 436 deletions(-)