usercorn: Can't build on 32-bit x86
Hi,
This is my first contact with Go so I’m not sure I can vouch for my installation but hopefully that’s not the issue here:
go build -i -o usercorn ./go/usercorn
# github.com/lunixbochs/usercorn/go/native
../../go1.5/src/github.com/lunixbochs/usercorn/go/native/fdset_linux.go:16: cannot use f.To64() (type [16]int64) as type [32]int32 in field value
../../go1.5/src/github.com/lunixbochs/usercorn/go/native/select_linux.go:9: cannot use int64(timespec.Sec) (type int64) as type int32 in field value
../../go1.5/src/github.com/lunixbochs/usercorn/go/native/select_linux.go:9: cannot use int64(timespec.Nsec / 1000) (type int64) as type int32 in field value
There’s a TODO comment in select_linux.go
so in case 32-bit support is not finished yet at least be aware I’m interested in doing some testing 😃
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 15 (15 by maintainers)
When you run a dynamically linked binary, the PT_INTERP ELF header can be used to specify an “interpreter” binary. This is usually used to indicate the binary uses a dynamic linker.
ld.so is the dynamic linker. When running a 32-bit x86 binary, I don’t think I currently pass the auxv header necessary to initialize ld.so, so it prints usage information instead of trying to run the binary.
https://github.com/lunixbochs/usercorn/blob/master/go/arch/x86_64/linux.go#L52 https://github.com/lunixbochs/usercorn/blob/master/go/arch/x86/linux.go#L19
This depends on #98