Pages:
Author

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

sr. member
Activity: 260
Merit: 251
Error time!

The first time I launch my wallet, everything seems to be in working order...
If I close and re-open, however, I receive a " error loading block index " warning.
Deleting the files from Appdata\Roaming will only fix the problem until the next time application is loaded.
Any clues?  I'll provide as much info as possible to those willing to help.  Thanks in advance
What version of Bitcoin did you build?
What Windows OS version are you using?
What versions of which libraries did you build your Bitcoin with?
Which program (daemon or Qt) are you running?

Do you have other versions, whether you built them or not, that do work on your system?  In the same location, setup, etc.?
Do you wait "long enough" after shutting down?  This can depend on which program you are running?

Ron
Bump?

Ron
sr. member
Activity: 260
Merit: 251
Error time!

The first time I launch my wallet, everything seems to be in working order...

If I close and re-open, however, I receive a " error loading block index " warning.

Deleting the files from Appdata\Roaming will only fix the problem until the next time application is loaded.

Any clues?  I'll provide as much info as possible to those willing to help.  Thanks in advance
What version of Bitcoin did you build?
What Windows OS version are you using?
What versions of which libraries did you build your Bitcoin with?
Which program (daemon or Qt) are you running?

Do you have other versions, whether you built them or not, that do work on your system?  In the same location, setup, etc.?

Do you wait "long enough" after shutting down?  This can depend on which program you are running?

Ron
hero member
Activity: 714
Merit: 500
Error time!

The first time I launch my wallet, everything seems to be in working order...

If I close and re-open, however, I receive a " error loading block index " warning.

Deleting the files from Appdata\Roaming will only fix the problem until the next time application is loaded.

Any clues?  I'll provide as much info as possible to those willing to help.  Thanks in advance
sr. member
Activity: 357
Merit: 250
How made it possible with current mingw64/msys2 to compile bitcoin(core) or other wallets?
Are there any guides to do that? This manual is outdated at all :/
newbie
Activity: 16
Merit: 0
It works following the official guide:

    https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md

But first you have to build a static version of Qt5.7 by following the guide (it takes some hours):

    http://dimitris.apeiro.gr/2015/06/24/build-a-static-qt5-for-windows-by-compiling/

And copy all the files from:

    C:\Qt\Qt5_static\plugins\platforms

To the bitcoin source folder:

    [whatever]\bitcoin-0.13.2\depends\x86_64-w64-mingw32\plugins\platforms

newbie
Activity: 16
Merit: 0
Anyone try windows 10 bash with mxe compile? if not ill set up a vb and see if it works :p


I get the same results whether I use a Linux VM or Windows 10 bash.

I think the problem is that the static libqwindows.a is not distributed with Qt. You get only the shared library qwindows.dll.

The platform plugin libraries are here:

C:\Qt\5.7\mingw53_32\plugins\platforms

I only have:

qminimal.dll
qminimald.dll
qwindows.dll
qwindowsd.dll

I am trying to follow the instructions for building a static Qt5.7 and I hope that also the missing libraries are built in the process.
hero member
Activity: 994
Merit: 500
Anyone try windows 10 bash with mxe compile? if not ill set up a vb and see if it works :p
newbie
Activity: 16
Merit: 0
Hi, I tried this instructions but:

1. after make HOST, I have to perform ./autogen.sh in order to get a configure file
2. the ./configure thing produces this error:

    checking for static Qt plugins: -lqwindows... no
    configure: error: Could not resolve: -lqwindows

What I'm supposed to do?

P.S. The line

    ./configure --prefix=`pwd`/depends/x86_64-w64-mingw32 --with-gui=qt5 --enable-tests=no

has to be corrected this way:

    ./configure --prefix=$PWD/depends/x86_64-w64-mingw32 --with-gui=qt5 --enable-tests=no



Thought I would necro this thread incase someone is stuck.

If you're trying to build a previous version and are getting stuck with config errors,
try and replace bitcoin_qt.m4 with the newest bitcoin/src/m4/bitcoin_qt.m4.

