Dear ports@, I am trying to get nextcloudclient aka nextcloud desktop to build on OpenBSD.
I am basing my experiments on the existing owncloudclient port. I could try to use that, but as Owncloud and Nextcloud are moving in different directions, I would like to use the official nextcloud client. https://github.com/nextcloud/desktop https://nextcloud.com/install/#install-clients And, of course, building ports is always fun (ahem) and a good way to get to know your operating system... :-) I have tried to build several different versions, but it boils down to this (see attached Build_Error* files for details): v2.5.3 and 2.6.2 are not building as (AFAIK) qtwebengine is not available. v2.4.0 fails with errors related to setupQtProxyFromConfig, that seem to be solved in newer versions of libqt5webengine5: https://github.com/nextcloud/desktop/issues/835 v2.3.4 does not build, due to some iconv errors. I tried to somehow have iconv used for building, but am lacking the knowledge to get that right. ###cite### dst = c_iconv(wstr, iconv_from_native); ^ /usr/obj/ports/nextcloud-desktop/desktop-2.3.4/csync/src/std/c_string.c:289:23: error: use of undeclared identifier 'iconv_from_native' ###/cite### A RTFM on how to fix the iconv errors might be enough to get this old version building (maybe). I fixed some errors in the qtwebengine Makefile (see the attached diff), but as all of the dozens of patches seem to no longer apply, I am stuck there (I know how to rebase a patch, but I also know that this is risky without knowing what the patch is for and how to ensure that it still does this after the rebase...). If someone knows these kinds of errors and would like to help out, this would be highly appreciated. Thanks in advance! Kind Regards, Johannes
--- qtwebengine.orig/Makefile Sun Feb 2 13:05:36 2020 +++ qtwebengine/Makefile Sun Feb 2 12:51:11 2020 @@ -18,7 +18,7 @@ # BSD-like, patents PERMIT_PACKAGE = Yes -COMPILER = base clang gcc +COMPILER = base-clang ports-gcc MODULES = lang/python MODPY_RUNDEP = No @@ -29,7 +29,7 @@ RUN_DEPENDS = sysutils/pciutils LIB_DEPENDS = \ - archivers/minizip \ + archivers/zip \ audio/pulseaudio \ archivers/snappy \ devel/glib2 \ @@ -72,10 +72,6 @@ google_default_client_secret=\"nQcDyaBvDyCeDrsRqKIWSHJn\" \ ffmpeg_branding=\"Chrome\" \ proprietary_codecs=true - -.if ${FLAVOR:Mdebug} -GN_ARGS+= remove_webcore_debug_symbols=true -.endif MODQMAKE_ARGS = \ WEBENGINE_CONFIG+=use_proprietary_codecs \ --- qtwebengine.orig/distinfo Sun Feb 2 13:05:36 2020 +++ qtwebengine/distinfo Sun Feb 2 12:51:11 2020 @@ -1,2 +1,2 @@ -SHA256 (qt/qtwebengine-opensource-src-5.9.1.tar.xz) = 9qN+65GIR0oW0p7eSY/OlZOWq4AymgqD6uuSUlFoZAE= -SIZE (qt/qtwebengine-opensource-src-5.9.1.tar.xz) = 218066864 +SHA256 (qt/qtwebengine-opensource-src-5.9.7.tar.xz) = 628bd3f099ce387e7048720a03dcf4a915573245c864b8dea9390558f47cf74f +SIZE (qt/qtwebengine-opensource-src-5.9.7.tar.xz) = 216738284
[9/213] /usr/obj/ports/nextcloud-desktop/bin/cc -DUNICODE -DUSE_FDO_NOTIFICATIONS -D_GNU_SOURCE -D_UNICODE -Icsync/src/std -I/usr/obj/ports/nextcloud-desktop/desktop-2.3.4/csync/src/std -I. -Icsync -O2 -pipe -I/usr/local/include/inotify -I/usr/local/include/qtkeychain -I/usr/local/include -std=gnu99 -pedantic -pedantic-errors -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -Wmissing-format-attribute -D_GNU_SOURCE -D__STDC_FORMAT_MACROS=1 -fPIC -fstack-protector -Wp,-D_FORTIFY_SOURCE=2 -DNDEBUG -fPIC -MD -MT csync/src/std/CMakeFiles/cstdlib.dir/c_string.c.o -MF csync/src/std/CMakeFiles/cstdlib.dir/c_string.c.o.d -o csync/src/std/CMakeFiles/cstdlib.dir/c_string.c.o -c /usr/obj/ports/nextcloud-desktop/desktop-2.3.4/csync/src/std/c_string.c FAILED: csync/src/std/CMakeFiles/cstdlib.dir/c_string.c.o /usr/obj/ports/nextcloud-desktop/bin/cc -DUNICODE -DUSE_FDO_NOTIFICATIONS -D_GNU_SOURCE -D_UNICODE -Icsync/src/std -I/usr/obj/ports/nextcloud-desktop/desktop-2.3.4/csync/src/std -I. -Icsync -O2 -pipe -I/usr/local/include/inotify -I/usr/local/include/qtkeychain -I/usr/local/include -std=gnu99 -pedantic -pedantic-errors -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -Wmissing-format-attribute -D_GNU_SOURCE -D__STDC_FORMAT_MACROS=1 -fPIC -fstack-protector -Wp,-D_FORTIFY_SOURCE=2 -DNDEBUG -fPIC -MD -MT csync/src/std/CMakeFiles/cstdlib.dir/c_string.c.o -MF csync/src/std/CMakeFiles/cstdlib.dir/c_string.c.o.d -o csync/src/std/CMakeFiles/cstdlib.dir/c_string.c.o -c /usr/obj/ports/nextcloud-desktop/desktop-2.3.4/csync/src/std/c_string.c /usr/obj/ports/nextcloud-desktop/desktop-2.3.4/csync/src/std/c_string.c:289:9: warning: implicit declaration of function 'c_iconv' is invalid in C99 [-Wimplicit-function-declaration] dst = c_iconv(wstr, iconv_from_native); ^ /usr/obj/ports/nextcloud-desktop/desktop-2.3.4/csync/src/std/c_string.c:289:23: error: use of undeclared identifier 'iconv_from_native' dst = c_iconv(wstr, iconv_from_native); ^ /usr/obj/ports/nextcloud-desktop/desktop-2.3.4/csync/src/std/c_string.c:321:11: warning: implicit declaration of function 'c_iconv' is invalid in C99 [-Wimplicit-function-declaration] dst = c_iconv(str, iconv_to_native); ^ /usr/obj/ports/nextcloud-desktop/desktop-2.3.4/csync/src/std/c_string.c:321:24: error: use of undeclared identifier 'iconv_to_native' dst = c_iconv(str, iconv_to_native); ^ 2 warnings and 2 errors generated. ninja: build stopped: subcommand failed. *** Error 1 in . (/usr/ports/devel/cmake/cmake.port.mk:34 'do-build') *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2781 '/usr/obj/ports/nextcloud-desktop/build-amd64/.build_done') *** Error 1 in /usr/ports/net/nextcloud-desktop (/usr/ports/infrastructure/mk/bsd.port.mk:2451 'build')
[135/222] /usr/obj/ports/nextcloud-desktop/bin/c++ -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_GUI_LIB -DQT_MESSAGELOGCONTEXT -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DUNICODE -DUSE_FDO_NOTIFICATIONS -D_UNICODE -Isrc/cmd/owncloudcmd_autogen/include -I. -I/usr/o bj/ports/nextcloud-desktop/desktop-2.4.0/src -Isrc -I/usr/obj/ports/nextcloud-desktop/desktop-2.4.0/src/libsync -Isrc/libsync -I/usr/obj/ports/nextcloud-desktop/desktop -2.4.0/src/csync -Isrc/csync -I/usr/obj/ports/nextcloud-desktop/desktop-2.4.0/src/3rdparty/qtokenizer -isystem /usr/local/include/X11/qt5 -isystem /usr/local/include/X1 1/qt5/QtNetwork -isystem /usr/local/include/X11/qt5/QtCore -isystem /usr/local/lib/qt5/./mkspecs/openbsd-clang -isystem /usr/local/include/X11/qt5/QtWidgets -isystem /u sr/local/include/X11/qt5/QtGui -isystem /usr/X11R6/include -isystem /usr/local/include/X11/qt5/QtConcurrent -O2 -pipe -I/usr/local/include/inotify -I/usr/local/incl ude/qtkeychain -I/usr/local/include -Wall -Wextra -pedantic -Wno-long-long -Wno-gnu-zero-variadic-macro-arguments -std=c++0x -pedantic -fPIC -fstack-protector-strong - D_FORTIFY_SOURCE=2 -fPIE -DNDEBUG -fPIC -MD -MT src/cmd/CMakeFiles/owncloudcmd.dir/simplesslerrorhandler.cpp.o -MF src/cmd/CMakeFiles/owncloudcmd.dir/simplesslerrorha ndler.cpp.o.d -o src/cmd/CMakeFiles/owncloudcmd.dir/simplesslerrorhandler.cpp.o -c /usr/obj/ports/nextcloud-desktop/desktop-2.4.0/src/cmd/simplesslerrorhandler.cpp [136/222] : && /usr/obj/ports/nextcloud-desktop/bin/c++ -O2 -pipe -I/usr/local/include/inotify -I/usr/local/include/qtkeychain -I/usr/local/include -Wall -Wextra -pedantic -Wno-long-long -Wno-gnu-zero-variadic-macro-arguments -std=c++0x -pedantic -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE -DNDEBUG -L/usr/local/lib /inotify -L/usr/local/lib -linotify -Wl,-rpath=/usr/local/lib/inotify -Wl,-z,relro -Wl,-z,now -pie src/cmd/CMakeFiles/owncloudcmd.dir/owncloudcmd_autogen/mocs_compil ation.cpp.o src/cmd/CMakeFiles/owncloudcmd.dir/cmd.cpp.o src/cmd/CMakeFiles/owncloudcmd.dir/simplesslerrorhandler.cpp.o src/cmd/CMakeFiles/owncloudcmd.dir/netrcparser.cpp.o -o bin/owncloudcmd -L/usr/obj/ports/nextcloud-desktop/build-amd64/src/libsync -L/usr/local/lib/qt5/. -L/usr/obj/ports/nextcloud-desktop/build-amd64/src/csync - L/usr/local/lib -L/usr/local/lib/inotify -Wl,-z,origin,-rpath,/usr/obj/ports/nextcloud-desktop/build-amd64/src/libsync:/usr/local/lib/qt5/.:/usr/X11R6/lib:/usr/obj/ports/nextcloud-desktop/build-amd64/src/csync: -lowncloudsync -lQt5Network -lQt5Widgets -lQt5Gui -locsync src/csync/std/libcstdlib.a -lsqlite3 -lz -lQt5Concurrent -lQt5Core -linotify -lqt5keychain -linotify -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib && : FAILED: bin/owncloudcmd : && /usr/obj/ports/nextcloud-desktop/bin/c++ -O2 -pipe -I/usr/local/include/inotify -I/usr/local/include/qtkeychain -I/usr/local/include -Wall -Wextra -pedantic -Wno-long-long -Wno-gnu-zero-variadic-macro-arguments -std=c++0x -pedantic -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE -DNDEBUG -L/usr/local/lib/inotify -L/usr/local/lib -linotify -Wl,-rpath=/usr/local/lib/inotify -Wl,-z,relro -Wl,-z,now -pie src/cmd/CMakeFiles/owncloudcmd.dir/owncloudcmd_autogen/mocs_compilation.cpp.o src/cmd/CMakeFiles/owncloudcmd.dir/cmd.cpp.o src/cmd/CMakeFiles/owncloudcmd.dir/simplesslerrorhandler.cpp.o src/cmd/CMakeFiles/owncloudcmd.dir/netrcparser.cpp.o -o bin/owncloudcmd -L/usr/obj/ports/nextcloud-desktop/build-amd64/src/libsync -L/usr/local/lib/qt5/. -L/usr/obj/ports/nextcloud-desktop/build-amd64/src/csync -L/usr/local/lib -L/usr/local/lib/inotify -Wl,-z,origin,-rpath,/usr/obj/ports/nextcloud-desktop/build-amd64/src/libsync:/usr/local/lib/qt5/.:/usr/X11R6/lib:/usr/obj/ports/nextcloud-desktop/build-amd64/src/csync: -lowncloudsync -lQt5Network -lQt5Widgets -lQt5Gui -locsync src/csync/std/libcstdlib.a -lsqlite3 -lz -lQt5Concurrent -lQt5Core -linotify -lqt5keychain -linotify -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib && : ld: error: undefined symbol: OCC::ClientProxy::ClientProxy(QObject*) >>> referenced by cmd.cpp >>> src/cmd/CMakeFiles/owncloudcmd.dir/cmd.cpp.o:(main) ld: error: undefined symbol: OCC::ClientProxy::setupQtProxyFromConfig() >>> referenced by cmd.cpp >>> src/cmd/CMakeFiles/owncloudcmd.dir/cmd.cpp.o:(main) ld: error: undefined symbol: OCC::ExcludedFiles::addExcludeFilePath(QString const&) >>> referenced by cmd.cpp >>> src/cmd/CMakeFiles/owncloudcmd.dir/cmd.cpp.o:(main) ld: error: undefined symbol: OCC::ExcludedFiles::addExcludeFilePath(QString const&) >>> referenced by cmd.cpp >>> src/cmd/CMakeFiles/owncloudcmd.dir/cmd.cpp.o:(main) ld: error: undefined symbol: OCC::ExcludedFiles::reloadExcludes() >>> referenced by cmd.cpp >>> src/cmd/CMakeFiles/owncloudcmd.dir/cmd.cpp.o:(main) c++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. *** Error 1 in . (/usr/ports/devel/cmake/cmake.port.mk:34 'do-build') *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2781 '/usr/obj/ports/nextcloud-desktop/build-amd64/.build_done') *** Error 1 in /usr/ports/net/nextcloud-desktop (/usr/ports/infrastructure/mk/bsd.port.mk:2451 'build')
-- Found INOTIFY: /usr/local/include/inotify -- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE) -- Found PdfLatex: /usr/local/bin/pdflatex -- Found OpenSSL: /usr/lib/libcrypto.so.45.5 (found suitable version "2.0.0", minimum required is "1.1") -- Found ZLIB: /usr/lib/libz.so.5.0 (found version "1.2.3") -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Found GLib2: /usr/local/lib/libglib-2.0.so.4201.2 -- Checking for module 'gio-2.0' -- Found gio-2.0, version 2.60.7 -- Found Gio libraries: /usr/local/lib/libgio-2.0.so.4200.9 -- Found Gio includes : /usr/local/include/glib-2.0/gio ================> LIBCLOUDPROVIDERS_LIBRARY-NOTFOUND -- Could NOT find LIBCLOUDPROVIDERS (missing: LIBCLOUDPROVIDERS_INCLUDE_DIR LIBCLOUDPROVIDERS_LIBRARY) CMake Error at /usr/local/lib/qt5/cmake/Qt5/Qt5Config.cmake:28 (find_package): Could not find a package configuration file provided by "Qt5WebEngineWidgets" with any of the following names: Qt5WebEngineWidgetsConfig.cmake qt5webenginewidgets-config.cmake Add the installation prefix of "Qt5WebEngineWidgets" to CMAKE_PREFIX_PATH or set "Qt5WebEngineWidgets_DIR" to a directory containing one of the above files. If "Qt5WebEngineWidgets" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): src/CMakeLists.txt:7 (find_package) -- Configuring incomplete, errors occurred! See also "/usr/obj/ports/nextcloud-desktop/build-amd64/CMakeFiles/CMakeOutput.log". *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2746 'do-configure') *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2766 '/usr/obj/ports/nextcloud-desktop/build-amd64/.configure_done') *** Error 1 in /usr/ports/net/nextcloud-desktop (/usr/ports/infrastructure/mk/bsd.port.mk:2451 'build')
-- Found INOTIFY: /usr/local/include/inotify -- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE) -- Found PdfLatex: /usr/local/bin/pdflatex -- Found OpenSSL: /usr/lib/libcrypto.so.45.5 (found suitable version "2.0.0", minimum required is "1.1") -- Found ZLIB: /usr/lib/libz.so.5.0 (found version "1.2.3") -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Found GLib2: /usr/local/lib/libglib-2.0.so.4201.2 -- Checking for module 'gio-2.0' -- Found gio-2.0, version 2.60.7 -- Found Gio libraries: /usr/local/lib/libgio-2.0.so.4200.9 -- Found Gio includes : /usr/local/include/glib-2.0/gio ================> LIBCLOUDPROVIDERS_LIBRARY-NOTFOUND -- Could NOT find LIBCLOUDPROVIDERS (missing: LIBCLOUDPROVIDERS_INCLUDE_DIR LIBCLOUDPROVIDERS_LIBRARY) CMake Error at /usr/local/lib/qt5/cmake/Qt5/Qt5Config.cmake:28 (find_package): Could not find a package configuration file provided by "Qt5WebEngineWidgets" with any of the following names: Qt5WebEngineWidgetsConfig.cmake qt5webenginewidgets-config.cmake Add the installation prefix of "Qt5WebEngineWidgets" to CMAKE_PREFIX_PATH or set "Qt5WebEngineWidgets_DIR" to a directory containing one of the above files. If "Qt5WebEngineWidgets" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): src/CMakeLists.txt:7 (find_package) -- Configuring incomplete, errors occurred! See also "/usr/obj/ports/nextcloud-desktop/build-amd64/CMakeFiles/CMakeOutput.log". *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2746 'do-configure') *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2766 '/usr/obj/ports/nextcloud-desktop/build-amd64/.configure_done') *** Error 1 in /usr/ports/net/nextcloud-desktop (/usr/ports/infrastructure/mk/bsd.port.mk:2451 'build')
nextcloud-desktop-2.3.4.tar.gz
Description: GNU Zip compressed data
nextcloud-desktop-2.4.0.tar.gz
Description: GNU Zip compressed data
nextcloud-desktop-2.5.3.tar.gz
Description: GNU Zip compressed data
nextcloud-desktop-2.6.2.tar.gz
Description: GNU Zip compressed data
signature.asc
Description: OpenPGP digital signature