# Catalog\_schema.go:271:28: internal compiler error: assertion failed

**URL:** <https://discuss.hashicorp.com/t/catalog-schema-go28-internal-compiler-error-assertion-failed/42748>\
**Category:** Consul\
**Created:** [August 3, 2022, 10:52am UTC](https://discuss.hashicorp.com/t/catalog-schema-go28-internal-compiler-error-assertion-failed/42748 "2022-08-03T10:52:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SRI1](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/sri1/32/24029_2.png) [@SRI1](https://discuss.hashicorp.com/u/SRI1)\
**Post date:** [August 3, 2022, 10:52am UTC](https://discuss.hashicorp.com/t/catalog-schema-go28-internal-compiler-error-assertion-failed/42748/1 "2022-08-03T10:52:07Z")

</div>

Hi all

Consul newbie here. The latest consul.git has local compilation errors due to assertion fail. Does this need a bug filing with go.dev and/or is there a local fix in Consul src code?

Thanks  
SR

bash-4.4$ make  
mkdir -p bin  
CGO\_ENABLED=0 go install -ldflags "-X [github.com/hashicorp/consul/version.GitCommit=58eed6b04](http://github.com/hashicorp/consul/version.GitCommit=58eed6b04) -X [github.com/hashicorp/consul/version.BuildDate=2022-08-02T21:58:41Z](http://github.com/hashicorp/consul/version.BuildDate=2022-08-02T21:58:41Z) " -tags “”

# [github.com/hashicorp/consul/agent/consul/state](http://github.com/hashicorp/consul/agent/consul/state)

agent/consul/state/catalog\_schema.go:271:28: internal compiler error: assertion failed

Please file a bug report including a short program that triggers the error.

> **[Build software better, together](https://github.com/golang/go/issues/new/choose)**
>
> GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.

make: \*\*\* [GNUmakefile:147: dev-build] Error 2  
bash-4.4$ uname -a  
Linux xyx 4.18.0-305.7.1.el8\_4.x86\_64 #1 SMP Mon Jun 14 17:25:42 EDT 2021 x86\_64 x86\_64 x86\_64 GNU/Linux  
bash-4.4$ git version  
git version 2.27.0  
bash-4.4$ go version  
go version go1.18.4 linux/amd64  
bash-4.4$ cat /etc/redhat-release  
Red Hat Enterprise Linux release 8.5 (Ootpa)

---

<div class="post-metadata">

**Author:** ![maxb](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/maxb/32/26655_2.png) [@maxb](https://discuss.hashicorp.com/u/maxb)\
**Post date:** [August 3, 2022, 8:43pm UTC](https://discuss.hashicorp.com/t/catalog-schema-go28-internal-compiler-error-assertion-failed/42748/2 "2022-08-03T20:43:30Z")

</div>

I tried building with the Go that I already had installed - 1.18.2 - and it worked.  
Then I upgraded to 1.18.4 - and it failed!

So it looks like this is a new problem that needs to be reported to the Go project

---

<div class="post-metadata">

**Author:** ![SRI1](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/sri1/32/24029_2.png) [@SRI1](https://discuss.hashicorp.com/u/SRI1)\
**Post date:** [August 4, 2022, 4:52pm UTC](https://discuss.hashicorp.com/t/catalog-schema-go28-internal-compiler-error-assertion-failed/42748/3 "2022-08-04T16:52:28Z")

</div>

> <https://github.com/golang/go/issues/54228>
>
> \<!--
> Please answer these questions before submitting your issue. Thanks!
> \--\>
> …
> \### What version of Go are you using (\`go version\`)?
> 
> go version go1.18.4 linux/amd64
> 
> \<pre\>
> $ go version
> 
> \</pre\>
> 
> \### Does this issue reproduce with the latest release?
> 
> yes.
> 
> \### What operating system and processor architecture are you using (\`go env\`)?
> 
> \<details\>\<summary\>\<code\>go env\</code\> Output\</summary\>\<br\>\<pre\>
> $ go env
> 
> bash-4.4$ go env
> GO111MODULE=""
> GOARCH="amd64"
> GOBIN=""
> GOCACHE="/users/xxx/.cache/go-build"
> GOENV="/users/xxx/.config/go/env"
> GOEXE=""
> GOEXPERIMENT=""
> GOFLAGS=""
> GOHOSTARCH="amd64"
> GOHOSTOS="linux"
> GOINSECURE=""
> GOMODCACHE="/ws/xxx-bgl/go\_118/go\_path/pkg/mod"
> GONOPROXY=""
> GONOSUMDB=""
> GOOS="linux"
> GOPATH="/ws/xxx-bgl/go\_118/go\_path/"
> GOPRIVATE=""
> GOPROXY="https://proxy.golang.org,direct"
> GOROOT="/ws/xxx-bgl/go\_118/go\_root/go"
> GOSUMDB="sum.golang.org"
> GOTMPDIR=""
> GOTOOLDIR="/ws/xxx-bgl/go\_118/go\_root/go/pkg/tool/linux\_amd64"
> GOVCS=""
> GOVERSION="go1.18.4"
> GCCGO="gccgo"
> GOAMD64="v1"
> AR="ar"
> CC="gcc"
> CXX="g++"
> CGO\_ENABLED="1"
> GOMOD="/nobackup/xxx/opensource/consul/consul/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-build1472410546=/tmp/go-build -gno-record-gcc-switches"
> \</pre\>\</details\>
> 
> \### What did you do?
> Build consul open source.
> 
> 1. git clone https://github.com/hashicorp/consul.git
> 2. make bootstrap
> 3. make
> 
> bash-4.4$ make
> mkdir -p bin
> CGO\_ENABLED=0 go install -ldflags "-X github.com/hashicorp/consul/version.GitCommit=58eed6b04 -X github.com/hashicorp/consul/version.BuildDate=2022-08-02T21:58:41Z " -tags ""
> \# github.com/hashicorp/consul/agent/consul/state
> agent/consul/state/catalog\_schema.go:271:28: internal compiler error: assertion failed
> 
> Please file a bug report including a short program that triggers the error.
> https://go.dev/issue/new
> make: \*\*\* \[GNUmakefile:147: dev-build\] Error 2
> bash-4.4$ 
> 
> \<!--
> If possible, provide a recipe for reproducing the error.
> A complete runnable program is good.
> A link on go.dev/play is best.
> \--\>
> 
> 
> 
> \### What did you expect to see?
> 
> 
> 
> \### What did you see instead?
