dev-ruby/pg-0.14.4-r1 fails configuration phase # emerge -av dev-ruby/pg These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-ruby/pg-0.18.4-r1::gentoo USE="-doc {-test}" RUBY_TARGETS="ruby21 ruby22 -ruby23" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB Would you like to merge these packages? [Yes/No] y >>> Verifying ebuild manifests >>> Emerging (1 of 1) dev-ruby/pg-0.18.4-r1::gentoo * pg-0.18.4.gem SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] >>> Unpacking source... * Running unpack phase for all ... * Unpacking .gem file... ... [ ok ] * Uncompressing metadata ... [ ok ] * Unpacking data.tar.gz ... [ ok ] >>> Source unpacked in /var/tmp/portage/dev-ruby/pg-0.18.4-r1/work >>> Preparing source in /var/tmp/portage/dev-ruby/pg-0.18.4-r1/work ... * Running prepare phase for all ... * Running source copy phase for ruby21 ... * Running source copy phase for ruby22 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/dev-ruby/pg-0.18.4-r1/work ... * Running configure phase for ruby21 ... checking for pg_config... no No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config checking for libpq-fe.h... no Can't find the 'libpq-fe.h header *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib64 --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby21 --with-pg --without-pg --enable-windows-cross --disable-windows-cross --with-pg-config --without-pg-config --with-pg_config --without-pg_config --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib64 * ERROR: dev-ruby/pg-0.18.4-r1::gentoo failed (configure phase): * extconf.rb failed * * Call stack: * ebuild.sh, line 115: Called src_configure * environment, line 4466: Called ruby-ng_src_configure * environment, line 4161: Called _ruby_each_implementation 'each_ruby_configure' * environment, line 508: Called _ruby_invoke_environment 'ruby21' 'each_ruby_configure' * environment, line 629: Called each_ruby_configure * environment, line 935: Called die * The specific snippet of code: * ${RUBY} -C ext extconf.rb || die "extconf.rb failed" * * If you need support, post the output of `emerge --info '=dev-ruby/pg-0.18.4-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-ruby/pg-0.18.4-r1::gentoo'`. !!! When you file a bug report, please include the following information: GENTOO_VM= CLASSPATH="" JAVA_HOME="/home/giuseppe/.gentoo/java-config-2/current-user-vm" JAVACFLAGS="" COMPILER="" and of course, the output of emerge --info =pg-0.18.4 * The complete build log is located at '/var/tmp/portage/dev-ruby/pg-0.18.4-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-ruby/pg-0.18.4-r1/temp/environment'. * Working directory: '/var/tmp/portage/dev-ruby/pg-0.18.4-r1/work/ruby21/pg-0.18.4' * S: '/var/tmp/portage/dev-ruby/pg-0.18.4-r1/work/ruby21/pg-0.18.4' >>> Failed to emerge dev-ruby/pg-0.18.4-r1, Log file: >>> '/var/tmp/portage/dev-ruby/pg-0.18.4-r1/temp/build.log' * Messages for package dev-ruby/pg-0.18.4-r1: * ERROR: dev-ruby/pg-0.18.4-r1::gentoo failed (configure phase): * extconf.rb failed * * Call stack: * ebuild.sh, line 115: Called src_configure * environment, line 4466: Called ruby-ng_src_configure * environment, line 4161: Called _ruby_each_implementation 'each_ruby_configure' * environment, line 508: Called _ruby_invoke_environment 'ruby21' 'each_ruby_configure' * environment, line 629: Called each_ruby_configure * environment, line 935: Called die * The specific snippet of code: * ${RUBY} -C ext extconf.rb || die "extconf.rb failed" * * If you need support, post the output of `emerge --info '=dev-ruby/pg-0.18.4-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-ruby/pg-0.18.4-r1::gentoo'`. * The complete build log is located at '/var/tmp/portage/dev-ruby/pg-0.18.4-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-ruby/pg-0.18.4-r1/temp/environment'. * Working directory: '/var/tmp/portage/dev-ruby/pg-0.18.4-r1/work/ruby21/pg-0.18.4' * S: '/var/tmp/portage/dev-ruby/pg-0.18.4-r1/work/ruby21/pg-0.18.4' This is emerge --info output: # emerge --info Portage 2.3.6 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.4.0, glibc-2.23-r4, 4.9.34-gentoo x86_64) ================================================================= System uname: Linux-4.9.34-gentoo-x86_64-Intel-R-_Core-TM-_i7-4700HQ_CPU_@_2.40GHz-with-gentoo-2.3 KiB Mem: 15842212 total, 7852248 free KiB Swap: 33554428 total, 33554428 free Timestamp of repository gentoo: Sat, 29 Jul 2017 12:00:01 +0000 sh bash 4.3_p48-r1 ld GNU ld (Gentoo 2.28 p1.2) 2.28 app-shells/bash: 4.3_p48-r1::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.1-r2::gentoo dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo dev-util/cmake: 3.7.2::gentoo dev-util/pkgconfig: 0.28-r2::gentoo sys-apps/baselayout: 2.3::gentoo sys-apps/openrc: 0.26.3::gentoo sys-apps/sandbox: 2.10-r3::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.28-r2::gentoo sys-devel/gcc: 5.4.0-r3::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r4::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 Overlay-Personale location: /usr/local/portage sync-type: git sync-uri: git://me.org/me masters: gentoo x-portage location: /usr/local/portage masters: gentoo priority: 0 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core-avx2 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/chromium/policies/managed/chrome-gnome-shell.json /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/opt/chrome/policies/managed/chrome-gnome-shell.json /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=core-avx2 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ http://gentoo.modulix.net/gentoo/ ftp://gentoo.imj.fr/pub/gentoo/ http://tux.rainside.sk/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/" LANG="it_IT.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j9" 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 a52 aac aalib acl acpi afs alsa amd64 berkdb bluetooth branding bzip2 cairo cdb cdda cddb cdparanoia cdr cli colord cracklib crypt css cups cvs cxx dbi dbm dbus dga directfb djvu dri dts dv dvb dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fontconfig foomaticdb fortran ftp gdbm gif glamor gnome gnome-keyring gnome-online-accounts gphoto2 gpm gsm gstreamer gtk gzip hddtemp iconv ieee1394 imagemagick introspection ipv6 jack java javascript jpeg jpeg2k kerberos lcms ldap libcaca libnotify libsecret libwww lzma lzo mad mhash mime mmap mms mmx mng modules mp3 mp4 mpeg mplayer multilib nas nautilus ncurses nls nptl offensive ogg openexr opengl openmp pam pango pcmcia pcre pda pdf png policykit ppds pulseaudio qt3support qt4 radius rdesktop readline samba scanner sdl seccomp session smp snmp spell sse sse2 sse3 ssl startup-notification svg systemd tcpd theora tidy tiff tracker truecrypt truetype udev udisks unicode upnp upnp-av upower usb v4l vcd vnc vorbis webkit wifi wxwidgets x264 xattr xcb xcomposite xine xml xscreensaver xv xvid zeroconf zlib zsh-completion" ABI_X86="64 32" 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="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" INPUT_DEVICES="synaptics evdev keyboard mouse joystick" KERNEL="linux" L10N="it" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="it" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia intel nouveau nv" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Which version of dev-db/postgresql do you have installed, and with which USE flags?
I have installed dev-db/postegresql-9.6.3-r1 # emerge -av postgresql These are the packages that would be merged, in order: Calculating dependencies ... done! [ebuild R ] dev-db/postgresql-9.6.3-r1:9.6::gentoo USE="kerberos ldap nls pam readline server ssl systemd xml zlib -doc (-libressl) -perl -pg_legacytimestamp -python (-selinux) -static-libs -tcl -threads -uuid" LINGUAS="it -af -cs -de -en -es -fa -fr -hr -hu -ko -nb -pl -pt_BR -ro -ru -sk -sl -sv -tr -zh_CN -zh_TW" PYTHON_SINGLE_TARGET="python3_4 -python2_7 (-python3_5) (-python3_6)" PYTHON_TARGETS="python2_7 python3_4 (-python3_5) (-python3_6)" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB I tried reemerging it, and I have seen there is a conflict: ... Setting 9.6 as the default...ln: failed to create symbolic link '/usr/include/libpq-fe.h': File exists !!! Error: Unable to create link! postgresql-9.6/libpq-fe.h -> /usr/include/libpq-fe.h exiting >>> Regenerating /etc/ld.so.cache... >>> Original instance of package unmerged safely. Setting 9.6 as the default...ln: failed to create symbolic link '/usr/include/postgresql/postgresql-9.6': File exists !!! Error: Unable to create link! postgresql-9.6 -> /usr/include/postgresql ... ... * GNU info directory index is up-to-date. !!! existing preserved libs: >>> package: dev-db/postgresql-9.5.7 * - /usr/lib64/postgresql-9.5/lib64/libpq.so.5 * - /usr/lib64/postgresql-9.5/lib64/libpq.so.5.8 * used by /usr/lib64/ruby/gems/2.1.0/gems/pg-0.18.4/lib/pg_ext.so (dev-ruby/pg-0.18.4-r1) * used by /usr/lib64/ruby/gems/2.2.0/gems/pg-0.18.4/lib/pg_ext.so (dev-ruby/pg-0.18.4-r1) Use emerge @preserved-rebuild to rebuild packages using these libraries if I try, it tries to reemerge dev-ruby/pg-0.18.4-r1, but it fails # emerge @preserved-rebuild Calculating dependencies... done! >>> Verifying ebuild manifests >>> Emerging (1 of 1) dev-ruby/pg-0.18.4-r1::gentoo ... it fails. Then I have manually deleted some broken links /usr/include/libpq /usr/include/libpq-fe.h /usr/include/pg_config_ext.h /usr/include/pg_config_manual.h /usr/include/postgres_ext.h AND /usr/include/postgresql/postgresql-9.6 ( # ls -la /usr/include | grep postgresql lrwxrwxrwx 1 root root 20 16 lug 22.01 libpq -> postgresql-9.5/libpq lrwxrwxrwx 1 root root 25 16 lug 22.01 libpq-fe.h -> postgresql-9.5/libpq-fe.h lrwxrwxrwx 1 root root 30 16 lug 22.01 pg_config_ext.h -> postgresql-9.5/pg_config_ext.h lrwxrwxrwx 1 root root 33 16 lug 22.01 pg_config_manual.h -> postgresql-9.5/pg_config_manual.h lrwxrwxrwx 1 root root 29 16 lug 22.01 postgres_ext.h -> postgresql-9.5/postgres_ext.h lrwxrwxrwx 1 root root 14 17 lug 10.12 postgresql -> postgresql-9.6 drwxr-xr-x 6 root root 4096 30 lug 16.35 postgresql-9.6 ) and reemerged dev-db/postgresql-9.6.3-r1. Now dev-ruby/pg-0.18.4.r1 compiles. (another attempt without removing /usr/include/postgresql/postgresql-9.6 failed). Not sure if this is a bug of postgresql ebuild, or a misconfiguration in my system. However, now I solved. Thanks