autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cross-compiling with Autoconf


From: Dustin Laurence
Subject: Re: Cross-compiling with Autoconf
Date: Tue, 03 Nov 2015 12:30:28 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 11/02/2015 02:28 PM, Nick Bowler wrote:

> I strongly recommend against hardcoding all these program locations.
> If you put /opt/nfast/gcc/bin in your PATH, configure should pick them
> all up automatically based on the --host option.

The problem is that the final version is going to have compilers in
different places for different architectures, since for one of them the
vendor compiler was b0rken (it wasn't their fault, GCC's 64-bit
emulation was broken on 32-bit powerpc and I have to build libraries
that use 64-bit ints) and I had to build my own cross-compiler toolchain
for that arch (more brain cells I'll never get back).  I'm not that
eager to put a bunch of stuff on my path that I never invoke by hand,
though I admit that may only be a personal quirk.
\
> Basically this means that autoconf tried to run the compiler and it failed.
> If you open up config.log, you should be able to find the exact compiler
> command line(s) which were attempted and failed.

I meant to pass that along with my original message, sorry.

> So I suggest putting such flags in CC instead, which feels more
> natural anyway (leaving CFLAGS for non-critical things like fine-
> tuning optimizations or whatnot).  Almost every package handles
> $CC properly.

It doesn't get far enough for that to matter yet.

Invocation:

./configure \
                --build=`./build-aux/config.guess` \
                --host strongarm-codesafe-elf \
                CC="/opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc
-mapcs-32 -msoft-float -mlittle-endian -march=armv4 -nostdinc" \
                AR="/opt/nfast/gcc/bin/strongarm-codesafe-elf-ar" \
                RANLIB="/opt/nfast/gcc/bin/strongarm-codesafe-elf-ranlib" \
                AS="/opt/nfast/gcc/bin/strongarm-codesafe-elf-as" \
                LD="/opt/nfast/gcc/bin/strongarm-codesafe-elf-ld" \
                NM="/opt/nfast/gcc/bin/strongarm-codesafe-elf-nm" \
                STRIP="/opt/nfast/gcc/bin/strongarm-codesafe-elf-strip"

config.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libsecp256k1 configure 0.1, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure --build=x86_64-unknown-linux-gnu --host
strongarm-codesafe-elf CC=/opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc
-mapcs-32 -msoft-float -mlittle-endian -march=armv4 -nostdinc
AR=/opt/nfast/gcc/bin/strongarm-codesafe-elf-ar
RANLIB=/opt/nfast/gcc/bin/strongarm-codesafe-elf-ranlib
AS=/opt/nfast/gcc/bin/strongarm-codesafe-elf-as
LD=/opt/nfast/gcc/bin/strongarm-codesafe-elf-ld
NM=/opt/nfast/gcc/bin/strongarm-codesafe-elf-nm
STRIP=/opt/nfast/gcc/bin/strongarm-codesafe-elf-strip

## --------- ##
## Platform. ##
## --------- ##

hostname = Convex
uname -m = x86_64
uname -r = 3.13.0-52-generic
uname -s = Linux
uname -v = #86-Ubuntu SMP Mon May 4 04:32:59 UTC 2015

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /home/laurence/.virtualenvs/api/bin
PATH: /home/laurence/.rbenv/shims
PATH: /home/laurence/.rbenv/bin
PATH: /home/laurence/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2360: checking build system type
configure:2374: result: x86_64-unknown-linux-gnu
configure:2394: checking host system type
configure:2407: result: arm-codesafe-elf
configure:2446: checking for a BSD-compatible install
configure:2514: result: /usr/bin/install -c
configure:2525: checking whether build environment is sane
configure:2580: result: yes
configure:2639: checking for strongarm-codesafe-elf-strip
configure:2666: result: /opt/nfast/gcc/bin/strongarm-codesafe-elf-strip
configure:2731: checking for a thread-safe mkdir -p
configure:2770: result: /bin/mkdir -p
configure:2777: checking for gawk
configure:2807: result: no
configure:2777: checking for mawk
configure:2793: found /usr/bin/mawk
configure:2804: result: mawk
configure:2815: checking whether make sets $(MAKE)
configure:2837: result: yes
configure:2866: checking whether make supports nested variables
configure:2883: result: yes
configure:3054: checking how to print strings
configure:3081: result: printf
configure:3114: checking for style of include used by make
configure:3142: result: GNU
configure:3173: checking for strongarm-codesafe-elf-gcc
configure:3200: result: /opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc
-mapcs-32 -msoft-float -mlittle-endian -march=armv4 -nostdinc
configure:3469: checking for C compiler version
configure:3478: /opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc -mapcs-32
-msoft-float -mlittle-endian -march=armv4 -nostdinc --version >&5
strongarm-codesafe-elf-gcc (GCC) 3.3.6
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3489: $? = 0
configure:3478: /opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc -mapcs-32
-msoft-float -mlittle-endian -march=armv4 -nostdinc -v >&5
Reading specs from
/opt/nfast/gcc/bin/../lib/gcc-lib/strongarm-codesafe-elf/3.3.6/specs
Configured with: ../gcc-3.3.6/configure --target=strongarm-codesafe-elf
--prefix=/ncipher/vines/b.1196079149.10270.1/gccsrc-1.1.13/own/spec/armdev/gcc
--enable-languages=c
Thread model: single
gcc version 3.3.6
configure:3489: $? = 0
configure:3478: /opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc -mapcs-32
-msoft-float -mlittle-endian -march=armv4 -nostdinc -V >&5
strongarm-codesafe-elf-gcc: `-V' must come at the start of the command line
configure:3489: $? = 1
configure:3478: /opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc -mapcs-32
-msoft-float -mlittle-endian -march=armv4 -nostdinc -qversion >&5
strongarm-codesafe-elf-gcc: unrecognized option `-qversion'
strongarm-codesafe-elf-gcc: no input files
configure:3489: $? = 1
configure:3509: checking whether the C compiler works
configure:3531: /opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc -mapcs-32
-msoft-float -mlittle-endian -march=armv4 -nostdinc    conftest.c  >&5
/opt/nfast/gcc/bin/../lib/gcc-lib/strongarm-codesafe-elf/3.3.6/../../../../strongarm-codesafe-elf/bin/ld:
crt0.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:3535: $? = 1
configure:3573: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libsecp256k1"
| #define PACKAGE_TARNAME "libsecp256k1"
| #define PACKAGE_VERSION "0.1"
| #define PACKAGE_STRING "libsecp256k1 0.1"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "libsecp256k1"
| #define VERSION "0.1"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3578: error: in
`/home/laurence/Projects/BitVault/HSM/gem-hsm/secp256k1':
configure:3580: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value='/opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc
-mapcs-32 -msoft-float -mlittle-endian -march=armv4 -nostdinc'
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CRYPTO_CFLAGS_set=
ac_cv_env_CRYPTO_CFLAGS_value=
ac_cv_env_CRYPTO_LIBS_set=
ac_cv_env_CRYPTO_LIBS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=
ac_cv_env_PKG_CONFIG_LIBDIR_value=
ac_cv_env_PKG_CONFIG_PATH_set=
ac_cv_env_PKG_CONFIG_PATH_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-unknown-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=strongarm-codesafe-elf
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=arm-codesafe-elf
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=mawk
ac_cv_prog_CC='/opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc -mapcs-32
-msoft-float -mlittle-endian -march=armv4 -nostdinc'
ac_cv_prog_STRIP=/opt/nfast/gcc/bin/strongarm-codesafe-elf-strip
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL}
/home/laurence/Projects/BitVault/HSM/gem-hsm/secp256k1/build-aux/missing
aclocal-1.14'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
AR='/opt/nfast/gcc/bin/strongarm-codesafe-elf-ar'
AUTOCONF='${SHELL}
/home/laurence/Projects/BitVault/HSM/gem-hsm/secp256k1/build-aux/missing
autoconf'
AUTOHEADER='${SHELL}
/home/laurence/Projects/BitVault/HSM/gem-hsm/secp256k1/build-aux/missing
autoheader'
AUTOMAKE='${SHELL}
/home/laurence/Projects/BitVault/HSM/gem-hsm/secp256k1/build-aux/missing
automake-1.14'
AWK='mawk'
BREW=''
BUILD_EXEEXT=''
BUILD_OBJEXT=''
CC='/opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc -mapcs-32 -msoft-float
-mlittle-endian -march=armv4 -nostdinc'
CCDEPMODE=''
CC_FOR_BUILD=''
CFLAGS=''
CFLAGS_FOR_BUILD=''
CPP=''
CPPFLAGS=''
CPPFLAGS_FOR_BUILD=''
CPP_FOR_BUILD=''
CRYPTO_CFLAGS=''
CRYPTO_LIBS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_MODULE_ECDH_FALSE=''
ENABLE_MODULE_ECDH_TRUE=''
ENABLE_MODULE_RECOVERY_FALSE=''
ENABLE_MODULE_RECOVERY_TRUE=''
ENABLE_MODULE_SCHNORR_FALSE=''
ENABLE_MODULE_SCHNORR_TRUE=''
EXEEXT=''
FGREP=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD='/opt/nfast/gcc/bin/strongarm-codesafe-elf-ld'
LDFLAGS=''
LDFLAGS_FOR_BUILD=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL}
/home/laurence/Projects/BitVault/HSM/gem-hsm/secp256k1/build-aux/missing
makeinfo'
MANIFEST_TOOL=''
MKDIR_P='/bin/mkdir -p'
NM='/opt/nfast/gcc/bin/strongarm-codesafe-elf-nm'
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='libsecp256k1'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='libsecp256k1'
PACKAGE_STRING='libsecp256k1 0.1'
PACKAGE_TARNAME='libsecp256k1'
PACKAGE_URL=''
PACKAGE_VERSION='0.1'
PATH_SEPARATOR=':'
PKG_CONFIG=''
PKG_CONFIG_LIBDIR=''
PKG_CONFIG_PATH=''
PORT=''
RANLIB='/opt/nfast/gcc/bin/strongarm-codesafe-elf-ranlib'
SECP_INCLUDES=''
SECP_LIBS=''
SECP_TEST_INCLUDES=''
SECP_TEST_LIBS=''
SED=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP='/opt/nfast/gcc/bin/strongarm-codesafe-elf-strip'
USE_BENCHMARK_FALSE=''
USE_BENCHMARK_TRUE=''
USE_ECMULT_STATIC_PRECOMPUTATION_FALSE=''
USE_ECMULT_STATIC_PRECOMPUTATION_TRUE=''
USE_TESTS_FALSE=''
USE_TESTS_TRUE=''
VERSION='0.1'
ac_ct_AR=''
ac_ct_CC=''
ac_ct_CC_FOR_BUILD=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__nodep='_no'
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias='x86_64-unknown-linux-gnu'
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='arm-codesafe-elf'
host_alias='strongarm-codesafe-elf'
host_cpu='arm'
host_os='elf'
host_vendor='codesafe'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL}
/home/laurence/Projects/BitVault/HSM/gem-hsm/secp256k1/build-aux/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "libsecp256k1"
#define PACKAGE_TARNAME "libsecp256k1"
#define PACKAGE_VERSION "0.1"
#define PACKAGE_STRING "libsecp256k1 0.1"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "libsecp256k1"
#define VERSION "0.1"

configure: exit 77




reply via email to

[Prev in Thread] Current Thread [Next in Thread]