Re: [Libguestfs] [libguestfs/libguestfs] when compiling v1.40.2: rake aborted! (#40)
On Wed, Jun 26, 2019 at 05:38:28AM -0700, Samuel Bernardo wrote:
When compilling libguestfs 1.40.2 I receive the following linking error:
``` linking shared-object _guestfs.so /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: actions-1.o: in function `guestfs_int_ruby_f2fs_expand': actions-1.c:(.text+0x1521): undefined reference to `guestfs_f2fs_expand' /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: actions-2.o: in function `guestfs_int_ruby_lvm_scan': actions-2.c:(.text+0x2e80): undefined reference to `guestfs_lvm_scan' /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: actions-5.o: in function `guestfs_int_ruby_inspect_get_osinfo': actions-5.c:(.text+0x1d42): undefined reference to `guestfs_inspect_get_osinfo' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:259: _guestfs.so] Error 1 make[3]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.40.2/work/libguestfs-1.40.2/ruby/ext/guestfs' rake aborted! ```
Unclear - would need to see the complete build log to even begin to guess at what's going on here. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On 6/26/19 4:55 PM, Richard W.M. Jones wrote:
On Wed, Jun 26, 2019 at 05:38:28AM -0700, Samuel Bernardo wrote:
When compilling libguestfs 1.40.2 I receive the following linking error:
``` linking shared-object _guestfs.so /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: actions-1.o: in function `guestfs_int_ruby_f2fs_expand': actions-1.c:(.text+0x1521): undefined reference to `guestfs_f2fs_expand' /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: actions-2.o: in function `guestfs_int_ruby_lvm_scan': actions-2.c:(.text+0x2e80): undefined reference to `guestfs_lvm_scan' /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: actions-5.o: in function `guestfs_int_ruby_inspect_get_osinfo': actions-5.c:(.text+0x1d42): undefined reference to `guestfs_inspect_get_osinfo' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:259: _guestfs.so] Error 1 make[3]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.40.2/work/libguestfs-1.40.2/ruby/ext/guestfs' rake aborted! ``` Unclear - would need to see the complete build log to even begin to guess at what's going on here.
Rich.
I'm using Gentoo distribution and I lost the build log after compiling without ruby use flag. When compiling without ruby configure flag libguestfs finishes and works as expected, but without ruby support. I try to compile again with ruby use flag activated and it compiled now. When in compile phase it didn't uninstall the previous installed version without ruby flag. Cloud this mean that it is missing some dependency in include path when compiling ruby guestfs gem, since .so and .a of libguestfs were already installed? Just try to compile with configure --enable-ruby with a clean base system installation and the mentioned error happens. I leave in attachment the ebuild with the source code used to compile and install libguestfs, and also the applied patches. Thanks, Samuel
On Thu, Jun 27, 2019 at 11:01:20AM +0100, Samuel Bernardo wrote:
I try to compile again with ruby use flag activated and it compiled now. When in compile phase it didn't uninstall the previous installed version without ruby flag. Cloud this mean that it is missing some dependency in include path when compiling ruby guestfs gem, since .so and .a of libguestfs were already installed?
It's hard to say, but this is plausible. Could you encourage the author of this patch to submit it upstream? It's not quite complete since I think you will need some further changes to at least appliance/packagelist.in.
diff -Naur a/m4/guestfs-appliance.m4 b/m4/guestfs-appliance.m4 --- a/m4/guestfs-appliance.m4 2018-09-21 16:05:40.719638121 +0100 +++ b/m4/guestfs-appliance.m4 2018-11-21 23:46:42.371118647 +0000 @@ -108,6 +108,9 @@ [OPENSUSE | SLED | SLES],[DISTRO=SUSE], [ARCH],[DISTRO=ARCHLINUX]) AC_MSG_RESULT([$DISTRO (from /etc/os-release)]) + elif test -f /etc/gentoo-release; then + DISTRO=GENTOO + AC_MSG_RESULT([$DISTRO (from /etc/gentoo-release)]) else AC_MSG_ERROR([/etc/os-release not available, please specify the distro using --with-distro=DISTRO]) fi
Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
participants (2)
-
Richard W.M. Jones -
Samuel Bernardo