Error running build.go

When building Syncthing on SmartOS (SunOS 5.11 joyent_20171221T020409Z i86pc i386 i86pc Solaris) I get the following error:

[admin@files ~/go/src/]$ go run build.go     -version v0.14.43 -no-upgrade tar
/opt/local/go/pkg/tool/solaris_amd64/link: running gcc failed: exit status 1
Undefined                       first referenced
 symbol                             in file
__stack_chk_fail                    /tmp/go-link-890189183/000001.o
__stack_chk_guard                   /tmp/go-link-890189183/000001.o
ld: fatal: symbol referencing errors. No output written to $WORK/
collect2: error: ld returned 1 exit status

exit status 2
exit status 1

Using go version 1.9.2, gcc version 4.9.4. I am able to build syncthing on SmartOS joyent_20171109T032417Z without problems. Syncthing v0.14.43

Odd. It works on my joyent_20171123T033756Z with an older zone and Go, too. Maybe something changed in the latest platform to catch the Go compiler off guard.

It also works on joyent_20180118T013028Z with a newly built Go 1.9.3, so not sure what you’re suffering from, sorry.

Thanks for your quick reply calmh. I did some additional tests this morning, and I’ve discovered that building syncthing works in the base-64-lts 16.4.1 image (gcc 4.9.4, go version go1.9 solaris/amd64), but not in the base-64-lts 17.4.0 image (gcc 4.9.4, go version go1.9.2 solaris/amd64). I generated 2 clean images just for testing this and basically followed the standard build procedure after running pkgin install nano tree lsof go git build-essential. So it seems that something in the newer version of the base-64-lts image has broken the build process. Here’s the full terminal output of the test run on the 17.4.0 image:

The image I’m using has UUID 390639d4-f146-11e7-9280-37ae5c6d53d4 when running imgadm list.

Yeah sounds like it. I suspect that the breakage is between Go and the SmartOS image though, so not really Syncthing related.

I just found out that this has been fixed in a newer Syncthing version (via #SmartOS IRC):

[22:51] martinc_: hi, I fixed that by backporting the latest go and disabling ssp [22:51] fwiw we also fixed syncthing in 2017Q4

No, he’s saying they’ve fixed their package build by using a new Go (compared to whatever they had before) and disabling “ssp”, whatever that is, probably something in their build setup. This is not a Syncthing issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.