Title: Ubuntu 12.04 - cpuminer compile problem - "C compiler cannot create..." Post by: gramma on March 22, 2013, 02:27:19 PM Any and all help is appreciated!
Following the directions on the litecoinpool.org site: Quote Linux users: download and compile cpuminer. Under Debian and Ubuntu, you can use the following recipe: sudo apt-get install automake build-essential git sudo apt-get install libcurl4-openssl-dev git clone git://github.com/pooler/cpuminer.git cd cpuminer ./autogen.sh ./configure CFLAGS="-O3" make I get the following after ./configure CFLAGS="-O3" Quote checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/home/me/cpuminer': configure: error: C compiler cannot create executables See `config.log' for more details I didn't see anything in config.log that seemed helpful, at least not to a noob. Do I need to install any random C compiler? A specific one? Obviously, "make" fails. Again, thanks for any help! Title: Re: Ubuntu 12.04 - cpuminer compile problem - "C compiler cannot create..." Post by: gnarcoinguy on March 22, 2013, 03:33:55 PM Do you have gcc installed?
If not, sudo apt-get install gcc Title: Re: Ubuntu 12.04 - cpuminer compile problem - "C compiler cannot create..." Post by: gramma on March 22, 2013, 03:37:25 PM Do you have gcc installed? If not, sudo apt-get install gcc I do/did, and it's at latest version. :-\ But it's still very kind of you to reply! Title: Re: Ubuntu 12.04 - cpuminer compile problem - "C compiler cannot create..." Post by: gnarcoinguy on March 22, 2013, 03:45:35 PM post the output of your config log. And just for shits and giggles try ./configure without any flags to see if you get any different errors.
Title: Re: Ubuntu 12.04 - cpuminer compile problem - "C compiler cannot create..." Post by: gramma on March 22, 2013, 04:16:18 PM post the output of your config log. And just for shits and giggles try ./configure without any flags to see if you get any different errors. In its entirety, before trying your suggestion, below: Quote 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 2.2.3, which was generated by GNU Autoconf 2.68. Invocation command line was $ ./configure CFLAGS=-03 ## --------- ## ## Platform. ## ## --------- ## hostname = linuxbox uname -m = i686 uname -r = 3.2.0-39-generic-pae uname -s = Linux uname -v = #62-Ubuntu SMP Wed Feb 27 22:25:11 UTC 2013 /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: /usr/lib/lightdm/lightdm PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /sbin PATH: /bin PATH: /usr/games ## ----------- ## ## Core tests. ## ## ----------- ## configure:2300: checking build system type configure:2314: result: i686-pc-linux-gnu configure:2334: checking host system type configure:2347: result: i686-pc-linux-gnu configure:2367: checking target system type configure:2380: result: i686-pc-linux-gnu configure:2424: checking for a BSD-compatible install configure:2492: result: /usr/bin/install -c configure:2503: checking whether build environment is sane configure:2553: result: yes configure:2694: checking for a thread-safe mkdir -p configure:2733: result: /bin/mkdir -p configure:2746: checking for gawk configure:2776: result: no configure:2746: checking for mawk configure:2762: found /usr/bin/mawk configure:2773: result: mawk configure:2784: checking whether make sets $(MAKE) configure:2806: result: yes configure:2890: checking whether to enable maintainer-specific portions of Makefiles configure:2899: result: no configure:2925: checking for style of include used by make configure:2953: result: GNU configure:3024: checking for gcc configure:3040: found /usr/bin/gcc configure:3051: result: gcc configure:3280: checking for C compiler version configure:3289: gcc --version >&5 gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 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:3300: $? = 0 configure:3289: gcc -v >&5 Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper Target: i686-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) configure:3300: $? = 0 configure:3289: gcc -V >&5 gcc: error: unrecognized option '-V' gcc: fatal error: no input files compilation terminated. configure:3300: $? = 4 configure:3289: gcc -qversion >&5 gcc: error: unrecognized option '-qversion' gcc: fatal error: no input files compilation terminated. configure:3300: $? = 4 configure:3320: checking whether the C compiler works configure:3342: gcc -03 conftest.c >&5 gcc: error: unrecognized option '-03' configure:3346: $? = 1 configure:3384: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "cpuminer" | #define PACKAGE_TARNAME "cpuminer" | #define PACKAGE_VERSION "2.2.3" | #define PACKAGE_STRING "cpuminer 2.2.3" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "cpuminer" | #define VERSION "2.2.3" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3389: error: in `/home/me/cpuminer': configure:3391: error: C compiler cannot create executables See `config.log' for more details ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_build=i686-pc-linux-gnu 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=set ac_cv_env_CFLAGS_value=-03 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=i686-pc-linux-gnu ac_cv_path_install='/usr/bin/install -c' ac_cv_path_mkdir=/bin/mkdir ac_cv_prog_AWK=mawk ac_cv_prog_ac_ct_CC=gcc ac_cv_prog_make_make_set=yes ac_cv_target=i686-pc-linux-gnu ## ----------------- ## ## Output variables. ## ## ----------------- ## ACLOCAL='${SHELL} /home/me/cpuminer/missing --run aclocal-1.11' ALLOCA='' AMDEPBACKSLASH='\' AMDEP_FALSE='#' AMDEP_TRUE='' AMTAR='$${TAR-tar}' ARCH_x86_64_FALSE='' ARCH_x86_64_TRUE='' ARCH_x86_FALSE='' ARCH_x86_TRUE='' AUTOCONF='${SHELL} /home/me/cpuminer/missing --run autoconf' AUTOHEADER='${SHELL} /home/me/cpuminer/missing --run autoheader' AUTOMAKE='${SHELL} /home/me/cpuminer/missing --run automake-1.11' AWK='mawk' CC='gcc' CCAS='' CCASDEPMODE='' CCASFLAGS='' CCDEPMODE='' CFLAGS='-03' 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='' LIBCURL='' LIBCURL_CPPFLAGS='' LIBOBJS='' LIBS='' LTLIBOBJS='' MAINT='#' MAINTAINER_MODE_FALSE='' MAINTAINER_MODE_TRUE='#' MAKEINFO='${SHELL} /home/me/cpuminer/missing --run makeinfo' MKDIR_P='/bin/mkdir -p' OBJEXT='' PACKAGE='cpuminer' PACKAGE_BUGREPORT='' PACKAGE_NAME='cpuminer' PACKAGE_STRING='cpuminer 2.2.3' PACKAGE_TARNAME='cpuminer' PACKAGE_URL='' PACKAGE_VERSION='2.2.3' PATH_SEPARATOR=':' PTHREAD_FLAGS='' PTHREAD_LIBS='' RANLIB='' SET_MAKE='' SHELL='/bin/bash' STRIP='' VERSION='2.2.3' WANT_JANSSON_FALSE='' WANT_JANSSON_TRUE='' WS2_LIBS='' _libcurl_config='' ac_ct_CC='gcc' am__EXEEXT_FALSE='' am__EXEEXT_TRUE='' am__fastdepCCAS_FALSE='' am__fastdepCCAS_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='i686-pc-linux-gnu' build_alias='' build_cpu='i686' build_os='linux-gnu' build_vendor='pc' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='NONE' host='i686-pc-linux-gnu' host_alias='' host_cpu='i686' host_os='linux-gnu' host_vendor='pc' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' install_sh='${SHELL} /home/me/cpuminer/install-sh' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' mkdir_p='/bin/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='i686-pc-linux-gnu' target_alias='' target_cpu='i686' target_os='linux-gnu' target_vendor='pc' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "cpuminer" #define PACKAGE_TARNAME "cpuminer" #define PACKAGE_VERSION "2.2.3" #define PACKAGE_STRING "cpuminer 2.2.3" #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "" #define PACKAGE "cpuminer" #define VERSION "2.2.3" configure: exit 77 After trying your suggestion, I get the following, quite different result (console output). I am not sure whether that means I am good to go. I don't know what the flags meant after ./configure. I am in pure monkey-see monkey-do at this point. Do you think I am good to make? Quote ./configure checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking for gcc option to accept ISO C99... -std=gnu99 checking how to run the C preprocessor... gcc -std=gnu99 -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking whether gcc -std=gnu99 needs -traditional... no checking whether gcc -std=gnu99 and cc understand -c and -o together... yes checking dependency style of gcc -std=gnu99... gcc3 checking for ranlib... ranlib checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking sys/endian.h usability... no checking sys/endian.h presence... no checking for sys/endian.h... no checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for sys/sysctl.h... yes checking whether be32dec is declared... no checking whether le32dec is declared... no checking whether be32enc is declared... no checking whether le32enc is declared... no checking for size_t... yes checking for working alloca.h... yes checking for alloca... yes checking for getopt_long... yes checking whether we can compile AVX code... yes checking whether we can compile XOP code... yes checking for json_loads in -ljansson... no checking for pthread_create in -lpthread... yes checking for gawk... (cached) mawk checking for curl-config... /usr/bin/curl-config checking for the version of libcurl... 7.22.0 checking for libcurl >= version 7.10.1... yes checking whether libcurl is usable... yes checking for curl_free... yes configure: creating ./config.status config.status: creating Makefile config.status: creating compat/Makefile config.status: creating compat/jansson/Makefile config.status: creating cpuminer-config.h config.status: executing depfiles commands Title: Re: Ubuntu 12.04 - cpuminer compile problem - "C compiler cannot create..." Post by: jgarzik on March 22, 2013, 04:30:00 PM Does the official cpuminer have the same problem? Perhaps try avoiding an unofficial version.
https://github.com/jgarzik/cpuminer/ Title: Re: Ubuntu 12.04 - cpuminer compile problem - "C compiler cannot create..." Post by: gramma on March 22, 2013, 04:52:35 PM Does the official cpuminer have the same problem? Perhaps try avoiding an unofficial version. https://github.com/jgarzik/cpuminer/ Interesting. I was following the recommendation from http://www.litecoinpool.org/help (http://www.litecoinpool.org/help), which delivered me to an entirely different github, https://github.com/pooler/cpuminer (https://github.com/pooler/cpuminer), which upon closer reading is a fork of yours. It claims bitcoin and litecoin capabilities. Was the fork to include litecoin (which is what I am wanting to use a CPU for)? Does your official miner support litecoin? Apologies if these are all really basic questions. I've been mining bitcoin for a while now, just for fun, using our graphics cards when we're not using the computers. Mining litecoin seems like a way to use the laptop and/or the other CPUs, and learn more about crypto/alt currencies. If I can figure it out. Thanks :) Title: Re: Ubuntu 12.04 - cpuminer compile problem - "C compiler cannot create..." Post by: gnarcoinguy on March 22, 2013, 05:09:00 PM type in 'make' and see what happens. I think it will compile at this point, it looks like you had a bad flag before. Worst thing that will happen is it won't build correctly, and you can start again with 'make clean'.
IF it builds than you are good to go with ./minerd and your pool information. Quote ./minerd --url=URL --userpass=user.worker:password Title: Re: Ubuntu 12.04 - cpuminer compile problem - "C compiler cannot create..." Post by: pooler on March 22, 2013, 06:23:37 PM Quote Invocation command line was $ ./configure CFLAGS=-03 There's your problem. It should be "-O3", not "-03" (big O, not zero), otherwise gcc won't recognize the flag. Does the official cpuminer have the same problem? Perhaps try avoiding an unofficial version. https://github.com/jgarzik/cpuminer/ Interesting. I was following the recommendation from http://www.litecoinpool.org/help (http://www.litecoinpool.org/help), which delivered me to an entirely different github, https://github.com/pooler/cpuminer (https://github.com/pooler/cpuminer), which upon closer reading is a fork of yours. It claims bitcoin and litecoin capabilities. Was the fork to include litecoin (which is what I am wanting to use a CPU for)? Does your official miner support litecoin? As seen above, the problem you encountered is not a bug, and you would get the same behavior with jgarzik's original version. My fork just adds support for the algorithm used for Litecoin mining, introduces a lot of optimizations and adds a few extra functionalities. Title: Re: Ubuntu 12.04 - cpuminer compile problem - "C compiler cannot create..." Post by: gramma on March 23, 2013, 10:45:29 PM Thank you! The change in the flag from 03 (zero three) to O3 (oh three) made all the difference. I'm out of town right now, but when I get back I'll be working with the problem of minerd not being in the same folder as litecoin-qt. But I am not the only one to have had that problem, and I feel progress has been made with success just around the corner!
|