-
Notifications
You must be signed in to change notification settings - Fork 120
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
How to cross-compile an application which uses DuckDB? #243
Comments
You can use a cross compilation toolchain like https://github.com/messense/homebrew-macos-cross-toolchains
Does this work for you? Windows is a chapter by itself. We're still struggling to get DuckDB cross-compile to Windows. |
Yes, this worked – thanks a lot for your help 🎉 I assume that compiling for Linux on ARM would work in a similar way (one needs to figure out what to install for this). And I assume that the same is basically possible the other way round – compiling for macOS, but on Linux. Given that it's just a few lines, at least if you know what you're doing, wouldn't that be something that could be helpful to add to the documentation? |
I am closing this, since my initial question has been answered, and there is a follow-up issue at #279 |
I am writing an application, using macOS on Apple Silicon.
If I try to compile for this platform, it works:
If I try to compile for macOS on AMD64, it works as well:
(In this case I have not yet tested whether it also actually runs, but at least it compiles without errors.)
Compiling for Linux
So, from the fact that this works I assume that cross-compiling my application with a statically linked DuckDB should be possible. Otherwise, it wouldn't work for AMD64, would it?
However, next I try to compile for Linux on AMD64, using this command:
Now I get an error message:
The same is true for Linux on ARM64 (with the exact same error message):
Compiling for Windows
And I try to compile for Windows on AMD64, I get this error message:
What am I missing? Is cross-compiling my application even possible this way? If so, how?
PS
I'm using
[email protected]
, and my application so far only initializes an in-memory database, creates a table, and saves a few records, nothing fancy.The text was updated successfully, but these errors were encountered: