Skip to content

Commit 87ecb48

Browse files
committed
try using grpc package from conda forge for conda builds
previous workaround of build from source is not necessary since a bug with libabseil has been fixed
1 parent e5605c1 commit 87ecb48

7 files changed

Lines changed: 49 additions & 9 deletions

File tree

conda/environments/all_cuda-129_arch-aarch64.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ dependencies:
2828
- gcc_linux-aarch64=14.*
2929
- ipython
3030
- jsonref==1.1.0
31+
- libabseil
3132
- libboost-devel
3233
- libcudss-dev >=0.7
3334
- libcurand-dev
3435
- libcusolver-dev
3536
- libcusparse-dev
37+
- libgrpc
38+
- libprotobuf
3639
- libraft-headers==26.4.*,>=0.0.0a0
3740
- librmm==26.4.*,>=0.0.0a0
3841
- make
@@ -60,6 +63,7 @@ dependencies:
6063
- pyyaml>=6.0.0
6164
- rapids-build-backend>=0.4.0,<0.5.0
6265
- rapids-logger==0.2.*,>=0.0.0a0
66+
- re2
6367
- requests
6468
- rmm==26.4.*,>=0.0.0a0
6569
- scikit-build-core>=0.11.0

conda/environments/all_cuda-129_arch-x86_64.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ dependencies:
2828
- gcc_linux-64=14.*
2929
- ipython
3030
- jsonref==1.1.0
31+
- libabseil
3132
- libboost-devel
3233
- libcudss-dev >=0.7
3334
- libcurand-dev
3435
- libcusolver-dev
3536
- libcusparse-dev
37+
- libgrpc
38+
- libprotobuf
3639
- libraft-headers==26.4.*,>=0.0.0a0
3740
- librmm==26.4.*,>=0.0.0a0
3841
- make
@@ -60,6 +63,7 @@ dependencies:
6063
- pyyaml>=6.0.0
6164
- rapids-build-backend>=0.4.0,<0.5.0
6265
- rapids-logger==0.2.*,>=0.0.0a0
66+
- re2
6367
- requests
6468
- rmm==26.4.*,>=0.0.0a0
6569
- scikit-build-core>=0.11.0

conda/environments/all_cuda-131_arch-aarch64.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ dependencies:
2828
- gcc_linux-aarch64=14.*
2929
- ipython
3030
- jsonref==1.1.0
31+
- libabseil
3132
- libboost-devel
3233
- libcudss-dev >=0.7
3334
- libcurand-dev
3435
- libcusolver-dev
3536
- libcusparse-dev
37+
- libgrpc
38+
- libprotobuf
3639
- libraft-headers==26.4.*,>=0.0.0a0
3740
- librmm==26.4.*,>=0.0.0a0
3841
- make
@@ -60,6 +63,7 @@ dependencies:
6063
- pyyaml>=6.0.0
6164
- rapids-build-backend>=0.4.0,<0.5.0
6265
- rapids-logger==0.2.*,>=0.0.0a0
66+
- re2
6367
- requests
6468
- rmm==26.4.*,>=0.0.0a0
6569
- scikit-build-core>=0.11.0

conda/environments/all_cuda-131_arch-x86_64.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ dependencies:
2828
- gcc_linux-64=14.*
2929
- ipython
3030
- jsonref==1.1.0
31+
- libabseil
3132
- libboost-devel
3233
- libcudss-dev >=0.7
3334
- libcurand-dev
3435
- libcusolver-dev
3536
- libcusparse-dev
37+
- libgrpc
38+
- libprotobuf
3639
- libraft-headers==26.4.*,>=0.0.0a0
3740
- librmm==26.4.*,>=0.0.0a0
3841
- make
@@ -60,6 +63,7 @@ dependencies:
6063
- pyyaml>=6.0.0
6164
- rapids-build-backend>=0.4.0,<0.5.0
6265
- rapids-logger==0.2.*,>=0.0.0a0
66+
- re2
6367
- requests
6468
- rmm==26.4.*,>=0.0.0a0
6569
- scikit-build-core>=0.11.0

conda/recipes/libcuopt/recipe.yaml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,7 @@ cache:
2929
export CXXFLAGS=$(echo $CXXFLAGS | sed -E 's@\-fdebug\-prefix\-map[^ ]*@@g')
3030
set +x
3131
32-
# Workaround for abseil-cpp#1624: Mutex::Dtor() not exported from shared libabseil on Linux.
33-
# Build gRPC/Protobuf/Abseil from source to ensure consistent ABI and avoid symbol issues.
34-
GRPC_INSTALL_DIR="${SRC_DIR}/grpc_install"
35-
36-
bash ./ci/utils/install_protobuf_grpc.sh --prefix="${GRPC_INSTALL_DIR}" --build-dir="${SRC_DIR}" --skip-deps
37-
38-
export CMAKE_PREFIX_PATH="${GRPC_INSTALL_DIR}:${CMAKE_PREFIX_PATH:-}"
39-
./build.sh -n -v ${BUILD_EXTRA_FLAGS} libmps_parser libcuopt deb --allgpuarch --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_PREFIX_PATH=${GRPC_INSTALL_DIR}\"
32+
./build.sh -n -v ${BUILD_EXTRA_FLAGS} libmps_parser libcuopt deb --allgpuarch --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
4033
secrets:
4134
- AWS_ACCESS_KEY_ID
4235
- AWS_SECRET_ACCESS_KEY
@@ -100,6 +93,10 @@ cache:
10093
- bzip2
10194
- openssl
10295
- c-ares
96+
- libgrpc
97+
- libprotobuf
98+
- libabseil
99+
- re2
103100

104101
outputs:
105102
- package:
@@ -177,6 +174,10 @@ outputs:
177174
- openssl
178175
- c-ares
179176
- libuuid
177+
- libgrpc
178+
- libprotobuf
179+
- libabseil
180+
- re2
180181
run:
181182
- ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }}
182183
- ${{ pin_subpackage("libmps-parser", exact=True) }}
@@ -187,6 +188,9 @@ outputs:
187188
- openssl
188189
- c-ares
189190
- libuuid
191+
- libgrpc
192+
- libprotobuf
193+
- libabseil
190194
ignore_run_exports:
191195
by_name:
192196
- cuda-nvtx
@@ -231,6 +235,9 @@ outputs:
231235
- libcusparse-dev
232236
- openssl
233237
- c-ares
238+
- libgrpc
239+
- libprotobuf
240+
- libabseil
234241
run:
235242
- ${{ pin_subpackage("libcuopt", exact=True) }}
236243
- ${{ pin_subpackage("libmps-parser", exact=True) }}

cpp/CMakeLists.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,14 @@ endif(BUILD_MSAN)
111111

112112
# Note: -UNDEBUG is applied via CUOPT_CXX_FLAGS / CUOPT_CUDA_FLAGS (not add_definitions)
113113
# to avoid leaking into dependencies that are built in-tree.
114+
#
115+
# For CXX: -UNDEBUG is applied per-source-file (not target-wide) to exclude gRPC
116+
# infrastructure files. Those files include abseil headers, and abseil's shared library
117+
# on conda-forge doesn't export Mutex::Dtor() in NDEBUG builds (abseil-cpp#1624).
118+
# Keeping NDEBUG defined for gRPC files makes the header inline an empty Dtor(),
119+
# avoiding the missing symbol at runtime.
114120
if(DEFINE_ASSERT)
115121
add_definitions(-DASSERT_MODE)
116-
list(APPEND CUOPT_CXX_FLAGS -UNDEBUG)
117122
list(APPEND CUOPT_CUDA_FLAGS -UNDEBUG)
118123
endif(DEFINE_ASSERT)
119124

@@ -348,6 +353,14 @@ if (HOST_LINEINFO)
348353
set_source_files_properties(${CUOPT_SRC_FILES} DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTIES COMPILE_OPTIONS "-g1")
349354
endif()
350355

356+
# Apply -UNDEBUG only to solver source files (not gRPC infrastructure).
357+
# Must happen before gRPC files are appended to CUOPT_SRC_FILES.
358+
# Uses APPEND to preserve any existing per-file options (e.g. -g1 from HOST_LINEINFO).
359+
if(DEFINE_ASSERT)
360+
set_property(SOURCE ${CUOPT_SRC_FILES} DIRECTORY ${CMAKE_SOURCE_DIR}
361+
APPEND PROPERTY COMPILE_OPTIONS "-UNDEBUG")
362+
endif()
363+
351364
# Add gRPC mapper files and generated protobuf sources
352365
list(APPEND CUOPT_SRC_FILES
353366
${PROTO_SRCS}

dependencies.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,10 @@ dependencies:
304304
- bzip2
305305
- openssl
306306
- c-ares
307+
- libgrpc
308+
- libprotobuf
309+
- libabseil
310+
- re2
307311
test_cpp:
308312
common:
309313
- output_types: [conda]

0 commit comments

Comments
 (0)