0

Configure script fails when checking for C compiler, but path for it are right.

 (cd /home/dcow/work/tssltd/br2/output/build/openjdk-b132-03_mar_2014/ &&
 rm -rf config.cache && PATH="/home/dcow/work/tssltd/br2/output/host/bin:/home/dcow/work/tssltd/br2/output/host/sbin:/home/dcow/work/tssltd/br2/output/host/usr/bin:/home/dcow/work/tssltd/br2/output/host/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/dcow/.local/bin:/home/dcow/bin" 

    AR="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-ar" 
    AS="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-as" 
    LD="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-ld" 
    NM="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-nm" 
    CC="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-gcc" 
    GCC="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-gcc" 
CPP="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-cpp" 
CXX="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-g++" 
FC="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-gfortran"
 RANLIB="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-ranlib" 
READELF="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-readelf" 
STRIP="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-strip"
 OBJCOPY="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-objcopy" 
OBJDUMP="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-objdump"
 AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" 
CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/bin/gcc" 
CXX_FOR_BUILD="/usr/bin/g++"
 LD_FOR_BUILD="/usr/bin/ld" 
CPPFLAGS_FOR_BUILD="-I/home/dcow/work/tssltd/br2/output/host/usr/include" 
CFLAGS_FOR_BUILD="-O2 -I/home/dcow/work/tssltd/br2/output/host/usr/include" 
CXXFLAGS_FOR_BUILD="-O2 -I/home/dcow/work/tssltd/br2/output/host/usr/include" 
LDFLAGS_FOR_BUILD="-L/home/dcow/work/tssltd/br2/output/host/lib -L/home/dcow/work/tssltd/br2/output/host/usr/lib -Wl,-rpath,/home/dcow/work/tssltd/br2/output/host/usr/lib" 
FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-as" 
DEFAULT_LINKER="/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-ld"
 CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 " 
LDFLAGS=""
 FCFLAGS="" 
PKG_CONFIG="/home/dcow/work/tssltd/br2/output/host/usr/bin/pkg-config" 
STAGING_DIR="/home/dcow/work/tssltd/br2/output/host/usr/x86_64-buildroot-linux-gnu/sysroot" 
INTLTOOL_PERL=/usr/bin/perl ac_cv_lbl_unaligned_fail=no ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_memcmp_working=yes ac_cv_have_decl_malloc=yes gl_cv_func_malloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes ac_cv_func_calloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes lt_cv_sys_lib_search_path_spec="" ac_cv_c_bigendian=no  
CONFIG_SITE=/dev/null ./configure --target=x86_64-buildroot-linux-gnu --host=x86_64-buildroot-linux-gnu --build=x86_64-unknown-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --program-prefix="" --disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no --disable-dependency-tracking --enable-ipv6  --disable-static --enable-shared  --disable-headful --disable-option-checking  )
        Warning: You are using legacy autoconf cross-compilation flags.
        It is recommended that you use --openjdk-target instead.

        Running generated-configure.sh
        configure: Configuration created at Wed Oct 12 16:11:20 MSK 2016.
        configure: configure script generated at timestamp 1433258489.
        checking for basename... /usr/bin/basename
        checking for bash... /usr/bin/bash
        checking for cat... /usr/bin/cat
        checking for chmod... /usr/bin/chmod
        checking for cmp... /usr/bin/cmp
        checking for comm... /usr/bin/comm
        checking for cp... /usr/bin/cp
        checking for cpio... /usr/bin/cpio
        checking for cut... /usr/bin/cut
        checking for date... /usr/bin/date
        checking for gdiff... no
        checking for diff... /usr/bin/diff
        checking for dirname... /usr/bin/dirname
        checking for echo... /usr/bin/echo
        checking for expr... /usr/bin/expr
        checking for file... /home/dcow/work/tssltd/br2/output/host/usr/bin/file
        checking for find... /usr/bin/find
        checking for head... /usr/bin/head
        checking for ln... /usr/bin/ln
        checking for ls... /usr/bin/ls
        checking for mkdir... /usr/bin/mkdir
        checking for mktemp... /usr/bin/mktemp
        checking for mv... /usr/bin/mv
        checking for printf... /usr/bin/printf
        checking for rm... /usr/bin/rm
        checking for sh... /usr/bin/sh
        checking for sort... /usr/bin/sort
        checking for tail... /usr/bin/tail
        checking for tar... /usr/bin/tar
        checking for tee... /usr/bin/tee
        checking for touch... /usr/bin/touch
        checking for tr... /usr/bin/tr
        checking for uname... /usr/bin/uname
        checking for uniq... /usr/bin/uniq
        checking for wc... /usr/bin/wc
        checking for which... /usr/bin/which
        checking for xargs... /usr/bin/xargs
        checking for gawk... gawk
        checking for grep that handles long lines and -e... /usr/bin/grep
        checking for egrep... /usr/bin/grep -E
        checking for fgrep... /usr/bin/grep -F
        checking for a sed that does not truncate output... /usr/bin/sed
        checking for nawk... no
        checking for gawk... /home/dcow/work/tssltd/br2/output/host/usr/bin/gawk
        checking for cygpath... no
        checking for readlink... /usr/bin/readlink
        checking for df... /usr/bin/df
        checking for SetFile... no
        checking build system type... x86_64-unknown-linux-gnu
        checking host system type... x86_64-buildroot-linux-gnu
        checking target system type... x86_64-buildroot-linux-gnu
        checking openjdk-build os-cpu... linux-x86_64
        checking openjdk-target os-cpu... linux-x86_64
        checking compilation type... cross
        checking for presence of closed sources... no
        checking if closed source is suppressed (openjdk-only)... no
        checking which variant of the JDK to build... normal
        checking which interpreter of the JVM to build... template
        checking which variants of the JVM to build... server
        checking which debug level to use... release
        checking what configuration name to use... linux-x86_64-normal-server-release
        checking for apt-get... no
        checking for yum... yum
        checking for gmake... /usr/bin/gmake
        configure: Testing potential make at /usr/bin/gmake, found using gmake in PATH
        configure: Resolving FOUND_MAKE (as /usr/bin/gmake) failed, using /usr/bin/gmake directly.
        configure: Using GNU make 3.81 (or later) at /usr/bin/gmake (version: GNU Make 4.1)
        checking if find supports -delete... yes
        checking for unzip... /usr/bin/unzip
        checking for zip... /usr/bin/zip
        checking for ldd... /usr/bin/ldd
        checking for readelf... /home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-readelf
        checking for hg... /usr/bin/hg
        checking for stat... /usr/bin/stat
        checking for time... /usr/bin/time
        checking pkg-config is at least version 0.9.0... yes
        checking for 7z... 7z
        checking for wget... wget
        checking headful support... headless only
        checking for javac... /usr/bin/javac
        checking for java... /usr/bin/java
        configure: Found potential Boot JDK using java(c) in PATH
        checking for Boot JDK... /usr/java/jdk1.8.0_91
        checking Boot JDK version... java version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode) 
        checking for java in Boot JDK... ok
        checking for javac in Boot JDK... ok
        checking for javah in Boot JDK... ok
        checking for javap in Boot JDK... ok
        checking for jar in Boot JDK... ok
        checking for rmic in Boot JDK... ok
        checking for native2ascii in Boot JDK... ok
        checking flags for boot jdk java command ...  
        checking flags for boot jdk java command for big workloads...  -Xms64M -Xmx1600M -XX:ThreadStackSize=1536
        checking flags for boot jdk java command for small workloads...  -XX:+UseSerialGC -Xms32M -Xmx512M
        checking for jtreg... no
        checking for cl... no
        checking for cc... /usr/bin/cc
        configure: Resolving BUILD_CC (as /usr/bin/cc) failed, using /usr/bin/cc directly.
        checking for cl... no
        checking for CC... no
        checking for g++... /home/dcow/work/tssltd/br2/output/host/usr/bin/g++
        configure: Resolving BUILD_CXX (as /home/dcow/work/tssltd/br2/output/host/usr/bin/g++) failed, using /home/dcow/work/tssltd/br2/output/host/usr/bin/g++ directly.
        checking for ld... /usr/bin/ld
        configure: Resolving BUILD_LD (as /usr/bin/ld) failed, using /usr/bin/ld directly.
        checking for /home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-gcc... no
        configure: error: Could not find a C compiler. You might be able to fix this by running 'sudo yum groupinstall "Development Tools"'.
        configure exiting with result code 1

