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