Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

goapp serve not working #2

Closed
vorcigernix opened this issue Jan 6, 2017 · 8 comments
Closed

goapp serve not working #2

vorcigernix opened this issue Jan 6, 2017 · 8 comments
Assignees

Comments

@vorcigernix
Copy link

This may be something I overlooked, but when I run my app (almost helloworld) with goapp serve, it fails to build. Publishing to gae works fine though. Is this known issue?

@x1ddos x1ddos self-assigned this Jan 6, 2017
@x1ddos
Copy link
Contributor

x1ddos commented Jan 6, 2017

Not sure. Let me check.

@x1ddos
Copy link
Contributor

x1ddos commented Jan 6, 2017

@vorcigernix I don't see anything in the github.com/google/http2preload package that would prevent building your app.

What do you mean by "almost helloworld" and what is error message. Also, why do you think it is related to http2preload package?

@vorcigernix
Copy link
Author

It worked before I added http2preload. Might be something else though. Here is the code:

package hello

import (
	"html/template"
	"net/http"

	"github.com/google/http2preload"
)

func init() {
	m, err := http2preload.ReadManifest("push_manifest.json")
	http.Handle("/", m.Handler(handleRoot))
	if err != nil {
		panic(err)
	}

}

func handleRoot(w http.ResponseWriter, r *http.Request) {
	tmpl := template.Must(template.ParseGlob("templates/index.html"))
	if err := tmpl.Execute(w, nil); err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
	}
}

@x1ddos
Copy link
Contributor

x1ddos commented Jan 6, 2017

So, what is the actual build failure error message?

@vorcigernix
Copy link
Author

ERROR    2017-01-06 12:43:49,409 go_runtime.py:181] Failed to build Go application: (Executed command: /Users/adamsobotka/Downloads/go_appengine/goroot/bin/go-app-builder -app_base /Users/adamsobotka/myblog -arch 6 -dynamic -goroot /Users/adamsobotka/Downloads/go_appengine/goroot -gopath /Users/adamsobotka/Downloads/go_appengine/goroot -nobuild_files ^^$ -incremental_rebuild -unsafe -binary_name _go_app -extra_imports appengine_internal/init -work_dir /var/folders/3v/tmfr7mws3pscthdg02w4m5nm0000gn/T/tmp4CMjldappengine-go-bin -gcflags -I,/Users/adamsobotka/Downloads/go_appengine/goroot/pkg/darwin_amd64_appengine -ldflags -L,/Users/adamsobotka/Downloads/go_appengine/goroot/pkg/darwin_amd64_appengine hello.go)
/var/folders/3v/tmfr7mws3pscthdg02w4m5nm0000gn/T/tmp4CMjldappengine-go-bin/hello.go:7: import /Users/adamsobotka/Downloads/go_appengine/goroot/pkg/darwin_amd64/github.com/google/http2preload.a: object is [darwin amd64 go1.7.1 X:framepointer] expected [darwin amd64 go1.6.3 (appengine-1.9.48) X:none]

2017/01/06 13:43:49 go-app-builder: build timing: 0×skip (0 total), 2×compile (240ms total), 0×link (0 total)
2017/01/06 13:43:49 go-app-builder: failed running compile: exit status 2

@x1ddos
Copy link
Contributor

x1ddos commented Jan 6, 2017

Your issue is with the local setup. The problem is here: /Users/adamsobotka/Downloads/go_appengine/goroot/pkg/darwin_amd64/github.com/google/http2preload.a: object is [darwin amd64 go1.7.1 X:framepointer] expected [darwin amd64 go1.6.3 (appengine-1.9.48) X:none]

The package was compiled with Go1.7 but App Engine is obviously using Go1.6. Try deleting /Users/adamsobotka/Downloads/go_appengine/goroot/pkg/darwin_amd64/github.com/google/http2preload.a.

@x1ddos
Copy link
Contributor

x1ddos commented Jan 6, 2017

Closing as this is a non-package issue.

@x1ddos x1ddos closed this as completed Jan 6, 2017
@vorcigernix
Copy link
Author

Yeah, thanks, works now.

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

No branches or pull requests

2 participants