The names Go compiler generates for shared objects are bad. Example:
go install -buildmode=shared -linkshared github.com/apache/thrift/lib/go/thrift code.google.com/p/go-uuid/uuid
Produces shared object named: libgithub.com-apache-thrift-lib-go-thrift,code.google.com-p-go-uuid-uuid.so
(I need to link together about thirty packages, and this would create a file name several KB large). Reading through go help build
and related documentation I don't see anywhere any options for specifying the shared object name. I tried -o
but it's not supported. As an interesting aside, if you call go install --ldflags "-o foo"
, then Go compiler crashes with an NPE...