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

Is it possible to build it under windows? #445

Open
kitcarsongit opened this issue Jul 14, 2022 · 6 comments
Open

Is it possible to build it under windows? #445

kitcarsongit opened this issue Jul 14, 2022 · 6 comments
Assignees

Comments

@kitcarsongit
Copy link

Did someone managed to build it under windows?

@brotzeit
Copy link
Member

brotzeit commented Jul 14, 2022

I think it depends on which features you want to use. I remember that @DavidDeSimone has tried to make the javascript feature work but I think it turned out to be complicated, as far as I remember. The webrender feature probably also doesn't work on windows. But I actually didn't try it ;)

@kitcarsongit
Copy link
Author

i'll search for his posts. anyway, is there some preferred build system (mingw, cygwin, msvc) to try?

@brotzeit
Copy link
Member

No idea, I only use windows for occasional gaming.

@DavidDeSimone
Copy link
Member

I'll dig up the post in a second - the crux of the issue is that we use deno, which uses a set of bindings for v8 called "rusty_v8". Rusty_v8 works with a pre-compiled binary of v8 (google's javascript engine) that is compiled with msvc.

We compile emacs-ng with the same toolchain as vanilla emacs, which is not usually msvc. I'll be honest - I may have just been over my head at the time I attempted this. I did document my progress and thoughts pretty well. I got remacs builds working back in the day on windows - the main issue is with v8. I tried separating v8 at the DLL barrier, but I ran into roadblocks there.

@DavidDeSimone
Copy link
Member

#47

@derinsh0
Copy link

derinsh0 commented Jul 16, 2022

I actually tried to build emacs-ng over the weekend on Mingw just for curiosity. Emacs master can successfully be built without a few features such as dbus, pgtk and cairo.

Right now I've stumbled upon some minor issues, and I'm afraid there could be some coming major ones. You have to make sure you use Msys git and disable clfr. But there still are some issues.

../rust_src/target/release/remacs_lib.lib:1: *** missing separator. Stop.

When I tried to use the rust toolchain x86_64-pc-windows-gnu I get

sed -i~ 's/rust_src\//..\/rust_src\//g' ../rust_src/target/release/remacs_lib.lib
sed: can't read ../rust_src/target/release/remacs_lib.lib: No such file or directory
make[1]: *** No rule to make target '../rust_src/target/release/remacs_lib.lib', needed by 'etags.exe'.  Stop.

Doing a manual cargo build or more specifically cargo build --release --manifest-path=../rust_src/remacs-lib/Cargo.toml will not produce the remacs_lib.lib file for some reason on GNU rust. I've made sure to make from project root. Output:

make -C lib-src all
make[1]: Entering directory '/emacs/emacs-ng/lib-src'
CARGO_BUILD_DEP_INFO_BASEDIR=/emacs/emacs-ng \
RUSTFLAGS="" \
cargo build --release --manifest-path=../rust_src/remacs-lib/Cargo.toml
   Compiling winapi v0.3.9
   Compiling regex-syntax v0.6.22
   Compiling rand_chacha v0.1.1
   Compiling rand_pcg v0.1.2
   Compiling rand v0.6.5
   Compiling syn v0.11.11
   Compiling libc v0.2.97
   Compiling memchr v2.3.4
   Compiling rand_isaac v0.1.1
   Compiling rand_hc v0.1.0
   Compiling aho-corasick v0.7.15
   Compiling darling_core v0.2.2
   Compiling regex v1.4.3
   Compiling rand_jitter v0.1.4
   Compiling rand_os v0.1.3
   Compiling errno v0.2.7
   Compiling time v0.1.44
   Compiling darling_macro v0.2.2
   Compiling darling v0.2.2
   Compiling lisp-util v0.1.0 (C:\lib\msys64\emacs\emacs-ng\rust_src\crates\lisp_util)
   Compiling remacs-lib v0.1.0 (C:\lib\msys64\emacs\emacs-ng\rust_src\remacs-lib)
    Finished release [optimized] target(s) in 24.68s
sed -i~ 's/rust_src\//..\/rust_src\//g' ../rust_src/target/release/remacs_lib.lib
sed: can't read ../rust_src/target/release/remacs_lib.lib: No such file or directory
make[1]: *** No rule to make target '../rust_src/target/release/remacs_lib.lib', needed by 'etags.exe'.  Stop.
make[1]: Leaving directory '/emacs/emacs-ng/lib-src'
make: *** [Makefile:447: lib-src] Error 2

@declantsien declantsien self-assigned this Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants