Post
Topic
Board Altcoin Discussion
Re: [HOWTO] compile altcoin for windows on linux using mxe and mingw
by
widecash
on 02/06/2018, 17:55:04 UTC
@widecash

It was a simple fix for the last make command in the script

Add  cd ../.. before the last make command:

Code:
cd ../..
make -f Makefile.Release ...

it showed error as below:

c/qt/transactiontablemodel.cpp:1:0: error: bad value (x86_64) for -march= switch
 #include "transactiontablemodel.h"
 ^
src/qt/bitcoingui.cpp:1:0: error: bad value (x86_64) for -march= switch
 /*
 ^
src/txdb-leveldb.cpp:1:0: error: bad value (x86_64) for -march= switch
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 ^
src/qt/bitcoin.cpp:1:0: error: bad value (x86_64) for -march= switch
 /*
 ^
src/qt/addresstablemodel.cpp:1:0: error: bad value (x86_64) for -march= switch
 #include "addresstablemodel.h"
 ^
src/qt/optionsdialog.cpp:1:0: error: bad value (x86_64) for -march= switch
 #include "optionsdialog.h"
 ^
Makefile.Release:15242: recipe for target 'build/transactiontablemodel.o' failed
make: *** [build/transactiontablemodel.o] Error 1
make: *** Waiting for unfinished jobs....
Makefile.Release:13697: recipe for target 'build/bitcoingui.o' failed
make: *** [build/bitcoingui.o] Error 1
Makefile.Release:12071: recipe for target 'build/bitcoin.o' failed
make: *** [build/bitcoin.o] Error 1
Makefile.Release:10508: recipe for target 'build/txdb-leveldb.o' failed
make: *** [build/txdb-leveldb.o] Error 1
Makefile.Release:16774: recipe for target 'build/addresstablemodel.o' failed
make: *** [build/addresstablemodel.o] Error 1
Makefile.Release:17735: recipe for target 'build/optionsdialog.o' failed
make: *** [build/optionsdialog.o] Error 1


Change all instances of -march= to:

-march=native

Secondly, you should be adjusting the script accordingly to your environment, not making it x86_64 just cause mine is. You originally showed that you're using i686 platform, so you must keep it consistent throughout.


Can run now but error


src/leveldb/libleveldb.a(version_set.o):version_set.cc:(.text+0x67ab): undefined reference to `leveldb::port::Mutex::Lock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0x20): undefined reference to `leveldb::port::Mutex::Lock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0x4d): undefined reference to `leveldb::port::Mutex::Unlock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0x153): undefined reference to `leveldb::port::Mutex::~Mutex()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0x193): undefined reference to `leveldb::port::Mutex::~Mutex()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0x205): undefined reference to `leveldb::port::Mutex::~Mutex()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0x313): undefined reference to `leveldb::port::Mutex::Lock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0x351): undefined reference to `leveldb::port::Mutex::Unlock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0x37d): undefined reference to `leveldb::port::Mutex::Unlock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0x438): undefined reference to `leveldb::port::Mutex::Lock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0x6e2): undefined reference to `leveldb::port::Mutex::Unlock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0x8a4): undefined reference to `leveldb::port::Mutex::Unlock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0x915): undefined reference to `leveldb::port::Mutex::~Mutex()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0xa32): undefined reference to `leveldb::port::Mutex::Lock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0xb05): undefined reference to `leveldb::port::Mutex::Unlock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0xb41): undefined reference to `leveldb::port::Mutex::Unlock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0xba6): undefined reference to `leveldb::port::Mutex::Lock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0xc35): undefined reference to `leveldb::port::Mutex::Unlock()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0xcf6): undefined reference to `leveldb::port::Mutex::Mutex()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0xe03): undefined reference to `leveldb::port::Mutex::Mutex()'
/mnt/wch/src/leveldb/libleveldb.a(cache.o):cache.cc:(.text+0xed4): undefined reference to `leveldb::port::Mutex::~Mutex()'
/mnt/wch/src/leveldb/libleveldb.a(comparator.o):comparator.cc:(.text+0x1f3): undefined reference to `leveldb::port::InitOnce(leveldb::port::OnceType*, void (*)())'
/mnt/wch/src/leveldb/libleveldb.a(comparator.o):comparator.cc:(.text+0x1b6): undefined reference to `leveldb::port::Mutex::~Mutex()'
/mnt/wch/src/leveldb/libleveldb.a(comparator.o):comparator.cc:(.text.startup+0x10): undefined reference to `leveldb::port::Mutex::Mutex()'
/mnt/wch/src/leveldb/libleveldb.a(env_win.o):env_win.cc:(.text+0x2593): undefined reference to `leveldb::port::InitOnce(leveldb::port::OnceType*, void (*)())'
/mnt/wch/src/leveldb/libleveldb.a(env_win.o):env_win.cc:(.text+0x5e6): undefined reference to `leveldb::port::Mutex::~Mutex()'
/mnt/wch/src/leveldb/libleveldb.a(env_win.o):env_win.cc:(.text.startup+0x62): undefined reference to `leveldb::port::Mutex::Mutex()'
collect2: error: ld returned 1 exit status