Bitcoin Forum
June 17, 2024, 03:12:08 AM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Mining software (miners) / Win32 CgMiner CURL static linking on: March 30, 2014, 04:29:17 PM
Helloo, i have build libcurl with ssl support statically myself, when i try to compile a simple samples it links allright in a static executable,
but when i try to link it with cgminer 3.6.6 i get

Code:
c:\mingw\include\sdkddkver.h:154:0: note: this is the location of the previous d
efinition
 #    define _WIN32_WINNT _WIN32_WINNT_WIN2K
 ^
  CC     cgminer-api.o
  CC     cgminer-logging.o
  CC     cgminer-driver-opencl.o
  CC     cgminer-ocl.o
  CC     cgminer-findnonce.o
  CC     cgminer-adl.o
  CCLD   cgminer.exe
cgminer-cgminer.o:cgminer.c:(.text+0x3304): undefined reference to `timeEndPerio
d'
cgminer-cgminer.o:cgminer.c:(.text+0x9f77): undefined reference to `timeEndPerio
d'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cgminer-cg
miner.o: bad reloc address 0x200 in section `.data'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link
 failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
make[2]: *** [cgminer.exe] Error 1
make[2]: Leaving directory `/home/user/cgminer2/cgminer-3.6.6'

So i assume timeEndPeriod are undefined for some reason now, how do i fix that?

My configuration of cgminer is
Quote
configure --enable-opencl --enable-adl --disable-shared CFLAGS="-DCURL_STATICLIB -DPTW32_STATIC_LIB -O2 -msse2"

My configuration of libcurl is
Quote
configure --disable-shared --disable-ldap --with-ssl=/usr/local LIBS="-lgdi32"

My configuration of openssl is
Quote
perl Configure mingw no-shared no-asm --prefix=/c/OpenSSL
2  Bitcoin / Mining software (miners) / Mingw&Msys win32 Troubles with building cgminer 3.6.6 on: March 28, 2014, 07:23:08 PM
Hello, i'm trying to build the cgminer with mingw+msys, i followed in the windows-build.txt file and installed everything, but when i do

autoreconf: Leaving directory `compat/jansson-2.5'
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
configure.ac:95: error: possibly undefined macro: AC_DEFINE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:185: error: possibly undefined macro: AC_MSG_ERROR

autoreconf: /usr/bin/autoconf-2.68 failed with exit status: 1


I assume that configure.ac:185 is

if test "x$has_winpthread" != xtrue; then
        AC_CHECK_LIB(pthread, pthread_create, ,
this->                AC_MSG_ERROR([Could not find pthread library - please install libpthread]))
        PTHREAD_LIBS=-lpthread
fi


And configure.ac:95 is

 *-*-mingw*)
    have_win32=true
    PTHREAD_FLAGS=""
    DLOPEN_FLAGS=""
    WS2_LIBS="-lws2_32"
    MM_LIBS="-lwinmm"
    RT_LIBS=""
this->   AC_DEFINE([_WIN32_WINNT], [0x0501], "WinNT version for XP+ support")
    ;;

What did i make wrong? Also can i get rid of those dll files, and build the cgminer statically?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!