Cross compiling for linux from dawin

373 views
Skip to first unread message

Mixo Ndleve

unread,
Sep 22, 2020, 2:19:36 PM9/22/20
to golang-nuts

Marcin Romaszewicz

unread,
Sep 22, 2020, 3:47:13 PM9/22/20
to Mixo Ndleve, golang-nuts
Your compiler environment for C code is still building for Darwin, most likely. You need to set up a cross compiler and use cgo (https://golang.org/cmd/cgo/). $CC should invoke your cross compiler.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/bd1c2b60-8459-46d8-a022-0527f0fba150n%40googlegroups.com.

Mixo Ndleve

unread,
Sep 22, 2020, 6:54:24 PM9/22/20
to Marcin Romaszewicz, golang-nuts
 FiloSottile/musl-cross/musl-cross is set up. (https://subscription.packtpub.com/book/application_development/9781789138412/app02/app02lvl1sec98/cross-compiling-for-linux-with-cgo

With it we are able to cross compile for windows and linux from darwin, the problem arises as soon as we import _ "github.com/cvigo/go_ibm_db"

Joop Kiefte

unread,
Sep 22, 2020, 7:14:03 PM9/22/20
to ndl...@gmail.com, mar...@gmail.com, golan...@googlegroups.com
Quick guess, the dependencies the CGo in that library tries to link with are not the correct version and as such lack some definitions? Try updating the C dependency source if possible to a later or corresponding version, if that makes sense?
Reply all
Reply to author
Forward
0 new messages