Pages:
Author

Topic: Building headless Bitcoin and Bitcoin-qt on Windows - page 15. (Read 419390 times)

sr. member
Activity: 444
Merit: 250
I prefer evolution to revolution.
If you keep getting this exact error, then this exact error is what you should address:
Quote
C:\bitcoin>mingw32-make -f Makefile.Release
cd C:/bitcoin/src/leveldb && CC=gcc CXX=g++ TARGET_OS=OS_WINDOWS_CROSSCOMPILE mi
ngw32-make OPT="-pipe -fno-keep-inline-dllexport -D_FORTIFY_SOURCE=2 -O2" liblev
eldb.a libmemenv.a && ranlib C:/bitcoin/src/leveldb/libleveldb.a && ranlib C:/bi
tcoin/src/leveldb/libmemenv.a
'CC' is not recognized as an internal or external command,
operable program or batch file.
Makefile.Release:301: recipe for target 'c:/bitcoin/src/leveldb/libleveldb.a' failed
mingw32-make: *** [c:/bitcoin/src/leveldb/libleveldb.a] Error 1

I think you're skipping some important (analysis) steps in solving it.  As I read this output, it's telling you that "CC" is not a recognized command.  As far as I know, the command line as entered will generate this error as long as CC isn't a recognized command because "cd [blah blah blah] && [X]" means to change the active directory and then (assuming the directory existed and was accessible and therefore the cd command succeeded) execute X, and in Windows, "CC" really isn't a recognized command.

The command line comes from the mingw32-make executable, which appears to run under the assumption that it is in a shell that allows command-line variable assignments without using "SET" (as in "SET CC=gcc"), and the shell you're running doesn't allow that.  If mingw32-make created a command line that used SET (as in "cd [blah blah blah] && SET CC=gcc...", then maybe it would get past that part, but if I'm right about what mingw32-make needs in the shell it invokes, you'll get other errors anyway.

My best guess is that mingw32-make will invoke a shell that is supposed to be a minGW shell, and something about your setup causes it to invoke a non-MinGW shell.

I am extremely rusty, so there's a lot of guesswork in what I wrote.  If anyone reads that and sees an error in my guesswork, I'd very much appreciate if you point it out to me.

The main point I wanted to stress is that every error provides specific details that we ought not just ignore.  In this case, the fact is that it interpreted your use of CC as "an internal or external command, operable program or batch file," and you definitely are not using it that way.  When you track down the exact problem, you learn a lot along the way and expand your ability to help others.
hero member
Activity: 1316
Merit: 504
ok so i have read through countless post's and google searches to no avail everything goes as it should up until the point i do the last step (compiling) and i get this

Setting up a MinGW/Qt only environment...

-- QTDIR set to C:\Qt\4.8.6
-- PATH set to C:\Qt\4.8.6\bin
-- Adding C:\mingw32\bin to PATH
-- Adding C:\Windows\System32 to PATH
-- QMAKESPEC set to win32-g++-4.6

C:\Qt\4.8.6>cd C:\bitcoin\

C:\bitcoin>qmake "USE_QRCODE=1" "USE_UPNP=1" "USE_IPV6=1" bitcoin-qt.pro
Project MESSAGE: Building with QRCode support
Project MESSAGE: Building with UPNP support
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Project MESSAGE: Building with QRCode support
Project MESSAGE: Building with UPNP support
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Project MESSAGE: Building with QRCode support
Project MESSAGE: Building with UPNP support
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.

C:\bitcoin>mingw32-make -f Makefile.Release
cd C:/bitcoin/src/leveldb && CC=gcc CXX=g++ TARGET_OS=OS_WINDOWS_CROSSCOMPILE mi
ngw32-make OPT="-pipe -fno-keep-inline-dllexport -D_FORTIFY_SOURCE=2 -O2" liblev
eldb.a libmemenv.a && ranlib C:/bitcoin/src/leveldb/libleveldb.a && ranlib C:/bi
tcoin/src/leveldb/libmemenv.a
'CC' is not recognized as an internal or external command,
operable program or batch file.
Makefile.Release:301: recipe for target 'c:/bitcoin/src/leveldb/libleveldb.a' failed
mingw32-make: *** [c:/bitcoin/src/leveldb/libleveldb.a] Error 1

I've Try'd
Building libleveldb.a libmemenv.a from scratch over several times
try'd using libleveldb.a libmemenv.a from diff coin sources
try'd windows cmd & qt cmd
try'd multiple versions of mingw, msys, Qt
try'd editing bitcoin-qt.pro and makefile.mingw
added to PATH
added to folder's ie qt, mingw etc

getting the same error regardless of what i do tho

i can build bitcoind no probz at all with no errors just the damn qt wallet Sad


newbie
Activity: 42
Merit: 0
I never tried building the qt client, I'll see if I can have a look at it and report back if I manage to build it successfully
hero member
Activity: 490
Merit: 500
sp00lin9, did you do paragraph 2.6?
Quote
2.6 qrencode:
Download and unpack http://download.sourceforge.net/libpng/libpng-1.6.16.tar.gz inside your deps folder then configure and make:
Code:
cd /c/deps/libpng-1.6.16
configure --disable-shared
make
cp .libs/libpng16.a .libs/libpng.a

Download and unpack http://fukuchi.org/works/qrencode/qrencode-3.4.4.tar.gz inside your deps folder then configure and make:
Code:
cd /c/deps/qrencode-3.4.4

LIBS="../libpng-1.6.16/.libs/libpng.a ../../mingw32/i686-w64-mingw32/lib/libz.a" \
png_CFLAGS="-I../libpng-1.6.16" \
png_LIBS="-L../libpng-1.6.16/.libs" \
configure --enable-static --disable-shared --without-tools

make

Yes but it never built correctly, i just reinstalled & was able to get past that error.

on to the next one lol :

Code:
release\shitcoin-qt.exe object_script.shitcoin-qt.Release  -L"c:\Qt\4.8.6\lib" -
lmingwthrd -lmingw32 -lqtmain build\bitcoin-qt_res.o -lqrencode -LC:/deps/miniup
npc -lminiupnpc -liphlpapi -LC:/deps/boost_1_55_0/stage/lib -LC:/deps/db-4.8.30.
NC/build_unix -LC:/deps/openssl-1.0.1j -LC:/deps/qrencode-3.4.4/.libs -lssl -lcr
ypto -ldb_cxx -lshlwapi -lmswsock -lboost_system-mgw49-mt-s-1_55 -lboost_filesys
tem-mgw49-mt-s-1_55 -lboost_program_options-mgw49-mt-s-1_55 -lboost_thread-mgw49
-mt-s-1_55 -lboost_chrono-mgw49-mt-s-1_55 -lQtGui -lQtNetwork -lgdi32 -lcomdlg32
 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCore -lole32 -luuid -lws2_3
2 -ladvapi32 -lshell32 -luser32 -lkernel32
./build\net.o:net.cpp:(.text+0x58e5): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x5922): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x594e): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x59e8): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x5b15): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x5b30): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x5c28): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x5ca0): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x5cbf): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x5cce): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x5d13): undefined reference to `_imp__FreeUPNPUrls
'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x17 in section `.text.unlikely'
collect2.exe: error: ld returned 1 exit status
Makefile.Release:307: recipe for target 'release\shitcoin-qt.exe' failed
mingw32-make: *** [release\shitcoin-qt.exe] Error 1
legendary
Activity: 996
Merit: 1013
Getting a clean compile, but an executable that crashes with the following error:

"EXCEPTION: N5boost10filesystem16filesystem_errorE
boost::filesystem::status: The operation completed successfully: "C:
\Users\Deacon\AppData\Roaming\Microsoft\Windows\Start
Menu\Programs\Startup\Mooncoin.lnk"
C:\deps\mooncoin\release\mooncoin-qt.exe in Runaway exception"

Any ideas or suggestions?

I'm too getting this now. What to do?

This stuff is driving me batty.

EDIT 2:

 the exception is thrown by Boost's filesystem::exists and ::remove functions.
I've no idea what causes it to break havoc on some builds and not on others...
I tried with Boost 1.55 and 1.57 and both gave the same result.
In this particular case got around it by putting try-catch statements around the problematic lines,
but it can avoided also by using non-throwing overloaded functions of the same name.
legendary
Activity: 1400
Merit: 1000
sp00lin9, did you do paragraph 2.6?
Quote
2.6 qrencode:
Download and unpack http://download.sourceforge.net/libpng/libpng-1.6.16.tar.gz inside your deps folder then configure and make:
Code:
cd /c/deps/libpng-1.6.16
configure --disable-shared
make
cp .libs/libpng16.a .libs/libpng.a

Download and unpack http://fukuchi.org/works/qrencode/qrencode-3.4.4.tar.gz inside your deps folder then configure and make:
Code:
cd /c/deps/qrencode-3.4.4

LIBS="../libpng-1.6.16/.libs/libpng.a ../../mingw32/i686-w64-mingw32/lib/libz.a" \
png_CFLAGS="-I../libpng-1.6.16" \
png_LIBS="-L../libpng-1.6.16/.libs" \
configure --enable-static --disable-shared --without-tools

make
hero member
Activity: 490
Merit: 500
Code:
g++ -c -pipe -fno-keep-inline-dllexport -msse2 -O2 -frtti -fexceptions -mthreads
 -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-
