Bitcoin Forum
June 25, 2024, 03:40:55 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 [25] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 »
  Print  
Author Topic: Building headless Bitcoin and Bitcoin-qt on Windows  (Read 419327 times)
softron
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
March 22, 2014, 07:34:32 AM
 #481

Nice ive looking for this. Can this be done on a VPS.

jamd315
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
March 22, 2014, 06:21:51 PM
 #482

Shocked
at make -f makefile.release I get
Code:
ld.exe: cannot find -ldb_cxx
In the .pro file the path BDB_LIB_PATH point to the directory with db_cxx.h
also, how to I get a log from make?
If one studies the makefile, one sees that the -lxxx refers to a file in the -LpathWhateverDirectory whose name is libxxx.a Shocked

So do you have such a file in that place?  If not, then either it wasn't built, or was built but put elsewhere (or erased, renamed,...)  Can't think of too many orther possibilities Huh

Ron
I can find db_cxx.h in the "BDB_LIB_PATH=c:/deps/db-4.8.30.NC/build_unix" and when I built Berkeley DB I used --enable_cxx

Let's try again,

Did you see my message above?  I made it bigger this time Shocked  So when one sees a gcc argument like -ldb_cxx one should find a file named libdb_cxx.a there.  Notice how -lssl becomes libssl.a, etc.

Hint: one must observe and generalize from the patterns shown in the makefile.  It's all there if one just looks. Perhaps this has helped others.

Ron
So I checked in c:/deps/db-4.8.30.NC/build_unix I couldn't find db_cxx.a, did I build it wrong?  I also ran a full HD search and found nothing.  Thanks for your help!
Kaishi
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile WWW
March 22, 2014, 11:14:10 PM
 #483

Thanks for these instructions. This helped quickly get a solid build/dev environment up and running.
Stygian0708
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
March 23, 2014, 06:53:10 AM
Last edit: March 23, 2014, 07:29:39 AM by Stygian0708
 #484

ok I just redid the everything and now I am missing this

C:\MinGW\msys\1.0\msys.bat

Edit: got it working
apple242
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
March 23, 2014, 01:25:53 PM
 #485

boost : 1.55.0
Qt : 4.8.5
resource : bitcoin 0.8.0
mingw : 4.8.1
vc:10.0

Quote
make -f makefile.release

c:/deps/boost_1_55_0/boost/thread/mutex.hpp:12:44: fatal error : boost/thread/detail/platform.hpp: No shch file or directory

#include <boost/thread/detail/platform.hpp>

compilation terminated.
makefile.release:865: recipe for target 'build/bitcoin.o' faild
mingw32-make: *** [build/bitcoin.o] Error 1
Stygian0708
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
March 23, 2014, 04:17:16 PM
 #486

The steps for building bitcoin is that the same steps to use to build any wallet for any altcoin?
Stygian0708
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
March 23, 2014, 05:28:17 PM
 #487

when I run ming32-make -f Makefile.Release after running qmake I get the following error

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

C:\JennyCoin>
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
March 23, 2014, 05:32:42 PM
 #488

I suggest installing MSYS on top of MinGW, makes your life easier and might solve your problem.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
Stygian0708
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
March 23, 2014, 08:12:50 PM
 #489

I suggest installing MSYS on top of MinGW, makes your life easier and might solve your problem.

what do you mean install msys ontop of mingw I followed the guide to install everything
dadcoin
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
March 24, 2014, 05:17:51 PM
Last edit: March 24, 2014, 07:56:03 PM by dadcoin
 #490

Code:
g++ -c -pipe -D_FORTIFY_SOURCE=2 -O2 -frtti -fexceptions -mthreads -fdiagnostics
-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wst
ack-protector -Wno-unused-variable -Wno-unused-function -Wno-strict-aliasing -Lc
:\MinGW\bin\libexec\gcc\mingw32\4.8.1 -DUNICODE -DQT_GUI -DBOOST_THREAD_USE_LIB
-DBOOST_SPIRIT_THREADSAFE -DUSE_UPNP=1 -DSTATICLIB -DWIN32 -D_MT -DQT_THREAD_SUP
PORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQ
T_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_NEEDS_QMAIN -I".
.\..\..\Qt\4.8.5\include\QtCore" -I"..\..\..\Qt\4.8.5\include\QtNetwork" -I"..\.
.\..\Qt\4.8.5\include\QtGui" -I"..\..\..\Qt\4.8.5\include" -I"src" -I"src\json"
-I"src\qt" -I"..\..\..\deps" -I"src\leveldb\include" -I"src\leveldb\helpers" -I"
..\..\boost_1_55_0" -I"..\..\db-4.8.30.NC\build_unix" -I"..\..\openssl-1.0.1e\in
clude" -I"..\..\..\Qt\4.8.5\include\ActiveQt" -I"build" -I"build" -I"..\..\..\Qt
\4.8.5\mkspecs\win32-g++" -o build\rpcnet.o src\rpcnet.cpp
In file included from src\netbase.h:11:0,
                 from src\net.h:19,
                 from src\rpcnet.cpp:6:
src\compat.h:14:0: warning: "FD_SETSIZE" redefined [enabled by default]
 #define FD_SETSIZE 1024 // max number of fds in fd_set
 ^
In file included from c:\mingw\include\windows.h:93:0,
                 from ..\..\openssl-1.0.1e\include/openssl/rand.h:67,
                 from src\net.h:11,
                 from src\rpcnet.cpp:6:
c:\mingw\include\winsock.h:62:0: note: this is the location of the previous defi
nition
 #define FD_SETSIZE 64
 ^
In file included from src\compat.h:17:0,
                 from src\netbase.h:11,
                 from src\net.h:19,
                 from src\rpcnet.cpp:6:
c:\mingw\include\ws2tcpip.h:38:2: error: #error "ws2tcpip.h is not compatible wi
th winsock.h. Include winsock2.h instead."
 #error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instead
."
  ^
In file included from src\schnorr.h:11:0,
                 from src\hash.h:17,
                 from src\net.h:22,
                 from src\rpcnet.cpp:6:
src\cryptopp/osrng.h:43:0: warning: ignoring #pragma comment  [-Wunknown-pragmas
]
 #pragma comment(lib, "advapi32.lib")
 ^
In file included from src\compat.h:17:0,
                 from src\netbase.h:11,
                 from src\net.h:19,
                 from src\rpcnet.cpp:6:
c:\mingw\include\ws2tcpip.h:147:8: error: redefinition of 'struct ip_mreq'
 struct ip_mreq {
        ^
In file included from c:\mingw\include\windows.h:93:0,
                 from ..\..\openssl-1.0.1e\include/openssl/rand.h:67,
                 from src\net.h:11,
                 from src\rpcnet.cpp:6:
c:\mingw\include\winsock.h:315:8: error: previous definition of 'struct ip_mreq'

 struct ip_mreq {
        ^
In file included from src\compat.h:17:0,
                 from src\netbase.h:11,
                 from src\net.h:19,
                 from src\rpcnet.cpp:6:
c:\mingw\include\ws2tcpip.h:390:13: error: expected initializer before 'freeaddr
info'
 void WSAAPI freeaddrinfo (struct addrinfo*);
             ^
c:\mingw\include\ws2tcpip.h:391:12: error: expected initializer before 'getaddri
nfo'
 int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*,
            ^
c:\mingw\include\ws2tcpip.h:393:12: error: expected initializer before 'getnamei
nfo'
 int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD,
            ^
In file included from src\cryptopp/pubkey.h:35:0,
                 from src\cryptopp/eccrypto.h:7,
                 from src\schnorr.h:12,
                 from src\hash.h:17,
                 from src\net.h:22,
                 from src\rpcnet.cpp:6:
src\cryptopp/modarith.h: In copy constructor 'CryptoPP::ModularArithmetic::Modul
arArithmetic(const CryptoPP::ModularArithmetic&)':
src\cryptopp/modarith.h:29:2: warning: base class 'class CryptoPP::AbstractRing<
CryptoPP::Integer>' should be explicitly initialized in the copy constructor [-W
extra]
  ModularArithmetic(const ModularArithmetic &ma)
  ^
Makefile.Release:3231: recipe for target 'build/rpcnet.o' failed
mingw32-make: *** [build/rpcnet.o] Error 1


If I try to copy content of winsock2.h and replace ws2tcpip.h, i will get an error at netbase.cpp where it need ws2tcpip.h , so I can't really fix this part

#error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instead."

what should i do..
Stygian0708
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
March 24, 2014, 09:23:24 PM
 #491

Ok I have figured all the other errors out and now I am just getting the following, anyone able to help with this, be appreciated

Code:
C:\JennyCoin>mingw32-make -f Makefile.Release
mingw32-make: *** No rule to make target 'c:/JennyCoin/src/leveldb/libleveldb.a', needed by 'release\JennyCoin-qt.exe'.
 Stop.

C:\JennyCoin>
Cassey
Sr. Member
****
Offline Offline

Activity: 470
Merit: 250

Better to have 100 friends than 100 rubles


View Profile
March 24, 2014, 09:55:00 PM
 #492

Ok I have figured all the other errors out and now I am just getting the following, anyone able to help with this, be appreciated

Code:
C:\JennyCoin>mingw32-make -f Makefile.Release
mingw32-make: *** No rule to make target 'c:/JennyCoin/src/leveldb/libleveldb.a', needed by 'release\JennyCoin-qt.exe'.
 Stop.

C:\JennyCoin>

Open a MinGW window and:

cd /JennyCoin/src/leveldb
TARGET_OS=NATIVE_WINDOWS make libleveldb.a libmemenv.a

Then...

cd ../..
qmake JennyCoin-qt.pro
mingw32-make -f Makefile.Release

Cassey
Stygian0708
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
March 24, 2014, 10:29:28 PM
 #493

Ok I have figured all the other errors out and now I am just getting the following, anyone able to help with this, be appreciated

Code:
C:\JennyCoin>mingw32-make -f Makefile.Release
mingw32-make: *** No rule to make target 'c:/JennyCoin/src/leveldb/libleveldb.a', needed by 'release\JennyCoin-qt.exe'.
 Stop.

C:\JennyCoin>

Open a MinGW window and:

cd /JennyCoin/src/leveldb
TARGET_OS=NATIVE_WINDOWS make libleveldb.a libmemenv.a

Then...

cd ../..
qmake JennyCoin-qt.pro
mingw32-make -f Makefile.Release

qmake doesn't work inside of mingw seems like every step I get further in I run into another problem
Cassey
Sr. Member
****
Offline Offline

Activity: 470
Merit: 250

Better to have 100 friends than 100 rubles


View Profile
March 24, 2014, 10:41:11 PM
 #494

Ok I have figured all the other errors out and now I am just getting the following, anyone able to help with this, be appreciated

Code:
C:\JennyCoin>mingw32-make -f Makefile.Release
mingw32-make: *** No rule to make target 'c:/JennyCoin/src/leveldb/libleveldb.a', needed by 'release\JennyCoin-qt.exe'.
 Stop.

C:\JennyCoin>

Open a MinGW window and:

cd /JennyCoin/src/leveldb
TARGET_OS=NATIVE_WINDOWS make libleveldb.a libmemenv.a

Then...

cd ../..
qmake JennyCoin-qt.pro
mingw32-make -f Makefile.Release

qmake doesn't work inside of mingw seems like every step I get further in I run into another problem

Fortunately your near the end of the path... (pun intended).  [You need to add QT/bin to the end of your PATH variable]

If you prefer, just do the qmake from a windows command prompt or whatever environment you had it running it before.  The key is to build the libleveldb and libmemenv first as shown in the example.

Cassey
Stygian0708
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
March 24, 2014, 10:59:00 PM
 #495

Fortunately your near the end of the path... (pun intended).  [You need to add QT/bin to the end of your PATH variable]

If you prefer, just do the qmake from a windows command prompt or whatever environment you had it running it before.  The key is to build the libleveldb and libmemenv first as shown in the example.

lol I wish it was that simple but qt has already been added to my path plus this is the errors that I am getting now

Code:
e_exchange(T*, T, T) [with T = boost::shared_mutex::state_data]':
..\deps\boost_1_55_0/boost/thread/win32/shared_mutex.hpp:124:103:   required from here
..\deps\boost_1_55_0/boost/thread/win32/shared_mutex.hpp:52:99: warning: dereferencing type-punned pointer will break st
rict-aliasing rules [-Wstrict-aliasing]
                                                               *reinterpret_cast<long*>(&comparand));
                                                                                                   ^
..\deps\boost_1_55_0/boost/thread/win32/shared_mutex.hpp:52:99: warning: dereferencing type-punned pointer will break st
rict-aliasing rules [-Wstrict-aliasing]
..\deps\boost_1_55_0/boost/thread/win32/shared_mutex.hpp:53:52: warning: dereferencing type-punned pointer will break st
rict-aliasing rules [-Wstrict-aliasing]
             return *reinterpret_cast<T const*>(&res);
                                                    ^
..\deps\boost_1_55_0/boost/thread/win32/shared_mutex.hpp:53:52: warning: dereferencing type-punned pointer will break st
rict-aliasing rules [-Wstrict-aliasing]
In file included from ..\deps\boost_1_55_0/boost/system/system_error.hpp:14:0,
                 from ..\deps\boost_1_55_0/boost/thread/exceptions.hpp:22,
                 from ..\deps\boost_1_55_0/boost/thread/win32/thread_primitives.hpp:16,
                 from ..\deps\boost_1_55_0/boost/thread/win32/basic_timed_mutex.hpp:14,
                 from ..\deps\boost_1_55_0/boost/thread/win32/mutex.hpp:9,
                 from ..\deps\boost_1_55_0/boost/thread/mutex.hpp:14,
                 from src/allocators.h:10,
                 from src\qt\walletmodel.h:8,
                 from src\qt\bitcoin.cpp:9:
..\deps\boost_1_55_0/boost/system/error_code.hpp: At global scope:
..\deps\boost_1_55_0/boost/system/error_code.hpp:222:36: warning: 'boost::system::posix_category' defined but not used [
-Wunused-variable]
     static const error_category &  posix_category = generic_category();
                                    ^
..\deps\boost_1_55_0/boost/system/error_code.hpp:223:36: warning: 'boost::system::errno_ecat' defined but not used [-Wun
used-variable]
     static const error_category &  errno_ecat     = generic_category();
                                    ^
..\deps\boost_1_55_0/boost/system/error_code.hpp:224:36: warning: 'boost::system::native_ecat' defined but not used [-Wu
nused-variable]
     static const error_category &  native_ecat    = system_category();
                                    ^
Makefile.Release:811: recipe for target 'build/bitcoin.o' failed
mingw32-make: *** [build/bitcoin.o] Error 1

C:\JennyCoin>
Cassey
Sr. Member
****
Offline Offline

Activity: 470
Merit: 250

Better to have 100 friends than 100 rubles


View Profile
March 24, 2014, 11:15:13 PM
 #496

Was there something above that?  Those all look like warnings... not errors that would halt the compile.

Cassey
Stygian0708
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
March 24, 2014, 11:38:17 PM
 #497

Was there something above that?  Those all look like warnings... not errors that would halt the compile.

there is an error at the bottom that halted the compile and the cmd buffer isn't going back far enough to see this has been a total head ache lol
Cassey
Sr. Member
****
Offline Offline

Activity: 470
Merit: 250

Better to have 100 friends than 100 rubles


View Profile
March 25, 2014, 01:12:40 AM
 #498

I took me at least two 40 hour weeks to get my first coin to build under windows.  It took 5 minutes under Linux.  Once you get the environment setup right, it will go easier.

Cassey
victormx
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
March 25, 2014, 01:27:26 AM
 #499

I took me at least two 40 hour weeks to get my first coin to build under windows.  It took 5 minutes under Linux.  Once you get the environment setup right, it will go easier.
Same here, linux on minutes
Stygian0708
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
March 25, 2014, 03:50:58 AM
 #500

I took me at least two 40 hour weeks to get my first coin to build under windows.  It took 5 minutes under Linux.  Once you get the environment setup right, it will go easier.

the windows wallet can't be built under linux though right?
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 [25] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!