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

Issues cross-compiling bet for windows with mingw-w64 #262

Closed
satindergrewal opened this issue Sep 6, 2021 · 4 comments
Closed

Issues cross-compiling bet for windows with mingw-w64 #262

satindergrewal opened this issue Sep 6, 2021 · 4 comments
Assignees
Labels
help wanted Extra attention is needed wontfix This will not be worked on

Comments

@satindergrewal
Copy link
Collaborator

Tried cross-compiling bet for windows on Ubuntu 18.04 with mingw-w64 and got same issues as #261

sudo apt-get install -y \
  autoconf automake build-essential git libtool libgmp-dev \
  libsqlite3-dev python3 net-tools zlib1g-dev libsodium-dev \
  gettext wget libcurl3-gnutls ninja-build libssl-dev \
  libcurl4-gnutls-dev libevent-dev

sudo apt-get install -y \
  autoconf automake build-essential git libtool libgmp-dev \
  libsqlite3-dev python3 python3-mako net-tools zlib1g-dev libsodium-dev \
  gettext

sudo apt install mingw-w64

export target_host=x86_64-w64-mingw32

export AR=$target_host-ar
export AS=$target_host-as
export CC=$target_host-gcc
export CXX=$target_host-g++
export LD=$target_host-ld
export STRIP=$target_host-strip

git clone https://github.com/chips-blockchain/bet
cd bet
./configure

# Same configurator error as ARM compilation
satinder@ubuntu:~/bet$ ./configure
Compiling ccan/tools/configurator/configurator...done
./configure: 223: ./configure: ccan/tools/configurator/configurator: Exec format error
satinder@ubuntu:~/bet$ 
@satindergrewal satindergrewal added the help wanted Extra attention is needed label Sep 6, 2021
@satindergrewal satindergrewal added this to the 0.1 - First Alpha milestone Sep 6, 2021
@satindergrewal satindergrewal self-assigned this Sep 6, 2021
@satindergrewal
Copy link
Collaborator Author

Please hold on any efforts to make it cross-compile for now. I need to test something and push update for that in build system.

@satindergrewal
Copy link
Collaborator Author

I just noticed that the build system which is derived from c-lightning project doesn't has Windows installation support in it. So, that probably means this build system wasn't meant to compile for Windows and most probably will have issues.

Still exploring it further.

@satindergrewal
Copy link
Collaborator Author

Another relevant comment from the dependency repository ccan, which indicates this code might be hard to compile for windows as is in current state: rustyrussell/ccan#28 (comment)

I tried again in Ubuntu 16.04 Docker container and got little different error this time:

apt-get update && \
	DEBIAN_FRONTEND=noninteractive apt-get install -y \
	autoconf automake build-essential sudo git libtool libgmp-dev \
	libsqlite3-dev python3 python3-mako net-tools zlib1g-dev libsodium-dev \
	gettext wget libcurl3-gnutls ninja-build libssl-dev \
	libcurl4-gnutls-dev libevent-dev
sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git
sudo apt install g++-mingw-w64-x86-64

# Select Posix option from alternative
sudo update-alternatives --config x86_64-w64-mingw32-g++


export target_host=x86_64-w64-mingw32

export AR=$target_host-ar
export AS=$target_host-as
export CC=$target_host-gcc
export CXX=$target_host-g++
export LD=$target_host-ld
export STRIP=$target_host-strip


root@17c53b55dfce:~/bet# ./configure
Compiling ccan/tools/configurator/configurator...done
ccan/tools/configurator/configurator: 1: ccan/tools/configurator/configurator: MZ����@���: not found
ccan/tools/configurator/configurator: 1: ccan/tools/configurator/configurator: Syntax error: word unexpected (expecting ")")

@satindergrewal
Copy link
Collaborator Author

Closing this issue, since it seems it'll not be feasible to achieve it with current dependency setup.
Unless specific dependencies in ccan are identified and are setup to compile/use individually, this issue might not resolve.

@satindergrewal satindergrewal added the wontfix This will not be worked on label Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant