plentico / osxcross-target Goto Github PK
View Code? Open in Web Editor NEWProvides darwin (Mac) binary support on Linux when cross-compiling Go apps that have CGO dependencies
Provides darwin (Mac) binary support on Linux when cross-compiling Go apps that have CGO dependencies
This was so easy to use! Thank you for putting this together
Hi there, this is a great project and I just stumbled across it while I was looking into a goreleaser issue (this one).
I have a similar use-case like you had, I want to build darwin binaries on a linux machine.
I have setup a separate goreleaser config for darwin builds and I am running into the following issue:
⨯ release failed after 8s error=failed to build for darwin_arm64: exit status 2: # command-line-arguments
/usr/lib/go/pkg/tool/linux_amd64/link: running /home/deepjyoti30/git/osxcross-target/bin/o64-clang failed: exit status 1
/usr/bin/ld: unrecognized option '-dynamic'
/usr/bin/ld: use the --help option for usage information
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
As it seems, the -dynamic
flag is not supported by ld
anymore. I am assuming that the cause here is that a flag is being generated by osxcross
that is not supported anymore by ld
.
Following are the versions of ld
, clang
and gcc
that I have:
GNU ld (GNU Binutils) 2.39.0
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
gcc (GCC) 12.2.0
Copyright (C) 2022 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.
Can you shed some light on this and let me know if I am missing something here? I am trying to run the build on an amd64
machine and my OS is Arch Linux
.
Looking to use this in a goreleaser pipeline where I want to target also darwin arm64
I was getting some broken builds recently (https://github.com/plentico/plenti/runs/2171421181) so I decided to try and rebuild the OSXCross target, but I'm getting errors...
./tools/gen_sdk_package_pbzx.sh Xcode_11.6.xip
:
configure: error: Cannot build without libcrypto (OpenSSL)
./build.sh
:
configure: error: Cannot build without libcrypto (OpenSSL)
exiting with abnormal exit code (1)
run 'OCDEBUG=1 ./build.sh' to enable debug messages
I always used this osxcross target till now without any problem. Without any change to my cgo dependencies, I am failing to cross compile.
/home/runner/work/osxcross/target/bin/x86_64-apple-darwin20.4-ld: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
clang: error: unable to execute command: No such file or directory
clang: error: linker command failed due to signal (use -v to see invocation)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.