Skip to content

Commit

Permalink
#3378 need to use a different stubs dir on arm
Browse files Browse the repository at this point in the history
there's probably a better way of doing this (ie: parsing 'pkg-config --libs cuda')
  • Loading branch information
totaam committed Dec 7, 2021
1 parent 1b61d12 commit 0fc7073
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packaging/rpm/python3-pycuda.spec
Expand Up @@ -10,6 +10,11 @@
%define _disable_source_fetch 0
%global debug_package %{nil}

%define STUBS_DIR targets/x86_64-linux/lib/stubs/
%ifarch aarch64
%define STUBS_DIR targets/sbsa-linux/lib/stubs/
%endif

Name: python3-pycuda
Version: 2021.1
Release: 1
Expand Down Expand Up @@ -59,12 +64,12 @@ CUDA=/opt/cuda
--no-cuda-enable-curand
# --boost-python-libname=boost_python37
# --boost-thread-libname=boost_thread
LDFLAGS=-L$CUDA/targets/x86_64-linux/lib/stubs/ CXXFLAGS=-L$CUDA/targets/x86_64-linux/lib/stubs/ %{__python3} setup.py build
LDFLAGS=-L$CUDA/%{STUBS_DIR} CXXFLAGS=-L$CUDA/%{STUBS_DIR} %{__python3} setup.py build
#make

%install
CUDA=/opt/cuda
LDFLAGS=-L$CUDA/targets/x86_64-linux/lib/stubs/ CXXFLAGS=-L$CUDA/targets/x86_64-linux/lib/stubs/ %{__python3} setup.py install --prefix=%{_prefix} --root=%{buildroot}
LDFLAGS=-L$CUDA/%{STUBS_DIR} CXXFLAGS=-L$CUDA/%{STUBS_DIR} %{__python3} setup.py install --prefix=%{_prefix} --root=%{buildroot}

%clean
rm -rf %{buildroot}
Expand Down

0 comments on commit 0fc7073

Please sign in to comment.