juha-h / libbaresip-android

libbaresip for Android
Other
38 stars 29 forks source link

SNDFILE_INCLUDE_DIR not found #34

Closed AviWA closed 1 year ago

AviWA commented 1 year ago

when building the baresip project i am getting this error

https://github.com/juha-h/baresip-studio/assets/123717548/c01e4921-aad3-4413-b971-6f20eda6be36

I hope you are aware of this. Thank you.

juha-h commented 1 year ago

I cannot reproduce it:

cd baresip && \
rm -rf build && rm -rf .cache && mkdir build && cd build && \
cmake .. \
    -DANDROID=ON -DANDROID_PLATFORM=23 -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=23 -DCMAKE_TOOLCHAIN_FILE=/opt/Android/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DCMAKE_SKIP_INSTALL_RPATH=ON -DCMAKE_C_COMPILER=aarch64-linux-android23-clang -DCMAKE_CXX_COMPILER=aarch64-linux-android23-clang++ -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_FIND_ROOT_PATH="/usr/src/libbaresip-android/amr;/usr/src/libbaresip-android/vo-amrwbenc;/usr/src/libbaresip-android/openssl" \
    -DSTATIC=ON \
    -Dre_DIR=/usr/src/libbaresip-android/re/cmake \
    -DRE_LIBRARY=/usr/src/libbaresip-android/re/build/libre.a \
    -DRE_INCLUDE_DIR=/usr/src/libbaresip-android/re/include \
    -DOPENSSL_ROOT_DIR=/usr/src/libbaresip-android/openssl \
    -DG729_INCLUDE_DIR=/usr/src/libbaresip-android/bcg729/include \
    -DOPUS_INCLUDE_DIR=/usr/src/libbaresip-android/opus/include_opus \
    -DOPUS_LIBRARY=/usr/src/baresip-studio/distribution/opus/lib/arm64-v8a/libopus.a \
    -DGSM_INCLUDE_DIR=/usr/src/libbaresip-android/gsm/inc \
    -DSPANDSP_INCLUDE_DIRS="/usr/src/libbaresip-android/spandsp/src;/usr/src/libbaresip-android/tiff/libtiff" \
    -DWEBRTC_AECM_INCLUDE_DIRS=/usr/src/libbaresip-android/webrtc/include \
    -DG7221_INCLUDE_DIRS=/usr/src/libbaresip-android/g7221/src \
    -DGZRTP_INCLUDE_DIR=/usr/src/libbaresip-android/ZRTPCPP \
    -DGZRTP_LIBRARY="/usr/src/baresip-studio/distribution/gzrtp/lib/arm64-v8a/libzrtpcppcore.a" \
    -DGZRTP_INCLUDE_DIRS="/usr/src/libbaresip-android/ZRTPCPP;/usr/src/libbaresip-android/zZRTPCPP/zrtp;/usr/src/libbaresip-android/ZRTPCPP/srtp" \
    -DSNDFILE_INCLUDE_DIR="/usr/src/libbaresip-android/sndfile/include" \
    -DSNDFILE_LIBRARIES="/usr/src/baresip-studio/distribution/sndfile/lib/arm64-v8a/libsndfile.a" \
    -DCMAKE_C_COMPILER="clang" \
    -DCMAKE_CXX_COMPILER="clang++" \
    -DMODULES="webrtc_aecm;opensles;dtls_srtp;opus;g711;g722;g7221;g726;g729;gsm;amr;gzrtp;stun;turn;ice;presence;mwi;account;natpmp;srtp;uuid;sndfile;debug_cmd" && \
cmake --build . --target baresip -j
-- The C compiler identification is Clang 14.0.7
-- The CXX compiler identification is Clang 14.0.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/Android/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/Android/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found RE: /usr/src/libbaresip-android/re/build/libre.a  
-- Looking for backtrace
-- Looking for backtrace - not found
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY) 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Found ZLIB: /opt/Android/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/23/libz.so (found version "1.2.12") 
-- Found OpenSSL: /usr/src/libbaresip-android/openssl/libcrypto.a (found suitable version "3.1.0", minimum required is "1.1.1")  
-- Looking for arc4random
-- Looking for arc4random - found
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Looking for getopt.h
-- Looking for getopt.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for res_ninit
-- Looking for res_ninit - not found
-- Looking for thrd_create
-- Looking for thrd_create - not found
-- Looking for accept4
-- Looking for accept4 - found
-- Looking for epoll_create
-- Looking for epoll_create - found
-- Looking for kqueue
-- Looking for kqueue - not found
-- Looking for sys/prctl.h
-- Looking for sys/prctl.h - found
-- Checking for one of the modules 'fdk-aac'
-- Could NOT find AAC (missing: AAC_LIBRARY AAC_INCLUDE_DIR) 
-- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR) 
-- Found AMR: TRUE  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Checking for one of the modules 'aptx'
-- Could NOT find APTX (missing: APTX_LIBRARY APTX_INCLUDE_DIR) 
-- Could NOT find AOM (missing: AOM_LIBRARY AOM_INCLUDE_DIR) (found version "3.6.0")
-- Checking for one of the modules 'codec2'
-- Could NOT find CODEC2 (missing: CODEC2_LIBRARY CODEC2_INCLUDE_DIR) 
-- Could NOT find DIRECTFB (missing: DIRECTFB_LIBRARIES DIRECTFB_INCLUDE_DIR) 
-- Could NOT find FFMPEG (missing: FFMPEG_AVCODEC_LIBRARIES FFMPEG_AVCODEC_INCLUDE_DIRS avcodec avfilter avformat swscale swresample avdevice avutil) 
-- Checking for one of the modules 'g7221'
-- Could NOT find G7221 (missing: G7221_LIBRARY G7221_INCLUDE_DIR) 
-- Checking for module 'gio-unix-2.0'
--   Found gio-unix-2.0, version 2.66.8
-- Could NOT find GIO (missing: GLIB_LIBRARY GIO_LIBRARY GOBJ_LIBRARY GIO_INCLUDE_DIR GLIB_INCLUDE_DIR GIO_UNIX_INCLUDE_DIR) 
-- Could NOT find GST (missing: GST_FOUND) 
-- Checking for module 'gtk+-3.0'
--   Found gtk+-3.0, version 3.24.24
-- Found GTK3: gtk-3;gdk-3;pangocairo-1.0;pango-1.0;harfbuzz;atk-1.0;cairo-gobject;cairo;gdk_pixbuf-2.0;gio-2.0;gobject-2.0;glib-2.0  
-- Found GZRTP: /usr/src/baresip-studio/distribution/gzrtp/lib/arm64-v8a/libzrtpcppcore.a  
-- Checking for one of the modules 'jack'
-- Could NOT find JACK (missing: JACK_LIBRARY JACK_INCLUDE_DIR) 
-- Could NOT find MOSQUITTO (missing: MOSQUITTO_LIBRARY MOSQUITTO_INCLUDE_DIR) 
-- libmosquitto include dir: MOSQUITTO_INCLUDE_DIR-NOTFOUND
-- libmosquitto: MOSQUITTO_LIBRARY-NOTFOUND
-- Checking for one of the modules 'twolame'
-- Checking for one of the modules 'mpg123'
-- Checking for one of the modules 'speexdsp'
-- Could NOT find MPA (missing: MPA_LIBRARIES MPA_INCLUDE_DIRS) 
-- Found OPENSLES: /opt/Android/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/23/libOpenSLES.so  
-- opensles include dir: /opt/Android/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include
-- Checking for one of the modules 'opus'
-- Found OPUS: /usr/src/baresip-studio/distribution/opus/lib/arm64-v8a/libopus.a  
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_INCLUDE_DIR) 
-- Checking for one of the modules 'portaudio'
-- Could NOT find PORTAUDIO (missing: PORTAUDIO_LIBRARY PORTAUDIO_INCLUDE_DIR) 
-- Checking for one of the modules 'pulse'
-- Could NOT find PULSE (missing: PULSE_LIBRARY PULSE_INCLUDE_DIR) 
-- Checking for one of the modules 'libpipewire-0.3'
-- Could NOT find PIPEWIRE (missing: PIPEWIRE_INCLUDE_DIRS PIPEWIRE_LIBRARIES) 
-- Checking for one of the modules 'sdl2'
-- Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR) 
-- Checking for module 'sndfile'
--   Found sndfile, version 1.0.31
-- Found SNDFILE: /usr/src/libbaresip-android/sndfile/include  
...

Check that you have downloaded sndfile source.

AviWA commented 1 year ago

I applied the cmds as the readme file instructed first i have set the specs required the project in Makefile and after entered make download-sources it has successfully completed and after make install-all cmds running i am getting this error i tried this 3 times but no use

juha-h commented 1 year ago

AviWA writes:

I applied the cmds as the readme file instructed first i have set the specs required the project in Makefile and after entered make download-sources it has successfully completed and after make install-all cmds running i am getting this error i tried this 3 times but no use

Do you have sndfile/include directory in the directory where you cloned libbaresip-android project?

AviWA commented 1 year ago

No after the make process i searched i found sndfile folder but inside of that there is no include folder. Do i have to add anything to the android-project which is in android studio or the problem in downloading files?

juha-h commented 1 year ago

AviWA writes:

No after the make process i searched i found sndfile folder but inside of that there is no include folder. Do i have to add anything to the android-project which is in android studio or the problem in downloading files?

Command make download-sources clones sndfile:

git clone https://github.com/juha-h/libsndfile.git -b master --single-branch sndfile

and resulting sndfile directory does have include directory.

juha-h commented 1 year ago
$  git clone https://github.com/juha-h/libsndfile.git -b master --single-branch sndfile
Cloning into 'sndfile'...
remote: Enumerating objects: 399, done.
remote: Counting objects: 100% (399/399), done.
remote: Compressing objects: 100% (336/336), done.
remote: Total 399 (delta 59), reused 396 (delta 58), pack-reused 0
Receiving objects: 100% (399/399), 824.71 KiB | 1.80 MiB/s, done.
Resolving deltas: 100% (59/59), done.
$ ls sndfile/
AUTHORS          CONTRIBUTING.md  man/       Scripts/
Building-for-Android.md  COPYING      NEWS.OLD   SECURITY.md
ChangeLog        docs/        Octave/    sndfile.pc.in
CHANGELOG.md         examples/    ossfuzz/   src/
cmake/           include/     programs/  tests/
CMakeLists.txt       m4/          README     vcpkg.json
CODEOWNERS       Makefile.am      README.md  Win32/
configure.ac         make_lite.py     regtest/
jh@siika:/tmp$ ls sndfile/include/
sndfile.h  sndfile.hh