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

make build does not work on Mac

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • netobserv-1.6, netobserv-1.7
    • eBPF
    • 3
    • False
    • None
    • False
    • OCPSTRAT-1419 - Make tcpdump collection simpler using NetObserv CLI
    • NetObserv - Sprint 256, NetObserv - Sprint 257
    • Critical

      Description of problem:

      make build shows errors on Mac

      Steps to Reproduce:

      1. Run make build in cli repo on Mac
      

      Actual results:

      lint errors seen:
      make build                                               
      ### Formatting code
      go fmt ./...
      ### Test if prerequisites are met, and installing missing dependencies
      ### Linting code
      golangci-lint run ./... --timeout=3m
      WARN [runner] Can't run linter goanalysis_metalinter: inspect: failed to load package cmd: could not load export data: no export data for "github.com/netobserv/network-observability-cli/cmd" 
      ERRO Running error: 1 error occurred:
      	* can't run linter goanalysis_metalinter: inspect: failed to load package cmd: could not load export data: no export data for "github.com/netobserv/network-observability-cli/cmd"
       
      make: *** [lint] Error 3
      
      Upon removing lint in L106 of makefile and rerunning make build command, get error:
      make build 
      ### Formatting code
      go fmt ./...
      ### Compiling project
      GOARCH=amd64 go build -ldflags "-X main.version=main -X 'main.buildVersion=0.0.1-488e1d5-dirty' -X 'main.buildDate=2024-06-28 15:18'" -mod vendor -a -o build/network-observability-cli
      # github.com/netobserv/netobserv-ebpf-agent/pkg/utils
      vendor/github.com/netobserv/netobserv-ebpf-agent/pkg/utils/utils.go:75:18: undefined: syscall.Utsname
      vendor/github.com/netobserv/netobserv-ebpf-agent/pkg/utils/utils.go:76:20: undefined: syscall.Uname
      vendor/github.com/netobserv/netobserv-ebpf-agent/pkg/utils/utils.go:79:42: cannot infer T (/Users/amoghrd/repos/netobserv/network-observability-cli/vendor/github.com/netobserv/netobserv-ebpf-agent/p
      # github.com/netobserv/netobserv-ebpf-agent/pkg/ifaces
      vendor/github.com/netobserv/netobserv-ebpf-agent/pkg/ifaces/watcher.go:29:61: undefined: netlink.LinkUpdate
      vendor/github.com/netobserv/netobserv-ebpf-agent/pkg/ifaces/watcher.go:39:29: undefined: netlink.LinkSubscribeAt
      vendor/github.com/netobserv/netobserv-ebpf-agent/pkg/ifaces/watcher.go:65:29: undefined: netlink.LinkUpdate
      make: *** [compile] Error 1

      Expected results:

      Should get a local build

        1. image-2024-07-24-12-10-33-636.png
          115 kB
          Julien Pinsonneau
        2. image-2024-07-24-15-46-39-283.png
          229 kB
          Julien Pinsonneau
        3. screenshot-1.png
          43 kB
          Julien Pinsonneau

            jpinsonn@redhat.com Julien Pinsonneau
            rhn-support-aramesha Amogh Rameshappa Devapura
            Amogh Rameshappa Devapura Amogh Rameshappa Devapura
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: