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

Static binary #243

Open
Eilie opened this issue Dec 17, 2017 · 9 comments
Open

Static binary #243

Eilie opened this issue Dec 17, 2017 · 9 comments

Comments

@Eilie
Copy link

Eilie commented Dec 17, 2017

Hello, how can I compile my program to static binary?

@gwatt
Copy link
Contributor

gwatt commented Dec 18, 2017

There is no official way to do that, but there are a few community projects.
Ovenpasta has a method that involves a modified Chez Scheme and zlib.

Ovenpasta's project should be portable across any system that Chez Scheme supports.

I also have a project that doesn't require modifications to Chez or zlib, but does require that the system be unix-like.

Neither of these produce static binaries in the traditional sense (i.e. they will dynamically link against system libraries), but they do create executables that can be distributed without including the full Chez Scheme system.

Note that both of these projects involve embedding the boot files and use other code from Chez so the proper license notifications will need to be distributed with any binaries created from these projects.

@Eilie
Copy link
Author

Eilie commented Dec 18, 2017

@gwatt Chez-exe is really nice, thank you for making it! I wounder will there ever be an official way to do this?

@gwatt
Copy link
Contributor

gwatt commented Dec 20, 2017

I would personally like to see something like these included in Chez Scheme proper. However I think neither are ready to be incorporated yet.

@tizoc
Copy link

tizoc commented Dec 28, 2017

@gwatt why doesn't chez-exe support Windows? is it just that you have not tried or is there some extra complication that I'm not considering? (other than the hardcoded paths to the temp files)

@gwatt
Copy link
Contributor

gwatt commented Dec 28, 2017

@tizoc The hardcoded paths are definitely a problem. However, the biggest reason is that I haven't taken the time to setup my windows computer with dev tools and actually figure out what I need to do to support windows. I suspect the build process will need to change; windows doesn't have great support for makefiles. I also think I would change the way I embed the scheme program and boot files. Windows provides a mechanism for embedding arbitrary resources into the executables and I would like to see if that's a good option for chez-exe. Finally, I don't know what libraries (if any) I need to link against on the windows side.

@EmmanuelOga
Copy link

Hi, any updates about this? Is chez-exe still the best way to produce a self contained executable? Any chance Chez will include an official way to produces binaries? Thx!

@larrasket
Copy link

After 6 years, any updaes?

@gwatt
Copy link
Contributor

gwatt commented Nov 22, 2023

@EmmanuelOga I've not seen a bunch else that lets produce a self contained exe, so I assume chez-exe is still the best way.

I've also not seen any talk about mainlining such a feature, but I wouldn't be surprised if it happens. I know that racket has its own way of producing executables and with the recent merging back in of racket's chezscheme fork I half expect to see that functionality put in mainline chez scheme.

However, I'm not a maintainer of either Chez Scheme or Racket, so they'd need to chime in on that last point.

@amirouche
Copy link
Contributor

amirouche commented Nov 22, 2023

There is my project letloop/letloop it produce binaries, and even include the necessary files for recompilation, and any shared library.

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

6 participants