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

The error in running the example "Helloworld" #109

Open
windshome opened this issue Jun 28, 2022 · 5 comments
Open

The error in running the example "Helloworld" #109

windshome opened this issue Jun 28, 2022 · 5 comments

Comments

@windshome
Copy link

when I download the eggos and the source, I try run the "helloworld" by "egg run" command,but I receive error, and How can I do , my env setting error?

package github.com/icexin/eggos/app/examples/helloworld
imports github.com/icexin/eggos
imports github.com/icexin/eggos/drivers/e1000
imports github.com/icexin/eggos/inet
imports gvisor.dev/gvisor/pkg/abi/linux
imports gvisor.dev/gvisor/pkg/gohacks: build constraints exclude all Go files in /root/go/pkg/mod/gvisor.dev/gvisor@v0.0.0-20210716193733-566c23a60eea/pkg/gohacks
2022/06/28 09:52:16 error building kernel: exit status 1

@icexin
Copy link
Owner

icexin commented Jun 28, 2022

What's the output of go env and go version?

@windshome
Copy link
Author

thank you for reply.

root@LAPTOP-683IEQSK:/mnt/d/linux/egg/eggos-0.4.1/app/examples/helloworld# go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.3"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/mnt/d/linux/egg/eggos-0.4.1/app/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build887158675=/tmp/go-build -gno-record-gcc-switches"
root@LAPTOP-683IEQSK:/mnt/d/linux/egg/eggos-0.4.1/app/examples/helloworld# go version
go version go1.18.3 linux/amd64

@icexin
Copy link
Owner

icexin commented Jun 28, 2022

currently eggos only works with go version 1.16

@windshome
Copy link
Author

thanks,it's OK.

@windshome
Copy link
Author

I build the 'HelloWorld' and 'Httpd',there are two question :
(1)I found the kernel file size is approximately 9M, I view the elf file info by 'nm' command, there are many content I will not use.SO,how I exclude them in my kernel?
(2)In runing the qemu for this kernel,I use 256M memory, if my kernel only for some simple function,can I reduce the memory?how much memory I must provide?

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

No branches or pull requests

2 participants