ok, having another go at trying npp with sdk 8.0.61 in x64 ffmpeg static, using a hack of rdp's wonderful script. Need your thoughts though.
So, put the npp/cuda sdk headers and whatnot in the right places and created some variables
Code: Select all
which_cuda="cuda_8.0.61"
npp_config_libs=" --extra-cflags=-I/usr/${which_cuda}/cuda/include --extra-ldflags=-L/usr/${which_cuda}/cuda/lib/x64 --extra-cflags=-I/usr/${which_cuda}/npp/include --extra-ldflags=-L/usr/${which_cuda}/npp/lib/x64 --extra-libs=-lnppi --extra-libs=-lnppc "
npp_config_options=" --enable-libnpp ${npp_config_libs} "
npp_config_libs_lsw=" --extra-cflags=-I/usr/${which_cuda}/cuda/include --extra-ldflags=-L/usr/${which_cuda}/cuda/lib/x64 --extra-cflags=-I/usr/${which_cuda}/npp/include --extra-ldflags=-L/usr/${which_cuda}/npp/lib/x64 --extra-libs=-lnppi --extra-libs=-lnppc "
echo "npp_config_options=${npp_config_options}"
echo "npp_config_libs=${npp_config_libs}"
echo "npp_config_libs_lsw=${npp_config_libs_lsw}"
hacked a couple of things to see what happens eg
Code: Select all
build_lsmash() { # an MP4 library
echo "---------------------------------------------------------------------------------------------------"
echo "---------------------------------------------------------------------------------------------------"
echo "build_lsmash \"${1}\""
echo "---------------------------------------------------------------------------------------------------"
echo "---------------------------------------------------------------------------------------------------"
do_git_checkout https://github.com/l-smash/l-smash.git l-smash
cd l-smash
#generic_configure "--prefix=$mingw_w64_x86_64_prefix --cross-prefix=$cross_prefix ${npp_config_libs_lsw} "
./configure --prefix=$mingw_w64_x86_64_prefix --cross-prefix=$cross_prefix ${npp_config_libs_lsw} || exit 1 # rebuilding needs it
do_make_and_make_install
cd ..
#read -p "after build_lsmash - Press Enter to continue... or control-C if not happy"
}
Code: Select all
build_lsw() {
echo "---------------------------------------------------------------------------------------------------"
echo "---------------------------------------------------------------------------------------------------"
echo "build_lsw \"${1}\""
echo "---------------------------------------------------------------------------------------------------"
echo "---------------------------------------------------------------------------------------------------"
# Build L-Smash-Works, which are plugins based on lsmash
#build_ffmpeg static # dependency, assume already built
build_lsmash # dependency
do_git_checkout https://github.com/VFR-maniac/L-SMASH-Works.git lsw
cd lsw/VapourSynth
#generic_configure "--prefix=$mingw_w64_x86_64_prefix --cross-prefix=$cross_prefix ${npp_config_libs_lsw} "
./configure --prefix=$mingw_w64_x86_64_prefix --cross-prefix=$cross_prefix --target-os=mingw ${npp_config_libs_lsw} || exit 1
do_make_and_make_install
# AviUtl is 32bit-only
if [ "$bits_target" = "32" ]; then
cd ../AviUtl
#generic_configure "--prefix=$mingw_w64_x86_64_prefix --cross-prefix=$cross_prefix ${npp_config_libs_lsw} "
./configure --prefix=$mingw_w64_x86_64_prefix --cross-prefix=$cross_prefix ${npp_config_libs_lsw} || exit 1
do_make
fi
cd ../..
#read -p "after build_lsw - Press Enter to continue... or control-C if not happy"
}
Code: Select all
if [[ $enable_opencl == 'y' ]]; then
config_options+=" --enable-opencl "
# Here's where we try to build nvidia's NPP
if [ "$bits_target" = "64" ]; then # is 64 bit
config_options+=" ${npp_config_options} "
# and then we consider what ffmpeg has called "--enable-cuda-sdk"
echo "Unfortunately trying to build with cuda_sdk invokes the nvidia compiler nvcc which requires an OLD version of gcc to build a .cu and thus kills the build process. So not building with ffmpeg's cuda_sdk"
echo "it may have been like --enable-cuda-sdk --enable-filter=scale_cuda --extra-cflags=-I/usr/cuda_8.0.61/cuda/include --extra-ldflags=-L/usr/cuda_8.0.61/cuda/lib/x64 "
else # must be 32 bit whcih doesn't build :(
echo "Not building ffmpeg with nvidia 32bit NPP (cuda) since the cuda toolkit it only comes with 64bit NPP stuff"
# and then we consider what ffmpeg has called "--enable-cuda-sdk"
echo "Unfortunately trying to build with cuda_sdk invokes the nvidia compiler nvcc which requires an OLD version of gcc to build a .cu and thus kills the build process. So not building with ffmpeg's cuda_sdk"
fi
fi
It builds.
However - when run it aborts with "nppi64_80.dll is missing from your computer".
Hence, has anyone managed to build it static and can share the method ?