Package Details: ncnn-git 20220721.r5.g4158e6366-1

Git Clone URL: https://aur.archlinux.org/ncnn-git.git (read-only, click to copy)
Package Base: ncnn-git
Description: High-performance neural network inference framework optimized for the mobile platform
Upstream URL: https://github.com/Tencent/ncnn
Licenses: BSD
Conflicts: ncnn
Provides: ncnn
Submitter: salviati
Maintainer: HurricanePootis
Last Packager: HurricanePootis
Votes: 4
Popularity: 0.004098
First Submitted: 2019-07-19 23:45 (UTC)
Last Updated: 2022-07-25 22:20 (UTC)

Latest Comments

feng commented on 2022-07-26 19:28 (UTC)

@HurricanePootis Thanks for the kind remind. I shall update my makepkg.conf accordingly.

HurricanePootis commented on 2022-07-25 22:16 (UTC)

Thank you @feng for the patch.

But, as a reminder, if whenever you are building PKGBUILDs, adding nproc to the PKGBUILD goes against what the use specifys in /etc/makepkg.conf. If you yourself want to build packages with all of your cpu threads, please open up /etc/makepkg.conf in your text editor of choice, go to the MAKEFLAGS line, and add `MAKEFLAGS="-j$(nproc)"

feng commented on 2022-07-25 20:44 (UTC)

I need tools/onnx2ncnn but this pkgbuild does not build.

The patch below enables this tool

diff --git a/PKGBUILD b/PKGBUILD
index 017b7d3..9757116 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@

 pkgname=ncnn-git
 _pkgname=ncnn
-pkgver=20220721.r2.g13a953398
+pkgver=20220721.r5.g4158e6366
 pkgrel=1
 pkgdesc="High-performance neural network inference framework optimized for the mobile platform"
 url="https://github.com/Tencent/ncnn"
@@ -55,9 +55,13 @@ build() {
         -DNCNN_SHARED_LIB=ON \
         -DNCNN_ENABLE_LTO=ON \
         -DGLSLANG_TARGET_DIR=/usr/lib/cmake \
+        -DCMAKE_BUILD_TYPE=Release \
+        -DNCNN_STDIO=ON \
+        -DNCNN_STRING=ON \
+        -DNCNN_BUILD_TOOLS=ON \
         -Wno-dev \
         ..
-    make
+    make -j `nproc --all`
 }

 package() {

IncredibleLaser commented on 2022-04-09 07:36 (UTC) (edited on 2022-04-09 07:38 (UTC) by IncredibleLaser)

This doesn't build for me in a clean chroot:

CMake Error at src/CMakeLists.txt:256 (message):                                                                                           
  !! CMake didn't find Vulkan.  Please set VULKAN_SDK env var, e.g.:

  Linux: export VULKAN_SDK=~/soft/vulkansdk/1.2.148.0/x86_64

  Windows: set VULKAN_SDK=E:/lib/VulkanSDK/1.2.148.0

  MacOS: export VULKAN_SDK=~/soft/vulkansdk/1.2.148.0/macOS



-- Configuring incomplete, errors occurred!

feng commented on 2021-11-12 20:15 (UTC)

Can you please also pack onnx2ncnn, which is useful to me? It is compiled by default, and the path is './build/tools/onnx/onnx2ncnn'.

arzeth commented on 2021-09-04 14:42 (UTC) (edited on 2021-09-04 14:43 (UTC) by arzeth)

waifu2x-ncnn-vulkan-git is broken with current PKGBUILD: https://github.com/nihui/waifu2x-ncnn-vulkan/issues/155 . I had to add to ncnn-git's PKGBUILD:

-DNCNN_SYSTEM_GLSLANG=ON \

-DGLSLANG_TARGET_DIR=/usr/lib/cmake \

, compile it, and THEN recompile waifu2x-ncnn-vulkan-git.

taotieren commented on 2021-07-22 01:26 (UTC)

Using ninja for accelerated compilation can reduce local compilation time.

HurricanePootis commented on 2021-04-27 14:19 (UTC)

Fixed

PumpkinCheshire commented on 2021-04-24 09:42 (UTC)

The vulkan sdk version is "Not Found"

Please try this link instead:

https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.exe

HurricanePootis commented on 2021-04-06 17:33 (UTC)

I updated the package :]

chrhasse commented on 2020-10-14 04:29 (UTC)

I was able to get it to compile and install witht he following changes:

Adding this prepare function

prepare() {
    cd "${srcdir}/ncnn"
    sed -i'' 's|#include "glslang/glslang|#include "glslang|' ./src/gpu.cpp
}

and replacing the build function with this

build() {
    cd "${srcdir}/ncnn"
    mkdir -p build
    cd build
    cmake \
        -DCMAKE_TOOLCHAIN_FILE=../toolchains/host.gcc.toolchain.cmake \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DNCNN_BUILD_EXAMPLES=OFF \
        -DNCNN_BUILD_TOOLS=OFF \
        -DNCNN_VULKAN=ON \
        -DNCNN_SYSTEM_GLSLANG=ON \
        -DGLSLANG_TARGET_DIR=/usr/lib/cmake/ \
        ..
    make
}

chrhasse commented on 2020-10-13 22:46 (UTC) (edited on 2020-10-13 22:58 (UTC) by chrhasse)

I'm getting an error building because git submodules are not downloaded, adding a prepare function that initializes the submodules to the PKGBUILD seems to fix it for me.

prepare() {
    cd "${srcdir}/ncnn"
    git submodule update --init
}

though this appears to include glslang in the package itself which of course means it won't install, so a much better way is telling it to compile using system glslang with

        -DNCNN_SYSTEM_GLSLANG=ON \
        -DGLSLANG_TARGET_DIR=/usr/lib/cmake/ \

though with those it complains about a missing header file "glslang/glslang/Public/ShaderLang.h and I think that might need a patch since Shaderlang.h exists at /usr/include/glslang/Public/ShaderLang.h for me. I'll play with it some more and see if I can get it to compile

ipha commented on 2020-02-11 21:14 (UTC)

I've disabled building the examples and tools since they weren't being packaged anyway.

sl1pkn07 commented on 2020-02-11 11:22 (UTC) (edited on 2020-02-11 12:04 (UTC) by sl1pkn07)

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ncnn-git#n31

fail build with this line if have installed cuda or opencv with cuda support

examples and tools/quantize seems detect it

katt commented on 2019-07-31 14:45 (UTC) (edited on 2019-07-31 15:10 (UTC) by katt)

Fails to build package with mkdir: cannot create directory ‘/home/katt/ncnn-git/pkg/ncnn-git/usr/include/ncnn’: File exists

See full log: https://gist.github.com/Kattus/0d8fa052a78cb2b0b28da0705a00a76b

Also shouldn't make DESTDIR be set?