https://words.filippo.io/easy-windows-and-linux-cross-compil...
I debated doing the pure-Go SQLite thing, but musl-cross worked just fine for me, and kept things simpler.
https://words.filippo.io/easy-windows-and-linux-cross-compil...
I debated doing the pure-Go SQLite thing, but musl-cross worked just fine for me, and kept things simpler.
export GOARCH=arm64
export CC=zig cc -target aarch64-linux-musl
export CXX=zig cc -target aarch64-linux-musl CC="/path/to/cross/compiler" CGO_CFLAGS=—I/path/to/sdk/header/files/include" CGO_LDFLAGS="-L/path/to/sdk/obj/files/lib”
I suppose with .so files, you might have to specify "-Wl,-rpath" if the SDK libraries don’t reside under /usr/lib or /usr/local/lib on the target system. But I haven’t actually tried any of this yet, so I could be wrong. Are there any gotchas that I’m missing?You're missing all the tooling and OS specific steps required to produce a proper package.
That repository won't compile Swift, but it does compile objective C.
Either way, you don't need to be able to compile Swift/Obj C to link to a library that was written in Swift/Obj C.
GOOS= GOARCH= CGO_ENABLED=1 go build \
-tags osusergo,netgo,sqlite_omit_load_extension \
-ldflags="-extldflags=-static"
[0]: https://www.arp242.net/static-go.html1. https://github.com/ClickHouse/sysroot/
2. https://github.com/ClickHouse/ClickHouse/blob/master/cmake/f... and the `CMAKE_TOOLCHAIN_FILE` variable.
No one should touch servers directly, unless for down tracking stuff or remote development, in which case, they also don't need to cross compile.
No devs on production servers unless for tracking down issues, or servers configured for remote development.
Which in both cases, don't require cross compilation to start with.
The downside is that people (especially the ones who are just joining the workforce) are less efficient with the command line and more dependant on GUI. For example some of the junior devs do not know git cli anymore and rely on the VSCode plugin to interact with git. This becomes an issue when there is a bug in the plugin and you should use the CLI.
I know SCM tooling since the RCS days, and couldn't be bothered to master git implementation details to fix broken repos.
Unfortunely we are stuck with git for the time being.
I just really like to understand the tools that I use. Maybe it is a waste of time.
The developer should alao maintain their software and deploy it. Has IMHO a lot of advantages
Linux OEM vendors will appreciate it.
I got into UNIX development back when the whole team shared a development server and we used telnet and X Windows for our "IDE".
No one was running SPARC, RISC System/6000, PA-RISC, MIPS, Eclipse MV locally.
When everyone keeps worshipping UNIX, maybe it is time to learn how grey beards used to develop for it.
> No, and why should I?
These two statements are in direct conflict. CPU architecture is as much part of “matching the server” as operating system.
When I built software for SPARC, I was also running SPARC locally…