-
Notifications
You must be signed in to change notification settings - Fork 207
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
cross-compiling on Linux to macOS target #272
Comments
There is incremental build mode which leaves those files. For cross compiling you need to setup few environment variables before Please search or ask harbour-devel, harbour-users mailing lists for some examples. |
You can combine too with -workdir=output_folder |
Following your hints, I made some basic tests.
I can compile the .c sources to .o and I can confirm are darwin obj:
but the link stage stop.
I see there are no release/tag on github, are there some (recent) pre-built library mach/x86-64 (and maybe arm64) .a/.dylib, so I can avoid to cross-build all the harbour env, maybe I unable to do? |
I saw the file harbour-1.0.1-darwin_9.5.0.bin.tar.gz at: |
Don't use those old libraries. |
Not warranties whatsoever, but here they are.
|
I got another link error:
Now I'm generating the Darwin19 osxcross compiler tools to see if make difference, as my toolchain target 18 while I saw you used 19 |
OK, now work:
Will try to build something more complex now, with other deps. Did you have an arm64 build too? |
I can say the cross-build from harbour source to macOS/x86_64 work well using CLANG and OSXCROSS: https://github.com/tpoechtrager/osxcross Now I want try build a binary for Apple Silicon. thank you in advance |
@efa, |
Thanks for reporting! Good to know that it's possible to make such cross-build. Seems more practical for automated builds than personal usage. |
what Darwin version do you use? 20, 21 or 22? |
found, confirm do you used macOS 13.0 ? |
I got lot of warnings in the link phase:
|
Yep, 13.0.1 (22A400) MacOS Ventura |
I use a simple bash script that set all the env vars, than run hbmk2 |
Looks interesting, I remember few years ago I did the same thing but for mingw to compile on MACOS exes for windows. Harbour is really fantastic :) |
|
do something similar targeting windows |
A build for another SO is an automated build.
What about github machines?
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
I already use for Linux and Windows, but there are a Mac version available.
José M. C. Quintas
Em 23/11/2022 21:42, efa escreveu:
…
Seems more practical for automated builds than personal usage
I use a simple bash script that set all the env vars, than run hbmk2
—
Reply to this email directly, view it on GitHub
<#272 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABAO45HX42P72TTCKMUTLN3WJ22WBANCNFSM6AAAAAAR2TYT3Q>.
You are receiving this because you are subscribed to this
thread.Message ID: ***@***.***>
|
sorry, I can't understand what you mean. With manual build I mean invoking gcc or clang from the command prompt. Remotely, like with github machines, I suppose are the same all 4 combinations. |
hi,
I want try to cross-build from Linux to macOS.
This is something I regularly do for c files, so if hbmk2 can leave the .c file in tmp, I can manually cross-compile to both x64 and arm64
Please add an option to not delete temporary .c files
The text was updated successfully, but these errors were encountered: