Scenario: - FreeBSD v908.xyzzy 12.2-RELEASE-p7 FreeBSD 12.2-RELEASE-p7 9100a4e286a(MBi/releng/12.2) XYZZY_SMP_NOSPIN_HYPERV amd64 - latest ports - upgrading ports using "portmaster -a" Result: - upgrading nextcloudclient to 3.3.2 fails with "ld: error: unable to find library -lnextcloudsync_vfs_xattr" (multiple times) -- Martin
Check this: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257945#c2 Same here: [ 71%] Linking CXX executable ../bin/NotificationCacheTest cd /tmp/work/usr/ports/deskutils/nextcloudclient/work/.build/test && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/NotificationCacheTest.dir/link.txt --verbose=1 /usr/bin/c++ -O2 -pipe -march=core2 -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -isystem /usr/local/include -Wall -Wextra -pedantic -Wno-long-long -Wno-gnu-zero-variadic-macro-arguments -pedantic -O2 -pipe -march=core2 -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -isystem /usr/local/include -fstack-protector-strong -L/usr/local/lib CMakeFiles/NotificationCacheTest.dir/NotificationCacheTest_autogen/mocs_compilation.cpp.o CMakeFiles/NotificationCacheTest.dir/testnotificationcache.cpp.o -o ../bin/NotificationCacheTest -Wl,-rpath,/usr/local/lib/qt5:/tmp/work/usr/ports/deskutils/nextcloudclient/work/.build/src/libsync:/tmp/work/usr/ports/deskutils/nextcloudclient/work/.build/src/csync libtestutils.a ../src/gui/libnextcloudCore.a ../src/cmd/libcmdCore.a /usr/local/lib/qt5/libQt5Test.so.5.15.2 /usr/local/lib/qt5/libQt5Quick.so.5.15.2 -lnextcloudsync_vfs_xattr /usr/local/lib/qt5/libQt5Svg.so.5.15.2 /usr/local/lib/qt5/libQt5Widgets.so.5.15.2 /usr/local/lib/qt5/libQt5Xml.so.5.15.2 /usr/local/lib/qt5/libQt5QuickControls2.so.5.15.2 /usr/local/lib/qt5/libQt5Quick.so.5.15.2 /usr/local/lib/qt5/libQt5QmlModels.so.5.15.2 /usr/local/lib/qt5/libQt5Qml.so.5.15.2 /usr/local/lib/qt5/libQt5Gui.so.5.15.2 ../src/libsync/libnextcloudsync.so.3.3.5 /usr/lib/libssl.so /usr/lib/libcrypto.so /usr/local/lib/qt5/libQt5WebSockets.so.5.15.2 /usr/local/lib/qt5/libQt5Svg.so.5.15.2 /usr/local/lib/qt5/libQt5Widgets.so.5.15.2 /usr/local/lib/qt5/libQt5Gui.so.5.15.2 /usr/local/lib/libqt5keychain.so.0.12.0 /usr/local/lib/qt5/libQt5DBus.so.5.15.2 /usr/local/lib/libinotify.so ../src/csync/libnextcloud_csync.so.3.3.5 /usr/local/lib/libsqlite3.so /usr/local/lib/qt5/libQt5Concurrent.so.5.15.2 /usr/lib/libz.so /usr/local/lib/qt5/libQt5Network.so.5.15.2 /usr/local/lib/qt5/libQt5Core.so.5.15.2 /usr/local/lib/qt5/libQt5QmlModels.so.5.15.2 /usr/local/lib/qt5/libQt5Qml.so.5.15.2 /usr/local/lib/qt5/libQt5Network.so.5.15.2 /usr/local/lib/qt5/libQt5Gui.so.5.15.2 /usr/local/lib/qt5/libQt5Core.so.5.15.2 ld: error: unable to find library -lnextcloudsync_vfs_xattr c++: error: linker command failed with exit code 1 (use -v to see invocation) gmake[4]: *** [test/CMakeFiles/NotificationCacheTest.dir/build.make:150: bin/NotificationCacheTest] Error 1 gmake[4]: Leaving directory '/tmp/work/usr/ports/deskutils/nextcloudclient/work/.build' gmake[3]: *** [CMakeFiles/Makefile2:2212: test/CMakeFiles/NotificationCacheTest.dir/all] Error 2 gmake[3]: *** Waiting for unfinished jobs....
Seems to already be handled by bug #257945. Closing this one.
Looks like the issue is still present and caused by a bug in upstream build system, I'm testing a simple patch, I'll add it here as soon as I'm done testing it on my side.
Created attachment 228538 [details] patch Please test this simple patch, which I will send upstream, and report if it fixes the issue for you. The patch also removes a "DEBUG=yes" definition in the port Makefile I just noticed. AFAIK it's a noop, since that variable is not used by the framework, but it's better to remove it to avoid confusion in the future.
(In reply to Guido Falsi from comment #4) Build fine with this patch, thanks!
Sent the patch upstream as a pull request, added to See Also field.
This fixed the build in ports: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=228538&action=diff 3.3.5 does not build in ports without the ablove: [ 87%] Linking CXX executable ../bin/ChunkingNgTest cd /usr/ports/deskutils/nextcloudclient/work/.build/test && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/ChunkingNgTest.dir/link.txt --verbose=1 /usr/bin/c++ -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -isystem /usr/local/include -Wall -Wextra -pedantic -Wno-long-long -Wno-gnu-zero-variadic-macro-arguments -pedantic -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -isystem /usr/local/include -fstack-protector-strong -L/usr/local/lib CMakeFiles/ChunkingNgTest.dir/ChunkingNgTest_autogen/mocs_compilation.cpp.o CMakeFiles/ChunkingNgTest.dir/testchunkingng.cpp.o -o ../bin/ChunkingNgTest -Wl,-rpath,/usr/local/lib/qt5:/usr/ports/deskutils/nextcloudclient/work/.build/src/libsync:/usr/ports/deskutils/nextcloudclient/work/.build/src/csync libtestutils.a ../src/gui/libnextcloudCore.a ../src/cmd/libcmdCore.a /usr/local/lib/qt5/libQt5Test.so.5.15.2 /usr/local/lib/qt5/libQt5Quick.so.5.15.2 -lnextcloudsync_vfs_xattr /usr/local/lib/qt5/libQt5Svg.so.5.15.2 /usr/local/lib/qt5/libQt5Widgets.so.5.15.2 /usr/local/lib/qt5/libQt5Xml.so.5.15.2 /usr/local/lib/qt5/libQt5QuickControls2.so.5.15.2 /usr/local/lib/qt5/libQt5Quick.so.5.15.2 /usr/local/lib/qt5/libQt5QmlModels.so.5.15.2 /usr/local/lib/qt5/libQt5Qml.so.5.15.2 /usr/local/lib/qt5/libQt5Gui.so.5.15.2 ../src/libsync/libnextcloudsync.so.3.3.5 /usr/lib/libssl.so /usr/lib/libcrypto.so /usr/local/lib/qt5/libQt5WebSockets.so.5.15.2 /usr/local/lib/qt5/libQt5Svg.so.5.15.2 /usr/local/lib/qt5/libQt5Widgets.so.5.15.2 /usr/local/lib/qt5/libQt5Gui.so.5.15.2 /usr/local/lib/libqt5keychain.so.0.12.0 /usr/local/lib/qt5/libQt5DBus.so.5.15.2 /usr/local/lib/libinotify.so ../src/csync/libnextcloud_csync.so.3.3.5 /usr/local/lib/libsqlite3.so /usr/local/lib/qt5/libQt5Concurrent.so.5.15.2 /usr/lib/libz.so /usr/local/lib/qt5/libQt5Network.so.5.15.2 /usr/local/lib/qt5/libQt5Core.so.5.15.2 /usr/local/lib/qt5/libQt5QmlModels.so.5.15.2 /usr/local/lib/qt5/libQt5Qml.so.5.15.2 /usr/local/lib/qt5/libQt5Network.so.5.15.2 /usr/local/lib/qt5/libQt5Gui.so.5.15.2 /usr/local/lib/qt5/libQt5Core.so.5.15.2 ld: error: unable to find library -lnextcloudsync_vfs_xattr c++: error: linker command failed with exit code 1 (use -v to see invocation) gmake[4]: *** [test/CMakeFiles/ChunkingNgTest.dir/build.make:150: bin/ChunkingNgTest] Error 1
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=027ed04832c4160ac66139b8769a33d828ee7573 commit 027ed04832c4160ac66139b8769a33d828ee7573 Author: Guido Falsi <madpilot@FreeBSD.org> AuthorDate: 2021-10-29 09:13:03 +0000 Commit: Guido Falsi <madpilot@FreeBSD.org> CommitDate: 2021-10-29 09:13:03 +0000 deskutils/nextcloudclient: Fix build failure when tests are enabled Upstream build system tries to include a Linux only library in the build when tests are enabled. This patch has already been accepted upstream. PR: 258119 Approved by: Maintiner timeout Obtained from: https://github.com/nextcloud/desktop/pull/3880 deskutils/nextcloudclient/Makefile | 1 - .../files/patch-test_nextcloud__add__test.cmake (new) | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
Patch committed. Closing as fixed. Thanks!