Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 638180 - app-emulation/libguestfs-1.36.5: guestfs_protocol.h:9:21: fatal error: rpc/rpc.h: No such file or directory
Summary: app-emulation/libguestfs-1.36.5: guestfs_protocol.h:9:21: fatal error: rpc/rp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Maxim Koltsov (RETIRED)
URL:
Whiteboard: ~arch only
Keywords:
Depends on:
Blocks: glibc-rpc
  Show dependency tree
 
Reported: 2017-11-19 20:26 UTC by Maciej Piechotka
Modified: 2018-08-22 14:40 UTC (History)
7 users (show)

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


Attachments
Build log (app-emulation:libguestfs-1.36.5:20171119-201929.log.gz,51.52 KB, application/gzip)
2017-11-19 20:26 UTC, Maciej Piechotka
Details
libguestfs-1.36.11.ebuild (libguestfs-1.36.11.ebuild,3.79 KB, text/plain)
2017-12-12 01:02 UTC, Samuel Bernardo
Details
rpc patch (libguestfs-1.36.11-rpc.patch,3.29 KB, patch)
2017-12-19 11:26 UTC, Samuel Bernardo
Details | Diff
build log libguestfs-1.36.11 (build.log.tar.gz,50.09 KB, application/gzip)
2017-12-19 11:29 UTC, Samuel Bernardo
Details
emerge --info (info.txt,28.03 KB, text/plain)
2017-12-23 14:54 UTC, Denis Descheneaux
Details
libguestfs-1.37.35.ebuild (libguestfs-1.37.35.ebuild,3.83 KB, text/plain)
2018-01-21 14:03 UTC, Samuel Bernardo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Piechotka 2017-11-19 20:26:44 UTC
Created attachment 505008 [details]
Build log

Probably a missing dependency.

libtool: link: x86_64-pc-linux-gnu-ar cru .libs/liberrnostring.a .libs/liberrnostring_la-errnostring-gperf.o .libs/liberrnostring_la-errnostring.o 
libtool: link: x86_64-pc-linux-gnu-ranlib .libs/liberrnostring.a
libtool: link: ( cd ".libs" && rm -f "liberrnostring.la" && ln -s "../liberrnostring.la" "liberrnostring.la" )
make[3]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.36.5/work/libguestfs-1.36.5/common/errnostring'
make[2]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.36.5/work/libguestfs-1.36.5/common/errnostring'
Making all in common/protocol
make[2]: Entering directory '/var/tmp/portage/app-emulation/libguestfs-1.36.5/work/libguestfs-1.36.5/common/protocol'
make  all-am
make[3]: Entering directory '/var/tmp/portage/app-emulation/libguestfs-1.36.5/work/libguestfs-1.36.5/common/protocol'
/bin/sh ../../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../..    -Wall -Wno-unused -fno-strict-aliasing -fvisibility=hidden -O2 -march=native -pipe -ggdb -Wa,--compress-debug-sections -fgcse-sm -fgcse-las -fgcse-after-reload -fno-strict-overflow -Wno-strict-overflow -c -o libprotocol_la-guestfs_protocol.lo `test -f 'guestfs_protocol.c' || echo './'`guestfs_protocol.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -Wall -Wno-unused -fno-strict-aliasing -fvisibility=hidden -O2 -march=native -pipe -ggdb -Wa,--compress-debug-sections -fgcse-sm -fgcse-las -fgcse-after-reload -fno-strict-overflow -Wno-strict-overflow -c guestfs_protocol.c  -fPIC -DPIC -o .libs/libprotocol_la-guestfs_protocol.o
In file included from guestfs_protocol.c:6:0:
guestfs_protocol.h:9:21: fatal error: rpc/rpc.h: No such file or directory
 #include <rpc/rpc.h>
                     ^
compilation terminated.
make[3]: *** [Makefile:1742: libprotocol_la-guestfs_protocol.lo] Error 1
make[3]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.36.5/work/libguestfs-1.36.5/common/protocol'
make[2]: *** [Makefile:1656: all] Error 2
make[2]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.36.5/work/libguestfs-1.36.5/common/protocol'
make[1]: *** [Makefile:1954: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.36.5/work/libguestfs-1.36.5'
make: *** [Makefile:1863: all] Error 2

Portage 2.3.14 (python 3.4.6-final-0, hardened/linux/amd64/systemd, gcc-6.3.0, glibc-2.26-r3, 4.13.5-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.13.5-gentoo-x86_64-Intel-R-_Core-TM-_i7-5820K_CPU_@_3.30GHz-with-gentoo-2.4.1
KiB Mem:    32841260 total,   3108036 free
KiB Swap:   67108860 total,  67104508 free
Timestamp of repository gentoo: Sun, 19 Nov 2017 19:50:19 +0000
Head commit of repository gentoo: 6769aa8a69b26fd3005b1183bd8065d504e13eef

sh bash 4.4_p12
ld GNU ld (Gentoo 2.28 p1.2) 2.28
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.6-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.8::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.28-r2::gentoo, 2.28.1::gentoo, 2.29::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.3.0::gentoo, 6.4.0::gentoo
sys-devel/gcc-config:     1.9.0::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: git://anongit.gentoo.org/repo/sync/gentoo.git
    priority: -1000

haskell
    location: /var/lib/layman/haskell
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -ggdb -Wa,--compress-debug-sections -fgcse-sm -fgcse-las -fgcse-after-reload"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe -ggdb -Wa,--compress-debug-sections -fgcse-sm -fgcse-las -fgcse-after-reload"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j13 --load-average=12"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=both -Wl,--sort-common -Wl,--no-keep-memory"
MAKEOPTS="-j13 -l12"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl amd64 avahi berkdb bzip2 clang cli cracklib crossdev crypt cuda cxx dbus dri emacs gdbm git gles2 graphite hardened iconv ipv6 jit justify mmx modules multilib ncurses nls nptl opencl opengl openmp pam pcre pie readline seccomp sensord session sse sse2 ssl ssp systemd tcpd udev unicode urandom usb wayland xattr xcb xkb xlib-xcb xtpax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-emulation/libguestfs-1.36.5::gentoo was built with the following:
USE="fuse ocaml perl -bash-completion -debug -doc -erlang -gtk -inspect-icons -introspection -lua -python -ruby (-selinux) -static-libs -systemtap -test" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_4 -python2_7 -python3_5" PYTHON_TARGETS="python2_7 python3_4 -python3_5"
Comment 1 Solly Ross 2017-11-22 00:35:39 UTC
looks like it's an instance of the removal of rpc from glibc: https://bugs.gentoo.org/381391
Comment 2 Richard Jones 2017-11-23 18:58:35 UTC
We should work with libtirpc, but recently a bug was reported where
some flags were missing and you might have got compilation errors
even if libtirpc was installed.  The simple fix for that is:

https://github.com/libguestfs/libguestfs/commit/946d5bf8d47b3129dbfd8d848ba53ce3be0b6bd8
Comment 3 Samuel Bernardo 2017-12-06 20:26:57 UTC
Unfortunately the suggested patch didn't solve the rpc.h in my case:

make[3]: Entering directory '/var/tmp/portage/app-emulation/libguestfs-1.36.5/work/libguestfs-1.36.5/common/protocol'
/bin/sh ../../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../..    -Wall -Wno-unused -fno-strict-aliasing -fvisibility=hidden  -O2 -pipe -march=native -fno-strict-overflow -Wno-strict-overflow -c -o libprotocol_la-guestfs_protocol.lo `test -f 'guestfs_protocol.c' || echo './'`guestfs_protocol.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -Wall -Wno-unused -fno-strict-aliasing -fvisibility=hidden -O2 -pipe -march=native -fno-strict-overflow -Wno-strict-overflow -c guestfs_protocol.c  -fPIC -DPIC -o .libs/libprotocol_la-guestfs_protocol.o
In file included from guestfs_protocol.c:6:0:
guestfs_protocol.h:9:21: fatal error: rpc/rpc.h: No such file or directory
 #include <rpc/rpc.h>
                     ^
compilation terminated.

Any suggestions?

Thanks
Comment 4 Samuel Bernardo 2017-12-06 20:53:34 UTC
(In reply to Samuel Bernardo from comment #3)
> Unfortunately the suggested patch didn't solve the rpc.h in my case:
> 
> make[3]: Entering directory
> '/var/tmp/portage/app-emulation/libguestfs-1.36.5/work/libguestfs-1.36.5/
> common/protocol'
> /bin/sh ../../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc
> -DHAVE_CONFIG_H -I. -I../..    -Wall -Wno-unused -fno-strict-aliasing
> -fvisibility=hidden  -O2 -pipe -march=native -fno-strict-overflow
> -Wno-strict-overflow -c -o libprotocol_la-guestfs_protocol.lo `test -f
> 'guestfs_protocol.c' || echo './'`guestfs_protocol.c
> libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -Wall
> -Wno-unused -fno-strict-aliasing -fvisibility=hidden -O2 -pipe -march=native
> -fno-strict-overflow -Wno-strict-overflow -c guestfs_protocol.c  -fPIC -DPIC
> -o .libs/libprotocol_la-guestfs_protocol.o
> In file included from guestfs_protocol.c:6:0:
> guestfs_protocol.h:9:21: fatal error: rpc/rpc.h: No such file or directory
>  #include <rpc/rpc.h>
>                      ^
> compilation terminated.
> 
> Any suggestions?
> 
> Thanks

I'm using linux-headers-4.9 with gentoo-sources-4.9. I'm also using glibc-2.26.
I know that rpc.h was removed from the sources above.
Anyone knows how rpc.h dependency should be corrected?
Comment 5 Richard Jones 2017-12-06 21:08:59 UTC
You'll need also
https://github.com/libguestfs/libguestfs/commit/4bbb1f74901667be4aa8fe0a83662cf16c4c3b0a

I've cherry-picked both patches on to stable-1.36:

https://github.com/libguestfs/libguestfs/commits/stable-1.36

However I didn't test if it works because I'm still using
the old glibc.
Comment 6 Samuel Bernardo 2017-12-10 23:04:24 UTC
(In reply to Richard Jones from comment #5)
> You'll need also
> https://github.com/libguestfs/libguestfs/commit/
> 4bbb1f74901667be4aa8fe0a83662cf16c4c3b0a
> 
> I've cherry-picked both patches on to stable-1.36:
> 
> https://github.com/libguestfs/libguestfs/commits/stable-1.36
> 
> However I didn't test if it works because I'm still using
> the old glibc.

Thanks Richard Jones for your help.

libguestfs compiled with the following error for glibc-2.26 with both patches for the 1.36.5 version:

In file included from visit-c.c:34:0:
../lib/guestfs-internal.h:32:69: fatal error: rpc/types.h: No such file or directory
 #include <rpc/types.h>  /* Needed on libc's different than glibc. */
                                                                     ^
compilation terminated.
make[2]: *** [Makefile:2388: libmllib_a-visit-c.o] Error 1
Comment 7 Richard Jones 2017-12-11 07:43:31 UTC
Can you first try the stable-1.36 branch or libguestfs 1.36.11.
1.36.5 is a very old and buggy version, and moving to the new
stable version on the same branch only fixes bugs.
Comment 8 Samuel Bernardo 2017-12-12 01:00:55 UTC
(In reply to Richard Jones from comment #7)
> Can you first try the stable-1.36 branch or libguestfs 1.36.11.
> 1.36.5 is a very old and buggy version, and moving to the new
> stable version on the same branch only fixes bugs.

Thanks again.
I just created ebuild for 1.36.11 with same code of ebuild 1.36.5. Unfortunately compile error remains:

ocamlfind ocamlc -g -annot -safe-string -warn-error CDEFLMPSUVYZX-3 -package str,unix -I ../common/utils/.libs -I ../lib/.libs -I ../gnulib/lib/.libs -I ../ocaml -I . -package gettext-stub -c URI.mli -o URI.cmi
ocamlfind ocamlc -g -annot -safe-string -warn-error CDEFLMPSUVYZX-3 -package str,unix -I ../common/utils/.libs -I ../lib/.libs -I ../gnulib/lib/.libs -I ../ocaml -I . -package gettext-stub -c visit.mli -o visit.cmi
In file included from visit-c.c:34:0:
../lib/guestfs-internal.h:32:69: fatal error: rpc/types.h: No such file or directory
 #include <rpc/types.h>  /* Needed on libc's different than glibc. */
                                                                     ^
compilation terminated.
ocamlfind ocamlc -g -annot -safe-string -warn-error CDEFLMPSUVYZX-3 -package str,unix -I ../common/utils/.libs -I ../lib/.libs -I ../gnulib/lib/.libs -I ../ocaml -I . -package gettext-stub -c planner.mli -o planner.cmi
make[2]: *** [Makefile:2428: libmllib_a-visit-c.o] Error 1

I'll push it to my overlay and so will be available in https://gpo.zugaina.org/ for anyone who needs to test it, since most recent version present in portage is 1.36.5.

I'll leave here in attachment the ebuild.

I also review the code and mabe the problem is in Makefile, because there is no -ltirpc flag in compilation for visit-c.c:

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../gnulib/lib -I../gnulib/lib -I/usr/lib64/ocaml -I../common/utils -I../lib -I../common/visit -I../common/options -I../common/progress  -fno-common -
W -Wabi -Waddress -Waggressive-loop-optimizations -Wall -Wattributes -Wbad-function-cast -Wbool-compare -Wbuiltin-macro-redefined -Wchar-subscripts -Wchkp -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -W
cpp -Wdate-time -Wdeprecated -Wdeprecated-declarations -Wdesignated-init -Wdisabled-optimization -Wdiscarded-array-qualifiers -Wdiscarded-qualifiers -Wdiv-by-zero -Wdouble-promotion -Wduplicated-cond -Wempty-bo
dy -Wendif-labels -Wenum-compare -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-signedness -Wformat-y2k -Wformat-zero-length -Wframe-address -Wfree-nonheap-obje
ct -Whsa -Wignored-attributes -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Winit-self -Wint-conversion -Wint-to-pointer-cast -Winvalid-memory-mode
l -Winvalid-pch -Wjump-misses-init -Wlogical-not-parentheses -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmemset-transposed-args -Wmisleading-indentation -Wmissing-braces -Wmissing-declarations -Wmissing-field-i
nitializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-prototypes -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull -Wnonnull-compare -Wnull-dereference -Wodr -Wold-style-declaration -Wold-style
-definition -Wopenmp-simd -Woverflow -Woverride-init -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wreturn-local-addr -Wreturn-type -Wscalar-stor
age-order -Wsequence-point -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wsizeof-array-argument -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-overflow -Wstrict-prototypes -Wsugge
st-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-final-methods -Wsuggest-final-types -Wswitch -Wswitch-bool -Wsync-nand -Wtautological-compare -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -
Wunknown-pragmas -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-macros -Wunused-parameter -Wunused-result -Wunused-value -Wunused
-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvolatile-register-var -Wwrite-strings -Warray-bounds=2 -Wnormalized=nfc -Wshift-overflow=2 -Wunused-const-variable=2 -Wno-unused-parameter-
Wno-missing-field-initializers -fdiagnostics-show-option -Wframe-larger-than=5000 -Wstack-usage=10000   -I/usr/include/libxml2 -fPIC -O2 -pipe -march=native -fno-strict-overflow -Wno-strict-overflow -c -o libml
lib_a-visit-c.o `test -f 'visit-c.c' || echo './'`visit-c.c
Comment 9 Samuel Bernardo 2017-12-12 01:02:49 UTC
Created attachment 509556 [details]
libguestfs-1.36.11.ebuild
Comment 10 Richard Jones 2017-12-12 20:51:10 UTC
The "problem" here is that glibc on Fedora is the new version
but they still seem to be shipping rpc headers, so it's tricky
to reproduce here.  I think it may be best if you can suggest a
patch.  It should be a matter of adding $(RPC_CFLAGS) in a few
places.
Comment 11 Samuel Bernardo 2017-12-12 22:04:31 UTC
(In reply to Richard Jones from comment #10)
> The "problem" here is that glibc on Fedora is the new version
> but they still seem to be shipping rpc headers, so it's tricky
> to reproduce here.  I think it may be best if you can suggest a
> patch.  It should be a matter of adding $(RPC_CFLAGS) in a few
> places.

Thanks again. I'll do that.
Comment 12 Samuel Bernardo 2017-12-19 11:23:57 UTC
I created a patch for libguestfs-1.36.11 to use with glibc-2.26 and profile 17, but the following error remains in linkage:

/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-emulation/libguestfs-1.36.11/work/libguestfs-1.36.11/lib/.libs/libguestfs.so: undefined reference to symbol 'xdr_bool@@TIRPC_0.3.0'
/lib64/libtirpc.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:2221: guestfish] Error 1
make[3]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.36.11/work/libguestfs-1.36.11/fish'
make[2]: *** [Makefile:2118: all] Error 2
make[2]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.36.11/work/libguestfs-1.36.11/fish'
make[1]: *** [Makefile:1994: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.36.11/work/libguestfs-1.36.11'

I'll leave in attachment build.log and patch applied in ebuild.
Comment 13 Samuel Bernardo 2017-12-19 11:26:06 UTC
Created attachment 510966 [details, diff]
rpc patch

Patch for libguestfs-1.36.11.ebuild left here in attachment.
Comment 14 Samuel Bernardo 2017-12-19 11:29:50 UTC
Created attachment 510970 [details]
build log libguestfs-1.36.11

Build log for libguestfs-1.36.11 with rpc patch.
Comment 15 Samuel Bernardo 2017-12-19 11:33:29 UTC
This maybe related with the link error mentioned before:
https://stackoverflow.com/questions/19901934/strange-linking-error-dso-missing-from-command-line

I'll be glad for your help.
Comment 16 Denis Descheneaux 2017-12-23 14:00:55 UTC
With the 1.36.11 ebuild + rpc patch i get further but it does ofc block not much further down the line, its been impossible for me to get this package to emerge for almost a year now, if its not for one reason it simply fails into new innovative ways but simply will not merge regardless.

Would it even be possible to create a binary version of that package so everything could be built precisely with what it needs and we could be done with the endless reasons why its not possible to build this package from source...


libtool: link: x86_64-pc-linux-gnu-gcc -fno-common -W -Wabi -Waddress -Waggressive-loop-optimizations -Wall -Wattributes -Wbad-function-cast -Wbool-compare -Wbool-operation -Wbuiltin-declaration-mismatch -Wbuiltin-macro-redefined -Wchar-subscripts -Wchkp -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdangling-else -Wdate-time -Wdeprecated -Wdeprecated-declarations -Wdesignated-init -Wdisabled-optimization -Wdiscarded-array-qualifiers -Wdiscarded-qualifiers -Wdiv-by-zero -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wduplicate-decl-specifier -Wempty-body -Wendif-labels -Wenum-compare -Wexpansion-to-defined -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-signedness -Wformat-y2k -Wformat-zero-length -Wframe-address -Wfree-nonheap-object -Whsa -Wignored-attributes -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Winit-self -Wint-conversion -Wint-in-bool-context -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wjump-misses-init -Wlogical-not-parentheses -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args -Wmisleading-indentation -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-prototypes -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull -Wnonnull-compare -Wnull-dereference -Wodr -Wold-style-declaration -Wold-style-definition -Wopenmp-simd -Woverflow -Woverride-init -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-compare -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wrestrict -Wreturn-local-addr -Wreturn-type -Wscalar-storage-order -Wsequence-point -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wsizeof-array-argument -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-overflow -Wstrict-prototypes -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-final-methods -Wsuggest-final-types -Wswitch -Wswitch-bool -Wswitch-unreachable -Wsync-nand -Wtautological-compare -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-macros -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvolatile-register-var -Wwrite-strings -Walloc-size-larger-than=9223372036854775807 -Warray-bounds=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wnormalized=nfc -Wshift-overflow=2 -Wstringop-overflow=2 -Wunused-const-variable=2 -Wno-unused-parameter -Wno-missing-field-initializers -fdiagnostics-show-option -Wframe-larger-than=5000 -Wstack-usage=10000 -Wimplicit-fallthrough=4 -Wformat-truncation=1 -march=sandybridge -O2 -ftree-vectorize -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -pipe -fno-strict-overflow -Wno-strict-overflow -Wl,-O1 -fuse-ld=gold -o .libs/display-icon display_icon-display-icon.o  -Wl,--as-needed ../lib/.libs/libguestfs.so -lpcre -lmagic -lvirt -lxml2 -lselinux -lyajl -lfuse -pthread
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_uint32_t'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_free'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdrstdio_create'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_string'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_int64_t'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_u_int'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_uint64_t'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_int'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_opaque'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_float'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_char'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_bytes'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_array'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_pointer'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_bool'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_enum'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdrmem_create'
collect2: error: ld returned 1 exit status
../lib/.libs/libguestfs.so: error: undefined reference to 'xdrmem_create'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_uint32_t'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_string'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_int64_t'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_u_int'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_uint64_t'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_int'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_opaque'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_float'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_char'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_bytes'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_array'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_pointer'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_bool'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_enum'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_free'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdrstdio_create'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1947: debug-logging] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1943: create-disk] Error 1
libtool: link: x86_64-pc-linux-gnu-gcc -fno-common -W -Wabi -Waddress -Waggressive-loop-optimizations -Wall -Wattributes -Wbad-function-cast -Wbool-compare -Wbool-operation -Wbuiltin-declaration-mismatch -Wbuiltin-macro-redefined -Wchar-subscripts -Wchkp -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdangling-else -Wdate-time -Wdeprecated -Wdeprecated-declarations -Wdesignated-init -Wdisabled-optimization -Wdiscarded-array-qualifiers -Wdiscarded-qualifiers -Wdiv-by-zero -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wduplicate-decl-specifier -Wempty-body -Wendif-labels -Wenum-compare -Wexpansion-to-defined -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-signedness -Wformat-y2k -Wformat-zero-length -Wframe-address -Wfree-nonheap-object -Whsa -Wignored-attributes -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Winit-self -Wint-conversion -Wint-in-bool-context -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wjump-misses-init -Wlogical-not-parentheses -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args -Wmisleading-indentation -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-prototypes -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull -Wnonnull-compare -Wnull-dereference -Wodr -Wold-style-declaration -Wold-style-definition -Wopenmp-simd -Woverflow -Woverride-init -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-compare -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wrestrict -Wreturn-local-addr -Wreturn-type -Wscalar-storage-order -Wsequence-point -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wsizeof-array-argument -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-overflow -Wstrict-prototypes -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-final-methods -Wsuggest-final-types -Wswitch -Wswitch-bool -Wswitch-unreachable -Wsync-nand -Wtautological-compare -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-macros -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvolatile-register-var -Wwrite-strings -Walloc-size-larger-than=9223372036854775807 -Warray-bounds=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wnormalized=nfc -Wshift-overflow=2 -Wstringop-overflow=2 -Wunused-const-variable=2 -Wno-unused-parameter -Wno-missing-field-initializers -fdiagnostics-show-option -Wframe-larger-than=5000 -Wstack-usage=10000 -Wimplicit-fallthrough=4 -Wformat-truncation=1 -march=sandybridge -O2 -ftree-vectorize -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -pipe -fno-strict-overflow -Wno-strict-overflow -Wl,-O1 -fuse-ld=gold -o .libs/inspect-vm inspect_vm-inspect-vm.o  -Wl,--as-needed ../lib/.libs/libguestfs.so -lpcre -lmagic -lvirt -lxml2 -lselinux -lyajl -lfuse -pthread
../lib/.libs/libguestfs.so: error: undefined reference to 'xdrmem_create'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_uint32_t'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_free'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdrstdio_create'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_string'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_int64_t'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_u_int'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_uint64_t'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_int'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_opaque'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_float'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_char'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_bytes'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_array'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_pointer'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_bool'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_enum'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1951: display-icon] Error 1
../lib/.libs/libguestfs.so: error: undefined reference to 'xdrmem_create'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_uint32_t'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_string'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_int64_t'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_u_int'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_uint64_t'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_int'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_opaque'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_float'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_char'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_array'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_pointer'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_bool'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_enum'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdrstdio_create'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_free'
../lib/.libs/libguestfs.so: error: undefined reference to 'xdr_bytes'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1955: inspect-vm] Error 1
make[2]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.36.11/work/libguestfs-1.36.11/examples'
make[1]: *** [Makefile:1994: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.36.11/work/libguestfs-1.36.11'
make: *** [Makefile:1903: all] Error 2
 * ERROR: app-emulation/libguestfs-1.36.11::maolang failed (compile phase):
 *   emake failed
Comment 17 Richard Jones 2017-12-23 14:46:02 UTC
It looks as if you will also need to add $(RPC_LIBS) to the link line in
Makefile.am.  I don't have a machine that I can reproduce this problem
on, hence difficult to suggest a working patch ...
Comment 18 Denis Descheneaux 2017-12-23 14:52:53 UTC
Well finally got this package to build....

First checking which version is latest here
http://download.libguestfs.org/1.37-development/

making a copy from
libguestfs-1.36.11.ebuild --> libguestfs-1.37.35.ebuild

Removing previous rpc.patch from /etc/portage/patches/app-emulation/libguestfs

Removing any previous patches usage from the ebuild to not look in files/1.37

src_prepare() {
- 	eapply "${FILESDIR}"/${MY_PV_1}
+# 	eapply "${FILESDIR}"/${MY_PV_1}

Then emerging it successfully


...
...
>>> app-emulation/libguestfs-1.37.35 merged.
>>> Regenerating /etc/ld.so.cache...

 * Messages for package app-emulation/libguestfs-1.37.35:

 * Package:    app-emulation/libguestfs-1.37.35
 * Repository: maolang
 * Maintainer: maksbotan@gentoo.org rich@annexia.org
 * USE:        abi_x86_64 amd64 bash-completion doc elibc_glibc erlang fuse inspect-icons introspection kernel_linux lua perl python python_single_target_python3_5 python_targets_python3_5 ruby selinux systemtap userland_GNU
 * FEATURES:   preserve-libs sandbox selinux sesandbox userpriv usersandbox
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/4.14.8-gentoo-r1/build
 * Found sources for kernel version:
 *     4.14.8-gentoo-r1
 * Checking for suitable kernel configuration options...
 * Running eautoreconf in '/var/tmp/portage/app-emulation/libguestfs-1.37.35/work/libguestfs-1.37.35' ...
 * Running libtoolize --install --copy --force --automake ...
 * Running aclocal -I m4 ...
 * Running autoconf --force ...
 * Running autoheader ...
 * Running automake --add-missing --copy --foreign --force-missing ...
 * emake OTHERLDFLAGS=-Wl,-O1 -Wl,--as-needed -fuse-ld=gold
 * QA Notice: make jobserver unavailable:
 * 
 * 	make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
 * Sorry, but libguestfs does not support the LINGUAS: fr_FR fr_FR.utf-8 en en_US en_US.UTF-8 de_DE de_DE.utf-8 ru_RU ru_RU.utf-8
 * Final size of build directory: 281540 KiB (274.9 MiB)
 * Final size of installed tree:   69504 KiB ( 67.8 MiB)
 * virt-p2v NOT installed
 * QA Notice: This ebuild installs into the following deprecated directories:
 * 
 *   usr/man
 * 
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
Comment 19 Denis Descheneaux 2017-12-23 14:54:41 UTC
Created attachment 511548 [details]
emerge --info
Comment 21 Maciej Piechotka 2018-01-16 04:41:20 UTC
(In reply to Richard Jones from comment #20)
> I think I have now reproduced the problem.
> 
> Does it work if you add all of the following patches?

It seems to at least compile.
Comment 22 Samuel Bernardo 2018-01-21 14:02:22 UTC
Denis Descheneaux, thanks for sharing the solution with develop version of libguestfs.
I created an ebuild for version 1.37.35 following your advises, but with a little difference: test if directory is empty, if not don't apply anything.
I published the ebuild in my overlay and I will leave it here in attachment.

Anyway, without applying any patches, for profile 17.0 with glibc-2.26 keyword unmasked, I have the following error:

 /R_X86_64_32usr /againstlib /symbolgcc /`x86_64caml_backtrace_last_exn-'pc -canlinux -notgnu /be6.4.0 /used. .when/ .making. /a. .shared/ .object.collect2: error: ld returned 1 exit status

lib64//usrocaml//liblibasmrun.a/(gccmd5.o/)x86_64:- pcwarning-:linux -relocationgnu /6.4.0against/ .`.memcpy/@.@.GLIBC_2.14/'. .in/ .readonly. /sectionx86_64 -`pc.-textlinux'-
gnu//usrbin//libld/:gcc /finalx86_64 -linkpc -failedlinux:- gnuNonrepresentable/ 6.4.0section/ .on. /output.
./../../x86_64-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
File "caml_startup", line 1:
Error: Error during linking
File "caml_startup", line 1:
Error: Error during linking
make[2]: *** [Makefile:1991: debug_logging] Error 2
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1995: inspect_vm] Error 2
make[2]: *** [Makefile:1987: create_disk] Error 2
make[2]: Leaving directory '/var/tmp/portage/app-emulation/libguestfs-1.37.35/work/libguestfs-1.37.35/ocaml/examples'
make[1]: *** [Makefile:2212: all-recursive] Error 1

Since the error is related to ocaml I think that it could depend on the ocaml compiler itself. libguestfs now binded to ocaml and so is not possible to disable ocaml use flag.
I already try to keyword unmask ocaml to 4.05 and it didn't solve the linkage error above.

(In reply to Denis Descheneaux from comment #18)
> Well finally got this package to build....
> 
> First checking which version is latest here
> http://download.libguestfs.org/1.37-development/
> 
> making a copy from
> libguestfs-1.36.11.ebuild --> libguestfs-1.37.35.ebuild
> 
> Removing previous rpc.patch from
> /etc/portage/patches/app-emulation/libguestfs
> 
> Removing any previous patches usage from the ebuild to not look in files/1.37
> 
> src_prepare() {
> - 	eapply "${FILESDIR}"/${MY_PV_1}
> +# 	eapply "${FILESDIR}"/${MY_PV_1}
> 
> Then emerging it successfully
> 
> 
> ...
> ...
> >>> app-emulation/libguestfs-1.37.35 merged.
> >>> Regenerating /etc/ld.so.cache...
> 
>  * Messages for package app-emulation/libguestfs-1.37.35:
> 
>  * Package:    app-emulation/libguestfs-1.37.35
>  * Repository: maolang
>  * Maintainer: maksbotan@gentoo.org rich@annexia.org
>  * USE:        abi_x86_64 amd64 bash-completion doc elibc_glibc erlang fuse
> inspect-icons introspection kernel_linux lua perl python
> python_single_target_python3_5 python_targets_python3_5 ruby selinux
> systemtap userland_GNU
>  * FEATURES:   preserve-libs sandbox selinux sesandbox userpriv usersandbox
>  * Determining the location of the kernel source code
>  * Found kernel source directory:
>  *     /usr/src/linux
>  * Found kernel object directory:
>  *     /lib/modules/4.14.8-gentoo-r1/build
>  * Found sources for kernel version:
>  *     4.14.8-gentoo-r1
>  * Checking for suitable kernel configuration options...
>  * Running eautoreconf in
> '/var/tmp/portage/app-emulation/libguestfs-1.37.35/work/libguestfs-1.37.35'
> ...
>  * Running libtoolize --install --copy --force --automake ...
>  * Running aclocal -I m4 ...
>  * Running autoconf --force ...
>  * Running autoheader ...
>  * Running automake --add-missing --copy --foreign --force-missing ...
>  * emake OTHERLDFLAGS=-Wl,-O1 -Wl,--as-needed -fuse-ld=gold
>  * QA Notice: make jobserver unavailable:
>  * 
>  * 	make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent
> make rule.
>  * Sorry, but libguestfs does not support the LINGUAS: fr_FR fr_FR.utf-8 en
> en_US en_US.UTF-8 de_DE de_DE.utf-8 ru_RU ru_RU.utf-8
>  * Final size of build directory: 281540 KiB (274.9 MiB)
>  * Final size of installed tree:   69504 KiB ( 67.8 MiB)
>  * virt-p2v NOT installed
>  * QA Notice: This ebuild installs into the following deprecated directories:
>  * 
>  *   usr/man
>  * 
> >>> Auto-cleaning packages...
> 
> >>> No outdated packages were found on your system.
> 
>  * GNU info directory index is up-to-date.
Comment 23 Samuel Bernardo 2018-01-21 14:03:49 UTC
Created attachment 515644 [details]
libguestfs-1.37.35.ebuild
Comment 24 Richard Jones 2018-01-21 14:21:50 UTC
Can you compile with ‘-j1’ so we can see the full, uncorrupted error message?

Anyway it seems like these errors come from use of ‘-fvisibility=hidden’ (although it's more likely that something else in the system has been miscompiled) so you could try removing that as a workaround:

https://github.com/libguestfs/libguestfs/blob/master/m4/guestfs-c.m4#L142
Comment 25 Samuel Bernardo 2018-01-23 00:59:05 UTC
(In reply to Richard Jones from comment #24)
> Can you compile with ‘-j1’ so we can see the full, uncorrupted error message?
> 
> Anyway it seems like these errors come from use of ‘-fvisibility=hidden’
> (although it's more likely that something else in the system has been
> miscompiled) so you could try removing that as a workaround:
> 
> https://github.com/libguestfs/libguestfs/blob/master/m4/guestfs-c.m4#L142

Thanks for your suggestion Richard Jones.

I realized that after upgrading ocaml to 4.0.5 it also needed camlp4-4.05_p1 keyword unmasked. After compiling camlp4 for the most recent version available, libguestfs-1.37 compiled and installed without any error.
Comment 26 Larry the Git Cow gentoo-dev 2018-02-07 22:39:08 UTC
The bug has been closed via the following commit(s):

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

commit d5fdb7d569488c4f4a33a6d1cae714d45b5a4f56
Author:     Gilles Dartiguelongue <eva@gentoo.org>
AuthorDate: 2018-02-07 22:34:53 +0000
Commit:     Gilles Dartiguelongue <eva@gentoo.org>
CommitDate: 2018-02-07 22:38:48 +0000

    app-emulation/libguestfs: version bump 1.36.5 → 1.36.13
    
        * Now compatible with >=glibc-2.26, bug #638180.
        * Make sure USE=introspection explicitely passes configure switch as we
          might split glib/gobject from introspection at some point.
        * Switch to perl-functions eclass as advised in bug #629946.
        * Restore USE=ocaml as I could not bug #629490 from provided info.
        * Fix pkg_postinst feature check on USE=gtk.
        * Fix build with FEATURES=test by disabling -Werror always. It makes no
          sense to enable this flag for a release, bug #640494.
        * Add myself to maintainers.
    
        Closes: https://bugs.gentoo.org/629690
        Closes: https://bugs.gentoo.org/629946
        Closes: https://bugs.gentoo.org/638180
        Closes: https://bugs.gentoo.org/640494
    
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-emulation/libguestfs/Manifest                  |   1 +
 app-emulation/libguestfs/libguestfs-1.36.13.ebuild | 173 +++++++++++++++++++++
 app-emulation/libguestfs/metadata.xml              |   4 +
 3 files changed, 178 insertions(+)