|
Wolf0
|
 |
July 22, 2013, 11:54:53 PM |
|
... I am of the opinion that whoever designed the Windows compatibility should be shot, although I did finally get the daemon to compile. Is 0.8.x any better?
|
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
|
|
|
|
|
|
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
|
|
Wolf0
|
 |
July 23, 2013, 03:15:18 AM |
|
Using this post to detail the bugs in the latest Git version of Bitcoin.
#1: In compat.h, somebody thought it was a good idea to typedef u_int to SOCKET. So remove line 29. (Maybe it should be put between #ifndef WIN32 guards?)
#2: The type pid_t isn't defined because the includes for sys/types.h and sys/time.h are excluded for Windows. God knows why. Open util.h and move line 12 to a new line AFTER the include of sys/time.h. (sys/resource.h does not exist on Windows systems.)
#3: If you get a bunch of Boost errors about InterlockedIncrement and InterlockedExchange, it's cause nobody defined BOOST_USE_WINDOWS_H. Do so, preferably in the Makefile. This should happen at checkpoints.cpp.
#4: If you're using the Windows shell like me, but have Cygwin's make, CURDIR doesn't work right in the Makefile. Set it manually, or init.cpp will gripe about missing leveldb/db.h. Don't use ?= like the other variable definitions, cause that will have no effect, use the = sign.
#5: This may or may not be a bug, but my ld didn't like '--large-address-aware', so if you have the same problem, remove '-Wl,--large-address-aware' from the Makefile.
#6: The linker line "-l db_cxx" will point to a file that apparently isn't a library on Windows, according to ld. Fix it by changing it to "-l db_cxx-4.8", or whatever version number you have.
|
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
|
|
|
|
Diapolo
|
 |
July 24, 2013, 07:14:13 AM |
|
Can you please contribute via some pull-requests or at least open an issue ticket at Github ( https://github.com/bitcoin/bitcoin/issues)?Perhaps you can at least give some information why your points need fixing, as (at least) I'm currently not seeing any obious compiler errors or warnings when building with MinGW 4.8.1 and current master  . Thanks, Dia
|
|
|
|
|
Diapolo
|
 |
July 24, 2013, 07:23:30 AM |
|
#2: The type pid_t isn't defined because the includes for sys/types.h and sys/time.h are excluded for Windows. God knows why. Open util.h and move line 12 to a new line AFTER the include of sys/time.h. (sys/resource.h does not exist on Windows systems.)
pid_t is never used for Windows builds AFAIK, so it would be an idea to guard CreatePidFile() by #ifndef WIN32. https://github.com/bitcoin/bitcoin/pull/2855Dia
|
|
|
|
|
Wolf0
|
 |
July 24, 2013, 08:33:36 AM |
|
Can you please contribute via some pull-requests or at least open an issue ticket at Github ( https://github.com/bitcoin/bitcoin/issues)?Perhaps you can at least give some information why your points need fixing, as (at least) I'm currently not seeing any obious compiler errors or warnings when building with MinGW 4.8.1 and current master  . Thanks, Dia Are you using MinGW-w64, or the old MinGW that doesn't support 64 bit?
|
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
|
|
|
|
Diapolo
|
 |
July 24, 2013, 08:40:54 AM |
|
Can you please contribute via some pull-requests or at least open an issue ticket at Github ( https://github.com/bitcoin/bitcoin/issues)?Perhaps you can at least give some information why your points need fixing, as (at least) I'm currently not seeing any obious compiler errors or warnings when building with MinGW 4.8.1 and current master  . Thanks, Dia Are you using MinGW-w64, or the old MinGW that doesn't support 64 bit? I'm using Mingwbuilds ( http://sourceforge.net/projects/mingwbuilds/) and from this a x86 version of MinGW 4.8.1. Dia
|
|
|
|
|
Wolf0
|
 |
July 24, 2013, 09:31:22 AM |
|
Can you please contribute via some pull-requests or at least open an issue ticket at Github ( https://github.com/bitcoin/bitcoin/issues)?Perhaps you can at least give some information why your points need fixing, as (at least) I'm currently not seeing any obious compiler errors or warnings when building with MinGW 4.8.1 and current master  . Thanks, Dia Are you using MinGW-w64, or the old MinGW that doesn't support 64 bit? I'm using Mingwbuilds ( http://sourceforge.net/projects/mingwbuilds/) and from this a x86 version of MinGW 4.8.1. Dia Strange, you should at least run into problems #1, #2, and #3.
|
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
|
|
|
|
Diapolo
|
 |
July 24, 2013, 09:48:21 AM |
|
Strange, you should at least run into problems #1, #2, and #3.
#1 It makes no difference, I removed the typedef u_int to SOCKET and compiled, which generates no error or warning just like before. Anyway, if this is not needed we should perhaps also just remove it from the code. What compiler error do you get from this, can you post it? #2 My pull also prevents this from beeing a problem without new includes for WIN32. As we often use #ifdef WIN32, is this correct with mingw-64 or a 64 bit compiler also or could that cause your errors? Same question as above, can you post compiler errors / warnings for this? #3 No idea for this, can you link me to a page that gives info about when to define or set BOOST_USE_WINDOWS_H. One last thing, I compile bitcoin-qt, not bitcoind, perhaps that also makes a difference... Thanks, Dia
|
|
|
|
Remember remember the 5th of November
Legendary
Offline
Activity: 1750
Merit: 1001
Reverse engineer from time to time
|
 |
July 24, 2013, 11:02:55 AM |
|
MinGW-W64 != MinGW32. Both projects are maintained by different people afaik. I've had some weird errors with mingw64 than with regular x86 mingw on many non-bitcoin related projects.
Plus, 0.6.2 should be obsolete.
|
BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
|
|
|
|
Wolf0
|
 |
July 24, 2013, 12:03:06 PM |
|
Strange, you should at least run into problems #1, #2, and #3.
#1 It makes no difference, I removed the typedef u_int to SOCKET and compiled, which generates no error or warning just like before. Anyway, if this is not needed we should perhaps also just remove it from the code. What compiler error do you get from this, can you post it? #2 My pull also prevents this from beeing a problem without new includes for WIN32. As we often use #ifdef WIN32, is this correct with mingw-64 or a 64 bit compiler also or could that cause your errors? Same question as above, can you post compiler errors / warnings for this? #3 No idea for this, can you link me to a page that gives info about when to define or set BOOST_USE_WINDOWS_H. One last thing, I compile bitcoin-qt, not bitcoind, perhaps that also makes a difference... Thanks, Dia I get the following: g++ -c -mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-par ameter -g -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -D USE_IPV6=1 -I/cygdrive/c/deps/bitcoin/src/leveldb/include -I/cygdrive/c/deps/bit coin/src/leveldb/helpers -I"/cygdrive/c/deps/bitcoin/src" -I"C:/deps/boost_1_54 _0" -I"C:/deps/db-4.8.30.NC/build_unix" -I"C:/deps/win64-openssl/include" -o o bj/alert.o alert.cpp In file included from netbase.h:11:0, from util.h:30, from alert.h:13, from alert.cpp:11: compat.h:29:15: error: conflicting declaration 'typedef u_int SOCKET' typedef u_int SOCKET; ^ In file included from c:\mingw\x86_64-w64-mingw32\include\winsock2.h:55:0, from compat.h:15, from netbase.h:11, from util.h:30, from alert.h:13, from alert.cpp:11: c:\mingw\x86_64-w64-mingw32\include\psdk_inc\_socket_types.h:11:18: error: 'SOCK ET' has a previous declaration as 'typedef UINT_PTR SOCKET' typedef UINT_PTR SOCKET; ^ In file included from alert.h:13:0, from alert.cpp:11: util.h:211:57: error: 'pid_t' has not been declared void CreatePidFile(const boost::filesystem::path &path, pid_t pid); ^ makefile.mingw:127: recipe for target `obj/alert.o' failed make: *** [obj/alert.o] Error 1
About #3, I think we're running into this bug: https://svn.boost.org/trac/boost/ticket/4849MinGW-W64 != MinGW32. Both projects are maintained by different people afaik. I've had some weird errors with mingw64 than with regular x86 mingw on many non-bitcoin related projects.
Plus, 0.6.2 should be obsolete.
Had you read, you would know this was done on the latest git.
|
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
|
|
|
|
Diapolo
|
 |
July 24, 2013, 12:45:48 PM |
|
I get the following: g++ -c -mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-par ameter -g -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -D USE_IPV6=1 -I/cygdrive/c/deps/bitcoin/src/leveldb/include -I/cygdrive/c/deps/bit coin/src/leveldb/helpers -I"/cygdrive/c/deps/bitcoin/src" -I"C:/deps/boost_1_54 _0" -I"C:/deps/db-4.8.30.NC/build_unix" -I"C:/deps/win64-openssl/include" -o o bj/alert.o alert.cpp In file included from netbase.h:11:0, from util.h:30, from alert.h:13, from alert.cpp:11: compat.h:29:15: error: conflicting declaration 'typedef u_int SOCKET' typedef u_int SOCKET; ^ In file included from c:\mingw\x86_64-w64-mingw32\include\winsock2.h:55:0, from compat.h:15, from netbase.h:11, from util.h:30, from alert.h:13, from alert.cpp:11: c:\mingw\x86_64-w64-mingw32\include\psdk_inc\_socket_types.h:11:18: error: 'SOCK ET' has a previous declaration as 'typedef UINT_PTR SOCKET' typedef UINT_PTR SOCKET; ^ In file included from alert.h:13:0, from alert.cpp:11: util.h:211:57: error: 'pid_t' has not been declared void CreatePidFile(const boost::filesystem::path &path, pid_t pid); ^ makefile.mingw:127: recipe for target `obj/alert.o' failed make: *** [obj/alert.o] Error 1
About #3, I think we're running into this bug: https://svn.boost.org/trac/boost/ticket/4849The CreatePidFile() error will be gone with my pull included in master. I'll also create a pull to remove the typedef u_int SOCKET; from compat.h. For the Boost bug you mention, it seems that was fixed long ago in 1.47.0 and we are currently using 1.50 for our Windows builds (my own build is using 1.54). Which Boost version are you using? Dia
|
|
|
|
|
Wolf0
|
 |
July 24, 2013, 12:57:19 PM |
|
I get the following: g++ -c -mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-par ameter -g -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -D USE_IPV6=1 -I/cygdrive/c/deps/bitcoin/src/leveldb/include -I/cygdrive/c/deps/bit coin/src/leveldb/helpers -I"/cygdrive/c/deps/bitcoin/src" -I"C:/deps/boost_1_54 _0" -I"C:/deps/db-4.8.30.NC/build_unix" -I"C:/deps/win64-openssl/include" -o o bj/alert.o alert.cpp In file included from netbase.h:11:0, from util.h:30, from alert.h:13, from alert.cpp:11: compat.h:29:15: error: conflicting declaration 'typedef u_int SOCKET' typedef u_int SOCKET; ^ In file included from c:\mingw\x86_64-w64-mingw32\include\winsock2.h:55:0, from compat.h:15, from netbase.h:11, from util.h:30, from alert.h:13, from alert.cpp:11: c:\mingw\x86_64-w64-mingw32\include\psdk_inc\_socket_types.h:11:18: error: 'SOCK ET' has a previous declaration as 'typedef UINT_PTR SOCKET' typedef UINT_PTR SOCKET; ^ In file included from alert.h:13:0, from alert.cpp:11: util.h:211:57: error: 'pid_t' has not been declared void CreatePidFile(const boost::filesystem::path &path, pid_t pid); ^ makefile.mingw:127: recipe for target `obj/alert.o' failed make: *** [obj/alert.o] Error 1
About #3, I think we're running into this bug: https://svn.boost.org/trac/boost/ticket/4849The CreatePidFile() error will be gone with my pull included in master. I'll also create a pull to remove the typedef u_int SOCKET; from compat.h. For the Boost bug you mention, it seems that was fixed long ago in 1.47.0 and we are currently using 1.50 for our Windows builds (my own build is using 1.54). Which Boost version are you using? Dia My build is also using 1.54. Apparently it wasn't fixed.
|
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
|
|
|
|
Diapolo
|
 |
July 24, 2013, 01:00:14 PM |
|
I get the following: g++ -c -mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-par ameter -g -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -D USE_IPV6=1 -I/cygdrive/c/deps/bitcoin/src/leveldb/include -I/cygdrive/c/deps/bit coin/src/leveldb/helpers -I"/cygdrive/c/deps/bitcoin/src" -I"C:/deps/boost_1_54 _0" -I"C:/deps/db-4.8.30.NC/build_unix" -I"C:/deps/win64-openssl/include" -o o bj/alert.o alert.cpp In file included from netbase.h:11:0, from util.h:30, from alert.h:13, from alert.cpp:11: compat.h:29:15: error: conflicting declaration 'typedef u_int SOCKET' typedef u_int SOCKET; ^ In file included from c:\mingw\x86_64-w64-mingw32\include\winsock2.h:55:0, from compat.h:15, from netbase.h:11, from util.h:30, from alert.h:13, from alert.cpp:11: c:\mingw\x86_64-w64-mingw32\include\psdk_inc\_socket_types.h:11:18: error: 'SOCK ET' has a previous declaration as 'typedef UINT_PTR SOCKET' typedef UINT_PTR SOCKET; ^ In file included from alert.h:13:0, from alert.cpp:11: util.h:211:57: error: 'pid_t' has not been declared void CreatePidFile(const boost::filesystem::path &path, pid_t pid); ^ makefile.mingw:127: recipe for target `obj/alert.o' failed make: *** [obj/alert.o] Error 1
About #3, I think we're running into this bug: https://svn.boost.org/trac/boost/ticket/4849The CreatePidFile() error will be gone with my pull included in master. I'll also create a pull to remove the typedef u_int SOCKET; from compat.h. For the Boost bug you mention, it seems that was fixed long ago in 1.47.0 and we are currently using 1.50 for our Windows builds (my own build is using 1.54). Which Boost version are you using? Dia My build is also using 1.54. Apparently it wasn't fixed. As I said, I never saw that Boost error and it seems neither does our Gitian build suffer from this or our pulltester. Can you post the boost related compiler errors/warnings also? Dia
|
|
|
|
|
Wolf0
|
 |
July 24, 2013, 04:42:46 PM |
|
I think I exceeded the max post length, so here: http://pastebin.com/SNjP3Htj
|
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
|
|
|
|
Wolf0
|
 |
July 27, 2013, 01:54:15 PM |
|
Bump.
|
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
|
|
|
|
Wolf0
|
 |
August 02, 2013, 08:21:09 PM |
|
Bump so devs see this.
|
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
|
|
|
|
Wolf0
|
 |
August 13, 2013, 03:46:04 AM |
|
Bump.
|
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
|
|
|
|
Wolf0
|
 |
August 19, 2013, 08:34:28 PM |
|
Bump.
|
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
|
|
|
cabin
Sr. Member
  
Offline
Activity: 613
Merit: 250
Join Cashbery Coin!
|
 |
August 28, 2013, 02:19:13 AM |
|
I get these boost errors on mingw64 as well:
c:/data/miner2/deps/boost_1_54_0/boost/detail/interlocked.hpp:161:37: error: '_I nterlockedExchange' is not a member of 'boost::detail' # define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange
Wolf can you explain what and where the BOOST_USE_WINDOWS_H fix goes?
Edit: Got it.. using lines like these in makefile.mingw fixed it:
DEFS=-DWIN32_LEAN_AND_MEAN -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DBOOST_USE_WINDOWS_H
LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -static
|
|
|
|
|
Wolf0
|
 |
August 30, 2013, 09:29:21 PM |
|
I get these boost errors on mingw64 as well:
c:/data/miner2/deps/boost_1_54_0/boost/detail/interlocked.hpp:161:37: error: '_I nterlockedExchange' is not a member of 'boost::detail' # define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange
Wolf can you explain what and where the BOOST_USE_WINDOWS_H fix goes?
Edit: Got it.. using lines like these in makefile.mingw fixed it:
DEFS=-DWIN32_LEAN_AND_MEAN -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DBOOST_USE_WINDOWS_H
LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -static
Yeah, it goes in DEFS. I'm hoping the devs will put it in there so people don't have to fix it.
|
Donations: BTC: 1WoLFdwcfNEg64fTYsX1P25KUzzSjtEZC -- XMR: 45SLUTzk7UXYHmzJ7bFN6FPfzTusdUVAZjPRgmEDw7G3SeimWM2kCdnDQXwDBYGUWaBtZNgjYtEYA22aMQT4t8KfU3vHLHG
|
|
|
|