Pages:
Author

Topic: [HOWTO] compile altcoin for windows on linux using mxe and mingw - page 12. (Read 49087 times)

newbie
Activity: 16
Merit: 0
It's kind of funny that the file you named your username after no longer exist in the Bitcoin source code. Ever since main.h and main.cpp were sort of replaced (I guess?) by chainparams.cpp/chainparams.h, I don't think anyone's written a decent guide on how to fork Bitcoin to make an altcoin for fun.
member
Activity: 148
Merit: 11
Does anyone know how to resolve this error?  The coin I'm working from uses secp256k which I noticed earlier someone stated is a bit older. 

Code:
/mnt/mxe/usr/bin/i686-w64-mingw32.static-ld: cannot find -lsecp256k1
collect2: error: ld returned 1 exit status
legendary
Activity: 2254
Merit: 1278
gives error during configure
Code:
./configure: line 12234: SECP_64BIT_ASM_CHECK: command not found
./configure: line 12263: SECP_INT128_CHECK: command not found
./configure: line 12291: SECP_INT128_CHECK: command not found
./configure: line 12316: SECP_GMP_CHECK: command not found
./configure: line 12422: SECP_OPENSSL_CHECK: command not found

The messages suggests that autoconf isn't finding the relevant m4 macros which suggests there's a missing file or an existing file has missing stanzas. Cross-referencing the m4 contents with those of a successfully-compiling coin of similar vintage and configuration might help you fill in the missing bits.

Cheers

Graham
legendary
Activity: 1638
Merit: 1036
after more fruitless searching,
i'm guessing it's to do with the age of secp256k1 (looks like early 2015).

will have to try a different coin with more recent version.
legendary
Activity: 1638
Merit: 1036
i'm having trouble with building a coin using secp256k1

Code:
libsecp256k1_la-secp256k1.o: file not recognized: File format not recognized

generally it seems like i have success with secp256k1 but it is not recognized on qt build.

i've tried a variety of things including

Code:
./autogen.sh
./configure --host=i686-w64-mingw32.static
make

fails on qt build

and
Code:
./configure --host=i686-w64-mingw32.static --prefix=/home/mxe/mxe/usr/i686-w64-mingw32.static --enable-static --disable-shared

gives error during configure
Code:
./configure: line 12234: SECP_64BIT_ASM_CHECK: command not found
./configure: line 12263: SECP_INT128_CHECK: command not found
./configure: line 12291: SECP_INT128_CHECK: command not found
./configure: line 12316: SECP_GMP_CHECK: command not found
./configure: line 12422: SECP_OPENSSL_CHECK: command not found

also fails on qt build



any assistance would be welcomed Smiley
legendary
Activity: 1400
Merit: 1001
Fucker of "the system"
when i run
Code:
./compile-db.sh
 

i m getting this error

Code:
configure: error: in `/home/nomad/mnt/db-5.3.28/build_mxe':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.



some one please help
or is there any updated guides on how to compile an alt coin wallet

i am not saying this file http://www.demonoid.pw/files/details/3565679/?rel=1496772185 is the complete environment with everything you need ------  i am not denying it either

ubuntu 17  PW spayse    sudo su  pw spayse
member
Activity: 93
Merit: 10
when i run
Code:
./compile-db.sh
 

i m getting this error

Code:
configure: error: in `/home/nomad/mnt/db-5.3.28/build_mxe':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.



some one please help
or is there any updated guides on how to compile an alt coin wallet
legendary
Activity: 1400
Merit: 1001
Fucker of "the system"
I'm getting this

Code:
in file included from src/netbase.h:10:0,
                 from src/qt/optionsdialog.cpp:6:
src/serialize.h:19:48: fatal error: boost/type_traits/is_fundamental.hpp: No such file or directory
compilation terminated.


I have  libboost-dev all installed under root/usr/include/boost this is crazy because I have compiled for Linux earlier

i tried to find boost in the mxe and i think the script thinks its here  /mnt/mxe/usr/i686-w64-mingw32.static/include  am I right?  doi just copy boost there??  im using an ubuntu server on digital ocean with node if that means anything.  I'm trying to copy over now plus I am dl the VM to see if I have better luck.

today was the first time I have been able to compile Berkeley DB ever and I have been trying for a long time. I think it was part this thread and part the education I have been receiving THAT FINALLY MAKES THIS STUFF SOUND LIKE ENGLISH.\


fixed  needed to set PATH
hero member
Activity: 882
Merit: 533
anyone found a way for this ?


Use this  ==> https://www.amazon.com/clouddrive/share/ZhOxZQQzji8FpQvuV9b86DqJg6IGpIXmlXFyG5o2X8h?ref_=cd_ph_share_link_copy


Here's a copy of my Ubuntu 14.04 32-bit VMware Image for anyone that wants it. You will need atleast VMware 10 installed.

https://www.amazon.com/clouddrive/share/ZhOxZQQzji8FpQvuV9b86DqJg6IGpIXmlXFyG5o2X8h?ref_=cd_ph_share_link_copy

It should be a big help to anyone that is having problems following this guide.

The user password is Password1

The root password is Password1

There are instructions on the desktop for anyone that needs them. Wink

There is a problem, i tried to do this many time and i always ended with different issues, so i came up to the conclusion that due to MXE's updates, the paths/scripts must be fixed.
So either change the scripts, or download this VM (i used it) and compile it from there. You just have to export path and then run compile script. Instructions are provided in the desktop.
hero member
Activity: 1638
Merit: 507
The snake which cannot cast its skin has to die
I am trying to compile Blackcoin, following exactly everything from the OP;

Code:
a@a-VirtualBox:/mnt/blackcoin$ sudo ./compile-blk.sh
./compile-blk.sh: line 6: i686-w64-mingw32.static-qmake-qt5: command not found
make: Makefile.Release: No such file or directory
make: *** No rule to make target `Makefile.Release'.  Stop.

a@a-VirtualBox:/mnt/blackcoin$ echo $PATH
/mnt/mxe/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin‌​:/bin

How do I fix this ?

i686-w64-mingw32.static-qmake-qt5

it's saying this command is missing do a search for it if it's missing your mxe installation is broken
sr. member
Activity: 461
Merit: 252
Hello.

Somebody tried to realize 64-bit assembly of the altcoin client? Has been compiled by me novacoind.exe and novacoin-qt.exe
Just try to build alternative toolchain with mxe
Code:
make -j2 gcc MXE_TARGETS=x86_64-w64-mingw32.static.posix
member
Activity: 157
Merit: 23
Thanks, this worked really well! I wonder how difficult it would be to cross-compile for MacOS


Error:

/mnt/mxe/usr/i686-w64-mingw32.static/lib/libdb_cxx.a(os_pid.o):os_pid.c:(.text+0x25): undefined reference to `pthread_self'
collect2: error: ld returned 1 exit status
Makefile.Release:427: recipe for target 'release/blackcoin-qt.exe' failed
make: *** [release/blackcoin-qt.exe] Error 1

Thank you,

To fix this issue edit the .pro file and replace

Code:
windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32

with

Code:
windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 -pthread

No, the Problem was that Berkley DB was not the correct Version, I had to downgrade it and then it works. Smiley
sr. member
Activity: 292
Merit: 259
wagerr.com
hi guys, while in the final steps of compiling i get this

Quote
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_program_options-mt.a(cmdline.o): duplicate section `.rdata$_ZTSN5boost16exception_detail19error_info_injectorINS_17bad_function_callEEE[__ZTSN5boost16exception_detail19error_info_injectorINS_17bad_function_callEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_program_options-mt.a(cmdline.o): duplicate section `.rdata$_ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_17bad_function_callEEEEE[__ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_17bad_function_callEEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_program_options-mt.a(cmdline.o): duplicate section `.rdata$_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_17bad_function_callEEEEE[__ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_17bad_function_callEEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost16exception_detail19error_info_injectorISt13runtime_errorEE[__ZTSN5boost16exception_detail19error_info_injectorISt13runtime_errorEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEEE[__ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost16exception_detail19error_info_injectorINS_9gregorian16bad_day_of_monthEEE[__ZTSN5boost16exception_detail19error_info_injectorINS_9gregorian16bad_day_of_monthEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost16exception_detail19error_info_injectorINS_21thread_resource_errorEEE[__ZTSN5boost16exception_detail19error_info_injectorINS_21thread_resource_errorEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEEE[__ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorISt9bad_allocEEEE[__ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorISt9bad_allocEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost16exception_detail19error_info_injectorINS_10lock_errorEEE[__ZTSN5boost16exception_detail19error_info_injectorINS_10lock_errorEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_10lock_errorEEEEE[__ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_10lock_errorEEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost16exception_detail19error_info_injectorINS_9gregorian8bad_yearEEE[__ZTSN5boost16exception_detail19error_info_injectorINS_9gregorian8bad_yearEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEEE[__ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost16exception_detail19error_info_injectorINS_9gregorian9bad_monthEEE[__ZTSN5boost16exception_detail19error_info_injectorINS_9gregorian9bad_monthEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEEE[__ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEEE[__ZTSN5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTSN5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_14bad_exception_EEEEE[__ZTSN5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_14bad_exception_EEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEEE[__ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEEE[__ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEEE[__ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorISt9bad_allocEEEE[__ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorISt9bad_allocEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTVN5boost16exception_detail10clone_implINS0_10bad_alloc_EEE[__ZTVN5boost16exception_detail10clone_implINS0_10bad_alloc_EEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTVN5boost16exception_detail10clone_implINS0_14bad_exception_EEE[__ZTVN5boost16exception_detail10clone_implINS0_14bad_exception_EEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_10lock_errorEEEEE[__ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_10lock_errorEEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEEE[__ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_thread_win32-mt.a(thread.o): duplicate section `.rdata$_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEEE[__ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_chrono-mt.a(chrono.o): duplicate section `.rdata$_ZTSN5boost16exception_detail19error_info_injectorINS_6system12system_errorEEE[__ZTSN5boost16exception_detail19error_info_injectorINS_6system12system_errorEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_chrono-mt.a(chrono.o): duplicate section `.rdata$_ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEEE[__ZTSN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEEE]' has different size
/mnt/mxe/usr/i686-w64-mingw32.static/lib/libboost_chrono-mt.a(chrono.o): duplicate section `.rdata$_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEEE[__ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEEE]' has different size
collect2: error: ld returned 1 exit status

any clues ?
sr. member
Activity: 292
Merit: 259
wagerr.com
hi guys, great guide !

im trying to compile a coin that contains secp256k1 using this guide

i get this error

Quote
i686-w64-mingw32.static-g++ -c -pipe -fno-keep-inline-dllexport -D_FORTIFY_SOURCE=2 -O2 -std=gnu++11 -frtti -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -Wno-unused-variable -fpermissive -Wno-cpp -Wno-maybe-uninitialized -Wno-unused-local-typedefs -fexceptions -mthreads -DUNICODE -DENABLE_WALLET -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DQT_DISABLE_DEPRECATED_BEFORE=0 -DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT -DUSE_UPNP=1 -DMINIUPNP_STATICLIB -DSTATICLIB -DWIN32 -D_MT -DBOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -Isrc -Isrc/json -Isrc/qt -Isrc/qt/plugins/mrichtexteditor -Isrc/leveldb/include -Isrc/leveldb/helpers -I../mxe/usr/i686-w64-mingw32.static/include -I../mxe/usr/i686-w64-mingw32.static/include/boost -I../mxe/usr/i686-w64-mingw32.static/include -I../mxe/usr/i686-w64-mingw32.static/include/openssl -IC:/dev/coindeps32/Secp256k1/include -I../mxe/usr/i686-w64-mingw32.static/qt5/include -I../mxe/usr/i686-w64-mingw32.static/qt5/include/QtPrintSupport -I../mxe/usr/i686-w64-mingw32.static/qt5/include/QtWidgets -I../mxe/usr/i686-w64-mingw32.static/qt5/include/QtGui -I../mxe/usr/i686-w64-mingw32.static/qt5/include/QtNetwork -I../mxe/usr/i686-w64-mingw32.static/qt5/include/QtCore -Ibuild -Ibuild -I../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/win32-g++  -o build/key.o src/key.cpp
src/key.cpp:11:23: fatal error: secp256k1.h: No such file or directory
 #include
                       ^
compilation terminated.
make: *** [build/key.o] Error 1

can anybody help with what i need to do to include secp256k1. do  i just compile it in its folder by it self using standard means

nvm fixed it. just edited key.cpp and specified exactly where the file was
sr. member
Activity: 292
Merit: 259
wagerr.com
hi guys, great guide !

im trying to compile a coin that contains secp256k1 using this guide

i get this error

Quote
i686-w64-mingw32.static-g++ -c -pipe -fno-keep-inline-dllexport -D_FORTIFY_SOURCE=2 -O2 -std=gnu++11 -frtti -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -Wno-unused-variable -fpermissive -Wno-cpp -Wno-maybe-uninitialized -Wno-unused-local-typedefs -fexceptions -mthreads -DUNICODE -DENABLE_WALLET -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DQT_DISABLE_DEPRECATED_BEFORE=0 -DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT -DUSE_UPNP=1 -DMINIUPNP_STATICLIB -DSTATICLIB -DWIN32 -D_MT -DBOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -Isrc -Isrc/json -Isrc/qt -Isrc/qt/plugins/mrichtexteditor -Isrc/leveldb/include -Isrc/leveldb/helpers -I../mxe/usr/i686-w64-mingw32.static/include -I../mxe/usr/i686-w64-mingw32.static/include/boost -I../mxe/usr/i686-w64-mingw32.static/include -I../mxe/usr/i686-w64-mingw32.static/include/openssl -IC:/dev/coindeps32/Secp256k1/include -I../mxe/usr/i686-w64-mingw32.static/qt5/include -I../mxe/usr/i686-w64-mingw32.static/qt5/include/QtPrintSupport -I../mxe/usr/i686-w64-mingw32.static/qt5/include/QtWidgets -I../mxe/usr/i686-w64-mingw32.static/qt5/include/QtGui -I../mxe/usr/i686-w64-mingw32.static/qt5/include/QtNetwork -I../mxe/usr/i686-w64-mingw32.static/qt5/include/QtCore -Ibuild -Ibuild -I../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/win32-g++  -o build/key.o src/key.cpp
src/key.cpp:11:23: fatal error: secp256k1.h: No such file or directory
 #include
                       ^
compilation terminated.
make: *** [build/key.o] Error 1

can anybody help with what i need to do to include secp256k1. do  i just compile it in its folder by it self using standard means
member
Activity: 112
Merit: 10
Such is life in crypto paradise
Thanks, this worked really well! I wonder how difficult it would be to cross-compile for MacOS


Error:

/mnt/mxe/usr/i686-w64-mingw32.static/lib/libdb_cxx.a(os_pid.o):os_pid.c:(.text+0x25): undefined reference to `pthread_self'
collect2: error: ld returned 1 exit status
Makefile.Release:427: recipe for target 'release/blackcoin-qt.exe' failed
make: *** [release/blackcoin-qt.exe] Error 1

Thank you,

To fix this issue edit the .pro file and replace

Code:
windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32

with

Code:
windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 -pthread
sr. member
Activity: 1050
Merit: 277
Ok that's complicated. What do you do after that ? I dont understand how do you get your wallet to you csn generate and mine coins ? How do you do a premine ? What are the next steps. This is not so easy to understand. For you it is since you know all these things and you know what is in your head but we dont so for us understanding is not so easy.
member
Activity: 157
Merit: 23
Hey,

I cannot compile the Windows Wallet, it shows me everytime this Error:
What have I missed here?
I am Using Debian.

Error:

/mnt/mxe/usr/i686-w64-mingw32.static/lib/libdb_cxx.a(os_pid.o):os_pid.c:(.text+0x25): undefined reference to `pthread_self'
collect2: error: ld returned 1 exit status
Makefile.Release:427: recipe for target 'release/blackcoin-qt.exe' failed
make: *** [release/blackcoin-qt.exe] Error 1

Thank you,
legendary
Activity: 2412
Merit: 1044
legendary
Activity: 2254
Merit: 1278
My issues arise when I try to cross-compile the QT wallet for windows using MXE.

I've had success with MXE cross-compilation by adding the MXE ppa deb http://pkg.mxe.cc/repos/apt/debian wheezy main to my apt-sources, installing the appropriate cross-compiler bundle and all the pre-compiled packages: boost, qt, libqrencode, miniupnpc.



I doubt whether I actually hand-selected every single installed package, I probably selected a bundle but I had a very sketchy model of the cross-compilation process at the time, so was sort of stabbing around in blind optimism (yes, it does sometimes pay off) and don't exactly recall what I did - other than, at the end of the exercise, I had a richly-populated /usr/lib/mxe/usr/lib folder which does the biz.

It also has the useful side-effect of obviating the cross-compilation of the upnp & qrencode support libs.

I have this for cross-compiling SLIMCoin:

Code:
#!/bin/bash

# Working setup to cross-compile Windows binaries for Slimcoin hosted on a
# Vagrant Ubuntu 16.04 VM using non-Canonical ppas for MXE and Qt5.7:
# deb http://pkg.mxe.cc/repos/apt/debian wheezy main

# Doesn't seem to pass the QT directives through, though. Tough.

# Basic path bindings
PATH=/usr/lib/mxe/usr/bin:$PATH
MXE_PATH=/usr/lib/mxe
MXE_INCLUDE_PATH=/usr/lib/mxe/usr/i686-w64-mingw32.static/include
MXE_LIB_PATH=/usr/lib/mxe/usr/i686-w64-mingw32.static/lib
# Belt and braces
CXXFLAGS="-std=gnu++11 -march=i686"
LDFLAGS="-march=i686"
target="i686-w64-mingw32.static"

# Particularise for cross-compiling
export BOOST_LIB_SUFFIX=-mt
export BOOST_THREAD_LIB_SUFFIX=_win32-mt
export BOOST_INCLUDE_PATH=${MXE_INCLUDE_PATH}/boost
export BOOST_LIB_PATH=${MXE_LIB_PATH}
export OPENSSL_INCLUDE_PATH=${MXE_INCLUDE_PATH}/openssl
export OPENSSL_LIB_PATH=${MXE_LIB_PATH}
export BDB_INCLUDE_PATH=${MXE_INCLUDE_PATH}
export BDB_LIB_PATH=${MXE_LIB_PATH}
export MINIUPNPC_INCLUDE_PATH=${MXE_INCLUDE_PATH}
export MINIUPNPC_LIB_PATH=${MXE_LIB_PATH}
export QMAKE_LRELEASE=${MXE_PATH}/usr/${target}/qt5/bin/lrelease

# Call qmake to create Makefile.[Release|Debug]
${target}-qmake-qt5 \
    MXE=1 \
    USE_O3=1 \
    USE_QRCODE=1 \
    FIRST_CLASS_MESSAGING=1 \
    RELEASE=1 \
    USE_UPNPC=1 \
    BOOST_LIB_SUFFIX=${BOOST_LIB_SUFFIX} \
    BOOST_THREAD_LIB_SUFFIX=${BOOST_THREAD_LIB_SUFFIX} \
    BOOST_INCLUDE_PATH=${BOOST_INCLUDE_PATH} \
    BOOST_LIB_PATH=${BOOST_LIB_PATH} \
    OPENSSL_INCLUDE_PATH=${OPENSSL_INCLUDE_PATH} \
    OPENSSL_LIB_PATH=${OPENSSL_LIB_PATH} \
    BDB_INCLUDE_PATH=${BDB_INCLUDE_PATH} \
    BDB_LIB_PATH=${BDB_LIB_PATH} \
    MINIUPNPC_INCLUDE_PATH=${MINIUPNPC_INCLUDE_PATH} \
    MINIUPNPC_LIB_PATH=${MINIUPNPC_LIB_PATH} \
    QMAKE_LRELEASE=${QMAKE_LRELEASE} slimcoin-qt.pro

# Go for it. If successful, Windows binary will be written out to ./release/slimcoin-qt.exe
make -f Makefile.Release CXXFLAGS="-DQT_GUI -DQT_NO_PRINTER -std=gnu++11 -march=i686" LDFLAGS="-march=i686"

(The above probably includes more incantations than are strictly necessary but I have at least omitted the 1cc of mouse blood that I habitually include.)

Oh, one last thing - all of the above assumes a VM with build-essentials, etc already apt-installed.

HTH,

Cheers

Graham
Pages:
Jump to: