Build error in ODC on macOS

I am trying to build O2DPG on macOS Monterey/Intel, and I get a problem when building O2C. The problem seems to be in the loading of the shared libraries for gRPC. I attached the output below.
It looks like it does not search for the libgrpc_plugin_support library in the ALICE sw/ directory, but only in the system directories.
I don’t know if this is related, but I had a problem with building ODC, gRPC and OpenSSL before that I solved with brew uninstall openssl@3.
I will try to remove sw/ and build from scratch, but wanted to check if there might be another problem.

++ make -j 12
[  2%] Generating CustomCommandsFormat.h
[  5%] Building CXX object examples/CMakeFiles/odc-epn-topo.dir/odc-epn-topo.cpp.o
[  7%] Building CXX object examples/CMakeFiles/odc-ex-sampler.dir/sampler.cpp.o
[ 10%] Building CXX object examples/CMakeFiles/odc-ex-processor.dir/processor.cpp.o
[ 12%] Building CXX object examples/CMakeFiles/odc-ex-sink.dir/sink.cpp.o
[ 15%] Building CXX object odc/cc/CMakeFiles/cc.dir/CustomCommands.cpp.o
[ 17%] Linking CXX static library libodc-cc.a
[ 17%] Built target cc
[ 20%] Building CXX object odc/CMakeFiles/odc.dir/Controller.cpp.o
[ 25%] Building CXX object plugins/fmq/CMakeFiles/FairMQPlugin_odc.dir/ODC.cpp.o
[ 25%] Building CXX object odc/CMakeFiles/odc.dir/Error.cpp.o
[ 28%] Building CXX object tests/CMakeFiles/cc-tests.dir/cc-tests.cpp.o
[ 30%] Linking CXX executable odc-epn-topo
[ 30%] Built target odc-epn-topo
[ 33%] Linking CXX executable odc-ex-sampler
[ 33%] Built target odc-ex-sampler
[ 35%] Linking CXX executable odc-ex-sink
[ 35%] Built target odc-ex-sink
ESC[1m/Users/tom/alice/sw/SOURCES/ODC/0.74.0/0.74.0/odc/Controller.cpp:165:30: ESC[0mESC[0;1;35mwarning: ESC[0mESC[1mcomparison of integers of different signs: 'const int32_t' (aka 'const int') and 'const std::map<std::string, unsigned int>::mapped_type' (aka 'const unsigned int') [-Wsign-compare]ESC[0m
            if (p.mNumAgents != agentCounts.at(p.mAgentGroup)) {
ESC[0;1;32m                ~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ESC[0mESC[1m/Users/tom/alice/sw/SOURCES/ODC/0.74.0/0.74.0/odc/Controller.cpp:631:40: ESC[0mESC[0;1;35mwarning: ESC[0mESC[1mlambda capture 'common' is not used [-Wunused-lambda-capture]ESC[0m
    requestPtr->setDoneCallback([&cv, &common]() {
ESC[0;1;32m                                    ~~~^~~~~~
ESC[0m[ 38%] Linking CXX executable odc-ex-processor
[ 38%] Built target odc-ex-processor
[ 41%] Linking CXX shared library libFairMQPlugin_odc.dylib
[ 41%] Built target FairMQPlugin_odc
[ 43%] Linking CXX executable cc-tests
[ 43%] Built target cc-tests
2 warnings generated.
[ 46%] Linking CXX static library libodc.a
[ 46%] Built target odc
[ 48%] Running grpc protocol buffer compiler on odc.proto
[ 51%] Running cpp protocol buffer compiler on odc.proto
dyld[231]: Library not loaded: @rpath/libgrpc_plugin_support.1.45.dylib
  Referenced from: /Users/tom/alice/sw/osx_x86-64/grpc/v1.45.1-local1/bin/grpc_cpp_plugin
  Reason: tried: '/usr/local/lib/libgrpc_plugin_support.1.45.dylib' (no such file), '/usr/lib/libgrpc_plugin_support.1.45.dylib' (no such file)
--grpc_out: protoc-gen-grpc: Plugin killed by signal 6.
[ 53%] Building CXX object examples/CMakeFiles/odc-topo.dir/odc-topo.cpp.o
[ 56%] Building CXX object odc/CMakeFiles/odc-cli-server.dir/CliServer.cpp.o
make[2]: *** [odc/grpc/odc.grpc.pb.h] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 61%] Building CXX object odc/CMakeFiles/odc-uuid-gen.dir/UuidGenerator.cpp.o
[ 61%] Building CXX object plugins/rp-same/CMakeFiles/odc-rp-same.dir/odc-rp-same.cpp.o
[ 66%] Building CXX object tests/CMakeFiles/odc-tests.dir/odc-tests.cpp.o
[ 66%] Building CXX object plugins/rp-epn-slurm/CMakeFiles/odc-rp-epn-slurm.dir/odc-rp-epn-slurm.cpp.o
make[1]: *** [odc/grpc/CMakeFiles/grpc.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 69%] Linking CXX executable odc-rp-same
[ 69%] Built target odc-rp-same
[ 71%] Linking CXX executable odc-topo
[ 74%] Linking CXX executable odc-uuid-gen
[ 74%] Built target odc-topo
[ 74%] Built target odc-uuid-gen
[ 76%] Linking CXX executable odc-rp-epn-slurm
[ 76%] Built target odc-rp-epn-slurm
[ 79%] Linking CXX executable odc-cli-server
[ 79%] Built target odc-cli-server
[ 82%] Linking CXX executable odc-tests
[ 82%] Built target odc-tests
make: *** [all] Error 2

After deleting sw/ and building from scratch, the problem persists. However, I noticed that I was compiling the entire O2DPGSuite, and not just O2DPG. The compilation of O2DPG worked and I can use it.

Hi Thomas,

I am encountering the same problem you describe, and would like to install the entire O2DPGSuite. Did you manage to find a fix for it?

Cheers,
Kaare