LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 07-08-2018, 03:21 PM   #1
caffe
LQ Newbie
 
Registered: Feb 2015
Posts: 17

Rep: Reputation: Disabled
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?
 
Old 07-09-2018, 01:54 AM   #2
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,540

Rep: Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309
"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.

Last edited by drmozes; 07-09-2018 at 03:22 AM.
 
Old 07-09-2018, 10:09 PM   #3
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 490

Rep: Reputation: Disabled
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.
 
Old 09-10-2018, 11:28 AM   #4
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,540

Rep: Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309
Quote:
Originally Posted by gus3 View Post
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#
 
Old 09-10-2018, 02:30 PM   #5
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,540

Rep: Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309
Quote:
Originally Posted by drmozes View Post
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*
 
Old 09-13-2018, 11:19 PM   #6
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 490

Rep: Reputation: Disabled
It's still broken here on ARM, but not on x86.
 
Old 09-21-2018, 08:28 AM   #7
glorsplitz
Senior Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 1,308

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
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.
 
Old 09-21-2018, 10:25 AM   #8
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,540

Rep: Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309
Quote:
Originally Posted by glorsplitz View Post
gcc-go-8.2.0-arm-2.txz is there but gcc-go-8.2.0-arm-2.txz.asc is not
Thanks. Fixed.
 
Old 05-12-2019, 01:07 AM   #9
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,540

Rep: Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cups pegs cpu rbees Linux - Software 7 01-10-2014 03:45 PM
Cyrus IMAP pegs processor and slowly eats resources digitolx Linux - Server 2 04-07-2010 02:21 PM
Athlon XP-M 3000+ won't return to highest CPU freq after being on battery lydgate Linux - Laptop and Netbook 3 12-22-2005 07:52 PM
Return code from main() using gcc Meatwad Programming 13 01-27-2004 06:36 PM
Optimise GCC for your CPU jatbudhwar Slackware 9 04-07-2003 07:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 11:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration