C source files not allowed when not using cgo or SWIG: y.tab.c

What version of Go are you using (go version)?
1.9.1

What operating system and processor architecture are you using (go env)?
Ubuntu 16.04 and PPC64le architecture

root:~ # go env
GOARCH="ppc64le"
GOBIN=""
GOEXE=""
GOHOSTARCH="ppc64le"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/meghali/couchbase/ns_server/deps/gocode"
GORACE=""
GOROOT="/root/meghali/go"
GOTOOLDIR="/root/meghali/go/pkg/tool/linux_ppc64le"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build957891049=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?
While building couchbase master source code, I am getting the go-build issue for this particular module “cbq-engine”.

Error which I see:

Building Go target cbq-engine using Go 1.9.1
**************** ENV_GOROOT : /root/meghali/go ***************
-- Executing: /root/meghali/go/bin/go install -pkgdir /root/meghali/couchbase/build/gopkg/go-1.9.1 -tags="community" -gcflags="" -ldflags="" github.com/couchbase/query/server/cbq-engine
../../../../../../goproj/src/github.com/couchbase/query/expression/parser/parser.go:17:2: C source files not allowed when not using cgo or SWIG: y.tab.c
-- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-- @ 'go install' failed! Re-running as 'go build' to help debug...
-- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
WORK=/tmp/go-build190761458
../../../../../../goproj/src/github.com/couchbase/query/expression/parser/parser.go:17:2: C source files not allowed when not using cgo or SWIG: y.tab.c
CMake Error at /root/meghali/couchbase/tlm/cmake/Modules/go-install.cmake:85 (MESSAGE):
Failed running go install

If anyone has observed the issue before, please let me know. Any pointers would help.
Thanks,
Meghali

I debugged more and found out that the parser/n1ql code wasn’t building fine.
Hence updated the source fresh using "git clone https://github.com/couchbase/query query"
and then ran the build.sh at “couchbase/goproj/src/github.com/couchbase/query/parser/n1ql” path individually. After this I was able to resolve the above build error.

However not sure why would the source at query wasn’t matching and where did this additional file came in from “y.tab.c”.

Thanks,
Meghali