LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-24-2014, 12:01 AM   #1
Spect73
Member
 
Registered: Aug 2013
Distribution: Slackware 14.1
Posts: 128

Rep: Reputation: Disabled
Unable to build GO language from SlackBuilds


I'm trying to build the SlackBuilds package for googles 'go' language. Apparently it compiles the source okay, but quits after running the tests and never produces the package. I've tried to figure out the problem with no luck. Using Slack 14.1 32 bit.
 
Old 02-24-2014, 03:51 AM   #2
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
It works here. Sorry

At the critical moment, mine prints this, what does yours print?
Code:
# ../test/bench/go1
ok  	_/tmp/SBo/package-google-go-lang/usr/lib/go/test/bench/go1	5.693s

# ../test

real	2m20.518s
user	3m56.910s
sys	0m35.483s

# Checking API compatibility.
Go version is "go1.2", ignoring -next /tmp/SBo/package-google-go-lang/usr/lib/go/api/next.txt

real	0m18.399s
user	0m13.210s
sys	0m1.102s

ALL TESTS PASSED

---
Installed Go for linux/386 in /tmp/SBo/package-google-go-lang/usr/lib/go
Installed commands in /tmp/SBo/package-google-go-lang/usr/bin

The binaries expect /tmp/SBo/package-google-go-lang/usr/lib/go to be copied or moved to /usr/lib/go

Slackware package maker, version 3.14159.
Do you get "ALL TESTS PASSED"? I guess that one (or more) of the tests is failing on your system.

In my personal experience, there are two reasons for a failing test in a SlackBuild. (1) the original developers wrote a test that doesn't work properly, usually for something like locking in a multiprocessor scenario, because there are race conditions in the test that the developers never found, because developers always have much better hardware than I have, or only test their own tests in a VM, or gave the job of writing tests to the most junior developer. (2) one of my memory sticks is starting to go bad.

It gets worse when the SlackBuild (quite reasonably) assumes that the build and tests won't just return an error status without printing an obvious error message. But you really should look closely at the output of the tests. Everything should say "ok" or "?" or "PASS", like this:

Code:
ok  	unicode/utf16	0.004s
ok  	unicode/utf8	0.008s
?   	unsafe	[no test files]

real	2m27.288s
user	4m8.284s
sys	0m29.468s

# GOMAXPROCS=2 runtime -cpu=1,2,4
ok  	runtime	34.918s

# sync -cpu=10
ok  	sync	0.061s

# ../misc/cgo/stdio

# ../misc/cgo/life

# ../misc/cgo/test
PASS
ok  	_/tmp/SBo/package-google-go-lang/usr/lib/go/misc/cgo/test	1.181s
PASS
If there's a problem with the tests, and you are *highly* confident that your system is good, you can remove the 'set -e' line from the SlackBuild.

If there's not a problem with the tests, then the other possibility is something wrong is happening with the scripts in go/src (all.bash, run.bash etc). There is a comment from Robby in the SlackBuild that says "unset BASH_ENV # Not sure why, but this causes run.bash to fail --rworkman", so you could try unsetting as many environment variables as possible before you run the SlackBuild, on the theory that those scripts may contain more FAIL of the same kind...

Update: Robby applied the BASH_ENV fix I just described on January 30th. Have you got the latest SlackBuild? If not, you should

Last edited by 55020; 02-24-2014 at 03:58 AM. Reason: Update
 
1 members found this post helpful.
Old 02-24-2014, 10:05 AM   #3
Spect73
Member
 
Registered: Aug 2013
Distribution: Slackware 14.1
Posts: 128

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 55020 View Post
It works here. Sorry

At the critical moment, mine prints this, what does yours print?
Code:
# ../test/bench/go1
ok  	_/tmp/SBo/package-google-go-lang/usr/lib/go/test/bench/go1	5.693s

# ../test

real	2m20.518s
user	3m56.910s
sys	0m35.483s

# Checking API compatibility.
Go version is "go1.2", ignoring -next /tmp/SBo/package-google-go-lang/usr/lib/go/api/next.txt

real	0m18.399s
user	0m13.210s
sys	0m1.102s

ALL TESTS PASSED

---
Installed Go for linux/386 in /tmp/SBo/package-google-go-lang/usr/lib/go
Installed commands in /tmp/SBo/package-google-go-lang/usr/bin

The binaries expect /tmp/SBo/package-google-go-lang/usr/lib/go to be copied or moved to /usr/lib/go

Slackware package maker, version 3.14159.
Do you get "ALL TESTS PASSED"? I guess that one (or more) of the tests is failing on your system.

In my personal experience, there are two reasons for a failing test in a SlackBuild. (1) the original developers wrote a test that doesn't work properly, usually for something like locking in a multiprocessor scenario, because there are race conditions in the test that the developers never found, because developers always have much better hardware than I have, or only test their own tests in a VM, or gave the job of writing tests to the most junior developer. (2) one of my memory sticks is starting to go bad.

It gets worse when the SlackBuild (quite reasonably) assumes that the build and tests won't just return an error status without printing an obvious error message. But you really should look closely at the output of the tests. Everything should say "ok" or "?" or "PASS", like this:

Code:
ok  	unicode/utf16	0.004s
ok  	unicode/utf8	0.008s
?   	unsafe	[no test files]

real	2m27.288s
user	4m8.284s
sys	0m29.468s

# GOMAXPROCS=2 runtime -cpu=1,2,4
ok  	runtime	34.918s

# sync -cpu=10
ok  	sync	0.061s

# ../misc/cgo/stdio

# ../misc/cgo/life

# ../misc/cgo/test
PASS
ok  	_/tmp/SBo/package-google-go-lang/usr/lib/go/misc/cgo/test	1.181s
PASS
If there's a problem with the tests, and you are *highly* confident that your system is good, you can remove the 'set -e' line from the SlackBuild.

If there's not a problem with the tests, then the other possibility is something wrong is happening with the scripts in go/src (all.bash, run.bash etc). There is a comment from Robby in the SlackBuild that says "unset BASH_ENV # Not sure why, but this causes run.bash to fail --rworkman", so you could try unsetting as many environment variables as possible before you run the SlackBuild, on the theory that those scripts may contain more FAIL of the same kind...

Update: Robby applied the BASH_ENV fix I just described on January 30th. Have you got the latest SlackBuild? If not, you should
Thanks for the help. You were correct, a test was failing:
Code:
--- FAIL: TestIPv4MulticastListener (0.00 seconds)
	multicast_test.go:53: First ListenMulticastUDP on <nil> failed: listen udp 224.0.0.254: setsockopt: no such device
Seems you must have a working network to build or disable that test. I normally don't have networking enabled so it would fail. Still, I didn't dig deep enough before asking for help. Sorry for the noise. It builds and installs fine now.

Last edited by Spect73; 02-24-2014 at 10:09 AM. Reason: Add success
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Can not get qdvdauthor to build using Slackbuilds. camorri Slackware 4 06-02-2011 11:08 AM
Build Environment for SlackBuilds qweasd Slackware 4 05-19-2011 11:46 PM
[SOLVED] upgraded current now i cannot build Slackbuilds mdynac Slackware 10 10-17-2010 10:49 AM
unable to build gspca from Alien Bob Slackbuilds package adityavpratap Slackware 5 08-04-2009 12:01 AM
Are there any SlackBuilds for Firefox 1.5 (build from source) spinner_0 Slackware 7 01-18-2006 05:48 AM

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

All times are GMT -5. The time now is 11:40 PM.

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