Real check for compiler :

$/home/dcow/work/tssltd/br2/output/host/usr/bin/x86_64-tss-linux-gnu-gcc -v
Используются внутренние спецификации.
COLLECT_GCC=/home/dcow/x-tools/x86_64-tss-linux-gnu//bin/x86_64-tss-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/dcow/x-tools/x86_64-tss-linux-gnu/libexec/gcc/x86_64-tss-linux-gnu/5.2.0/lto-wrapper
Целевая архитектура: x86_64-tss-linux-gnu
Параметры конфигурации: /home/dcow/work/tssltd/toolchains/.build/src/gcc-5.2.0/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=x86_64-tss-linux-gnu --prefix=/home/dcow/x-tools/x86_64-tss-linux-gnu --with-sysroot=/home/dcow/x-tools/x86_64-tss-linux-gnu/x86_64-tss-linux-gnu/sysroot --enable-languages=c,c++ --with-pkgversion='crosstool-NG  - tss' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/home/dcow/work/tssltd/toolchains/.build/x86_64-tss-linux-gnu/buildtools --with-mpfr=/home/dcow/work/tssltd/toolchains/.build/x86_64-tss-linux-gnu/buildtools --with-mpc=/home/dcow/work/tssltd/toolchains/.build/x86_64-tss-linux-gnu/buildtools --with-isl=/home/dcow/work/tssltd/toolchains/.build/x86_64-tss-linux-gnu/buildtools --with-cloog=/home/dcow/work/tssltd/toolchains/.build/x86_64-tss-linux-gnu/buildtools --with-libelf=/home/dcow/work/tssltd/toolchains/.build/x86_64-tss-linux-gnu/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-target-optspace --enable-plugin --disable-multilib --with-local-prefix=/home/dcow/x-tools/x86_64-tss-linux-gnu/x86_64-tss-linux-gnu/sysroot --enable-long-long
Модель многопоточности: posix
gcc версия 5.2.0 (crosstool-NG  - tss) 

Anyone stuck with same problem? Can Help?

Dcow
  • 1,413
  • 1
  • 19
  • 42
  • When posting some output, please export LANG=C in your environment first so the messages are readable by everyone. – Arnout Oct 12 '16 at 21:38

1 Answers1

1

It looks like openjdk uses a non-standard autoconf which ignores CC and instead uses BUILD_CC, so you need to add BUILD_CC="$(TARGET_CC)" to OPENJDK_CONF_ENV. Similar for BUILD_CXX and BUILD_LD.

You should also pass a proper --openjdk-target=... option in OPENJDK_CONF_OPTS.

Arnout
  • 2,927
  • 16
  • 24