Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#45036 - [syncthing] Crashes when trying to run - while official upstream binary works

Attached to Project: Community Packages
Opened by Ace (0xACE) - Wednesday, 20 May 2015, 23:52 GMT
Last edited by Jaroslav Lichtblau (Dragonlord) - Thursday, 24 March 2016, 09:27 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jaroslav Lichtblau (Dragonlord)
Martin Wimpress (flexiondotorg)
Architecture i686
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Trying to run `syncthing` provided in community/syncthing results in the error output that I've attached.

However running the binary provided by syncthing's official site works fine.

Additional info:
* package version v0.11.5-1
* First time I run the program, no configuration exists


Steps to reproduce:

$ sudo pacman -S syncthing
$ syncthing
This task depends upon

Closed by  Jaroslav Lichtblau (Dragonlord)
Thursday, 24 March 2016, 09:27 GMT
Reason for closing:  Implemented
Additional comments about closing:  Corrected in syncthing-0.12.21-1 PKGBUILD
Comment by Ace (0xACE) - Saturday, 23 May 2015, 17:25 GMT
While looking at how they package their binaries I noticed how the PKGBUILD archlinux uses compiles differently:

Theirs:
go run build.go -goos linux -goarch 386 tar
go run build.go -goos linux -goarch amd64 tar

PKGBUILD:
go run build.go -no-upgrade build

Therefore I'm assuming the PKGBUILD is missing the `-goarch <arch>` flag.

This is how it should look:
go run build.go -no-upgrade -goarch 386 build
go run build.go -no-upgrade -goarch amd64 build

Depending on the architecture.

I don't have go: which is why I haven't tested it myself.
Comment by Jaroslav Lichtblau (Dragonlord) - Sunday, 31 May 2015, 19:40 GMT
Still the same trouble with the latest package version - 0.11.7? Any chance you could try building the package using your suggested directives and see if the crashing dissapears? I'm running syncthing only on my x86_64 box, but see no similar trouble with it.
Comment by Ace (0xACE) - Friday, 05 June 2015, 15:06 GMT
Sorry about the late response, I thought I would recieve a e-mail notification if any comments were made here.


The machine doesn't have go installed and cant compile it. I talked with the authors of syncthing and this was their response:

<xace > in syncthing's build.go what happens if you don't specify a -goarch ? in archlinux PKGBUILD they dont specify -goarch in build() and their binaries dont run on my pc (old cpu)
<@Zillode > 32b or 64b?
<@Zillode > (nothing happens, but if you build for 32bit it can be that old cpus are not compatible with the build)
<xace > 32b
<@Zillode > you can fix it by prefixing support as follows: "GO386=387 go run build.go"; but your go runtime also needs to be compiled with that option

Meaning; according to them, the golang runtime has to be built with support for 386(387) and compiling syncthing with -goarch 386.

Afaik this is a issue with old AMD cpu's not having various instructions such as SSE2, intel was way earlier with SSE2 instructions iirc.
Comment by Doug Newgard (Scimmia) - Wednesday, 16 March 2016, 15:27 GMT
Pretty sure this isn't fixed. Currently the build function looks like this:
if [ ${CARCH}" == "i686" ] ; then
go run build.go -no-upgrade -goarch 386 build
if [ ${CARCH}" == "x86_64" ] ; then
go run build.go -no-upgrade -goarch amd64 build
else
go run build.go -no-upgrade build
fi

While that second "if" should be "elif". Right now, it's running both "go run build.go -no-upgrade -goarch 386 build" and "go run build.go -no-upgrade build" for i686.

Loading...