LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   go pegs cpu, does not return (gcc-go) (https://www.linuxquestions.org/questions/slackware-arm-108/go-pegs-cpu-does-not-return-gcc-go-4175633577/)

caffe 07-08-2018 03:21 PM

go pegs cpu, does not return (gcc-go)
 
I'm not a go expert, just trying to build some other software which uses go. On both 14.2 and current, running a simple go example pegs one CPU at 100% and does not return (even after hours of running).

Example

Code:

$ cat test.go
package main

import (
        "os"
)

func main() {
        os.Exit(0)
}

$ /usr/bin/go run test.go

This returns immediately on x86/x86_64, but has the problem described above on arm. Has anyone else noticed this?

drmozes 07-09-2018 01:54 AM

"go" has been broken since its inclusion. I have no idea what is wrong with it. If you find out, let me know!
I've looked at this a few times and looked at Debian and Fedora for patches but there were none that had any relation to "go", so perhaps the problem is elsewhere.

gus3 07-09-2018 10:09 PM

I'll confirm it's broken, in both SMP and UP, on ARM but not on x86. "go do anything" even fails to parse. The failure is very early: the standard libpath libraries load, then it deadlocks in an infinite loop.

drmozes 09-10-2018 11:28 AM

Quote:

Originally Posted by gus3 (Post 5877546)
I'll confirm it's broken, in both SMP and UP, on ARM but not on x86. "go do anything" even fails to parse. The failure is very early: the standard libpath libraries load, then it deadlocks in an infinite loop.

I've been experimenting with gcc-go and now I get something more useful.
Does the test code actually work properly elsewhere?

Code:

root@zippy:~/ac/source/d/gcc/test-code# cat test-go.sh
# https://www.linuxquestions.org/questions/slackware-arm-108/go-pegs-cpu-does-not-return-gcc-go-4175633577/
cat << 'EOF' > /tmp/test.go
package main

import (
        "os"
)

func main() {
        os.Exit(0)
}
EOF

go run /tmp/test.go

root@zippy:~/ac/source/d/gcc/test-code# sh test-go.sh
# command-line-arguments
/tmp/go-build588487404/b001/_buildid.s: Assembler messages:
/tmp/go-build588487404/b001/_buildid.s:8: Error: junk at end of line, first unrecognized character is `,'
/tmp/go-build588487404/b001/_buildid.s:9: Error: junk at end of line, first unrecognized character is `,'
root@zippy:~/ac/source/d/gcc/test-code#


drmozes 09-10-2018 02:30 PM

Quote:

Originally Posted by drmozes (Post 5901885)
I've been experimenting with gcc-go and now I get something more useful.
Does the test code actually work properly elsewhere?

Yes it does. *shrug*

gus3 09-13-2018 11:19 PM

It's still broken here on ARM, but not on x86.

glorsplitz 09-21-2018 08:28 AM

since this thread is about gcc-go.... after last upgrade-all
.
.
No such file 'gcc-go-8.2.0-arm-2.txz.asc'.
ERROR - Package not installed! md5sum error!
.
.

at ftp://ftp.arm.slackware.com/slackwar...sting/packages
gcc-go-8.2.0-arm-2.txz is there but gcc-go-8.2.0-arm-2.txz.asc is not

Thank you Stuart.

drmozes 09-21-2018 10:25 AM

Quote:

Originally Posted by glorsplitz (Post 5906159)
gcc-go-8.2.0-arm-2.txz is there but gcc-go-8.2.0-arm-2.txz.asc is not

Thanks. Fixed.

drmozes 05-12-2019 01:07 AM

Try upgrading to gcc-go version 9. It's back in the main tree and seems to work.
14.2 won't get a fix though as I've no idea what the problem was - it's just started working with gcc-9.


All times are GMT -5. The time now is 08:04 AM.