lucasjones / cpuminer-multi

Multi-algo CPUMiner & Reference Cryptonote Miner (JSON-RPC 2.0)
Other
638 stars 1.5k forks source link

configure: error: cannot run C compiled programs. #41

Open saadsaidi opened 7 years ago

saadsaidi commented 7 years ago

Trying to compile on freebsd and getting the following

checking whether we are cross compiling... configure: error: in /root/cpuminer-cryptonite': configure: error: cannot run C compiled programs. If you meant to cross compile, use--host'. See `config.log' for more details

Below 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 cpuminer configure 1.0.4, which was generated by GNU Autoconf 2.69. Invocation command line was

$ ./configure

---------

Platform.

---------

hostname = pfs-gh.9mcloud.com uname -m = amd64 uname -r = 10.3-RELEASE-p17 uname -s = FreeBSD uname -v = FreeBSD 10.3-RELEASE-p17 #10 6da131e75c7(RELENG_2_3_3): Wed Mar 8 14:24:33 CST 2017 root@ce23-amd64-builder:/builder/pfsense-233/tmp/obj/builder/pfsense-233/tmp/FreeBSD-src/sys/pfSense

/usr/bin/uname -p = amd64 /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: /sbin PATH: /bin PATH: /usr/sbin PATH: /usr/bin PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /root/bin

-----------

Core tests.

-----------

configure:2324: checking build system type configure:2338: result: amd64-unknown-freebsd10.3 configure:2358: checking host system type configure:2371: result: amd64-unknown-freebsd10.3 configure:2391: checking target system type configure:2404: result: amd64-unknown-freebsd10.3 configure:2448: checking for a BSD-compatible install configure:2516: result: /usr/bin/install -c configure:2527: checking whether build environment is sane configure:2582: result: yes configure:2733: checking for a thread-safe mkdir -p configure:2772: result: ./install-sh -c -d configure:2779: checking for gawk configure:2795: found /usr/local/bin/gawk configure:2806: result: gawk configure:2817: checking whether make sets $(MAKE) configure:2839: result: yes configure:2868: checking whether make supports nested variables configure:2885: result: yes configure:3015: checking whether to enable maintainer-specific portions of Makefiles configure:3024: result: no configure:3050: checking for style of include used by make configure:3078: result: GNU configure:3149: checking for gcc configure:3165: found /usr/local/bin/gcc configure:3176: result: gcc configure:3405: checking for C compiler version configure:3414: gcc --version >&5 gcc (FreeBSD Ports Collection) 4.9.4 Copyright (C) 2015 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:3425: $? = 0 configure:3414: gcc -v >&5 Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc49/gcc/x86_64-portbld-freebsd10.3/4.9.4/lto-wrapper Target: x86_64-portbld-freebsd10.3 Configured with: /wrkdirs/usr/ports/lang/gcc/work/gcc-4.9.4/configure --disable-bootstrap --disable-nls --enable-gnu-indirect-function --libdir=/usr/local/lib/gcc49 --libexecdir=/usr/local/libexec/gcc49 --program-suffix=49 --with-as=/usr/local/bin/as --with-gmp=/usr/local --with-gxx-include-dir=/usr/local/lib/gcc49/include/c++/ --with-ld=/usr/local/bin/ld --with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --disable-libgcj --enable-languages=c,c++,objc,fortran --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/gcc49 --build=x86_64-portbld-freebsd10.3 Thread model: posix gcc version 4.9.4 (FreeBSD Ports Collection) configure:3425: $? = 0 configure:3414: gcc -V >&5 gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files compilation terminated. configure:3425: $? = 1 configure:3414: gcc -qversion >&5 gcc: error: unrecognized command line option '-qversion' gcc: fatal error: no input files compilation terminated. configure:3425: $? = 1 configure:3445: checking whether the C compiler works configure:3467: gcc conftest.c >&5 configure:3471: $? = 0 configure:3519: result: yes configure:3522: checking for C compiler default output file name configure:3524: result: a.out configure:3530: checking for suffix of executables configure:3537: gcc -o conftest conftest.c >&5 configure:3541: $? = 0 configure:3563: result: configure:3585: checking whether we are cross compiling configure:3593: gcc -o conftest conftest.c >&5 In file included from conftest.c:11:0: /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd10.3/4.9.4/include-fixed/stdio.h:53:23: fatal error: sys/cdefs.h: No such file or directory

include <sys/cdefs.h>

                   ^

compilation terminated. configure:3597: $? = 1 configure:3604: ./conftest eval: ./conftest: not found configure:3608: $? = 127 configure:3615: error: in /root/cpuminer-multi': configure:3619: error: cannot run C compiled programs. If you meant to cross compile, use--host'. See `config.log' for more details

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

Cache variables.

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

ac_cv_build=amd64-unknown-freebsd10.3 ac_cv_env_CCASFLAGS_set='' ac_cv_env_CCASFLAGS_value='' ac_cv_env_CCAS_set='' ac_cv_env_CCAS_value='' ac_cv_env_CC_set='' ac_cv_env_CC_value='' 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_LDFLAGS_set='' ac_cv_env_LDFLAGS_value='' ac_cv_env_LIBS_set='' ac_cv_env_LIBS_value='' ac_cv_env_build_alias_set='' ac_cv_env_build_alias_value='' ac_cv_env_host_alias_set='' ac_cv_env_host_alias_value='' ac_cv_env_target_alias_set='' ac_cv_env_target_alias_value='' ac_cv_host=amd64-unknown-freebsd10.3 ac_cv_path_install='/usr/bin/install -c' ac_cv_prog_AWK=gawk ac_cv_prog_ac_ct_CC=gcc ac_cv_prog_make_make_set=yes ac_cv_target=amd64-unknown-freebsd10.3 am_cv_make_support_nested_variables=yes

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

Output variables.

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

ACLOCAL='${SHELL} /root/cpuminer-multi/missing aclocal-1.15' ALLOCA='' AMDEPBACKSLASH='\' AMDEP_FALSE='#' AMDEP_TRUE='' AMTAR='$${TAR-tar}' AM_BACKSLASH='\' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' AM_DEFAULT_VERBOSITY='1' AM_V='$(V)' ARCH_ARM_FALSE='' ARCH_ARM_TRUE='' ARCH_x86_64_FALSE='' ARCH_x86_64_TRUE='' ARCH_x86_FALSE='' ARCH_x86_TRUE='' AUTOCONF='${SHELL} /root/cpuminer-multi/missing autoconf' AUTOHEADER='${SHELL} /root/cpuminer-multi/missing autoheader' AUTOMAKE='${SHELL} /root/cpuminer-multi/missing automake-1.15' AWK='gawk' CC='gcc' CCAS='' CCASDEPMODE='' CCASFLAGS='' CCDEPMODE='' CFLAGS='' CPP='' CPPFLAGS='' CYGPATH_W='echo' DEFS='' DEPDIR='.deps' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' EXEEXT='' GREP='' HAVE_WINDOWS_FALSE='' HAVE_WINDOWS_TRUE='' INSTALL_DATA='${INSTALL} -m 644' INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' JANSSON_LIBS='' LDFLAGS='' LIBOBJS='' LIBS='' LTLIBOBJS='' MAINT='#' MAINTAINER_MODE_FALSE='' MAINTAINER_MODE_TRUE='#' MAKEINFO='${SHELL} /root/cpuminer-multi/missing makeinfo' MKDIR_P='./install-sh -c -d' OBJEXT='' PACKAGE='cpuminer' PACKAGE_BUGREPORT='' PACKAGE_NAME='cpuminer' PACKAGE_STRING='cpuminer 1.0.4' PACKAGE_TARNAME='cpuminer' PACKAGE_URL='' PACKAGE_VERSION='1.0.4' PATH_SEPARATOR=':' PTHREAD_FLAGS='' PTHREAD_LIBS='' RANLIB='' SET_MAKE='' SHELL='/bin/sh' STRIP='' USE_ASM_FALSE='' USE_ASM_TRUE='' VERSION='1.0.4' WANT_JANSSON_FALSE='' WANT_JANSSON_TRUE='' WS2_LIBS='' ac_ct_CC='gcc' amEXEEXT_FALSE='' am__EXEEXT_TRUE='' amfastdepCCAS_FALSE='' amfastdepCCAS_TRUE='' am__fastdepCC_FALSE='' amfastdepCC_TRUE='' aminclude='include' amisrc='' amleading_dot='.' am__nodep='_no' amquote='' amtar='$${TAR-tar} chof - "$$tardir"' amuntar='$${TAR-tar} xf -' bindir='${exec_prefix}/bin' build='amd64-unknown-freebsd10.3' build_alias='' build_cpu='amd64' build_os='freebsd10.3' build_vendor='unknown' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='NONE' host='amd64-unknown-freebsd10.3' host_alias='' host_cpu='amd64' host_os='freebsd10.3' host_vendor='unknown' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' install_sh='${SHELL} /root/cpuminer-multi/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='amd64-unknown-freebsd10.3' target_alias='' target_cpu='amd64' target_os='freebsd10.3' target_vendor='unknown'

-----------

confdefs.h.

-----------

/ confdefs.h /

define PACKAGE_NAME "cpuminer"

define PACKAGE_TARNAME "cpuminer"

define PACKAGE_VERSION "1.0.4"

define PACKAGE_STRING "cpuminer 1.0.4"

define PACKAGE_BUGREPORT ""

define PACKAGE_URL ""

define PACKAGE "cpuminer"

define VERSION "1.0.4"

configure: exit 1

akostadinov commented 6 years ago

Same here, gcc 7.1.1 20170622

I removed -V -qversion and configure passed that point.