BelledonneCommunications / linphone-desktop

Linphone is a free VoIP and video softphone based on the SIP protocol. Mirror of git://git.linphone.org/linphone-desktop.git
https://linphone.org/
GNU General Public License v3.0
393 stars 201 forks source link

Can't compile linphone-desktop on Gentoo #740

Closed amxyz-cyber closed 1 year ago

amxyz-cyber commented 1 year ago

Hi, first of all I've been using linphone desktop for a couple of years and could always build it. However, a couple of days ago I cloned the current github branch using the following command: $ git clone https://github.com/BelledonneCommunications/linphone-desktop.git

As a side note: I'm currently using a Raspberry Pi 4 B with 8 GB RAM. Until recently I've been able to compile the current build on my RPI4 as an AARCH64 binary.

Then I switched to the 'linphone-desktop' directory and entered the following cmake command: cmake .. -Wno-dev -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_MKV=NO -DENABLE_OPUS=NO -DENABLE_VPX=NO -DENABLE_WEBRTC_AEC=NO -DENABLE_FFMPEG=NO -DENABLE_V4L=NO -DENABLE_OPENH264=ON -DENABLE_NON_FREE_CODECS=ON -DENABLE_JPEG=NO -DENABLE_ZLIB=NO -DCMAKE_CXX_FLAGS="-fPIC" -DLINPHONESDK_DOXYGEN_PROGRAM=/usr/bin/doxygen -DENABLE_QRCODE=NO -DENABLE_LDAP=NO -DENABLE_VIDEO=NO -DENABLE_OPENSSL_EXPORT=ON -DENABLE_STATIC=ON -DENABLE_SHARED=NO -DCMAKE_BUILD_TYPE=Gentoo -DLIB_INSTALL_DIR=/usr/local/lib64

Then I compile linphone-desktop using the following command: make -j2

Even though cmake could succesfully compile the linphone-binary it throws an error after reaching 98%. My Gentoo settings are as follows:

Portage 3.0.42 (python 3.10.9-final-0, default/linux/arm64/17.0/desktop, gcc-12, glibc-2.36-r6, 5.15.76_p20221104-raspberrypi-v8 aarch64)

System uname: Linux-5.15.76_p20221104-raspberrypi-v8-aarch64-with-glibc2.36 KiB Mem: 7758080 total, 2907168 free KiB Swap: 13479932 total, 13122044 free Timestamp of repository gentoo: Fri, 20 Jan 2023 16:30:01 +0000 Head commit of repository gentoo: 0de866251dd08f973d647b2b32f2d623420faee9 sh bash 5.2_p15 ld GNU ld (Gentoo 2.39 p5) 2.39.0 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.2_p15::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.36.0-r1::gentoo dev-lang/python: 3.10.9::gentoo, 3.11.1::gentoo, 3.12.0_alpha3-r1::gentoo dev-lang/rust: 1.66.0::gentoo dev-util/cmake: 3.25.1::gentoo dev-util/meson: 1.0.0::gentoo sys-apps/baselayout: 2.9::gentoo sys-apps/openrc: 0.45.2-r2::gentoo sys-apps/sandbox: 2.30-r1::gentoo sys-devel/autoconf: 2.13-r7::gentoo, 2.71-r5::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.39-r4::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/clang: 15.0.6::gentoo sys-devel/gcc: 11.3.1_p20221223::gentoo, 12.2.1_p20221231::gentoo sys-devel/gcc-config: 2.9::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/lld: 15.0.6::gentoo sys-devel/llvm: 13.0.1::gentoo, 15.0.6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.36-r6::gentoo Repositories:

gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: 0 volatile: True sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="arm64 ~arm64" ACCEPT_LICENSE="@FREE" CBUILD="aarch64-unknown-linux-gnu" CFLAGS="-march=armv8-a+crc+simd -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer" CHOST="aarch64-unknown-linux-gnu" CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe" DISTDIR="/backup/tmp/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="de_DE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j2 -l3 --quiet" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/backup/tmp/" SHELL="/bin/bash" USE="X a52 aac acl acpi alsa arm64 bindist branding bzip2 cairo cdda cdr clang cli crypt cups dbus dri dts dvdr elogind encode exif extras flac fortran gdbm gif gpm gtk gui help iconv icu ipv6 java jpeg lcms libglvnd libnotify libtirpc mad mariadb mng mp3 mp4 mpeg ncurses nls notification nptl ogg opengl openmp pam pango pcre pdf pdfimport png policykit ppds pulseaudio qt5 readline sdl seccomp sound spell split-usr ssl startup-notification svg test-rust themes tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xft xml xv xvid zlib" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" QEMU_SOFTMMU_TARGETS="arm x86_64 sparc aarch64" QEMU_USER_TARGETS="aarch64" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="vc4" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

The error I receive is the following:

/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: SipAddressesModel.cpp:(.text+0x1920): undefined reference to linphone::AccountParams::setIdentityAddress(std::shared_ptr<linphone::Address const> const&)' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: SipAddressesModel.cpp:(.text+0x1964): undefined reference tolinphone::Core::createAccount(std::shared_ptr const&)' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: SipAddressesModel.cpp:(.text+0x19b4): undefined reference to linphone::Account::normalizeSipUri(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: CMakeFiles/app-library.dir/src/components/timeline/TimelineListModel.cpp.o: in functionTimelineListModel::onCallCreated(std::shared_ptr const&)': TimelineListModel.cpp:(.text+0x2e2c): undefined reference to linphone::Call::getCurrentParams() const' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: CMakeFiles/app-library.dir/src/utils/Utils.cpp.o: in functionUtils::interpretUrl(QString const&)': Utils.cpp:(.text+0x70): undefined reference to linphone::Core::interpretUrl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: Utils.cpp:(.text+0x1b4): undefined reference tolinphone::Core::interpretUrl(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: CMakeFiles/app-library.dir/src/utils/Utils.cpp.o: in function Utils::getMatchingLocalAddress(std::shared_ptr<linphone::Address>)': Utils.cpp:(.text+0x10bc): undefined reference tolinphone::Account::getParams() const' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: Utils.cpp:(.text+0x10d8): undefined reference to linphone::AccountParams::getIdentityAddress() const' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: CMakeFiles/app-library.dir/src/utils/Utils.cpp.o: in functionUtils::isPhoneNumber(QString const&)': Utils.cpp:(.text+0xa7ec): undefined reference to linphone::Core::getDefaultAccount() const' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: Utils.cpp:(.text+0xa834): undefined reference tolinphone::Account::isPhoneNumber(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: /usr/local/lib64/liblinphone.so.10: undefined reference to ortp_random' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: /usr/local/lib64/liblinphone.so.10: undefined reference toortp_file_exist' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: /usr/local/lib64/liblinphone.so.10: undefined reference to ortp_get_cur_time_ms' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: /usr/local/lib64/liblinphone.so.10: undefined reference tobelr::Recognizer::feed(std::shared_ptr const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned long)' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: /home/angie/Downloads/linphone-desktop/build/linphone-sdk/desktop/lib64/libbellesip.so.1: undefined reference to bctbx_mkdir' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: /usr/local/lib64/libmediastreamer.so.11: undefined reference toortp_is_multicast_addr' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: /usr/local/lib64/libmediastreamer.so.11: undefined reference to ortp_sleep_ms' /usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: /home/angie/Downloads/linphone-desktop/build/linphone-sdk/desktop/lib64/libbellesip.so.1: undefined reference tobctbx_parse_directory' collect2: Error: ld returned 1 make[2]: [linphone-app/CMakeFiles/linphone-qt.dir/build.make:402: linphone-app/linphone] Error 1 make[1]: [CMakeFiles/Makefile2:381: linphone-app/CMakeFiles/linphone-qt.dir/all] Error 2 make: *** [Makefile:156: all] Error 2

Unfortunately, I don't know how to fix this. There exists a previous build where the libraries have been saved to /usr/local/lib64. But how can I tell cmake that it should use the newly created libraries instead of the older ones?!.