Hi @FiloSottile, many thanks for maintaining this repo offering macOS-to-Linux cross-compiling solutions for Go, you just can't imagine how you make my life easier when one of my projects needs to embed Rocksdb, such an awesome key-value storage that I've recently developed a love-hate relationship with.
Utilizing the c and c++ cross compiler, my first try on the go build command is as follows:
Ideally, this should work, but my terminal once again yells at me
-link-2821846975/000054.o: in function `gorocksdb_comparator_with_ts_create':
grocksdb.c:(.text+0x88): undefined reference to `rocksdb_comparator_with_ts_create'
/opt/homebrew/Cellar/musl-cross/0.9.9_1/libexec/bin/../lib/gcc/x86_64-linux-musl/9.2.0/../../../../x86_64-linux-musl/bin/ld: /var/folders/85/7xzvr1n56wnbx8tj6h38drq80000gn/T/go-link-2821846975/000054.o: in function `gorocksdb_compactionfilter_create':
grocksdb.c:(.text+0xbe): undefined reference to `rocksdb_compactionfilter_create'
/opt/homebrew/Cellar/musl-cross/0.9.9_1/libexec/bin/../lib/gcc/x86_64-linux-musl/9.2.0/../../../../x86_64-linux-musl/bin/ld: /var/folders/85/7xzvr1n56wnbx8tj6h38drq80000gn/T/go-link-2821846975/000054.o: in function `gorocksdb_mergeoperator_create':
grocksdb.c:(.text+0x104): undefined reference to `rocksdb_mergeoperator_create'
/opt/homebrew/Cellar/musl-cross/0.9.9_1/libexec/bin/../lib/gcc/x86_64-linux-musl/9.2.0/../../../../x86_64-linux-musl/bin/ld: /var/folders/85/7xzvr1n56wnbx8tj6h38drq80000gn/T/go-link-2821846975/000054.o: in function `gorocksdb_slicetransform_create':
grocksdb.c:(.text+0x16d): undefined reference to `rocksdb_slicetransform_create'
collect2: error: ld returned 1 exit status
I think there must have been something extremely simple and outright on the surface, right below my nose, that somehow I've just managed to unsee, yet I can't figure out what and how. Partly because my familiarity with C is not competent enough. And that's why I'm now humbly asking for any assistance that can help me get this over with.
Hi @FiloSottile, many thanks for maintaining this repo offering macOS-to-Linux cross-compiling solutions for Go, you just can't imagine how you make my life easier when one of my projects needs to embed Rocksdb, such an awesome key-value storage that I've recently developed a love-hate relationship with.
Utilizing the c and c++ cross compiler, my first try on the
go build
command is as follows:Ideally, this should work, but my terminal once again yells at me
Being spammed of those countless
undefined reference
errors, I think there must have been something wrong with my go build configurations, by looking and half-guessing at https://stackoverflow.com/questions/62158905/undefined-references-to-symbols-in-standard-libraries-with-musl-cross-make , I changed my go build command as follows:Yet the same error occurs.
I think there must have been something extremely simple and outright on the surface, right below my nose, that somehow I've just managed to unsee, yet I can't figure out what and how. Partly because my familiarity with C is not competent enough. And that's why I'm now humbly asking for any assistance that can help me get this over with.