Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on windows 10 bash (ubuntu) error #2676

Closed
dragnoir opened this issue Oct 20, 2017 · 11 comments
Closed

Build on windows 10 bash (ubuntu) error #2676

dragnoir opened this issue Oct 20, 2017 · 11 comments
Labels
A-build Area: Build system O-windows Operating system: Windows

Comments

@dragnoir
Copy link

dragnoir commented Oct 20, 2017

at this level
./zcutil/build.sh --disable-rust -j$(nproc)
I received this error

dragnoir@DESKTOP-UG3OHSI:~/zcash$ ./zcutil/build.sh --disable-rust -j$(nproc)
+++ readlink -f ./zcutil/build.sh
++ dirname /home/dragnoir/zcash/zcutil/build.sh
+ cd /home/dragnoir/zcash/zcutil/..
+ LCOV_ARG=
+ HARDENING_ARG=--enable-hardening
+ TEST_ARG=
+ '[' x--disable-rust = x--enable-lcov ']'
+ '[' x--disable-rust = x--disable-tests ']'
+ MINING_ARG=
+ '[' x--disable-rust = x--disable-mining ']'
+ RUST_ARG=
+ '[' x--disable-rust = x--disable-rust ']'
+ RUST_ARG=--enable-rust=no
+ shift
+ PROTON_ARG=--enable-proton=no
+ '[' x-j8 = x--enable-proton ']'
+ LIBS_ARG=
+ '[' x-j8 = x--disable-libs ']'
++ pwd
+ PREFIX=/home/dragnoir/zcash/depends/x86_64-unknown-linux-gnu/
+ eval make --version
++ make --version
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
+ eval gcc --version
++ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

+ eval g++ --version
++ g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

+ as --version
GNU assembler (GNU Binutils for Ubuntu) 2.26.1
Copyright (C) 2015 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-linux-gnu'.
+ ld -v
GNU ld (GNU Binutils for Ubuntu) 2.26.1
+ HOST=x86_64-unknown-linux-gnu
+ BUILD=x86_64-unknown-linux-gnu
+ NO_RUST=--enable-rust=no
+ NO_PROTON=--enable-proton=no
+ make -j8 -C ./depends/ V=1
make: Entering directory '/home/dragnoir/zcash/depends'
echo Configuring native_ccache...
Configuring native_ccache...
rm -rf /home/dragnoir/zcash/depends/x86_64-unknown-linux-gnu; mkdir -p /home/dragnoir/zcash/depends/x86_64-unknown-linux-gnu/lib; cd /home/dragnoir/zcash/depends/x86_64-unknown-linux-gnu;
mkdir -p /home/dragnoir/zcash/depends/work/build/x86_64-unknown-linux-gnu/native_ccache/3.3.1-85982d36978/.
cd /home/dragnoir/zcash/depends/work/build/x86_64-unknown-linux-gnu/native_ccache/3.3.1-85982d36978/.;     PKG_CONFIG_LIBDIR=/home/dragnoir/zcash/depends/x86_64-unknown-linux-gnu/native/lib/pkgconfig PKG_CONFIG_PATH=/home/dragnoir/zcash/depends/x86_64-unknown-linux-gnu/native/share/pkgconfig PATH=/home/dragnoir/zcash/depends/x86_64-unknown-linux-gnu/native/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0/bin:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0/libnvvp:/mnt/c/Perl64/site/bin:/mnt/c/Perl64/bin:/mnt/c/Program Files (x86)/Razer Chroma SDK/bin:/mnt/c/Program Files/Razer Chroma SDK/bin:/mnt/c/Program Files (x86)/Intel/iCLS Client:/mnt/c/Program Files/Intel/iCLS Client:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/nodejs:/mnt/c/Program Files (x86)/Calibre2:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/cURL/bin:/mnt/c/Program Files/CMake/bin:/mnt/c/Program Files/PuTTY:/mnt/c/Users/mega/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files (x86)/Microsoft VS Code/bin:/mnt/c/Users/mega/AppData/Roaming/npm   ./configure --host=x86_64-unknown-linux-gnu --disable-dependency-tracking --prefix=/home/dragnoir/zcash/depends/x86_64-unknown-linux-gnu/native         CC="gcc" CXX="g++" NM="nm" RANLIB="ranlib" AR="ar" CPPFLAGS="-I/home/dragnoir/zcash/depends/x86_64-unknown-linux-gnu/native/include    " LDFLAGS="-L/home/dragnoir/zcash/depends/x86_64-unknown-linux-gnu/native/lib    "
/bin/sh: 1: Syntax error: "(" unexpected
funcs.mk:242: recipe for target '/home/dragnoir/zcash/depends/work/build/x86_64-unknown-linux-gnu/native_ccache/3.3.1-85982d36978/./.stamp_configured' failed
make: *** [/home/dragnoir/zcash/depends/work/build/x86_64-unknown-linux-gnu/native_ccache/3.3.1-85982d36978/./.stamp_configured] Error 2
make: Leaving directory '/home/dragnoir/zcash/depends'

