Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net-voip/linphone-desktop-5.2.4 broken #158

Open
shfbsdbvf opened this issue Aug 18, 2024 · 5 comments
Open

net-voip/linphone-desktop-5.2.4 broken #158

shfbsdbvf opened this issue Aug 18, 2024 · 5 comments

Comments

@shfbsdbvf
Copy link

here's the error:

FAILED: linphone-app/CMakeFiles/app-library.dir/app-library_autogen/mocs_compilation.cpp.o
/usr/bin/x86_64-pc-linux-gnu-g++ -DENABLE_VIDEO -I/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app -I/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app -I/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app/app-library_autogen/include -I/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/src -I/usr/include/OpenGL -I"/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/$ENV{DESTDIR}/usr/include" -isystem /usr/include/belle-sip -isystem /usr/include/libxml2 -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtQmlModels -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtQuick -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtQuickControls2 -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtTest -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtDBus -mtune=generic -O2 -pipe -DQMLMODELS_ENABLED -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -std=gnu++14 -fPIC -MD -MT linphone-app/CMakeFiles/app-library.dir/app-library_autogen/mocs_compilation.cpp.o -MF linphone-app/CMakeFiles/app-library.dir/app-library_autogen/mocs_compilation.cpp.o.d -o linphone-app/CMakeFiles/app-library.dir/app-library_autogen/mocs_compilation.cpp.o -c /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app/app-library_autogen/mocs_compilation.cpp
In file included from /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app/app-library_autogen/WROIZFETPG/../../../../linphone-desktop-5.2.4/linphone-app/src/components/contacts/ContactsImporterModel.hpp:28,
from /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app/app-library_autogen/WROIZFETPG/moc_ContactsImporterModel.cpp:10,
from /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app/app-library_autogen/mocs_compilation.cpp:46:
/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/include/LinphoneApp/PluginDataAPI.hpp:9:18: fatal error: LinphoneApp/LinphonePlugin.hpp: No such file or directory
9 | #include <LinphoneApp/LinphonePlugin.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

@SpiderX
Copy link
Owner

SpiderX commented Sep 8, 2024

I can't reproduce this.
Attaching my build.log with success compilation

build.log

@shfbsdbvf
Copy link
Author

shfbsdbvf commented Sep 28, 2024

Maybe the problem is in \$ENV{DESTDIR}? In my case $ENV is empty.
Anyway, I built it with a workaround after the build failed:

cd /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/src
ln -s ../include/LinphoneApp .
ebuild /var/db/repos/nest/net-voip/linphone-desktop/linphone-desktop-5.2.4.ebuild merge

@SpiderX
Copy link
Owner

SpiderX commented Sep 29, 2024

Maybe the problem is in $ENV{DESTDIR}?

I don't think so.
DESTDIR is used here to avoid copying files outside of portage sendbox, like this:

 /usr/bin/cmake -E copy_directory /var/tmp/portage/net-voip/linphone-desktop-5.2.6/work/linphone-desktop-5.2.6/linphone-app/include/ /usr/include/ && cd /var/tmp/portage/net-voip/linphone-desktop-5.2.6/work/linphone-desktop-5.2.6_build/linphone-app && /usr/bin/cmake -E copy /var/tmp/portage/net-voip/linphone-desktop-5.2.6/work/linphone-desktop-5.2.6_build/linphone-app/libapp-plugin.so /usr/lib64/ && cd /var/tmp/portage/net-voip/linphone-desktop-5.2.6/work/linphone-desktop-5.2.6_build/linphone-app && /usr/bin/cmake -E copy /var/tmp/portage/net-voip/linphone-desktop-5.2.6/work/linphone-desktop-5.2.6_build/linphone-app/libapp-plugin.so /usr/lib64/
Error copying directory from "/var/tmp/portage/net-voip/linphone-desktop-5.2.6/work/linphone-desktop-5.2.6/linphone-app/include/" to "/usr/include/".
ninja: build stopped: subcommand failed.

You could verify this by copying ebuild to local overlay and removing this line from it.

In your original error you're missing headers for plugin and looks like you workaround makes them accessible for your build environment.

@whiteman808
Copy link

Try this ebuild:

# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake xdg

DESCRIPTION="A free VoIP and video softphone based on the SIP protocol"
HOMEPAGE="https://gitlab.linphone.org/BC/public/linphone-desktop"
SRC_URI="https://gitlab.linphone.org/BC/public/${PN}/-/archive/${PV}/${P}.tar.bz2"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="ldap qrcode"
RESTRICT="test" # needs sdk

RDEPEND="dev-libs/belcard
	dev-libs/jsoncpp:0=
	dev-libs/liblinphone
	dev-libs/qtkeychain:=
	dev-qt/qtconcurrent:5
	dev-qt/qtcore:5
	dev-qt/qtdbus:5
	dev-qt/qtgui:5
	dev-qt/qtnetwork:5
	dev-qt/qtquickcontrols:5
	dev-qt/qtquickcontrols2:5[widgets]
	dev-qt/qtsvg:5
	dev-qt/qtwidgets:5
	media-libs/mediastreamer2[zrtp,jpeg]
	net-libs/bctoolbox
	net-libs/ortp
	ldap? ( net-nds/openldap:0= )
	qrcode? ( media-libs/zxing-cpp:0= )"
DEPEND="${RDEPEND}"
BDEPEND="dev-vcs/git
	dev-qt/linguist-tools:5
	virtual/pkgconfig"

PATCHES=( # change path to BCToolbox, include utils
	"${FILESDIR}"/"${PN}"-5.2.4-FindBCToolbox.patch
	# fix incorrect use of get_target_property
	"${FILESDIR}"/"${PN}"-5.2.4-FindMediastreamer2.patch
	# change path to BCToolbox, include config
	"${FILESDIR}"/"${PN}"-5.2.4-FindLibLinphone.patch
	# change path to BelCard
	"${FILESDIR}"/"${PN}"-5.2.4-FindBelcard.patch
	# remove spellchecker from UI
	"${FILESDIR}"/"${PN}"-5.2.4-spellchecker.patch )

DOCS=( {CHANGELOG,README}.md )

src_prepare() {
	# don't build ispell, don't build rpm, don't install qt.conf,
	# respect DESTDIR, correct include path, commend out spellchecker sources
	sed -i  -e '/if(NOT APPLE AND NOT WIN32)/s|APPLE|UNIX|' \
		-e '/add_subdirectory(build)/d' \
		-e '/deployqt_hack/d' \
		-e 's|${CMAKE_INSTALL_PREFIX}|\\$ENV{DESTDIR}\/${CMAKE_INSTALL_PREFIX}|g' \
		-e '/install(DIRECTORY/s|include"|include/"|' \
		-e '/spell-checker/s|^|#|' \
		linphone-app/CMakeLists.txt \
		|| die "sed for CMakeLists.txt failed"

	# don't install ispell dictionaries, don't build AppImage, don't install qt.conf
	sed -i -e '/ISpell_SOURCE_DIR/d' \
		-e '/{ENABLE_APP_PACKAGING}/s|}|_}|' \
		-e "/install(FILES.*qt.conf/d" \
		linphone-app/cmake_builder/linphone_package/CMakeLists.txt \
		|| die "sed failed for linphone_package/CMakeLists.txt"

	# remove SpellChecker component
	sed -i '/SpellChecker/d' linphone-app/src/app/App.cpp \
		|| die "sed failed for App.cpp"

	# make plugins headers visible
	ln -s "${S}/linphone-app/include/LinphoneApp" "${S}/linphone-app/src/LinphoneApp"

	cmake_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-DLINPHONEAPP_VERSION="${PV}"
		-DLINPHONE_OUTPUT_DIR="/usr"
		-DENABLE_APP_PACKAGING=YES
		-DLINPHONE_QT_ONLY=YES
		-DENABLE_APP_EXPORT_PLUGIN=NO
		-DENABLE_BUILD_VERBOSE=ON
		-DENABLE_CONSOLE_UI=ON
		-DENABLE_DAEMON=ON
		-DENABLE_LDAP="$(usex ldap)"
		-DENABLE_QRCODE="$(usex qrcode)"
		-DENABLE_QT_KEYCHAIN=NO
		-DENABLE_STRICT=OFF
		-DENABLE_UPDATE_CHECK=OFF
		-DENABLE_BUILD_APP_PLUGINS=OFF
		-Wno-dev
	)
	cmake_src_configure
}

@SpiderX
Copy link
Owner

SpiderX commented Nov 30, 2024

Your ebuild works for me in the same way as ebuild without 'ln'.

In your original error:

In file included from /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app/app-library_autogen/WROIZFETPG/../../../../linphone-desktop-5.2.4/linphone-app/src/components/contacts/ContactsImporterModel.hpp:28

It fails on string #include "include/LinphoneApp/PluginDataAPI.hpp" in file ContactsImporterModel.hpp because it can't find PluginDataAPI.hpp under the one of provided paths:

  • "-I/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app"
  • "-I/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app"
  • "-I/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4_build/linphone-app/app-library_autogen/include"
  • "-I/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/src"
  • "-I/usr/include/OpenGL"
  • "-I"/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/$ENV{DESTDIR}/usr/include""

which doesn't make much sense since it is available under the second from the top path:

ls /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/include/LinphoneApp/PluginDataAPI.hpp 
/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/include/LinphoneApp/PluginDataAPI.hpp

Your change makes PluginDataAPI.hpp available under /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/src/LinphoneApp, absolute path for it will be:

/var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app/src/LinphoneApp/PluginDataAPI.hpp

but there are no reference to this file as LinphoneApp/PluginDataAPI.hpp in whole Linphone's codebase. There're references to include/LinphoneApp/PluginDataAPI.hpp only.

So your change shouldn't make any difference, but apparently it works for you.

So, I have no idea why your build environment ignores supplied path for headers /var/tmp/portage/net-voip/linphone-desktop-5.2.4/work/linphone-desktop-5.2.4/linphone-app and I have no idea why your change helps you.

But this change harmless and if it helps your it could be applied, but not in the way you proposed it.
Change it to

        ln -s ../include/LinphoneApp linphone-app/src || die "ln failed"

and I will merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants