NVIDIA / warp

A Python framework for high performance GPU simulation and graphics

Home Page:https://nvidia.github.io/warp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building from source with conda

jc211 opened this issue · comments

In a conda environment, the current build scripts do not find the appropriate CUDA headers required to compile. Its somewhat difficult to debug since the build scripts are custom.

Hi @jc211, can you provide some information to help us reproduce it? What OS are you on? What does your environment.yml file look like? You probably will need to set --cuda_path to an appropriate location.

@alberthli and I are hitting this same issue -- and made some headway on reproducing/debugging it.

Here's some code to set up a vanilla conda env + try to build warp:

$ conda create -n warp-test python=3.10
$ conda install -c nvidia/label/cuda-12.2.2 cuda # install cuda toolkit
$ python build_lib.py # errors due to linking issues

We found if you run conda install -c conda-forge cxx-compiler it's able to find the headers (sometimes we had to run export CUDA_PATH=$CONDA_PREFIX).

However, we still are getting build errors -- specifically, during the clang/llvm portion, we get:

warp/_build/host-deps/llvm-project/release-x86_64/include/llvm/Object/SymbolicFile.h:48:30: error: expected ')' before 'PRIxPTR'
   48 |   OS << "(" << format("0x%08" PRIxPTR, D.p) << " (" << format("0x%08x", D.d.a)

So it still looks like some of the macros aren't getting linked properly. We can still build/use the library by passing --no_standalone to build_lib.py but aren't sure if this will cause issues down the line. Thanks!!

I think you're on the right track with conda install -c conda-forge cxx-compiler. Can you tell me what version of GCC this installs? You may also need a newer glibc version. Try installing a specific version like conda install -c conda-forge libstdcxx-ng=9.5.