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

compiling error #9

Open
GoogleCodeExporter opened this issue Nov 9, 2015 · 2 comments
Open

compiling error #9

GoogleCodeExporter opened this issue Nov 9, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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

What is the expected output? What do you see instead?

8a 386/asm.s
8a linux/386/rt0.s
8a linux/386/sys.s
8a 386/vlop.s
rm -f _obj/runtime.a
gopack grc _obj/runtime.a _go_.8 asm.8 cgocall.8 chan.8 closure.8 float.8 
hashmap.8 iface.8 malloc.8 mcache.8 mcentral.8 mem.8 mfixalloc.8 mgc0.8 mheap.8 
mheapmap32.8 msize.8 print.8 proc.8 reflect.8 rune.8 runtime.8 rt0.8 sema.8 
signal.8 slice.8 string.8 symtab.8 sys.8 thread.8 traceback.8 vlop.8 vlrt.8
/cygdrive/f/projects/go/golang-on-cygwin/src/Make.pkg:46: recipe for target 
`/cygdrive/f/projects/go/golang-on-cygwin/pkg/linux_386/runtime.a' failed
make[1]: *** [/cygdrive/f/projects/go/golang-on-cygwin/pkg/linux_386/runtime.a] 
Error 1
rm reflect.c string.c sema.c malloc.c
make[1]: Leaving directory 
`/cygdrive/f/projects/go/golang-on-cygwin/src/pkg/runtime'
Makefile:126: recipe for target `runtime.install' failed
make: *** [runtime.install] Error 2


What version of the product are you using? On what operating system?
using windows7-32-bit with cygcheck (cygwin) 1.7.15 with latest golang source 
fm hg clone for cygwin

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 26 Aug 2012 at 9:54

@GoogleCodeExporter
Copy link
Author

I did the following
mkdir -p $GOROOT/pkg 
it created a pkg dir in repo but now it gives the error as below

%%%% making libcgo %%%%

gcc -m32 -O2 -fPIC -o linux_386.o -c linux_386.c
gcc -m32 -O2 -fPIC -o 386.o -c 386.S
gcc -m32 -O2 -fPIC -o util.o -c util.c
linux_386.c:1:0: warning: -fPIC ignored for target (all code is position 
independent)
386.S:1:0: warning: -fPIC ignored for target (all code is position independent)
util.c:1:0: warning: -fPIC ignored for target (all code is position independent)
gcc -m32 -shared -lpthread -lm -o libcgo.so linux_386.o 386.o util.o
Cannot export crosscall_386: symbol not defined
linux_386.o:linux_386.c:(.text+0x4c): undefined reference to `_crosscall_386'
collect2: ld returned 1 exit status
Makefile:27: recipe for target `libcgo.so' failed
make: *** [libcgo.so] Error 1


From $GOROOT, "cd src/libcgo"

What is the expected output? What do you see instead?
Should compile, but it gets link error since it cannot find the symbol 
"_crosscall_386". The method "crosscall_386" is defined in 
"src/libcgo/386.S".

made changes to as below in 386.S

#define EXT(s) s

.globl EXT(_crosscall_386)
EXT(_crosscall_386):
        pushl %ebp
        movl %esp, %ebp

this come to new error as 

cd xml && make install
make[1]: Entering directory 
`/cygdrive/f/projects/go/golang-on-cygwin/src/pkg/xml'
cp _obj/xml.a /cygdrive/f/projects/go/golang-on-cygwin/pkg/linux_386/xml.a
make[1]: Leaving directory 
`/cygdrive/f/projects/go/golang-on-cygwin/src/pkg/xml'
cd archive/tar && make test
make[1]: Entering directory 
`/cygdrive/f/projects/go/golang-on-cygwin/src/pkg/archive/tar'
gotest
make[1]: gotest: Command not found
/cygdrive/f/projects/go/golang-on-cygwin/src/Make.pkg:35: recipe for target 
`test' failed
make[1]: *** [test] Error 127
make[1]: Leaving directory 
`/cygdrive/f/projects/go/golang-on-cygwin/src/pkg/archive/tar'
Makefile:132: recipe for target `archive/tar.test' failed
make: *** [archive/tar.test] Error 2

Original comment by [email protected] on 27 Aug 2012 at 5:28

@GoogleCodeExporter
Copy link
Author

The _crosscall_386 error looks like issue #3.

Original comment by [email protected] on 17 Dec 2012 at 11:14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant