Uploaded image for project: 'Network Observability'
  1. Network Observability
  2. NETOBSERV-2025

make build and make images does not work

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • netobserv-1.8-candidate
    • CLI
    • False
    • None
    • False
    • OCPSTRAT-1419 - Make tcpdump collection simpler using NetObserv CLI

      Description of problem:

      make build and make images does not work on Mac

      Steps to Reproduce:

      1. Run make build
      2. Run make images
      

      Actual results:

      Commands fail with error logs below
      
      make build
      ### Installing dependencies
      GOFLAGS="" go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2
      GOFLAGS="" go install github.com/mikefarah/yq/v4@v4.43.1
      go: downloading github.com/mikefarah/yq/v4 v4.43.1
      go: downloading github.com/alecthomas/participle/v2 v2.1.1
      go: downloading github.com/goccy/go-yaml v1.11.3
      go: downloading github.com/pelletier/go-toml/v2 v2.2.0
      go: downloading github.com/yuin/gopher-lua v1.1.1
      ### Formatting code
      go fmt ./...
      ### Linting code
      golangci-lint run ./... --timeout=3m
      cmd/packet_capture.go:182:28: undefined: pcapng (typecheck)
      func writeEnrichedData(pw *pcapng.FileWriter, genericMap *config.GenericMap) {
                                 ^
      cmd/config.go:59:9: undefined: yaml (typecheck)
      	err := yaml.Unmarshal(rawConfig, &cfg)
      	       ^
      cmd/packet_capture.go:63:13: undefined: pcapng (typecheck)
      	pw, err := pcapng.NewFileWriter("./output/pcap/" + filename + ".pcapng")
      	           ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/slices/iter.go:50:17: cannot range over seq (variable of type iter.Seq[E]) (typecheck)
      	for v := range seq {
      	               ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/os/stat_darwin.go:47:62: not enough arguments in call to time.Unix
      	have (unknown type)
      	want (int64, int64) (typecheck)
      	return time.Unix(fi.Sys().(*syscall.Stat_t).Atimespec.Unix())
      	                                                            ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/database/sql/sql.go:786:1: missing return (typecheck)
      }
      ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/exec.go:432:48: inst.Arg undefined (type *onePassInst has no field or method Arg) (typecheck)
      	if pos == 0 && flag.match(syntax.EmptyOp(inst.Arg)) &&
      	                                              ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/exec.go:446:17: inst.Out undefined (type *onePassInst has no field or method Out) (typecheck)
      		pc = int(inst.Out)
      		              ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/exec.go:447:15: inst.Op undefined (type *onePassInst has no field or method Op) (typecheck)
      		switch inst.Op {
      		            ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/exec.go:458:13: inst.MatchRune undefined (type *onePassInst has no field or method MatchRune) (typecheck)
      			if !inst.MatchRune(r) {
      			         ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/exec.go:462:17: inst.Rune undefined (type *onePassInst has no field or method Rune) (typecheck)
      			if r != inst.Rune[0] {
      			             ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/exec.go:480:39: inst.Arg undefined (type *onePassInst has no field or method Arg) (typecheck)
      			if !flag.match(syntax.EmptyOp(inst.Arg)) {
      			                                   ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/exec.go:485:16: inst.Arg undefined (type *onePassInst has no field or method Arg) (typecheck)
      			if int(inst.Arg) < len(m.matchcap) {
      			            ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:76:12: i.MatchRunePos undefined (type *onePassInst has no field or method MatchRunePos) (typecheck)
      	next := i.MatchRunePos(r)
      	          ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:80:7: i.Op undefined (type *onePassInst has no field or method Op) (typecheck)
      	if i.Op == syntax.InstAltMatch {
      	     ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:81:12: i.Out undefined (type *onePassInst has no field or method Out) (typecheck)
      		return i.Out
      		         ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:238:21: p.Inst[pc].Op undefined (type onePassInst has no field or method Op) (typecheck)
      		switch p.Inst[pc].Op {
      		                  ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:243:29: p.Inst[pc].Out undefined (type onePassInst has no field or method Out) (typecheck)
      			p_A_Other := &p.Inst[pc].Out
      			                         ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:244:27: p.Inst[pc].Arg undefined (type onePassInst has no field or method Arg) (typecheck)
      			p_A_Alt := &p.Inst[pc].Arg
      			                       ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:247:17: instAlt.Op undefined (type onePassInst has no field or method Op) (typecheck)
      			if !(instAlt.Op == syntax.InstAlt || instAlt.Op == syntax.InstAltMatch) {
      			             ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:250:18: instAlt.Op undefined (type onePassInst has no field or method Op) (typecheck)
      				if !(instAlt.Op == syntax.InstAlt || instAlt.Op == syntax.InstAltMatch) {
      				             ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:256:17: instOther.Op undefined (type onePassInst has no field or method Op) (typecheck)
      			if instOther.Op == syntax.InstAlt || instOther.Op == syntax.InstAltMatch {
      			             ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:262:33: p.Inst[*p_A_Alt].Out undefined (type onePassInst has no field or method Out) (typecheck)
      			p_B_Alt := &p.Inst[*p_A_Alt].Out
      			                             ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:263:35: p.Inst[*p_A_Alt].Arg undefined (type onePassInst has no field or method Arg) (typecheck)
      			p_B_Other := &p.Inst[*p_A_Alt].Arg
      			                               ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:265:15: instAlt.Out undefined (type onePassInst has no field or method Out) (typecheck)
      			if instAlt.Out == uint32(pc) {
      			           ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:267:22: instAlt.Arg undefined (type onePassInst has no field or method Arg) (typecheck)
      			} else if instAlt.Arg == uint32(pc) {
      			                  ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:315:15: inst.Op undefined (type *onePassInst has no field or method Op) (typecheck)
      		switch inst.Op {
      		            ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:317:20: inst.Out undefined (type *onePassInst has no field or method Out) (typecheck)
      			ok = check(inst.Out, m) && check(inst.Arg, m)
      			                ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:319:23: inst.Out undefined (type *onePassInst has no field or method Out) (typecheck)
      			matchOut := m[inst.Out]
      			                   ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:332:10: inst.Op undefined (type *onePassInst has no field or method Op) (typecheck)
      				inst.Op = syntax.InstAltMatch
      				     ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:367:16: inst.Rune undefined (type *onePassInst has no field or method Rune) (typecheck)
      			if len(inst.Rune) == 0 {
      			            ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:373:16: inst.Rune undefined (type *onePassInst has no field or method Rune) (typecheck)
      			if len(inst.Rune) == 1 && syntax.Flags(inst.Arg)&syntax.FoldCase != 0 {
      			            ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/regexp/onepass.go:449:14: p.Inst[i].Rune undefined (type onePassInst has no field or method Rune) (typecheck)
      			p.Inst[i].Rune = onePassRunes[i]
      			          ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/crypto/tls/auth.go:133:7: previous case (typecheck)
      	case *rsa.PublicKey:
      	     ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/crypto/tls/auth.go:181:7: previous case (typecheck)
      	case *ecdsa.PublicKey:
      	     ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/crypto/tls/auth.go:273:7: previous case (typecheck)
      	case *ecdsa.PublicKey:
      	     ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/crypto/tls/tls.go:15:2: "bytes" imported and not used (typecheck)
      	"bytes"
      	^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/math/big/intconv.go:220:21: r.ReadRune undefined (type byteReader has no field or method ReadRune) (typecheck)
      	ch, size, err := r.ReadRune()
      	                   ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/math/big/intconv.go:228:11: r.UnreadRune undefined (type byteReader has no field or method UnreadRune) (typecheck)
      	return r.UnreadRune()
      	         ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/net/http/fs.go:1000:20: missing type in composite literal (typecheck)
      		"Content-Range": {r.contentRange(size)},
      		                 ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/net/http/fs.go:1001:20: missing type in composite literal (typecheck)
      		"Content-Type":  {contentType},
      		                 ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/net/http/pattern.go:382:1: missing return (typecheck)
      }
      ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/net/http/server.go:2210:1: missing return (typecheck)
      }
      ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/maps/iter.go:51:20: cannot range over seq (variable of type iter.Seq2[K, V]) (typecheck)
      	for k, v := range seq {
      	                  ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/text/template/exec.go:140:31: s.tmpl.ErrorContext undefined (type *Template has no field or method ErrorContext) (typecheck)
      		location, context := s.tmpl.ErrorContext(s.node)
      		                            ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/text/template/exec.go:221:24: t.Root undefined (type *Template has no field or method Root) (typecheck)
      	if t.Tree == nil || t.Root == nil {
      	                      ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/text/template/exec.go:224:22: t.Root undefined (type *Template has no field or method Root) (typecheck)
      	state.walk(value, t.Root)
      	                    ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/text/template/exec.go:240:31: tmpl.Root undefined (type *Template has no field or method Root) (typecheck)
      		if tmpl.Tree == nil || tmpl.Root == nil {
      		                            ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/text/template/exec.go:461:26: tmpl.Root undefined (type *Template has no field or method Root) (typecheck)
      	newState.walk(dot, tmpl.Root)
      	                        ^
      ../../../../../usr/local/Cellar/go/1.23.4/libexec/src/go/doc/example.go:343:2: usedDecls declared and not used (typecheck)
      	usedDecls := make(map[ast.Decl]bool)   // set of top-level decls reachable from the body
      	^
      make: *** [lint] Error 1
      
      
      
      USER=aramesha make images
      trap 'exit' INT; \
      		echo 'building image for arch amd64'; DOCKER_BUILDKIT=1 docker buildx build --load --build-arg LDFLAGS="" --build-arg TARGETARCH=amd64  -t quay.io/aramesha/network-observability-cli:main-amd64 -f Dockerfile
      building image for arch amd64
      unknown flag: --load
      See 'docker --help'.
      
      
      Usage:  docker [OPTIONS] COMMAND
      
      
      A self-sufficient runtime for containers
      
      
      Common Commands:
        run         Create and run a new container from an image
        exec        Execute a command in a running container
        ps          List containers
        build       Build an image from a Dockerfile
        pull        Download an image from a registry
        push        Upload an image to a registry
        images      List images
        login       Authenticate to a registry
        logout      Log out from a registry
        search      Search Docker Hub for images
        version     Show the Docker version information
        info        Display system-wide information
      
      
      Management Commands:
        builder     Manage builds
        checkpoint  Manage checkpoints
        container   Manage containers
        context     Manage contexts
        image       Manage images
        manifest    Manage Docker image manifests and manifest lists
        network     Manage networks
        plugin      Manage plugins
        system      Manage Docker
        trust       Manage trust on Docker images
        volume      Manage volumes
      

      Expected results:

      Commands should pass

              Unassigned Unassigned
              rhn-support-aramesha Amogh Rameshappa Devapura
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: