Bitcoin Forum
May 08, 2024, 03:37:01 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help to Windows compile for my crypto.  (Read 197 times)
klasias (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
December 13, 2018, 10:00:01 PM
 #1

Hi to all.

I'm a student , and i develop a my crypto ( fork to litecoin ).
In Ubuntu it's work fine , but when a try to compile for Windows is a disaster.

I follow this youtube tutorial : https://www.youtube.com/watch?v=_ti-d5t1WX8
But my Debian Virtual Machine gives me this error: ./bin/gbuild:21:in `system!': failed to run make-clean-vm --suite precise --arch amd64 (RuntimeError)

Does any of you have a virutal machine already configured to compile with gitian-builder Huh You can send it to me with a service like https://wetransfer.com/.

Or someone can compile for Windows (and send me with wetransfer) my wallet ?? My code is here:  https://github.com/gnucccoin/gnuccoin

Thanks a lot.
1715182621
Hero Member
*
Offline Offline

Posts: 1715182621

View Profile Personal Message (Offline)

Ignore
1715182621
Reply with quote  #2

1715182621
Report to moderator
1715182621
Hero Member
*
Offline Offline

Posts: 1715182621

View Profile Personal Message (Offline)

Ignore
1715182621
Reply with quote  #2

1715182621
Report to moderator
1715182621
Hero Member
*
Offline Offline

Posts: 1715182621

View Profile Personal Message (Offline)

Ignore
1715182621
Reply with quote  #2

1715182621
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715182621
Hero Member
*
Offline Offline

Posts: 1715182621

View Profile Personal Message (Offline)

Ignore
1715182621
Reply with quote  #2

1715182621
Report to moderator
darosior
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
December 13, 2018, 11:34:00 PM
 #2

Hi,

Which version of Litecoin did you fork ? I may have a solution to your problem, a friend of me made a general solution to build Litecoin forks for Windows from Linux after he spent dozens of hours without being able to compile Insacoin. I'll point him to the discussion.
DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1202
Merit: 582


OGRaccoon


View Profile
December 13, 2018, 11:39:02 PM
Last edit: December 13, 2018, 11:51:44 PM by MagicByt3
 #3

When I have seen this error in the past it can relate to  kvm is not loaded.

The command ls

Code:
ls -l /dev/kvm 

This will check the dev/kvm

You should also follow this guide for setting up the system.

https://github.com/mazaclub/EasyGitianBuilder

I guess you are missing something from the system.

can you post the full log in code tags please.


┏━━━━━━━━━━━━━━━━━┓
┃   💎 Mine Solo with CKPool 💎    ┃
┃    ➤ Hit Blocks on Your Own!      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
klasias (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
December 15, 2018, 12:41:10 PM
 #4

Help me please!!!  Cry

My error console is this:

Code:
debian@debian:~/gitian-builder$ ./bin/gbuild --commit gnuccoin=1.0 ../gnuccoin/contrib/gitian-descriptors/gitian-win32.yml
--- Building for precise amd64 ---
Stopping target if it is up
Making a new image copy
sudo: unable to resolve host gitian
stdin: is not a tty
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  rsyslog ubuntu-minimal
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 1289 kB disk space will be freed.
(Reading database ... 16075 files and directories currently installed.)
Removing ubuntu-minimal ...
Removing rsyslog ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
Processing triggers for ureadahead ...
Adding 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
Adding 'local diversion of /usr/bin/ischroot to /usr/bin/ischroot.distrib'
Adding 'local diversion of /usr/sbin/policy-rc.d to /usr/sbin/policy-rc.d.distrib'
Starting target
Checking if target is up
Preparing build environment
Updating apt-get repository (log in var/install.log)
Installing additional packages (log in var/install.log)
Upgrading system, may take a while (log in var/install.log)
Creating package manifest
stdin: is not a tty
Creating build script (var/build-script)
Running build script (log in var/build.log)
./bin/gbuild:21:in `system!': failed to run on-target setarch x86_64 bash -x < var/build-script > var/build.log 2>&1 (RuntimeError)
        from ./bin/gbuild:164:in `build_one_configuration'
        from ./bin/gbuild:309:in `block (2 levels) in <main>'
        from ./bin/gbuild:304:in `each'
        from ./bin/gbuild:304:in `block in <main>'
        from ./bin/gbuild:302:in `each'
        from ./bin/gbuild:302:in `<main>'


In gitian-builder/var/build.log i have this:

Code:
  inflating: lib/libminiupnpc.a      
  inflating: lib/libdb.a             
  inflating: lib/libpng16.a         
  inflating: lib/libpng16.la         
  inflating: lib/libpng.a           
  inflating: lib/libdb_cxx.a         
+ cd /home/ubuntu/build/
+ cd gnuccoin
+ export PATH=/home/ubuntu/staging/host/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH=/home/ubuntu/staging/host/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ mkdir -p /home/ubuntu/out/src
+ git archive HEAD
+ tar -x -C /home/ubuntu/out/src
+ cp /home/ubuntu/out/src/doc/README_windows.txt /home/ubuntu/out/readme.txt
cp: cannot stat `/home/ubuntu/out/src/doc/README_windows.txt': No such file or directory
darosior
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
December 15, 2018, 03:52:28 PM
 #5

Help me please!!!
That's not how you will get helped ..

Quote
cp: cannot stat `/home/ubuntu/out/src/doc/README_windows.txt': No such file or directory
Maybe this should help you to solve your error.

You have not answered my question :
Quote
Which version of Litecoin did you fork ?

However I asked my friend his Docker file and here it is (of course, you have to adapt it to your config) :
Code:
FROM debian:jessie
RUN apt update -y
RUN apt-get install -y --no-install-recommends p7zip-full libgdk-pixbuf2.0-dev libtool-bin \
       g++-multilib libc6-dev-i386 autoconf automake autopoint bash bison bzip2 cmake flex \
       gettext git g++ gperf intltool libffi-dev libtool libltdl-dev libssl-dev libxml-parser-perl \
       make openssl patch perl pkg-config python ruby scons sed unzip wget xz-utils

# Build the MXE toolchain.
RUN cd /mnt && git clone https://github.com/mxe/mxe.git \
        && cd mxe \
        # Don't link Qtbase against openssl v1.1.1 that will be build (we need 1.0.2)
        && sed -i '/-openssl-linked/d' /mnt/mxe/src/qtbase.mk \
        #&& sed -i "s/1.1.1a/1.0.2q/g" /mnt/mxe/src/openssl.mk \
        #&& sed -i "s/fc20130f8b7cbd2fb918b2f14e2f429e109c31ddd0fb38fc5d71d9ffed3f9f41/5744cfcbcec2b1b48629f7354203bc1e5e9b5466998bbccc5b5fcde3b18eb684/g" /mnt/mxe/src/openssl.mk \
        && make -j4 MXE_TARGETS="i686-w64-mingw32.static" boost \
        && make -j4 MXE_TARGETS="i686-w64-mingw32.static" qttools \
# Build berkleyDB.
        && cd /mnt \
        && wget http://download.oracle.com/berkeley-db/db-5.3.28.tar.gz \
        && tar zxvf db-5.3.28.tar.gz \
        && cd /mnt/db-5.3.28 \
        && export MXE_PATH=/mnt/mxe \
        && sed -i "s/WinIoCtl.h/winioctl.h/g" src/dbinc/win_db.h \
        && mkdir build_mxe \
        && cd build_mxe \
        && 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 -j4 \
        && make install \
# Can't remember the fuck is that.
        && cd /mnt \
        && CC=$MXE_PATH/usr/bin/i686-w64-mingw32.static-gcc AR=$MXE_PATH/usr/bin/i686-w64-mingw32.static-ar \
        CFLAGS="-DSTATICLIB -I$MXE_PATH/usr/i686-w64-mingw32.static/include" \
        LDFLAGS="-L$MXE_PATH/usr/i686-w64-mingw32.static/lib" \
# Build miniupnpc.
        && cd /mnt \
        && wget http://miniupnp.free.fr/files/miniupnpc-1.6.20120509.tar.gz \
        && tar zxvf miniupnpc-1.6.20120509.tar.gz \
        && cd /mnt/miniupnpc-1.6.20120509 \
        && CC=$MXE_PATH/usr/bin/i686-w64-mingw32.static-gcc AR=$MXE_PATH/usr/bin/i686-w64-mingw32.static-ar CFLAGS="-DSTATICLIB -I$MXE_PATH/usr/i686-w64-mingw32.static/include" LDFLAGS="-L$MXE_PATH/usr/i686-w64-mingw32.static/lib" make libminiupnpc.a \
# Copy miniupnpc  to static dir of mxe.
        && mkdir $MXE_PATH/usr/i686-w64-mingw32.static/include/miniupnpc \
        && cp *.h $MXE_PATH/usr/i686-w64-mingw32.static/include/miniupnpc \
        && cp libminiupnpc.a $MXE_PATH/usr/i686-w64-mingw32.static/lib

# Rebuild openssl v1.0.2q for compatibility.
RUN cd /mnt/ \
        && export PATH=/mnt/mxe/usr/bin:$PATH \
        && wget https://www.openssl.org/source/openssl-1.0.2q.tar.gz \
        && tar -xzvf openssl-1.0.2q.tar.gz \
        && cp -R openssl-1.0.2q openssl-win32-build \
        && cd openssl-win32-build \
        && CROSS_COMPILE="i686-w64-mingw32.static-" ./Configure mingw no-asm no-shared --prefix=/mnt/mxe/usr/i686-w64-mingw32.static \
        && make -j4  \
        && make install

# Build secp256k1.
RUN cd / \
        && git clone https://github.com/profithunterscoin/phc.git \
        && export MXE_PATH=/mnt/mxe \
        && cd /phc/src/secp256k1/ \
        && chmod +x autogen.sh \
        && ./autogen.sh \
        && CC=$MXE_PATH/usr/bin/i686-w64-mingw32.static-gcc \
        AR=$MXE_PATH/usr/bin/i686-w64-mingw32.static-ar \
        CFLAGS="-DSTATICLIB -I$MXE_PATH/usr/i686-w64-mingw32.static/include" \
        LDFLAGS="-L$MXE_PATH/usr/i686-w64-mingw32.static/lib" CROSS_COMPILE="i686-w64-mingw32.static-" ./configure --enable-module-recovery --host=i686-w64-mingw32.static \
        --enable-static --disable-shared --prefix=/mnt/mxe/usr/i686-w64-mingw32.static \
        && CC=$MXE_PATH/usr/bin/i686-w64-mingw32.static-gcc \
        AR=$MXE_PATH/usr/bin/i686-w64-mingw32.static-ar \
        CFLAGS="-DSTATICLIB -I$MXE_PATH/usr/i686-w64-mingw32.static/include" \
        LDFLAGS="-L$MXE_PATH/usr/i686-w64-mingw32.static/lib" make -j4 \
        # Put libsecp256k1.la in /mnt/mxe/usr/i686-w64-mingw32.static/lib/
        && make install

# Build leveldb
RUN cd / \
        && export PATH=/mnt/mxe/usr/bin:$PATH \
        && cd phc/src/leveldb \
        && chmod +x build_detect_platform \
        && TARGET_OS=NATIVE_WINDOWS make CC=i686-w64-mingw32.static-gcc CXX=i686-w64-mingw32.static-g++ libleveldb.a libmemenv.a

#Build PHC
RUN cd /phc \
        # Remove all paths that'll make the linker fail.
        && sed -i '/win32:BOOST_LIB_SUFFIX=-mgw49-mt-s-1_57/,/win32:QRENCODE_LIB_PATH=C:\/deps\/qrencode-3.4.4\/.libs/d' phc-qt.pro \
        # Add -pthread to libs.
        && sed -i '/^windows:LIBS\ +=\ -lws2_32/ s/$/ -pthread/' phc-qt.pro \
        && export PATH=/mnt/mxe/usr/bin:$PATH \
        && export MXE_PATH=/mnt/mxe \
        && MXE_INCLUDE_PATH=/mnt/mxe/usr/i686-w64-mingw32.static/include \
        MXE_LIB_PATH=/mnt/mxe/usr/i686-w64-mingw32.static/lib \
        i686-w64-mingw32.static-qmake-qt5 \
            BOOST_LIB_SUFFIX=-mt \
            BOOST_THREAD_LIB_SUFFIX=_win32-mt \
            BOOST_INCLUDE_PATH=$MXE_INCLUDE_PATH/boost \
            BOOST_LIB_PATH=$MXE_LIB_PATH \
            OPENSSL_INCLUDE_PATH=$MXE_INCLUDE_PATH/openssl \
            OPENSSL_LIB_PATH=$MXE_LIB_PATH \
            BDB_INCLUDE_PATH=$MXE_INCLUDE_PATH \
            BDB_LIB_PATH=$MXE_LIB_PATH \
            MINIUPNPC_INCLUDE_PATH=$MXE_INCLUDE_PATH \
            MINIUPNPC_LIB_PATH=$MXE_LIB_PATH \
            SECP256K1_INCLUDE_PATH=/phc/src/secp256k1/include \
            SECP256K1_LIB_PATH= $MXE_LIB_PATH \
        QMAKE_LRELEASE=/mnt/mxe/usr/i686-w64-mingw32.static/qt5/bin/lrelease phc-qt.pro \
        && make -j4 -f Makefile.Release
All credits to him, his pseudo is "Phylante".
DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1202
Merit: 582


OGRaccoon


View Profile
December 15, 2018, 11:39:07 PM
 #6

In the Gitian log there is the following :

Code:
+ tar -x -C /home/ubuntu/out/src
+ cp /home/ubuntu/out/src/doc/README_windows.txt /home/ubuntu/out/readme.txt
cp: cannot stat `/home/ubuntu/out/src/doc/README_windows.txt': No such file or directory

If the file exists you have maybe not the correct permissions or the file is non-existent.

Run in a terminal:

Code:
sudo chmod 775 /home/ubuntu/out/src/doc/README_windows.txt to grant yourself the permissions if the file is available.

You should question if you should release a coin if you are having issues with compiling one.
Running a coin is not easy it requires many skills and hard work to keep up to date with issues and updates.

I guess from your post this is a much older version codebase being used that will possibly have security risks for users.





┏━━━━━━━━━━━━━━━━━┓
┃   💎 Mine Solo with CKPool 💎    ┃
┃    ➤ Hit Blocks on Your Own!      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
klasias (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
December 16, 2018, 12:59:04 PM
 #7

Thanks a lot for all. But not works Sad

Can someone send me a virtual machine already configated to compile (for windows) a fork of litecoin 0.8.7.5 Huh
Or can you compile me in (for windows setup) and send me the package? ( Send me via WeTransfer )

Thank you

DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1202
Merit: 582


OGRaccoon


View Profile
December 16, 2018, 02:48:10 PM
 #8

Thanks a lot for all. But not works Sad

Can someone send me a virtual machine already configated to compile (for windows) a fork of litecoin 0.8.7.5 Huh
Or can you compile me in (for windows setup) and send me the package? ( Send me via WeTransfer )

Thank you



This is a very bad idea.  Someone could modify the code and send you virus files.


┏━━━━━━━━━━━━━━━━━┓
┃   💎 Mine Solo with CKPool 💎    ┃
┃    ➤ Hit Blocks on Your Own!      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
Pages: [1]
  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!