Open andrasfuchs opened 2 years ago
I managed to install Python 3.7 with these commands:
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update
sudo apt-get install mingw-w64 build-essential nodejs git python3.7
ls /usr/bin/python* -l
sudo ln -vfns /usr/bin/python3.7 /usr/bin/python3
When I run SYSTEM=win32 CROSS_COMPILE=i686-w64-mingw32- ./cross-do
again, I got a different error:
Using i686-w64-mingw32-gcc (GCC) 10-win32 20220113 Copyright (C) 2020 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.
Compiler CC: i686-w64-mingw32-gcc
Compiler CFLAGS:
Compiler LDFLAGS:
Compiling libsodium-sys v0.2.6 (https://github.com/cjdelisle/sodiumoxide?branch=cjdns#3aa7e8e2)
Compiling cjdns_sys v0.1.0 (/home/andras/cjdns/rust/cjdns_sys)
error: failed to run custom build command for `cjdns_sys v0.1.0 (/home/andras/cjdns/rust/cjdns_sys)`
Caused by:
process didn't exit successfully: `/home/andras/cjdns/target/release/build/cjdns_sys-6dbc8e88e4cae3eb/build-script-build` (exit status: 1)
--- stdout
Initialize 3ms
testing python python3.7
sys.version_info(major=3, minor=7, micro=13, releaselevel='final', serial=0)
Build Libuv
Total build time: 112ms.
['-DOS=win', '-f', 'make-linux', '/home/andras/cjdns/target/release/build/cjdns_sys-3ae9253361d09334/out/dependencies/libuv/uv.gyp', '-I', '/home/andras/cjdns/target/release/build/cjdns_sys-3ae9253361d09334/out/dependencies/libuv/common.gypi', '--depth=.', '-Goutput_dir=/home/andras/cjdns/target/release/build/cjdns_sys-3ae9253361d09334/out/dependencies/libuv/out', '--generator-output', '/home/andras/cjdns/target/release/build/cjdns_sys-3ae9253361d09334/out/dependencies/libuv/out', '-Dhost_arch=x64', '-Dtarget_arch=x64', '-Dlibrary=static_library', '-Dcomponent=static_library']
--- stderr
/home/andras/cjdns/node_build/CjdnsTest.js:36
if (err) { throw err; }
^
Error: ENOENT: no such file or directory, stat './node_linux/nodejs/node/include/node/libplatform/libplatform.h'
at Error (native)
Error: Failed to build cjdns
warning: build failed, waiting for other jobs to finish...
error: build failed
Interestingly nano ./node_linux/nodejs/node/include/node/libplatform/libplatform.h
could open that file without any problems.
After the steps above I could build the Windows executables using ./windows_do
.
In order to use these files on Windows you must also get the libssp-0.dll
from the LLVM based mingw-w64 toolchain repo.
It would be great to update the CJDNS Windows documentation based on these results.
I tried to compile the CJDNS source for Windows on Ubuntu with the following commands:
I got back this:
I don't completely understand the error, it might be because of a breaking change between Python 3.9 and 3.10? I have Python 3.10 installed on WSL Ubuntu 22.04.