Skip to content

Can't compile with gollvm. Redefinition of 'main' , in ping.go #37

@advancedwebdeveloper

Description

@advancedwebdeveloper

Hi.

$ go build -i -v -x
WORK=/tmp/go-build260147053
/home/oceanfish81/gexpect/examples
mkdir -p $WORK/b001/
cd $WORK
/home/oceanfish81/gollvm_dist/bin/llvm-goc -fgo-importcfg=/dev/null -c -x c - -o /dev/null || true
mkdir -p $WORK/b001/importcfgroot/github.com/ThomasRooney
ln -s /home/oceanfish81/go/pkg/gccgo_linux_amd64/github.com/ThomasRooney/libgexpect.a $WORK/b001/importcfgroot/github.com/ThomasRooney/libgexpect.a
cd /home/oceanfish81/gexpect/examples
/home/oceanfish81/gollvm_dist/bin/llvm-goc -c -O2 -g -m64 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -fgo-relative-import-path=
/home/oceanfish81/gexpect/examples -o $WORK/b001/go.o -I $WORK/b001/importcfgroot ./ftp.go ./ping.go ./python.go ./screen.go

_/home/oceanfish81/gexpect/examples

./ping.go:6:1: error: redefinition of 'main'
./ftp.go:6:1: note: previous definition of 'main' was here
./python.go:6:1: error: redefinition of 'main'
./ftp.go:6:1: note: previous definition of 'main' was here
./screen.go:7:1: error: redefinition of 'main'
./ftp.go:6:1: note: previous definition of 'main' was here

$ go version
go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64

$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/oceanfish81/.cache/go-build"
GOENV="/home/oceanfish81/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/oceanfish81/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/oceanfish81/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/oceanfish81/gollvm_dist"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/oceanfish81/gollvm_dist/tools"
GCCGO="/home/oceanfish81/gollvm_dist/bin/llvm-goc"
AR="ar"
CC="/usr/bin/clang"
CXX="/usr/bin/clang++"
CGO_ENABLED="1"
GOMOD=""
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build393449434=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions