Discussion:
Cross-compiling with Autoconf
Dustin Laurence
2015-11-02 19:39:12 UTC
Permalink
Situation: I need to cross-compile an autoconfiscated library
(libsecp256k1: https://github.com/bitcoin/secp256k1) for a couple of
embedded systems (one ARM-based, one PPC-based). What I believe to be
the Right Thing is to teach autoconf to use the vendor cross-compilers,
vendor C libraries, firmware API libraries, etc., hopefully without
having to fork and hack the library build system (...I hope), so I
simply cross-compile the library and then link to it like I would
anything else. The vendor cross-compilers are just (rather old) GCC
versions built for the target architecture, so it seems that this should
be a reasonably sane thing to do.

I have the flags needed to correctly cross-compile our code for the
target architectures, obviously, so I think I have all the tools in hand
and just need to learn how to put them together. I found the
Vaughan-Elliston-Tromey-Taylor book online as well as random internet
sources of questionable provenance, but they usually don't go further
than mentioning the build and host flags and don't discuss custom
toolchains, custom C libraries, etc. I came up with the following first
cut for the ARM build (snipped out of the makefile):


LONG_ARCH = strongarm

./configure \
--build=`./build-aux/config.guess` \
--host $(LONG_ARCH)-codesafe-elf \
CC="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-gcc" \
AR="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-ar" \
RANLIB="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-ranlib" \
AS="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-as" \
LD="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-ld" \
NM="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-nm" \
STRIP="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-strip

So, hopefully, I've figured out how to set build and host (the host
argument is obviously the prefix the vendor used when building the
toolchain) and point autoconf at the correct toolchain.

First problem--configure dies, reporting that "C compiler cannot create
executables." I suspect this is related to the Second Problem.

Second Problem: I don't know The Right Way to pass in the architecture
flags to autoconf (-march, text segment address, etc.). I tried
overriding CFLAGS with the values I use for my own code, but that didn't
work. Plus, I suspect that I shouldn't simply set CFLAGS anyway, since
the library build system presumably has some important opinions about
that. I guess I simply want to add my architecture flags to the
library's choices, not override. I tried appending them to the value of
CC, but that failed as well. I imagine I'm missing some basic autoconf
knowledge here.

What basic piece of knowledge am I missing here?

DLL
Gavin Smith
2015-11-02 20:41:21 UTC
Permalink
Post by Dustin Laurence
First problem--configure dies, reporting that "C compiler cannot create
executables."
Is there anything in config.log that could shed light on the causes of
this failure?

It might be simpler to debug by getting the configure run right from
the command line first, instead of doing it from a Makefile. In fact,
running configure from a Makefile you wrote yourself is unusual.
Post by Dustin Laurence
Second Problem: I don't know The Right Way to pass in the architecture
flags to autoconf (-march, text segment address, etc.). I tried
overriding CFLAGS with the values I use for my own code, but that didn't
work. Plus, I suspect that I shouldn't simply set CFLAGS anyway, since
the library build system presumably has some important opinions about
that. I guess I simply want to add my architecture flags to the
library's choices, not override. I tried appending them to the value of
CC, but that failed as well. I imagine I'm missing some basic autoconf
knowledge here.
These generic installation instructions:
https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Multiple-Architectures.html

show putting flags directly in CC.
Gavin Smith
2015-11-02 20:42:45 UTC
Permalink
Post by Gavin Smith
https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Multiple-Architectures.html
show putting flags directly in CC.
But I should add that using CFLAGS is more usual:
https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Compilers-and-Options.html#Compilers-and-Options
Dustin Laurence
2015-11-03 20:15:23 UTC
Permalink
Post by Gavin Smith
https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Compilers-and-Options.html#Compilers-and-Options
I tried adding just the architecture flags to CFLAGS, but it doesn't
really matter because it isn't finding the runtime:

Invocation (sorry about the crappy mail client wrapping):

./configure \
--build=`./build-aux/config.guess` \
--host strongarm-codesafe-elf \
CC="/opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc" \
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" \
CFLAGS="-mapcs-32 -msoft-float -mlittle-endian
-march=armv4 -nostdinc"

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
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 CFLAGS=-mapcs-32
-msoft-float -mlittle-endian -march=armv4 -nostdinc

## --------- ##
## 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
configure:3469: checking for C compiler version
configure:3478: /opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc --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 -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 -V >&5
strongarm-codesafe-elf-gcc: `-V' option must have argument
configure:3489: $? = 1
configure:3478: /opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc -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
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-mapcs-32 -msoft-float -mlittle-endian
-march=armv4 -nostdinc'
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
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'
CCDEPMODE=''
CC_FOR_BUILD=''
CFLAGS='-mapcs-32 -msoft-float -mlittle-endian -march=armv4 -nostdinc'
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
Dustin Laurence
2015-11-04 00:37:42 UTC
Permalink
This may be premature to post, but I wanted to report that I did make it
past the crt0.o problem that had me tearing my hair out.
Post by Gavin Smith
https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Compilers-and-Options.html#Compilers-and-Options
According to the GNU coding standards, CFLAGS is *supposed* to be
reserved for the user (i.e., you) to set, and passed unadulterated
to *every* invocation of $CC. Package authors sometimes botch it
up
Taking these comments as clues that I may need to feed other build
variables to configure as well, and knowing that _start is in libc, I
looked at what would control the link and finally find the answer to
that problem:

LDFLAGS="-nostdlib"

does the trick. That's progress.

This gets the configure script through to this error:

checking for /opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc option to
accept ISO C89... (cached) unsupported
configure: error: c89 compiler support required

Which is odd because I can call the compiler in my makefile with
-std=c89 and it doesn't complain about the flag. Nor should it be
necessary, since c89 is the default.

The config.log is below. This appears to be where it fails in configure.ac:

AC_PROG_CC_C89
if test x"$ac_cv_prog_cc_c89" = x"no"; then
AC_MSG_ERROR([c89 compiler support required])
fi

I guess AC_PROG_CC_C89 is a standard macro, so I find it hard to believe
that it would fail on GCC, so that suggests the problem is still in my
configure invocation, which would surprise no one. I haven't tried to
set CFLAGS yet since it's still failing in the tests of the compiler itself.

Dustin

----------------------------------------------------

Invocation:

./configure \
--build=`./build-aux/config.guess` \
--host strongarm-codesafe-elf \
CC="/opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc" \
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" \
LDFLAGS="-nostdlib"

config.log:

I'm attaching it since it's getting so long--hope that doesn't bother
anyone.

Dustin Laurence
2015-11-03 19:58:32 UTC
Permalink
Post by Gavin Smith
Post by Dustin Laurence
First problem--configure dies, reporting that "C compiler cannot create
executables."
Is there anything in config.log that could shed light on the causes of
this failure?
Sorry, that was bad manners. I meant to add the file to my original
message, but of course I forgot. :-( I don't know if the customs of
this list discourage attachments, so I'll append it below. If
attachments are preferred I'll switch to doing it that way.

It says it can't find crt0.o, which is why I guessed that I need to
figure out how to point it to the embedded system runtime before I can
tell if anything else works.
Post by Gavin Smith
It might be simpler to debug by getting the configure run right from
the command line first, instead of doing it from a Makefile. In fact,
running configure from a Makefile you wrote yourself is unusual.
Yeah, it's only there for experimental purposes because I got tired of
experimenting with doing up-arrow in the shell and editing my previous
invocation. It would have been a trivial shell script except I already
have all the directories and flags defined in make and I know they're
correct.
Post by Gavin Smith
https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Multiple-Architectures.html
show putting flags directly in CC.
Thanks, I didn't find that, and I probably do want to install for
multiple architectures as that describes. Putting the architecture
flags in CC doesn't change the error, though (I'll show that in another
reply, one config.log per message is more than enough).

Dustin

------------------------------------------------------------------------------------------
Invocation:

./configure \
--build=`./build-aux/config.guess` \
--host strongarm-codesafe-elf \
CC="/opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc" \
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"

resulting 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
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
configure:3469: checking for C compiler version
configure:3478: /opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc --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 -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 -V >&5
strongarm-codesafe-elf-gcc: `-V' option must have argument
configure:3489: $? = 1
configure:3478: /opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc -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
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
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
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'
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
Dustin Laurence
2015-11-03 21:17:40 UTC
Permalink
Post by Dustin Laurence
It says it can't find crt0.o
I did some more investigation on this, and one interesting thing is that
I can't find crt0.o either--it isn't anywhere in the SDK, though a
number of other *crt*.o files exist. That seems wrong since the
complaint is that LD can't find a file named crt0.o, but the tools work
so that we know that nothing is missing. There is no crt0.o in /usr/lib
either, for that matter, so probably it isn't expected to exist as a
separate file. Clearly one problem I have is not really understanding
what gcc and ld are doing under the hood.

If it helps, here are valid invocations of the SDK gcc and ld during an
ARM build (there is a *lot* of noise in those command lines from library
requirements and a bunch of other stuff, but I didn't trim anything so
there is no question about whether I took out something important):

/opt/nfast/gcc/bin/strongarm-codesafe-elf-gcc -O2 -Wall -Wpointer-arith
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -mapcs-32
-msoft-float -mlittle-endian -march=armv4 -nostdinc -fno-builtin -Werror
-std=gnu99 -Wformat=2 -D_FORTIFY_SOURCE=2
-fno-delete-null-pointer-checks -fno-strict-aliasing -fms-extensions
-Winline -DSERVER_ADDRS='{"127.0.0.1", NULL}' -DNDEBUG
-DGEM_WORKER_THREADS=4 -DNF_CROSSCC_BSDUSR=1 -D_THREAD_SAFE
-DNF_CROSSCC=1 -DNF_CROSSCC_ARM_GCC=1 -I../trezor-crypto -I.. -include
th_api/fixstdarg.h -I/opt/nfast/c/csd/include-see/bsdlib
-I/opt/nfast/c/csd/include-see/cutils
-I/opt/nfast/c/csd/include-see/bsdsee
-I/opt/nfast/c/csd/include-see/hilibs
-I/opt/nfast/c/csd/include-see/sworld
-I/opt/nfast/c/csd/include-see/nflog -I/opt/nfast/c/csd/examples/cutils
-I/opt/nfast/c/csd/examples/hilibs -c -MD -o socket.o ../gem_hsm/socket.c
/opt/nfast/gcc/bin/strongarm-codesafe-elf-ar rv libgem_hsm.a socket.o
/opt/nfast/gcc/bin/strongarm-codesafe-elf-ar: creating libgem_hsm.a

...

/opt/nfast/gcc/bin/strongarm-codesafe-elf-ld -warn-common -nostdlib
-Ttext 0x08400000 -Tdata 0x08600000 -z now -z relro -o gem_module.elf
gem_module.o socket.o error.o worker.o string_ref.o frame.o byte_ref.o
wallet_node.o log.o app.o random.o wallet_seed.o random_key.o
callbacks.o gem_secp256k1.o transact.o key_convert.o buf.o env.o
th_M_ACL.o th_Transact.o th_M_EllipticCurve.o th_M_Command.o
th_M_Reply.o th_M_Field.o th_M_KeyData.o th_M_PlainText.o
th_M_CipherText.o th_memset.o ncthread-unix.o ncthread-upcalls.o
normalmalloc.o nfutil.o simplebignum.o bip32.o ecdsa.o sha2.o
secp256k1.o bignum.o base58.o hmac.o ripemd160.o rand.o testutil.o
/opt/nfast/c/csd/lib-arm-gcc/hostinetsocks.o
-L/opt/nfast/c/csd/lib-arm-gcc/ -lnfkm -lvfsextras -lcutils -pthread -lc

Dustin
Nick Bowler
2015-11-02 22:28:24 UTC
Permalink
Post by Dustin Laurence
Situation: I need to cross-compile an autoconfiscated library
[...]
Post by Dustin Laurence
LONG_ARCH = strongarm
./configure \
--build=`./build-aux/config.guess` \
--host $(LONG_ARCH)-codesafe-elf \
CC="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-gcc" \
AR="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-ar" \
RANLIB="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-ranlib" \
AS="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-as" \
LD="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-ld" \
NM="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-nm" \
STRIP="/opt/nfast/gcc/bin/$(LONG_ARCH)-codesafe-elf-strip
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.
Post by Dustin Laurence
First problem--configure dies, reporting that "C compiler cannot create
executables." I suspect this is related to the Second Problem.
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.
Post by Dustin Laurence
Second Problem: I don't know The Right Way to pass in the architecture
flags to autoconf (-march, text segment address, etc.). I tried
overriding CFLAGS with the values I use for my own code, but that didn't
work. Plus, I suspect that I shouldn't simply set CFLAGS anyway, since the
library build system presumably has some important opinions about that.
[...]

According to the GNU coding standards, CFLAGS is *supposed* to be
reserved for the user (i.e., you) to set, and passed unadulterated
to *every* invocation of $CC. Package authors sometimes botch it up,
either by modifying CFLAGS in some way, or by failing to pass $CFLAGS
to every invocation. Either may cause serious build problems if you
need specific flags just to make the compiler work at all (very common
with embedded targets).

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. But ...
Post by Dustin Laurence
I tried appending them to the value of CC, but that failed as well. I
imagine I'm missing some basic autoconf knowledge here.
... this should have worked. For example, something like:

./configure --build=x86_64-pc-linux-gnu \
--host=strongarm-codesafe-elf \
CC='strongarm-codesafe-elf-gcc -mflag=whatever ...'

should behave acceptably. If it is not you will need to open up the
config.log file to see what's happening.

Cheers,
Nick
Dustin Laurence
2015-11-03 20:30:28 UTC
Permalink
Post by Nick Bowler
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.
\
Post by Nick Bowler
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.
Post by Nick Bowler
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
Loading...