Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net: sendfile needs -lsendfile for external linker on Solaris #12390
With Go 1.5.0 on SunOS/amd64 (namely SmartOS), packages employing the external linker and net/* packages (e.g. CouchBase or github.com/mongodb/mongo-tools) will fail due to an undefined 'sendfile' symbol.
The following patch (from pkgsrc's package for go-1.5.0) works around the problem:
Steps to repeat:
For the record, libsocket, libnsl, and libsendfile may be filter libraries in a future release of Solaris -- typically such libraries are merged into libc. So this change won't cause any problems, as the filter libraries will provide the necessary symbol compatibility, but is unnecessary starting with a future release: