Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
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: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Maxim Koltsov
URL:
Whiteboard:
Keywords: PullRequest
: 736862 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-16 15:10 UTC by Toralf Förster
Modified: 2020-08-27 18:21 UTC (History)
10 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. ***