parameter -Wstack-protector -DUNICODE -DQT_GUI -DBOOST_THREAD_USE_LIB -DBOOST_SP
IRIT_THREADSAFE -DBOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN -D__NO_SYSTE
M_INCLUDES -DUSE_QRCODE -DUSE_UPNP=1 -DSTATICLIB -DUSE_IPV6=1 -DWIN32 -D_MT -DQT
_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_SS
E -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\Qt\4.8.6\include\QtC
ore" -I"..\Qt\4.8.6\include\QtNetwork" -I"..\Qt\4.8.6\include\QtGui" -I"..\Qt\4.
8.6\include" -I"src" -I"src\json" -I"src\qt" -I"..\deps" -I"..\deps\boost_1_55_0
" -I"..\deps\db-4.8.30.NC\build_unix" -I"..\deps\openssl-1.0.1j\include" -I"..\Q
t\4.8.6\include\ActiveQt" -I"build" -I"build" -I"..\Qt\4.8.6\mkspecs\default" -o
 build\qrcodedialog.o src\qt\qrcodedialog.cpp
src\qt\qrcodedialog.cpp:12:22: fatal error: qrencode.h: No such file or director
y
 #include
                      ^
compilation terminated.
Makefile.Release:2482: recipe for target 'build/qrcodedialog.o' failed
mingw32-make: *** [build/qrcodedialog.o] Error 1

im so close! i just cant get qrencode to build correctly so i get this error ]:
legendary
Activity: 1400
Merit: 1000
MystPhysX, Sorry, but could you write the error?
I can not find the error among warnings Sad...
hero member
Activity: 597
Merit: 500
Describe what you did.  For example, did you compile the source you got before altering it, or did you make changes and then compile?  Where did you get the source?  The dir name at the end suggests that you aren't working on Bitcoin-qt, but MillenniumCoin.  Maybe there's a topic somewhere that is specific to that altcoin and the folks there can be of more help.
Oh hey thanks for responding.

So all me deps were setup by following the OP. The .pro file was amended, with the only changes being the dep directories and the static flags. I can't really see any major errors in the output but if anyone could pinpoint the compile breaking error I would be able to take it from there.
I bet it's one of the static flags changes.  Which ones did you change, and did you compile it without changing the flags, but with the changed dep directories?  I'm starting up my VM to check it out, so forgive me if what I wrote doesn't make sense.
So I added static to QMAKE_LFLAGS *= -fstack-protector-all --param ssp-buffer-size=1 -static

Let me quickly try compiling it without the static flag.



*edit - Similar error.
sr. member
Activity: 444
Merit: 250
I prefer evolution to revolution.
Describe what you did.  For example, did you compile the source you got before altering it, or did you make changes and then compile?  Where did you get the source?  The dir name at the end suggests that you aren't working on Bitcoin-qt, but MillenniumCoin.  Maybe there's a topic somewhere that is specific to that altcoin and the folks there can be of more help.
Oh hey thanks for responding.

So all me deps were setup by following the OP. The .pro file was amended, with the only changes being the dep directories and the static flags. I can't really see any major errors in the output but if anyone could pinpoint the compile breaking error I would be able to take it from there.
I bet it's one of the static flags changes.  Which ones did you change, and did you compile it without changing the flags, but with the changed dep directories?  I'm starting up my VM to check it out, so forgive me if what I wrote doesn't make sense.
hero member
Activity: 597
Merit: 500
Describe what you did.  For example, did you compile the source you got before altering it, or did you make changes and then compile?  Where did you get the source?  The dir name at the end suggests that you aren't working on Bitcoin-qt, but MillenniumCoin.  Maybe there's a topic somewhere that is specific to that altcoin and the folks there can be of more help.
Oh hey thanks for responding.

So all me deps were setup by following the OP. The .pro file was amended, with the only changes being the dep directories and the static flags. I can't really see any major errors in the output but if anyone could pinpoint the compile breaking error I would be able to take it from there.
sr. member
Activity: 444
Merit: 250
I prefer evolution to revolution.
Describe what you did.  For example, did you compile the source you got before altering it, or did you make changes and then compile?  Where did you get the source?  The dir name at the end suggests that you aren't working on Bitcoin-qt, but MillenniumCoin.  Maybe there's a topic somewhere that is specific to that altcoin and the folks there can be of more help.
hero member
Activity: 597
Merit: 500
newbie
Activity: 7
Merit: 0
GREAT TUTORIAL!

Right now have Bitcoin-qt 32bit running on Windows 8.1 x64, built using Windows 10 Technical Preview Edition in VirtualBox. Small change I did was to use openssl-1.0.1k and libpng-1.16.17rc01. Will try to go for x64 later.



Did anybody successfully compile bitcoin-v10 with Qt5.4.1 or Qt5.4.0 using mingw4.9.2 or mingw4.9.1 for Windows?



