Closed czka closed 11 years ago
Hi, I used to compile x64 binaries for pooler, and my MinGW64 installation did not need the -DPTW32_STATIC_LIB switch, as statically linking pthreads in general is extremely hard, and not just using a simple switch.
Mind I ask if you compiled libpthread on your own?
Yes, I have built ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz myself, according to instructions on http://www.mythtv.org/wiki/MythTV_on_Windows#libpthread_2. That went smooth.
My MinGW64 installation is TDM64 4.7.1, installed using their http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-webdl.exe/download (this link is on http://tdm-gcc.tdragon.net/download in "On-Demand Installer" section). I have selected all options in the installer except for fortran, objc and openmp.
I added msys to my C:\mingw64 installation, using https://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ (linked on http://mingw.org/wiki/Getting_Started), having chosen "MSYS Basic System" ONLY.
Then I had issues with linking during make, like I wrote above. Finally, my working configure line was:
LIBCURL='-lcurldll' CFLAGS='-DPTW32_STATIC_LIB -O3 -march=native -mtune=native -pipe' ./configure
The resulting minerd.exe works fine. It requires the following libs to be present along with it in the same dir, if ran from Windows cmd outside mingw64:
P.S.
If you could describe a simpler procedure to obtain a working env of MinGW64 + MSYS + minerd build deps that would be lovely!
The Windows build instructions assume the use of a precompiled version of libpthread. I didn't personally test building with MinGW-w64 on Windows, but a couple of other users have had no problems when following the steps outlined in the README. The same instructions also worked for me when cross-compiling with MinGW-w64 under Linux.
What MinGW-w64 distribution provide a precompiled libpthread? The TDM one doesn't.
Please add this info to README: to build minerd.exe from pooler-cpuminer-2.2.3.tar.gz in MinGW 64 on Windows 7 I had to add `-DPTW32_STATIC_LIB' to my CFLAGS at ./configure. Otherwise make fails with:
Also, the README could mention the nice how-to on pthreads installation, for MinGW 64 users: http://www.mythtv.org/wiki/MythTV_on_Windows#libpthread_2 (mind the `libpthread.a' rename "trick").
As I'm a complete MingW newbie, it took me several hours to sort these 2 things out. Probably others would find such hints usefull.