sci-libs/gdal-1.9.2 with USE=java and a jre installed but no jdk fails with this error: checking whether we should include Java support... configure: error: "Cannot find /opt/oracle-jre-bin-1.7.0.21/include directory." From the ebuild: RDEPEND=" java? ( >=virtual/jre-1.6 ) " /opt/oracle-jre-bin-1.7.0.21/include is provided by a jdk, not a jre Reproducible: Always Steps to Reproduce: 1. Set vm to a jre 2. emerge =sci-libs/gdal-1.9.2 3. Actual Results: Configure error Expected Results: No configure error $ eix -e gdal * sci-libs/gdal Available versions: 1.6.3-r1 1.8.1-r1 (~)1.9.1 1.9.2 {armadillo +aux_xml curl debug doc ecwj2k fits geos gif gml hdf hdf5 java jpeg jpeg2k mdb mysql netcdf odbc ogdi opencl pdf perl png postgres python ruby spatialite sqlite threads xls ELIBC="FreeBSD" RUBY_TARGETS="ruby18"} Homepage: http://www.gdal.org/ Description: Translator library for raster geospatial data formats (includes OGR support) $ emerge --info Portage 2.2.0_alpha177 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.17, 3.9.2-gentoo x86_64) ================================================================= System uname: Linux-3.9.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-2720QM_CPU_@_2.20GHz-with-gentoo-2.2 KiB Mem: 16462580 total, 8768596 free KiB Swap: 1000444 total, 1000444 free Timestamp of tree: Sat, 25 May 2013 09:30:01 +0000 ld GNU ld (GNU Binutils) 2.23.1 app-shells/bash: 4.2_p45 dev-java/java-config: 2.2.0 dev-lang/python: 2.7.4, 3.2.4, 3.3.2 dev-util/cmake: 2.8.10.2-r2 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.4_p6-r1, 1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.13.2 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.5.4, 4.6.4, 4.7.3 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.9 (virtual/os-headers) sys-libs/glibc: 2.17 Repositories: gentoo alan Installed sets: @alan-fonts, @alan-gkrellm, @alan-icon-themes, @alan-kde, @alan-tools ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm skype-eula PUEL googleearth google-talkplugin AdobeFlash-10 AdobeFlash-10.1" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /usr/share/themes/oxygen-gtk/gtk-2.0" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/var/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y --autounmask=n" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildsyspkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer 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="/mnt/distfiles ftp://ftp.is.co.za/mirror/gentoo.org/ http://distfiles.gentoo.org" LANG="en_ZA.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j9" PKGDIR="/var/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/var/portage" PORTDIR_OVERLAY="/home/alanm/gentoo/overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac aalib acl acpi alsa amd64 ao apache2 archive audiofile avahi bash-completion berkdb bittorrent bluetooth bluray branding bzip2 cairo cdda cddb cdr cli consolekit cracklib crypt cups curl curlwrappers cvs cxx dbus dbx dga dirac djvu dri dts dv dvb dvd dvdr emotion encode evo exif expat ffmpeg flac fontconfig fortran freetds ftp fuse gallium gd gdbm gif gimp glib gpm gps graphviz gs gstreamer gtk handbook iconv icu id3tag ieee1394 imagemagick imap imlib innodb introspection ios ipc ipod iproute2 ipv6 irda jabber java java6 javascript jbig jce jpeg jpeg2k kde kdepim keyring kig-scripting kipi lame lcms lesstif libass libc_glibc libcaca libnotify libsamplerate libv4l2 libwww lm_sensors lua lzma mad maildir mailwrapper man matroska mbox milter mime mms mmx mng modules mp3 mp3tunes mp4 mpeg mplayer mtp mudflap multilib musepack musicbrainz mysql mysqli ncurses netboot network nfs nls nptl nsplugin ntp odbc offensive ogg openexr opengl openmp openssl openvpn pam pango passwordsave pch pcre pdf perl phonon plasma plotutils pmu png policykit posix postscript ppds pppd projectm qt3support qt4 quicktime raw readline reflection resolvconf rtmp samba sasl scanner schroedinger sdl semantic-desktop session slp smi sms solver speex spell spl sql sqlite sqlite3 sse sse2 sse3 sse4 sse4_1 ssl ssse3 startup-notification subversion svg symlink syslog sysvipc taglib tbb testbed theora threads thumbnail tidy tiff truetype udev udisks udisks2 unicode upnp usb utempter v4l vaapi vcd vdpau video vim-syntax vlc vnc vorbis vpx wavpack webkit webp wifi wma wmf x264 xattr xcb xcomposite xinerama xml xorg xpm xrender xulrunner xv xvid xvmc zeroconf zip zlib" ABI_X86="64" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="author braindump flow karbon kexi krita sheets stage words" CAMERAS="adc65 agfa_cl20 aox ax203 barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z template topfield toshiba_pdrm11" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" ENLIGHTENMENT_MODULES="backlight battery clock comp conf-applications conf-dialogs conf-display conf-edgebindings conf-interaction conf-intl conf-keybindings conf-menus conf-paths conf-performance conf-randr conf-shelves conf-theme conf-window-manipulation conf-window-remembers cpufreq dropshadow everything fileman fileman-opinfo gadman ibar ibox illume2 mixer msgbus notification pager quickaccess start syscon systray tasks temperature tiling winlist wizard xkbswitch" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB en_US en_ZA" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="radeon vesa" 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: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
(In reply to Alan McKinnon from comment #0) > sci-libs/gdal-1.9.2 with USE=java and a jre installed but no jdk fails with > this error There is a jdk: DEPEND="... java? ( >=virtual/jdk-1.6 ) ..." > /opt/oracle-jre-bin-1.7.0.21/include is provided by a jdk, not a jre Confirmed, include folders are only present in jdk folders. > 1. Set vm to a jre > 2. emerge =sci-libs/gdal-1.9.2 Under normal conditions, the vm that you set there should not matter. However, in this occasion the ebuild forgot to call some eclass functions: 1. java-pkg-opt-2_pkg_setup (Initialization, for instance this switches the VM) 2. java-pkg-opt-2_src_prepare (Removal of bundled jars, can be more in future) Note that they internally check the USE flag, you can leave out 'use java &&'. Although java-pkg-opt-2_pkg_preinst is being used by default, an explicit call could prevent it from not being called in the future. It might be that switching the VM is not sufficient, then likely the autotools files need some patching.
*gdal-1.10.0 (24 Jun 2013) 24 Jun 2013; Aaron W. Swenson <titanofold@gentoo.org> -files/1.7.2-ruby_cflags.patch, -files/gdal-1.4.2-datadir.patch, -files/gdal-1.5.1-python-install.patch, -files/gdal-1.6.0-swig-fix.patch, -files/gdal-1.6.1-ruby-make.patch, -gdal-1.6.3-r1.ebuild, -files/gdal-1.6.3-libpng15.patch, -gdal-1.8.1-r1.ebuild, -gdal-1.9.1.ebuild, -files/gdal-1.9.1-opencl.patch, -files/gdal-1.9.1-poppler-0.20.1.patch, +gdal-1.10.0.ebuild, metadata.xml: Version bump. (Bug 468592) Call java-pkg-opt-2 functions. (Bug 471262; thanks to Tom Wijsman) Remove "=external". (Bug 470046; thanks to Ronan Dunklau.) Clean out old versions and patches, and update hdf to hdf5 in the local USE description.