I tried. Unfortunatelly bitcoin configure errors at -qtaccessiblewidgets, so it will compile without QT or fail to configure when --with-gui=qt5 to configure is passed. All other Qt checks seem fine, just this one fails so there must've been some change.
Also configure.bat needs commenting out of this line:

:: if not exist %QTSRC%\.gitignore goto sconf

and these lines:

:: C:\MinGW\msys\1.0\bin
:: if "%perl.exe%" == "" (
::    echo Perl not found in PATH. Aborting. >&2
::    exit /b 1
:: )


to properly generate configure.exe file and compile Qt 5.4.1. I may play with it a bit when I feel like it and have spare time, but the top priority was to make at least x86 v to compile using guide steps. (:

EDIT: I got into editing sourcecode mode more than actual compiling of new Qt or x64 version (github updates it pretty often to be concerned with it). Made myself version that has disabled checks for insufficient fee/priority, too high fee, broadcasting double-spents (partial implementation based on Bitcoin XT) and additional command: addnode IP:port ban, to ban a node similar way as if it was misbehaving (addnode ip:port remove does not disconnects the node You added by mistake, but I though that including ban&disconnect in one command was better).
legendary
Activity: 1400
Merit: 1000
litecoin 8.6 Sad
I compiled https://github.com/litecoin-project/litecoin/archive/master-0.8.zip without any problems...
Where is cheesecoin source?
I just use litecoin 0.8.6 to create cheesecoin.

So i get stuck in last step Sad
Can you take a look into it I can upload it Smiley
sure, I can, give me the link
legendary
Activity: 1190
Merit: 1002
litecoin 8.6 Sad
I compiled https://github.com/litecoin-project/litecoin/archive/master-0.8.zip without any problems...
Where is cheesecoin source?
I just use litecoin 0.8.6 to create cheesecoin.

So i get stuck in last step Sad
Can you take a look into it I can upload it Smiley
legendary
Activity: 1400
Merit: 1000
litecoin 8.6 Sad
I compiled https://github.com/litecoin-project/litecoin/archive/master-0.8.zip without any problems...
Where is cheesecoin source?
sr. member
Activity: 444
Merit: 250
I prefer evolution to revolution.
I have finished compiling 0.9.4 and wanted to provide some input
  • Recommend a VM with a disk large enough to hold the blockchain (20GB, plus future needs...) plus the recommended OS.  You can always add a disk later, but it's nice if it's all set up beforehand.
  • I read somewhere that in order to run Windows in VirtualBox, you need a separate Product Key.  I bought a new key for Windows 8.1 from MS for $200, but if anyone has found a way to use the same key for the host and the guest, that would be nice to know.
  • This was a fresh install of MinGW Installation Manager (MIM), but several packages showed up as installed when it was done.  Other than the four Nitro mentioned, there are some other packages that I had to install through MIM:
    • msys-bash.bin
    • msys-perl.bin
    • msys-sed.bin
    • msys-tar.bin
    • msys-m4.bin
  • In step 2.5, when unpacking the file I got for protobuf, tar complained that "Archive value 109965 is out of uid_t range 0..65535".  After examining one of the files it extracted, I decided to ignore the error and have not seen any problems.
  • ./autoconf.sh generated an error saying that autom4te requires m4 version 1.4 or later.  I downloaded the source for M4 and compiled it.  THIS IS  A MISTAKE.  MSYS needs programs that are aware of MSYS.  The correct solution is to use MIM to get the msys-m4 package installed (from MSYS Base System).
  • (I havent tried 0.10 yet, but in 0.9.4,) share/genbuild.sh, line 19, has "$(git rev-parse --is-inside-work-tree 2>/dev/null)" in it, but it wasn't in quotes, and this caused bash to report "Too many arguments" for the test ([ ... ]) command.  There are some references to the fix (add the quotes) on the Internet.
  • Only if you're compiling a version before 0.10, as 0.10 uses an even faster blockchain download strategy ("headers first") than torrent, consider using Jeff Garzick's torrent (https://bitcointalksearch.org/topic/ann-bitcoin-blockchain-data-torrent-145386) to bootstrap your copy of the blockchain.
hero member
Activity: 1484
Merit: 608
Vave.com - Crypto Casino

Did anybody successfully compile bitcoin-v10 with Qt5.4.1 or Qt5.4.0 using mingw4.9.2 or mingw4.9.1 for Windows?

sr. member
Activity: 444
Merit: 250
I prefer evolution to revolution.
Nitro, you rock.

May I humbly suggest that you add a link to new revision entries as you add them at the bottom of OP pointing to the last message in the thread that was incorporated into OP (currently https://bitcointalksearch.org/topic/m.10397539) so that newcomers who know enough can jump to that part of the thread and read any new discussion that happened since your update.

Meanwhile, I am reading through this entire thread.

Edited link to latest post incorporated into OP
Pages:
Jump to: