go-qml / qml

QML support for the Go language
Other
1.96k stars 189 forks source link

go test fails: undefined: runtime.main_main #164

Open pebbe opened 8 years ago

pebbe commented 8 years ago

Ubuntu 14.04.3 LTS go version go1.5.2 linux/amd64 Qt version 5.1.1 Qt installed with the Qt installer in /net/aps/64/opt/Qt5.1.1 qml installed with:

export PATH="/net/aps/64/opt/Qt5.1.1/5.1.1/gcc_64/bin:$PATH"
export PKG_CONFIG_PATH=/net/aps/64/opt/Qt5.1.1/5.1.1/gcc_64/lib/pkgconfig
export LD_RUN_PATH="/net/aps/64/opt/Qt5.1.1/5.1.1/gcc_64/lib"
go get gopkg.in/qml.v1

Without setting LD_RUN_PATH, installation fails. Shouldn't setting PKG_CONFIG_PATH be enough?

Then running go test gopkg.in/qml.v1 I get:

# testmain
gopkg.in/qml.v1/cdata.Addrs: runtime.main_main: not defined
gopkg.in/qml.v1/cdata.Addrs: undefined: runtime.main_main
FAIL    gopkg.in/qml.v1 [build failed]

See attachment, the output of running go test -x -v gopkg.in/qml.v1 qml_test.txt