Pages:
Author

Topic: [HOWTO] compile altcoin for windows on linux using mxe and mingw (Read 49127 times)

newbie
Activity: 7
Merit: 0
If you have levelDB issue (libleveldb.a / libmemenv.a), plz follow below instruction.

Code:
cd %coin_folder%/src/leveldb
TARGET_OS=NATIVE_WINDOWS make libleveldb.a libmemenv.a CC=/mnt/mxe/usr/bin/i686-w64-mingw32.static-gcc CXX=/mnt/mxe/usr/bin/i686-w64-mingw32.static-g++

It's really works, thanks a lot.
full member
Activity: 750
Merit: 100
Please help me with my error encountered

Please provide more details Huh

He got an error. What more do you want?  Roll Eyes
hero member
Activity: 1638
Merit: 507
The snake which cannot cast its skin has to die
Please help me with my error encountered

Please provide more details Huh
newbie
Activity: 8
Merit: 0
Please help me with my error encountered
jr. member
Activity: 117
Merit: 1


anyone wants a copy of secp256k1 for win32 here's a link
https://drive.google.com/open?id=0B5j8d4FSc7drYzlpMVJKbVdISVk

i had a go at win64, this version appears to have succeeded but i havent tested it
https://drive.google.com/open?id=0B5j8d4FSc7drd3RBUnc0R0pyUE0





Hey i know it's been a while, but do you still have those? The links are broken since  Sad

Thank you  Smiley

Being it's not clear exactly what you are trying to do. But compiling with MXE on linux will produce the platform versions you need. Also ofc secp has had recent updates on their repo, and you should work with whatever code may already exist with the project you're working on.

No that didnt work, tried already.

I've compiled my own libraries on windows for seckpt im ok now
hero member
Activity: 1638
Merit: 507
The snake which cannot cast its skin has to die


anyone wants a copy of secp256k1 for win32 here's a link
https://drive.google.com/open?id=0B5j8d4FSc7drYzlpMVJKbVdISVk

i had a go at win64, this version appears to have succeeded but i havent tested it
https://drive.google.com/open?id=0B5j8d4FSc7drd3RBUnc0R0pyUE0





Hey i know it's been a while, but do you still have those? The links are broken since  Sad

Thank you  Smiley

Being it's not clear exactly what you are trying to do. But compiling with MXE on linux will produce the platform versions you need. Also ofc secp has had recent updates on their repo, and you should work with whatever code may already exist with the project you're working on.
jr. member
Activity: 117
Merit: 1


anyone wants a copy of secp256k1 for win32 here's a link
https://drive.google.com/open?id=0B5j8d4FSc7drYzlpMVJKbVdISVk

i had a go at win64, this version appears to have succeeded but i havent tested it
https://drive.google.com/open?id=0B5j8d4FSc7drd3RBUnc0R0pyUE0





Hey i know it's been a while, but do you still have those? The links are broken since  Sad

Thank you  Smiley
hero member
Activity: 1638
Merit: 507
The snake which cannot cast its skin has to die
Hello everyone,

I decided to revisit this and ended up discovering the build script for BerkeleyDB initially posted in this thread by the OP is quite incorrect.

Here is the correct syntax!

Code:
#!/bin/bash

## Path to MXE source
 MXE_PATH=/home/demon/dev/mxe
## Path for mingw headers
 MXE_INCLUDE=$MXE_PATH/usr/i686-w64-mingw32.static/include

## Path to db source
 db=db-6.1.26


## Make a clean working tree / Create working DIR
## You can also use `make distclean` within build_mxe to start fresh
 rm -rf ./$db/build_mxe
 mkdir -p ./$db/build_mxe

 cd ./$db/build_mxe

## Correct naming of header file
 sed -i "s/WinIoCtl.h/winioctl.h/g" ../src/dbinc/win_db.h


## Define CC and C++ compiler & user level commands
export CC=$MXE_PATH/usr/bin/i686-w64-mingw32.static-gcc
export CXX=$MXE_PATH/usr/bin/i686-w64-mingw32.static-g++
export AR=$MXE_PATH/usr/bin/i686-w64-mingw32.static-ar
export STRIP=$MXE_PATH/usr/bin/i686-w64-mingw32.static-strip
export RANLIB=$MXE_PATH/usr/bin/i686-w64-mingw32.static-ranlib

### Find mingw headers in non-standard directory
export CPPFLAGS=-I$MXE_INCLUDE


## Configure the build
 ../dist/configure \
     --build=x86_64-pc-linux-gnu \
     --host=x86 \
     --disable-replication \
     --enable-cxx \
     --enable-mingw \
     --program-transform-name='s,.exe,,;s,\(.*\),\1.exe,' \
     --prefix=/home/demon/dev/mxe_db \
     --exec-prefix=/home/demon/dev/mxe_db

## Build DB and install it
 make -j(nproc); make -j(nproc) install

Also discussed here (with build log):
https://stackoverflow.com/questions/50639135/how-to-compile-berkeley-db-5-3-28-for-mxe-cross-compile
jr. member
Activity: 46
Merit: 10
All went ok with some trial and errors but i am stuck on last step with following error

/src/leveldb/libmemenv.a: error adding symbols: Archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
Makefile.Release:453: recipe for target 'release/coin-qt.exe' failed

I have already made db by using following command

Code:
#!/bin/bash
MXE_PATH=/mnt/mxe
sed -i "s/WinIoCtl.h/winioctl.h/g" src/dbinc/win_db.h
mkdir build_mxe
cd build_mxe

RANLIB=$MXE_PATH/usr/bin/i686-w64-mingw32.static-ranlib \
CC=$MXE_PATH/usr/bin/i686-w64-mingw32.static-gcc \
CXX=$MXE_PATH/usr/bin/i686-w64-mingw32.static-g++ \
../dist/configure \
        --disable-replication \
        --enable-mingw \
        --enable-cxx \
        --host x86 \
        --prefix=$MXE_PATH/usr/i686-w64-mingw32.static
make
make install



Still awaiting a solution. if anyone know??
full member
Activity: 750
Merit: 100

Was the file changed to Makefile instead of Makefile.Release? May have to change that in the compile.sh file.

I didnt rename coinname-qt.pro correctly in the  compile.sh file Smiley

Ty!

Been there, done that. Enjoy.
newbie
Activity: 9
Merit: 0

Was the file changed to Makefile instead of Makefile.Release? May have to change that in the compile.sh file.

I didnt rename coinname-qt.pro correctly in the  compile.sh file Smiley

Ty!
full member
Activity: 750
Merit: 100
Code:
make: Makefile.Release: No such file or directory
make: *** No rule to make target 'Makefile.Release'.  Stop.
root@test:/mnt/litecoin#

How to fix this Huh

ty

Was the file changed to Makefile instead of Makefile.Release? May have to change that in the compile.sh file.
member
Activity: 450
Merit: 10
Code:
make: Makefile.Release: No such file or directory
make: *** No rule to make target 'Makefile.Release'.  Stop.
root@test:/mnt/litecoin#

How to fix this Huh

ty
hero member
Activity: 1638
Merit: 507
The snake which cannot cast its skin has to die
Yer all the paths are correct i believe,  which path would it be under just for reference lol, im sure there all correct

Code:
/home/windows/Desktop/CCN/CCN-qt.pro

How is your script written ?
copper member
Activity: 57
Merit: 0
BiFi - Internet
Can anyone help with this issue, trying to compile windows qt desktop wallet

Saying it cant find the .pro even though its there in the coin source folder

Any help appreciated



Where exactly in the src folder is it and if you're using a script is its location correctly defined ?


This is where my .pro file is (in the coin source folder)

Im using ubuntu 16 also for reference



Ok so in your script / command to compile the code, is it correctly indicating the location of the file ?

Yer all the paths are correct i believe,  which path would it be under just for reference lol, im sure there all correct
hero member
Activity: 1638
Merit: 507
The snake which cannot cast its skin has to die
Can anyone help with this issue, trying to compile windows qt desktop wallet

Saying it cant find the .pro even though its there in the coin source folder

Any help appreciated



Where exactly in the src folder is it and if you're using a script is its location correctly defined ?


This is where my .pro file is (in the coin source folder)

Im using ubuntu 16 also for reference



Ok so in your script / command to compile the code, is it correctly indicating the location of the file ?
copper member
Activity: 57
Merit: 0
BiFi - Internet
Can anyone help with this issue, trying to compile windows qt desktop wallet

Saying it cant find the .pro even though its there in the coin source folder

Any help appreciated



Where exactly in the src folder is it and if you're using a script is its location correctly defined ?


This is where my .pro file is (in the coin source folder)

Im using ubuntu 16 also for reference

hero member
Activity: 1638
Merit: 507
The snake which cannot cast its skin has to die
Can anyone help with this issue, trying to compile windows qt desktop wallet

Saying it cant find the .pro even though its there in the coin source folder

Any help appreciated



Where exactly in the src folder is it and if you're using a script is its location correctly defined ?
copper member
Activity: 57
Merit: 0
BiFi - Internet
Can anyone help with this issue, trying to compile windows qt desktop wallet

Saying it cant find the .pro even though its there in the coin source folder

Any help appreciated

member
Activity: 179
Merit: 10
Pages:
Jump to: