Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues building in scratchbox #1300

Closed
gopherbot opened this issue Nov 25, 2010 · 5 comments
Closed

Issues building in scratchbox #1300

gopherbot opened this issue Nov 25, 2010 · 5 comments

Comments

@gopherbot
Copy link
Contributor

by fazzi.andrea:

What steps will reproduce the problem?
1. Run ./all.bash in scratchbox

What is the expected output?
(Almost) all tests pass. No core dumps.

What do you see instead?

[snip]

---
Installed Go for linux/arm in /home/andrea/src/go.
Installed commands in /home/andrea/src/go/bin.
The compiler is 5g.

--- cd pkg
cd archive/tar && gomake test
make[1]: Entering directory `/home/andrea/src/go/src/pkg/archive/tar'
gotest
make[2]: Entering directory `/home/andrea/src/go/src/pkg/archive/tar'
rm -f _test/archive/tar.a _gotest_.5
make[2]: Leaving directory `/home/andrea/src/go/src/pkg/archive/tar'
make[2]: Entering directory `/home/andrea/src/go/src/pkg/archive/tar'
5g -o _gotest_.5 common.go reader.go writer.go  reader_test.go writer_test.go
rm -f _test/archive/tar.a
gopack grc _test/archive/tar.a _gotest_.5 
make[2]: Leaving directory `/home/andrea/src/go/src/pkg/archive/tar'
make[1]: *** [test] Error 126
make[1]: Leaving directory `/home/andrea/src/go/src/pkg/archive/tar'
make: *** [archive/tar.test] Error 2

Which compiler are you using (5g, 6g, 8g, gccgo)?
5g

Which operating system are you using?

Linux on scratchbox

Which revision are you using?  (hg identify)

[sbox-FREMANTLE_ARMEL: ~/src/go/src/pkg] > hg identify            
b2a35b558ce9 tip


Please provide any additional information below.

[sbox-FREMANTLE_ARMEL: ~/src/go/src/pkg] > uname -r -m
2.6.32-25-generic arm

[sbox-FREMANTLE_ARMEL: ~/src/go/src/pkg] > env | grep GO
GOARCH=arm
GOROOT=/home/andrea/src/go
GOOS=linux

[sbox-FREMANTLE_ARMEL: ~/src/go/src/pkg] > gcc --version
sbox-arm-none-linux-gnueabi-gcc (GCC) 4.2.1

There is also a 70M "core" core dump file in src/pkg/archive/tar

Moreover, If I try to run cgo and gotest (for example) they segfault and a core dump
file is created.

5g runs fine and I can create a simple "Hello World" executable that runs
without issue both on scratchbox and on a real ARM device (my N900).
@peterGo
Copy link
Contributor

peterGo commented Nov 25, 2010

Comment 1:

The command and package builds have run successfully and the package tests have just
started running. To temporarily bypass a test, you could adapt the NOTEST mechanism in
$GOROOT/src/pkg/Makefile, which is used for other incomplete implementations such as
NaCl and Windows, for GOARCH=arm.
For example,
# Disable tests that arm in sandbox cannot run yet.
ifeq ($(GOARCH),arm)
NOTEST+=archive/tar  # Error 2
endif

@gopherbot
Copy link
Contributor Author

Comment 2 by fazzi.andrea:

Unfortunately, the problem is not only in testing archive/tar. There's some problem with
the testing package in general. In fact, I can't run any test, even a basic one. It
seems it segfaults in testing/testing.go at line 157:
    t.ch = make(chan *T)
I've got issues running cgo too so I can't build anything that depends on cgo.

@peterGo
Copy link
Contributor

peterGo commented Nov 26, 2010

Comment 3:

Does gotest fail when building with $GOARM=5 too? What version does scratchbox target?
Environment variables, Getting Started
http://golang.org/doc/install.html#environment

@gopherbot
Copy link
Contributor Author

Comment 4 by fazzi.andrea:

$ GOARM=5 ./all.bash
[snip]
cd image/png && gomake install
make[1]: Entering directory `/home/andrea/src/go/src/pkg/image/png'
5g -o _go_.5 reader.go writer.go 
cas_mutex: not defined
make[1]: *** [goyacc] Error 1
make[1]: Leaving directory `/home/andrea/src/go/src/cmd/goyacc'
make: *** [../cmd/goyacc.install] Error 2
make: *** Waiting for unfinished jobs....
The scratchbox shipped with the maemo5 SDK targets ARMv7. Anyway, after further
investigations I discovered that the problem resides in the qemu version 0.11.50
included in that scratchbox distribution. In fact, cgo and gotest do run fine on both
the real N900 and on a newer version of qemu (0.13.0). To confirm that and in order to
have a development environment for ARM as-close-to-reality-as-possible, I decided to
build a minimal, debian-based system running on a 2.6.32-versatile kernel compiled for
ARMv7 and to run it with a newer version of qemu. Fortunately, golang compiles fine on
it. Honestely, I didn't run all the tests because it was too slow. I'll post a brief
report on the golang-nuts ML about the whole process.

@adg
Copy link
Contributor

adg commented Dec 6, 2010

Comment 5:

Status changed to Invalid.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants