diff options
author | Daniel Bermond | 2018-11-22 15:14:01 +0000 |
---|---|---|
committer | Daniel Bermond | 2018-11-22 15:14:01 +0000 |
commit | 62c6ca0ae5659f928b2e2382ceb46632754d7a1b (patch) | |
tree | 3e7670312f3e27dfee17e18033c78e3860fb48a8 | |
parent | 6511f4f83db69cc372f6548fe5d3e5542c3a4b9c (diff) | |
download | aur-62c6ca0ae5659f928b2e2382ceb46632754d7a1b.tar.gz |
Fix build (disable fbgemm). Add missing libs. Fix insecure rpath.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 29 |
2 files changed, 18 insertions, 13 deletions
@@ -1,6 +1,6 @@ pkgbase = caffe2-cuda-git pkgdesc = A new lightweight, modular, and scalable deep learning framework (with cuda, git version) - pkgver = 0.8.2.r14563.g4f622c26b9 + pkgver = 0.8.2.r14826.gf79fb58744 pkgrel = 1 url = https://caffe2.ai/ arch = x86_64 @@ -2,7 +2,7 @@ pkgname=caffe2-cuda-git _srcname=pytorch -pkgver=0.8.2.r14563.g4f622c26b9 +pkgver=0.8.2.r14826.gf79fb58744 pkgrel=1 pkgdesc='A new lightweight, modular, and scalable deep learning framework (with cuda, git version)' arch=('x86_64') @@ -157,6 +157,9 @@ build() { mkdir -p build cd build + # NOTE: + # skip install rpath to remove unneeded insecure rpath + cmake \ -DBLAS:STRING='Eigen' \ \ @@ -172,6 +175,8 @@ build() { -DCMAKE_INSTALL_LIBDIR:PATH='lib' \ -DCMAKE_INSTALL_PREFIX:PATH='/usr' \ \ + -DCMAKE_SKIP_INSTALL_RPATH:BOOL='YES' \ + \ -DCUDA_HOST_COMPILER:FILEPATH='/usr/bin/gcc-7' \ -DCUDA_NVCC_EXECUTABLE:FILEPATH='/opt/cuda/bin/nvcc' \ -DCUDA_SDK_ROOT_DIR:PATH='/opt/cuda' \ @@ -196,7 +201,7 @@ build() { -DUSE_CUDA:BOOL='ON' \ -DUSE_CUDNN:BOOL='ON' \ -DUSE_DISTRIBUTED:BOOL='ON' \ - -DUSE_FBGEMM:BOOL='ON' \ + -DUSE_FBGEMM:BOOL='OFF' \ -DUSE_FFMPEG:BOOL='ON' \ -DUSE_GFLAGS:BOOL='ON' \ -DUSE_GLOG:BOOL='ON' \ @@ -255,17 +260,17 @@ package() { # remove unneeded files local _entry local _exclude_dirs - local _exclude_libs mapfile -t -d '' _exclude_dirs < <(find "${pkgdir}/usr/include" -mindepth 1 -maxdepth 1 -type d ! -name 'caffe*' -print0) - mapfile -t -d '' _exclude_libs < <(find -L "${pkgdir}/usr/lib" -maxdepth 1 -type f ! -name 'libcaffe*' -print0) - rm -f "$pkgdir"/usr/bin/{protoc,unzstd,zstd{cat,mt,}} - rm -f "$pkgdir"/usr/include/{*.h,*.py} - rm -rf "$pkgdir"/usr/lib/cmake/protobuf - rm -f "$pkgdir"/usr/lib/pkgconfig/{protobuf-lite,protobuf}.pc - rm -rf "$pkgdir"/usr/share/pkgconfig - rm -rf "$pkgdir"/usr/share/{ATen,cmake/{ATen,ONNX}} - rm -f "$pkgdir"/usr/share/man/man1/{unzstd,zstd{cat,}}.1 - for _entry in "${_exclude_dirs[@]}" "${_exclude_libs[@]}" + rm "$pkgdir"/usr/bin/{protoc,unzstd,zstd{cat,mt,}} + rm "$pkgdir"/usr/include/{*.h,*.py} + rm "$pkgdir"/usr/lib/*.a + rm "$pkgdir"/usr/lib/lib{zstd,onnxifi}* + rm -r "$pkgdir"/usr/lib/cmake/protobuf + rm "$pkgdir"/usr/lib/pkgconfig/{protobuf-lite,protobuf}.pc + rm "$pkgdir"/usr/share/pkgconfig/libzstd.pc + rm -r "$pkgdir"/usr/share/{ATen,cmake/{ATen,ONNX,Gloo}} + rm "$pkgdir"/usr/share/man/man1/{unzstd,zstd{cat,}}.1 + for _entry in "${_exclude_dirs[@]}" do rm -rf "$_entry" done |