# Using a fresh install Ubuntu 14.04 x64,
sudo apt-get update
sudo apt-get install -y build-essential libtool autotools-dev autoconf automake \
libqt5gui5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev \
libqt5core5a:i386 libqt5core5a pkg-config git \
g++-mingw-w64-i686 mingw-w64-i686-dev g++-mingw-w64-x86-64 mingw-w64-x86-64-dev curl
cd
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/depends
make HOST=i686-w64-mingw32
#or 64 bit setup :  make HOST=x86_64-w64-mingw32
cd ..
./configure --prefix=`pwd`/depends/i686-w64-mingw32 --with-gui=qt5 --enable-tests=no
#or 64 bit setup :  ./configure --prefix=`pwd`/depends/x86_64-w64-mingw32 --with-gui=qt5 --enable-tests=no
make
sr. member
Activity: 260
Merit: 251
How does one build qt 4.8 projects on qt 5?
I use the greaterThan(QT_MAJOR_VERSION, 4): QT += widgets and added -static but the compiled file throws runtime errors on opening or sometimes closing. Is there anything else to do?
I don't know about building a 4.8.x bitcoinQt on a Qt 5.x system?  But when I build 4.8.x on a 4.8.x (Windows 8.1) system, I found I got similar errors if I didn't delete all the .obj & other files in the build directory.  The make file isn't too bright about what needs to be compiled and what doesn't.

Ron


My build dir is already clean. I compiled a clean source. No luck so far. I think this runtime has to do with how qt is not statically linking libs. I pasted some dlls into the coins release folder but no dice.
Looking at http://www.qtcentre.org/threads/27729-statically-link-Qt-libraries-%28not-build-static-library%29 I tried the suggestions there and I still ended up with a dynamically linked bitcoin-qt.exe or *coin-qt.exe

If you look at message #1 in this forum it is not clear what Qt is created on one's system.  I did read, but can't find the link now, that one needs to build a set of libraries for Qt that are dynamic for the use of Qt creator and Qt designer (if you use them) and a set that is static for building one's applications.  I don't know if that is so, nor how one would keep the environment straight Huh Smiley

Ron

I still haven't figured this one out. And I stopped hacking at it for now. Did you find anything helpful?

I use this and it works fine

Quote
greaterThan(QT_MAJOR_VERSION, 4) {
    QT += widgets
    DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
}

if you have errors, post them here, so people can help you.


I have that in my code. My qt version is 5.3. The app starts fine. When I open debug window and enter any word or whenever I close the wallet. it closes with generic "this application has requested the runtime to terminate in an unusual way"
I noticed the final qt file size is only 9.few mb which is low if qt would statically link libs.
Hello,

How big is your Qt exe? ~7MB?  27MB?

I can't find the actual link, but here is a parallel discussion,
http://tdm-gcc.tdragon.net/quirks
which I think is apropos.  It seems that there are some exceptions being thrown due to the Qt linking perhaps?

I found similar errors going back to linking bitcoin-qt 0.8.1!  I was able to get rid of them and get a stable exe by removing the link arguments
 
Code:
	-static-libgcc \
-static-libstdc++ \
-static \
The test for me was using any command in the help->debug window->console, in addition to your actions.  But this is for Qt 4.8.4, not 5.x

Ron
sr. member
Activity: 350
Merit: 250
How does one build qt 4.8 projects on qt 5?
I use the greaterThan(QT_MAJOR_VERSION, 4): QT += widgets and added -static but the compiled file throws runtime errors on opening or sometimes closing. Is there anything else to do?
I don't know about building a 4.8.x bitcoinQt on a Qt 5.x system?  But when I build 4.8.x on a 4.8.x (Windows 8.1) system, I found I got similar errors if I didn't delete all the .obj & other files in the build directory.  The make file isn't too bright about what needs to be compiled and what doesn't.

Ron


My build dir is already clean. I compiled a clean source. No luck so far. I think this runtime has to do with how qt is not statically linking libs. I pasted some dlls into the coins release folder but no dice.
Looking at http://www.qtcentre.org/threads/27729-statically-link-Qt-libraries-%28not-build-static-library%29 I tried the suggestions there and I still ended up with a dynamically linked bitcoin-qt.exe or *coin-qt.exe

If you look at message #1 in this forum it is not clear what Qt is created on one's system.  I did read, but can't find the link now, that one needs to build a set of libraries for Qt that are dynamic for the use of Qt creator and Qt designer (if you use them) and a set that is static for building one's applications.  I don't know if that is so, nor how one would keep the environment straight Huh Smiley

Ron

I still haven't figured this one out. And I stopped hacking at it for now. Did you find anything helpful?

I use this and it works fine

Quote
greaterThan(QT_MAJOR_VERSION, 4) {
    QT += widgets
    DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
}

if you have errors, post them here, so people can help you.


I have that in my code. My qt version is 5.3. The app starts fine. When I open debug window and enter any word or whenever I close the wallet. it closes with generic "this application has requested the runtime to terminate in an unusual way"
I noticed the final qt file size is only 9.few mb which is low if qt would statically link libs.
hero member
Activity: 551
Merit: 500
How does one build qt 4.8 projects on qt 5?
I use the greaterThan(QT_MAJOR_VERSION, 4): QT += widgets and added -static but the compiled file throws runtime errors on opening or sometimes closing. Is there anything else to do?
I don't know about building a 4.8.x bitcoinQt on a Qt 5.x system?  But when I build 4.8.x on a 4.8.x (Windows 8.1) system, I found I got similar errors if I didn't delete all the .obj & other files in the build directory.  The make file isn't too bright about what needs to be compiled and what doesn't.

Ron


My build dir is already clean. I compiled a clean source. No luck so far. I think this runtime has to do with how qt is not statically linking libs. I pasted some dlls into the coins release folder but no dice.
Looking at http://www.qtcentre.org/threads/27729-statically-link-Qt-libraries-%28not-build-static-library%29 I tried the suggestions there and I still ended up with a dynamically linked bitcoin-qt.exe or *coin-qt.exe

If you look at message #1 in this forum it is not clear what Qt is created on one's system.  I did read, but can't find the link now, that one needs to build a set of libraries for Qt that are dynamic for the use of Qt creator and Qt designer (if you use them) and a set that is static for building one's applications.  I don't know if that is so, nor how one would keep the environment straight Huh Smiley

Ron

I still haven't figured this one out. And I stopped hacking at it for now. Did you find anything helpful?

I use this and it works fine

Quote
greaterThan(QT_MAJOR_VERSION, 4) {
    QT += widgets
    DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
}

if you have errors, post them here, so people can help you.
sr. member
Activity: 350
Merit: 250
How does one build qt 4.8 projects on qt 5?
I use the greaterThan(QT_MAJOR_VERSION, 4): QT += widgets and added -static but the compiled file throws runtime errors on opening or sometimes closing. Is there anything else to do?
I don't know about building a 4.8.x bitcoinQt on a Qt 5.x system?  But when I build 4.8.x on a 4.8.x (Windows 8.1) system, I found I got similar errors if I didn't delete all the .obj & other files in the build directory.  The make file isn't too bright about what needs to be compiled and what doesn't.

Ron


My build dir is already clean. I compiled a clean source. No luck so far. I think this runtime has to do with how qt is not statically linking libs. I pasted some dlls into the coins release folder but no dice.
Looking at http://www.qtcentre.org/threads/27729-statically-link-Qt-libraries-%28not-build-static-library%29 I tried the suggestions there and I still ended up with a dynamically linked bitcoin-qt.exe or *coin-qt.exe

If you look at message #1 in this forum it is not clear what Qt is created on one's system.  I did read, but can't find the link now, that one needs to build a set of libraries for Qt that are dynamic for the use of Qt creator and Qt designer (if you use them) and a set that is static for building one's applications.  I don't know if that is so, nor how one would keep the environment straight Huh Smiley

Ron

I still haven't figured this one out. And I stopped hacking at it for now. Did you find anything helpful?
sr. member
Activity: 260
Merit: 251
How does one build qt 4.8 projects on qt 5?
I use the greaterThan(QT_MAJOR_VERSION, 4): QT += widgets and added -static but the compiled file throws runtime errors on opening or sometimes closing. Is there anything else to do?
I don't know about building a 4.8.x bitcoinQt on a Qt 5.x system?  But when I build 4.8.x on a 4.8.x (Windows 8.1) system, I found I got similar errors if I didn't delete all the .obj & other files in the build directory.  The make file isn't too bright about what needs to be compiled and what doesn't.

Ron


My build dir is already clean. I compiled a clean source. No luck so far. I think this runtime has to do with how qt is not statically linking libs. I pasted some dlls into the coins release folder but no dice.
Looking at http://www.qtcentre.org/threads/27729-statically-link-Qt-libraries-%28not-build-static-library%29 I tried the suggestions there and I still ended up with a dynamically linked bitcoin-qt.exe or *coin-qt.exe

If you look at message #1 in this forum it is not clear what Qt is created on one's system.  I did read, but can't find the link now, that one needs to build a set of libraries for Qt that are dynamic for the use of Qt creator and Qt designer (if you use them) and a set that is static for building one's applications.  I don't know if that is so, nor how one would keep the environment straight Huh Smiley

Ron
sr. member
Activity: 350
Merit: 250
How does one build qt 4.8 projects on qt 5?
I use the greaterThan(QT_MAJOR_VERSION, 4): QT += widgets and added -static but the compiled file throws runtime errors on opening or sometimes closing. Is there anything else to do?
I don't know about building a 4.8.x bitcoinQt on a Qt 5.x system?  But when I build 4.8.x on a 4.8.x (Windows 8.1) system, I found I got similar errors if I didn't delete all the .obj & other files in the build directory.  The make file isn't too bright about what needs to be compiled and what doesn't.

Ron


My build dir is already clean. I compiled a clean source. No luck so far. I think this runtime has to do with how qt is not statically linking libs. I pasted some dlls into the coins release folder but no dice.
sr. member
Activity: 260
Merit: 251
How does one build qt 4.8 projects on qt 5?
I use the greaterThan(QT_MAJOR_VERSION, 4): QT += widgets and added -static but the compiled file throws runtime errors on opening or sometimes closing. Is there anything else to do?
I don't know about building a 4.8.x bitcoinQt on a Qt 5.x system?  But when I build 4.8.x on a 4.8.x (Windows 8.1) system, I found I got similar errors if I didn't delete all the .obj & other files in the build directory.  The make file isn't too bright about what needs to be compiled and what doesn't.

Ron
sr. member
Activity: 350
Merit: 250
How does one build qt 4.8 projects on qt 5?
I use the greaterThan(QT_MAJOR_VERSION, 4): QT += widgets and added -static but the compiled file throws runtime errors on opening or sometimes closing. Is there anything else to do?
sr. member
Activity: 350
Merit: 250
okay, so qt-everywhere-opensource-src-5.2.1 works.

but the compilation still says unknown module webkitwidgets

so how does one add this qt-everywhere to PATH?


Edit: I added C:\Qt\Qt5.3.2new\5.3\mingw482_32\bin to path environment. I am now only using qtcreator 5.3 instead of qt everywhere
sr. member
Activity: 350
Merit: 250
so I continued to build right from there after adding python27 to environment.

i run the mingw32-make -j5

and it continues from there but I do not understand this new error. is this a problem in the qt_everywhere release?
 
Code:
./.obj\release\YarrInterpreter.o:YarrInterpreter.cpp:(.text+0x622): undefined reference to `JSC::Yarr::wordcharCreate()'
./.obj\release\YarrInterpreter.o:YarrInterpreter.cpp:(.text+0x693): undefined reference to `JSC::Yarr::newlineCreate()'
C:/MingW/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: ./.obj\release\YarrInterpreter.o: bad reloc address 0x12 in section `.text$_ZN3WTF15BumpPointerPool6createEj[__ZN3WTF15BumpPointerPool6createEj]'
collect2.exe: error: ld returned 1 exit status
Makefile.Release:534: recipe for target 'C:\Qt\qt-everywhere-opensource-src-5.3.2\qtbase\lib\Qt5Qml.dll' failed
mingw32-make[4]: *** [C:\Qt\qt-everywhere-opensource-src-5.3.2\qtbase\lib\Qt5Qml.dll] Error 1
mingw32-make[4]: Leaving directory 'C:/Qt/qt-everywhere-opensource-src-5.3.2/qtdeclarative/src/qml'
Makefile:34: recipe for target 'release' failed
mingw32-make[3]: *** [release] Error 2
mingw32-make[3]: Leaving directory 'C:/Qt/qt-everywhere-opensource-src-5.3.2/qtdeclarative/src/qml'
Makefile:41: recipe for target 'sub-qml-make_first-ordered' failed
mingw32-make[2]: *** [sub-qml-make_first-ordered] Error 2
mingw32-make[2]: Leaving directory 'C:/Qt/qt-everywhere-opensource-src-5.3.2/qtdeclarative/src'
Makefile:41: recipe for target 'sub-src-make_first' failed
mingw32-make[1]: *** [sub-src-make_first] Error 2
mingw32-make[1]: Leaving directory 'C:/Qt/qt-everywhere-opensource-src-5.3.2/qtdeclarative'
makefile:215: recipe for target 'module-qtdeclarative-make_first' failed
mingw32-make: *** [module-qtdeclarative-make_first] Error 2
sr. member
Activity: 350
Merit: 250
while compiling qteverywhere from page 42.

Code:
 -I"." -I"..\3rdparty\double-conversion" -I"debugger" -I"animations" -I"C:\Qt\qt-everywhere-opensource-src-5.3.2\qtbase\include\QtNetwork'python' is not recognized as an internal or external command,
operable program or batch file.
" -I"C:\Qt\qt-everywhere-opensource-src-5.3.2\qtbase\include\QtCore\5.3.2" -I"C:\Qt\qt-everywhere-opensource-src-5.3.2\qtbase\include\QtCore\5.3.2\QtCore" -I"C:\Qt\qt-everywhere-opensource-src-5.3.2\qtbase\include\QtCore" -I".moc\release" -I"C:\deps\openssl-1.0.1j\include" -I"C:\deps\icu\dist\include" -I"C:\Qt\qt-everywhere-opensource-src-5.3.2\qtbase\mkspecs\win32-g++" -o .obj\release\YarrSyntaxChecker.o ..\3rdparty\masm\yarr\YarrSyntaxChecker.cpp
Makefile.Release:599: recipe for target 'RegExpJitTables.h' failed
mingw32-make[4]: *** [RegExpJitTables.h] Error 1
mingw32-make[4]: *** Waiting for unfinished jobs....
mingw32-make[4]: Leaving directory 'C:/Qt/qt-everywhere-opensource-src-5.3.2/qtdeclarative/src/qml'
Makefile:34: recipe for target 'release' failed
mingw32-make[3]: *** [release] Error 2
mingw32-make[3]: Leaving directory 'C:/Qt/qt-everywhere-opensource-src-5.3.2/qtdeclarative/src/qml'
Makefile:41: recipe for target 'sub-qml-make_first-ordered' failed
mingw32-make[2]: *** [sub-qml-make_first-ordered] Error 2
mingw32-make[2]: Leaving directory 'C:/Qt/qt-everywhere-opensource-src-5.3.2/qtdeclarative/src'
Makefile:41: recipe for target 'sub-src-make_first' failed
mingw32-make[1]: *** [sub-src-make_first] Error 2
mingw32-make[1]: Leaving directory 'C:/Qt/qt-everywhere-opensource-src-5.3.2/qtdeclarative'
makefile:215: recipe for target 'module-qtdeclarative-make_first' failed
mingw32-make: *** [module-qtdeclarative-make_first] Error 2

py output in cmd says
Code:
C:\Qt\qt-everywhere-opensource-src-5.3.2>py
Python 3.5.3rc1 (v3.5.3rc1:de530d7f21c0, Jan  2 2017, 06:41:25) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Edit: I think I am supposed to use python27. beause python 35 uses 'py' instead of 'python' to look for python. will report back what happens.
newbie
Activity: 52
Merit: 0
Thought I would necro this thread incase someone is stuck.

If you're trying to build a previous version and are getting stuck with config errors,
try and replace bitcoin_qt.m4 with the newest bitcoin/src/m4/bitcoin_qt.m4.

# Using a fresh install Ubuntu 14.04 x64,
sudo apt-get update
sudo apt-get install -y build-essential libtool autotools-dev autoconf automake \
libqt5gui5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev \
libqt5core5a:i386 libqt5core5a pkg-config git \
g++-mingw-w64-i686 mingw-w64-i686-dev g++-mingw-w64-x86-64 mingw-w64-x86-64-dev curl
cd
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/depends
make HOST=i686-w64-mingw32
#or 64 bit setup :  make HOST=x86_64-w64-mingw32
cd ..
./configure --prefix=`pwd`/depends/i686-w64-mingw32 --with-gui=qt5 --enable-tests=no
#or 64 bit setup :  ./configure --prefix=`pwd`/depends/x86_64-w64-mingw32 --with-gui=qt5 --enable-tests=no
make
Pages:
Jump to: