Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 681326

Summary: sys-devel/llvm-8.0.0 - Cannot find source file: /usr/include/libpq-fe.h
Product: Gentoo Linux Reporter: Martin Mokrejš <mmokrejs>
Component: Current packagesAssignee: LLVM support project <llvm>
Status: RESOLVED DUPLICATE    
Severity: normal CC: mgorny
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Martin Mokrejš 2019-03-22 22:40:17 UTC
-- <<< Gentoo configuration >>>
Build type      RelWithDebInfo
Install path    /usr/lib/llvm/8
Compiler flags:
C               -O2 -pipe -mpclmul -mpopcnt -march=native -ftree-vectorize -fPIC -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections
C++             -O2 -pipe -mpclmul -mpopcnt -march=native -ftree-vectorize -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed -Wl,-allow-shlib-undefined
Module          -Wl,-O1 -Wl,--as-needed -Wl,-z,nodelete
Shared          -Wl,-O1 -Wl,--as-needed -Wl,-z,defs -Wl,-z,nodelete

-- Configuring done
CMake Error at cmake/modules/AddLLVM.cmake:455 (add_library):
  Cannot find source file:

    /usr/include/libpq-fe.h

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx
Call Stack (most recent call first):
  cmake/modules/AddLLVM.cmake:626 (llvm_add_library)
  lib/Support/CMakeLists.txt:47 (add_llvm_library)


CMake Error at cmake/modules/AddLLVM.cmake:455 (add_library):
  Cannot find source file:

    /usr/include/libpq-fe.h

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx
Call Stack (most recent call first):
  cmake/modules/AddLLVM.cmake:626 (llvm_add_library)
  lib/WindowsManifest/CMakeLists.txt:8 (add_llvm_library)


CMake Error at cmake/modules/AddLLVM.cmake:455 (add_library):
  No SOURCES given to target: LLVMSupport
Call Stack (most recent call first):
  cmake/modules/AddLLVM.cmake:626 (llvm_add_library)
  lib/Support/CMakeLists.txt:47 (add_llvm_library)


CMake Error at cmake/modules/AddLLVM.cmake:455 (add_library):
  No SOURCES given to target: LLVMWindowsManifest
Call Stack (most recent call first):
  cmake/modules/AddLLVM.cmake:626 (llvm_add_library)
  lib/WindowsManifest/CMakeLists.txt:8 (add_llvm_library)


-- Build files have been written to: /scratch/var/tmp/portage/sys-devel/llvm-8.0.0/work/llvm-8.0.0.src-abi_x86_32.x86
 * ERROR: sys-devel/llvm-8.0.0::gentoo failed (configure phase):
 *   cmake failed
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_configure
 *   environment, line 4540:  Called multilib-minimal_src_configure
 *   environment, line 2865:  Called multilib_foreach_abi 'multilib-minimal_abi_src_configure'
 *   environment, line 3080:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *   environment, line 2795:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *   environment, line 2793:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure'
 *   environment, line  654:  Called multilib-minimal_abi_src_configure
 *   environment, line 2859:  Called multilib_src_configure
 *   environment, line 3331:  Called cmake-utils_src_configure
 *   environment, line 1250:  Called die
 * The specific snippet of code:
 *       "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/llvm-8.0.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/llvm-8.0.0::gentoo'`.
 * The complete build log is located at '/scratch/var/tmp/portage/sys-devel/llvm-8.0.0/temp/build.log'.
 * The ebuild environment file is located at '/scratch/var/tmp/portage/sys-devel/llvm-8.0.0/temp/environment'.
 * Working directory: '/scratch/var/tmp/portage/sys-devel/llvm-8.0.0/work/llvm-8.0.0.src-abi_x86_32.x86'
 * S: '/scratch/var/tmp/portage/sys-devel/llvm-8.0.0/work/llvm-8.0.0.src'


Does llvm need some postgresql headers? 

# emerge -pqv '=sys-devel/llvm-8.0.0::gentoo'
[ebuild  NS   ] sys-devel/llvm-8.0.0 [4.0.1-r1, 5.0.2, 6.0.1-r2, 7.0.1] USE="libffi ncurses xml -debug -doc -exegesis -gold -libedit -test -xar" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARM -Hexagon -Lanai -MSP430 -Mips -PowerPC -Sparc -SystemZ -XCore" 

# emerge --info '=sys-devel/llvm-8.0.0::gentoo'
Portage 2.3.62 (python 2.7.16-final-0, default/linux/amd64/17.0, gcc-8.3.0, glibc-2.28-r5, 4.20.17-default-pciehp x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.20.17-default-pciehp-x86_64-Intel-R-_Core-TM-_i7-2640M_CPU_@_2.80GHz-with-gentoo-2.6
KiB Mem:    16365372 total,   9875212 free
KiB Swap:   26853460 total,  26853460 free
Timestamp of repository gentoo: Thu, 21 Mar 2019 22:30:01 +0000
Head commit of repository gentoo: 4b866da22f0c83e9a97a8cad221f60af679a454b
sh bash 5.0_p3-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          5.0_p3-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.9999::gentoo
dev-lang/python:          2.7.16::gentoo, 3.5.6::gentoo, 3.6.8::gentoo, 3.7.2::gentoo
dev-util/cmake:           3.14.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r2::gentoo, 1.14.1-r1::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r4::gentoo, 2.31.1-r4::gentoo, 2.32::gentoo
sys-devel/gcc:            7.3.0-r6::gentoo, 8.2.0-r6::gentoo, 8.3.0::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r5::gentoo
Repositories:

gentoo
    location: /scratch/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

science
    location: /scratch/mmokrejs/proj/sci
    masters: gentoo
    priority: 0

layman
    location: /var/lib/layman
    masters: gentoo
    priority: 1

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 2

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

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE IBM-J1.6 skype-eula Nero-EULA-US AdobeFlash-10.3 skype-4.0.0.7-copyright AdobeFlash-11.x OPERA-2014 RAR Intel-SDP intel-ucode-20180807"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -mpclmul -mpopcnt -march=native -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.2/conf /usr/share/maven-bin-3.3/conf /usr/share/maven-bin-3.6/conf /var/bind /var/lib/hsqldb /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/vmware-installer"
CXXFLAGS="-O2 -pipe -mpclmul -mpopcnt -march=native -ftree-vectorize"
DISTDIR="/scratch/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.wheel.sk/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.web4u.cz/ rsync://gentoo.mirror.dkm.cz/gentoo/ ftp://gentoo.mirror.web4u.cz/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en_GB en cs"
MAKEOPTS="-j2"
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="/scratch/var/tmp"
USE="R X acpi alsa amd64 amr apache apache2 asm avx berkdb bluetooth boost bzip2 cairo cgi cli coin connection-sharing consolekit cracklib crypt cryptlib cryptsetup cups cxx dbus device-mapper dhcp directfb dri drm dvd emboss encode fax fbcon ffmpeg flac fontconfig fortran fuse gbm gcrypt gd gdbm geoip geolocation gimp glpk gmp gpm gps gtk hal hpijs hwdb iconv id3tag imaging innodb inotify java javafx javascript jce jpeg jpg js jscript keymap kmod ladspa lame lapack laptop lcms libnotify libtirpc lm_sensors mad matroska mmx modemmanager mp3 multicore multilib multimedia mysql ncurses netpbm networkmanager nfs nls nptl nptlonly nscd ntfs ntfsdecrypt ntfsprogs objc ocr ogg opengl openmp openssl pam parport pcre pcre16 pdf pdfimport pdl perl php pkcs11 plplot png policykit polkit postproc postscript ppds ppp pppd pptx python qt3support qt4 qt5 readline rendering resolvconf samba scanner sctp seccomp server session sha512 slideshow smartcard sna sndfile sparsehash sqlite sse sse2 sse3 sse4_1 sse4_2 ssh ssh-agent ssl sslv2 sslv3 ssse3 startup-notification suexec svg syslog tcl tcpd threads tiff tk truetype twolame udev unicode upower usb v4l v4l2 vim-syntax vnc wavpack wifi x11 xattr xcb xcomposite xinerama xml xorg xrandr xv xvid zlib" 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="alias authz_host auth_basic auth_digest cgi cgid deflate dir env filter include info mem_cache mime mime_magic negotiation remoteip setenvif status userdir vhost_alias rewrite usertrack cache file_cache disk_cache charset_lite log_config log_forensic" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="aivdm ashtech earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 navcom ntrip oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tnt tripmate tsip ublox fury geostar nmea0183 nmea2000 passthrough" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en-US en en-GB cs" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 python3_7" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="vesa vmware fbdev intel i915 i965" 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, LANG, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Martin Mokrejš 2019-03-22 22:40:39 UTC
Created attachment 570326 [details]
build.log
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-23 00:44:38 UTC
Is your /usr/include/libpq-fe.h a dangling link by chance?
Comment 3 Martin Mokrejš 2019-03-23 04:53:50 UTC
(In reply to Sergei Trofimovich from comment #2)
> Is your /usr/include/libpq-fe.h a dangling link by chance?

Right.

$ ls -latr /usr/include/libpq-fe.h
lrwxrwxrwx 1 root root 25 May 17  2017 /usr/include/libpq-fe.h -> postgresql-9.4/libpq-fe.h
$

Seems for the last time I had two slots used:

1531540726: === Unmerging... (dev-db/postgresql-11_beta1)
1531540753:  >>> unmerge success: dev-db/postgresql-11_beta1
1531540753: === Unmerging... (dev-db/postgresql-9.6.9)
1531540777:  >>> unmerge success: dev-db/postgresql-9.6.9
1531540777:  *** exiting successfully.


I June 2017 I had dev-db/postgresql-9.6 existing, can't say what was in May 2017.
Comment 4 Martin Mokrejš 2019-03-23 04:55:23 UTC
Actually, these are dangling too:

$ ls -latr /usr/include/postgresql*
lrwxrwxrwx 1 root root   14 May 17  2017 /usr/include/postgresql -> postgresql-9.6

/usr/include/postgresql-9.6:
total 68
lrwxrwxrwx   1 root root    14 May 17  2017 postgresql-9.6 -> postgresql-9.6
lrwxrwxrwx   1 root root    13 Jun 30  2018 postgresql-11 -> postgresql-11
drwxr-xr-x   2 root root  4096 Jul 14  2018 .
drwxr-xr-x 622 root root 61440 Mar 18 23:12 ..
$
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-03-23 06:43:01 UTC

*** This bug has been marked as a duplicate of bug 674662 ***
Comment 6 Martin Mokrejš 2019-03-23 08:37:29 UTC
So for completeness, I have:

*  sci-libs/cblas-reference
      Latest version available: 20161223-r101
      Latest version installed: 20161223-r101

*  virtual/blas
      Latest version available: 3.7-r100
      Latest version installed: 3.7-r100

*  virtual/cblas
      Latest version available: 3.7-r100
      Latest version installed: 3.7-r100

from the science overlay.
Comment 7 Martin Mokrejš 2019-03-30 14:27:30 UTC
Another dead symlink:

# ls -latr /usr/include/pg_config_ext.h
lrwxrwxrwx 1 root root 30 May 17  2017 /usr/include/pg_config_ext.h -> postgresql-9.4/pg_config_ext.h
# ls -latr /usr/include/pg_config_manual.h
lrwxrwxrwx 1 root root 33 May 17  2017 /usr/include/pg_config_manual.h -> postgresql-9.4/pg_config_manual.h

# ls -latr /usr/include/ | grep postgresql-9.4
lrwxrwxrwx   1 root root     20 May 17  2017 libpq -> postgresql-9.4/libpq
lrwxrwxrwx   1 root root     29 May 17  2017 postgres_ext.h -> postgresql-9.4/postgres_ext.h


# ls -latr /usr/include/postgresql
lrwxrwxrwx 1 root root 14 May 17  2017 /usr/include/postgresql -> postgresql-9.6
#

Also these below point to themselves.

# ls -latr /usr/include/postgresql-9.6/
total 72
lrwxrwxrwx   1 root root    14 May 17  2017 postgresql-9.6 -> postgresql-9.6
lrwxrwxrwx   1 root root    13 Jun 30  2018 postgresql-11 -> postgresql-11
drwxr-xr-x   2 root root  4096 Jul 14  2018 .
drwxr-xr-x 623 root root 65536 Mar 30 15:18 ..