Blueprint-uServices / blueprint

Blueprint Microservices Compiler: Flexible and Configurable Open-Source Microservice Benchmark Applications
https://blueprint-uservices.github.io
BSD 3-Clause "New" or "Revised" License
21 stars 5 forks source link

Compile error dsb_hotel #179

Closed alessandrocornacchia closed 1 week ago

alessandrocornacchia commented 1 month ago

I started encountering this issue today while compiling dsb_hotel:

...
[12:02:58.348] [plugins/dockercompose/dockergen/dockercompose.go:50] INFO: Generating docker/docker-compose.yml
[12:02:58.351] [plugins/environment/wiring.go:160] INFO: Generated .local.env
[12:02:58.351] [plugins/environment/wiring.go:160] INFO: Generated .env
[12:02:58.352] [plugins/goproc/deploy.go:38] INFO: Building goproc wlgen.proc to dsb_hotel/build/bp-original/wlgen/wlgen_proc
[12:02:58.353] [plugins/golang/gogen/workspacebuilder.go:143] INFO: Copying local module runtime to workspace dsb_hotel/build/bp-original/wlgen/wlgen_proc
[12:02:58.445] [plugins/golang/gogen/workspacebuilder.go:143] INFO: Copying local module workflow to workspace dsb_hotel/build/bp-original/wlgen/wlgen_proc
[12:02:58.460] [plugins/golang/gogen/workspacebuilder.go:143] INFO: Copying local module workload to workspace dsb_hotel/build/bp-original/wlgen/wlgen_proc
[12:02:58.464] [plugins/goproc/deploy.go:54] INFO: Creating module blueprint/goproc/wlgen_proc
[12:02:58.465] [plugins/golang/gogen/modulebuilder.go:87] INFO: Creating package blueprint/goproc/wlgen_proc/ot
[12:02:58.466] [plugins/opentelemetry/ir_ot_server.go:217] INFO: Generating blueprint/goproc/wlgen_proc/ot/FrontEndService_OTServerWrapperInterface
[12:02:58.467] [plugins/golang/gogen/modulebuilder.go:87] INFO: Creating package blueprint/goproc/wlgen_proc/http
[12:02:58.468] [plugins/http/httpcodegen/clientgen.go:31] INFO: Generating blueprint/goproc/wlgen_proc/http/FrontEndService_HTTPClient.go
[12:02:58.469] [plugins/golang/gogen/modulebuilder.go:97] INFO: require go.opentelemetry.io/otel/trace v1.26.0
[12:02:58.470] [plugins/opentelemetry/ir_ot_client.go:151] INFO: Generating blueprint/goproc/wlgen_proc/ot/FrontEndService_OTClientWrapperInterface
[12:02:58.472] [plugins/goproc/metric.go:63] INFO: Instantiating StdoutMetricCollector wlgen.proc.stdoutmetriccollector in blueprint/goproc/wlgen_proc/wlgen_proc.go
[12:02:58.472] [plugins/goproc/log.go:63] INFO: Instantiating SLogger wlgen.proc.logger in blueprint/goproc/wlgen_proc/wlgen_proc.go
[12:02:58.472] [plugins/jaeger/ir_collector_client.go:59] INFO: Instantiating JaegerClient jaeger.client in blueprint/goproc/wlgen_proc/wlgen_proc.go
[12:02:58.473] [plugins/workflow/ir_workflowservice.go:115] INFO: Instantiating FrontEndService frontend_service.client in blueprint/goproc/wlgen_proc/wlgen_proc.go
[12:02:58.473] [plugins/workflow/ir_workflowservice.go:82] INFO: Instantiating SimpleWorkload wlgen.service in blueprint/goproc/wlgen_proc/wlgen_proc.go
[12:02:58.473] [plugins/golang/gogen/namespacebuilder.go:286] INFO: Generating blueprint/goproc/wlgen_proc/wlgen_proc.go
[12:02:58.474] [plugins/goproc/goprocgen/main.go.go:55] INFO: Generating blueprint/goproc/wlgen_proc/main.go
[12:02:58.483] [plugins/golang/gogen/workspacebuilder.go:264] INFO: go mod tidy (dsb_hotel/build/bp-original/wlgen/wlgen_proc/wlgen_proc)
[12:02:59.313] [plugins/workload/ir.go:63] INFO: go build -C dsb_hotel/build/bp-original/wlgen/wlgen_proc/wlgen_proc

[12:02:59.319] [slog/logger.go:303] ERROR: go: module . listed in go.work file requires go >= 1.22.0, but go.work lists go 1.22; to update it:
        go work use

[12:02:59.319] [slog/logger.go:303] ERROR: unable to generate Hotel-original artifacts due to exit status 1
exit status 2

Output of go version

go version go1.22.1 linux/amd64

Output og go env

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/cornaca/.cache/go-build'
GOENV='/home/cornaca/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/cornaca/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/cornaca/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/cornaca/.local/bin/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='go1.22.1'
GOTOOLDIR='/home/cornaca/.local/bin/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK='/home/cornaca/llm-micro/apps/go.work'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2382606097=/tmp/go-build -gno-record-gcc-switches'
alessandrocornacchia commented 1 month ago

Temporarily solved by changing

var goWorkTemplate = `go 1.22

into

var goWorkTemplate = `go 1.22.1

in blueprint/plugins/golang/gogen/workspacebuilder.go

vaastav commented 1 week ago

Your temporary fix was indeed the correct fix to the issue! The fix is now in the main branch!