Any help please !

@daira
Copy link
Contributor

daira commented Oct 21, 2017

What does /bin/sh --version output in the bash shell?

@daira daira added A-build Area: Build system O-windows Operating system: Windows labels Oct 21, 2017
@dragnoir
Copy link
Author

$ bash --version
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

@daira
Copy link
Contributor

daira commented Oct 21, 2017

No, specifically /bin/sh --version (it may be the same or it may not).

@dragnoir
Copy link
Author

$ /bin/sh --version
/bin/sh: 0: Illegal option --

I am new with linux/ubuntu. I am trying to rum "bash on ubuntu" on my windows 10 for zcash solo mining.

@dragnoir
Copy link
Author

image 1

@daira
Copy link
Contributor

daira commented Oct 21, 2017

Ok, so /bin/sh is not bash. It's probably dash; what does /bin/sh print without arguments?

@dragnoir
Copy link
Author

$ /bin/sh
$

Open new line and wait me to write commands.

Also from windows Run : "%localappdata%\Lxss\rootfs"
the file sh content is : "dash"
image 2
image 3

@radix42
Copy link
Contributor

radix42 commented Oct 21, 2017

If your goal is solo mining on windows, my port to it is quite a lot faster than running in the bash on Ubuntu on Windows subsystem. My distribution of native command line zcashd and related tools is bundled with a gui in a box installer at zcash4win.com, and you just have to add the Sam options to mine to your zcash.conf file.

If you.are bound and determined to do a source build, there is a thread some where on forum.z.cash about how to do what you are doing, including the weird config file stuff you have to do because IPv6.doesn't play nice with it.

Sorry for typos, on vacation and on my phone!

@dragnoir
Copy link
Author

@radix42 Thank you. I think your native command line zcashd will help 👍

@dragnoir
Copy link
Author

Work good.
My zcash.conf under Program Files\zcash4win\app

daemon=1
txindex=1
addnode=mainnet.z.cash
rpcuser=username
rpcpassword=password
server=1
rpcallowip=127.0.0.1
rpcbind=127.0.0.1
rpcport=18232
bind=0.0.0.0
port=18233
onlynet=ipv4
#gen=1
#genproclimit=6

zcash.conf under AppData\Roaming\Zcash

addnode=mainnet.z.cash 
rpcuser=username 
rpcpassword=password
daemon=1 
showmetrics=1
genproclimit=-5
gen=1

@ioptio
Copy link
Contributor

ioptio commented Oct 23, 2017

Closing this since the issue is resolved for the user and a related ticket was opened (see above).

@ioptio ioptio closed this as completed Oct 23, 2017
@ioptio ioptio added this to Complete in User Support Oct 23, 2017
@daira daira added this to Complete in Portability Nov 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build Area: Build system O-windows Operating system: Windows
Projects
User Support
  
Complete
Portability
  
Complete
Development

No branches or pull requests

4 participants