Skip to content

cgo: life sample does not compile #1335

@gopherbot

Description

@gopherbot

by robert.hencke:

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1. cd $GOROOT/misc/cgo/life
2. make clean
3. make life

What is the expected output?
Successful build

What do you see instead?
CGOPKGPATH= cgo --  life.go
6g -o _go_.6  life.cgo1.go _cgo_gotypes.go
6c -FVw -I"/home/rhencke/go/src/pkg/runtime" _cgo_defun.c
echo 'int main() { return 0; }' >_cgo_main.c
gcc -m64 -g -fPIC -O2 -o _cgo_main.o -c  _cgo_main.c
gcc -m64 -g -fPIC -O2 -o life.cgo2.o -c  life.cgo2.c
gcc -m64 -g -fPIC -O2 -o _cgo1_.o _cgo_main.o life.cgo2.o _cgo_export.o c-life.so
-Wl,-R,`pwd`
gcc: _cgo_export.o: No such file or directory
gcc: c-life.so: No such file or directory
make: *** [_cgo1_.o] Error 1


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

Which operating system are you using?
linux (reproduced on darwin, too)

Which revision are you using?  (hg identify)
a752724ac5f6 tip

Please provide any additional information below.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions