New package: Cockatrice-2.10.2#54508
Conversation
5c1b324 to
488fa90
Compare
|
Apologies for the build failures on other architectures. Doing some research, found the arch pkgbuild lists support for only i686 and x86_64, consistent with what I'm seeing here. Will update. |
488fa90 to
fe33bd8
Compare
|
Hello, I've looked into the build process using CMake, and it appears that the issue might be more related to crossbuilding than to the supported architectures. Specifically, CMake doesn't seem to find qt6 at this line and then fails after reaching this line, returning an error that qt was not found. Additionally, I noticed on Repology that there are ARM builds in the Arch derivatives, and I believe the package compiles on these architectures when not crossbuilt. Given this, it might be better to set |
fe33bd8 to
3f7994a
Compare
|
I've noticed that the build fails on musl. On my system, compiling for musl, if I add the following snippet: the build passes the previously failing part. |
6837ae7 to
17a03ea
Compare
|
During my initial testing I hadn't completed a full build, and only noticed the libexecinfo linking error when reviewing CI logs later. After reproducing the issue locally with a complete build, I resolved it by introducing an CMake patch for libexecinfo handlingdiff --git a/servatrice/CMakeLists.txt b/servatrice/CMakeLists.txt
index 2b34536..9f55dba 100644
--- a/servatrice/CMakeLists.txt
+++ b/servatrice/CMakeLists.txt
@@ -30,7 +30,7 @@ if(WIN32)
endif(WIN32)
# Under FreeBSD we need libexecinfo to use backtrace_symbols_fd()
-if(CMAKE_HOST_SYSTEM MATCHES "FreeBSD")
+if(CMAKE_HOST_SYSTEM MATCHES "FreeBSD" OR (ENABLE_LIBEXECINFO))
find_package(Libexecinfo REQUIRED)
set(SYSTEM_LIBRARIES ${EXECINFO_LIBRARY} ${SYSTEM_LIBRARIES})
endif()
@@ -105,7 +105,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Build servatrice binary and link it
add_executable(servatrice MACOSX_BUNDLE ${servatrice_MOC_SRCS} ${servatrice_RESOURCES_RCC} ${servatrice_SOURCES})
-if(CMAKE_HOST_SYSTEM MATCHES "FreeBSD")
+if(CMAKE_HOST_SYSTEM MATCHES "FreeBSD" OR (ENABLE_LIBEXECINFO))
target_link_libraries(servatrice cockatrice_common Threads::Threads ${SERVATRICE_QT_MODULES} ${LIBEXECINFO_LIBRARY})
else()
target_link_libraries(servatrice cockatrice_common Threads::Threads ${SERVATRICE_QT_MODULES})Key improvements:
Final template configuration# Template file for 'Cockatrice'
pkgname=Cockatrice
version=2.10.0
revision=1
build_style=cmake
configure_args="-DWITH_SERVER=1 -DWITH_CLIENT=1 -DWITH_ORACLE=1"
hostmakedepends="qt6-tools qt6-base pkg-config extra-cmake-modules protobuf zlib"
makedepends="qt6-base-devel liblzma-devel protobuf-devel qt6-svg-devel qt6-tools-devel
qt6-websockets-devel qt6-multimedia-devel abseil-cpp-devel"
short_desc="Cross-platform virtual tabletop for multiplayer card games"
maintainer="Jason Elswick <jason@jasondavid.us>"
license="GPL-2.0-only"
homepage="https://github.com/Cockatrice/Cockatrice"
distfiles="https://github.com/Cockatrice/${pkgname}/archive/refs/tags/2025-02-10-Release-${version}.tar.gz"
checksum=7c2855c7277f9f57bb92a43eb24fe4d488d6ddb8f46929f03eb9c09a026dded8
if [ -n "$CROSS_BUILD" ]; then
configure_args+="-DQt6_DIR=${XBPS_CROSS_BASE}/usr/lib/cmake/Qt6"
fi
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
# Musl does not provide backtrace_symbols_fd(), so libexecinfo is required
makedepends+=" libexecinfo-devel"
configure_args+=" -DENABLE_LIBEXECINFO=1"
fiVerification: Successfully built for:
|
17a03ea to
65c67a7
Compare
|
I have now changed the template to match what you have with the patch file as well. Thank you for taking a look, I didn't expect so many detailed and quick responses, there must have been demand to build this before. I am not a CMake or musl expert, but am learning more because of all this. The templates I had researched across the few other distros where this was built all had not only different versions of Cockatrice, but different sets of architectures listed. I had also attempted to build 2.9.x series before, and even had discussion with developers on their discord, but nothing they suggested could truly compile and had just thought to check for any new versions. Is the lack of tests acceptable here, since your template suggestion doesn't build them? I had not had any issues with tests failing on any builds I have done, but is there desire to potentially add googletest as a void package? |
|
Thank you for your response. I wasn’t entirely sure how the musl configuration should work, so I based my approach on other templates in the repository. Regarding the cross-compiling issue, here’s the error log I encountered: Cross-compiling issue-- Downloading googletest
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Warning (dev) at /usr/libexec/xbps-src/share/cmake-3.30/Modules/ExternalProject/shared_internal_commands.cmake:1282 (message):
The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
not set. The policy's OLD behavior will be used. When using a URL
download, the timestamps of extracted files should preferably be that of
the time of extraction, otherwise code that depends on the extracted
contents might not be rebuilt if the URL changes. The OLD behavior
preserves the timestamps from the archive instead, but this is usually not
what you want. Update your project to the NEW behavior or specify the
DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
robustness issue.
Call Stack (most recent call first):
/usr/libexec/xbps-src/share/cmake-3.30/Modules/ExternalProject.cmake:3035 (_ep_add_download_command)
CMakeLists.txt:6 (ExternalProject_Add)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /builddir/Cockatrice-2.10.0/build/gtest-download
[1/9] Creating directories for 'googletest'
[2/9] Performing download step (download, verify and extract) for 'googletest'
FAILED: googletest-prefix/src/googletest-stamp/googletest-download /builddir/Cockatrice-2.10.0/build/gtest-download/googletest-prefix/src/googletest-stamp/googletest-download
cd /builddir/Cockatrice-2.10.0/build && /usr/libexec/xbps-src/bin/cmake -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE -P /builddir/Cockatrice-2.10.0/build/gtest-download/googletest-prefix/src/googletest-stamp/download-googletest.cmake && /usr/libexec/xbps-src/bin/cmake -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE -P /builddir/Cockatrice-2.10.0/build/gtest-download/googletest-prefix/src/googletest-stamp/verify-googletest.cmake && /usr/libexec/xbps-src/bin/cmake -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE -P /builddir/Cockatrice-2.10.0/build/gtest-download/googletest-prefix/src/googletest-stamp/extract-googletest.cmake && /usr/libexec/xbps-src/bin/cmake -E touch /builddir/Cockatrice-2.10.0/build/gtest-download/googletest-prefix/src/googletest-stamp/googletest-download
-- Downloading...
dst='/builddir/Cockatrice-2.10.0/build/gtest-download/googletest-prefix/src/release-1.11.0.zip'
timeout='none'
inactivity timeout='none'
-- Using src='https://github.com/google/googletest/archive/release-1.11.0.zip'
CMake Error at gtest-download/googletest-prefix/src/googletest-stamp/download-googletest.cmake:163 (message):
Each download failed!
error: downloading 'https://github.com/google/googletest/archive/release-1.11.0.zip' failed
status_code: 1
status_string: "Unsupported protocol, xbps-src's cmake has no network"
log:
--- LOG BEGIN ---
Protocol "https" not supported
Closing connection
--- LOG END ---
ninja: build stopped: subcommand failed.
CMake Error at tests/CMakeLists.txt:32 (add_subdirectory):
The source directory
/builddir/Cockatrice-2.10.0/build/gtest-src
does not contain a CMakeLists.txt file.
CMake Error at tests/CMakeLists.txt:36 (target_include_directories):
Cannot specify include directories for target "gtest" which is not built by
this project.
-- Configuring incomplete, errors occurred!
=> ERROR: Cockatrice-2.10.0_1: do_configure: 'CFLAGS="-DNDEBUG ${CFLAGS/ -pipe / }" CXXFLAGS="-DNDEBUG ${CXXFLAGS/ -pipe / }" cmake ${cmake_args} ${configure_args} ${LIBS:+-DCMAKE_C_STANDARD_LIBRARIES="$LIBS"} ${LIBS:+-DCMAKE_CXX_STANDARD_LIBRARIES="$LIBS"} ${wrksrc}/${build_wrksrc}' exited with 1
=> ERROR: in do_configure() at common/build-style/cmake.sh:77I resolved this error by using the To re-enable tests in the template, add |
65c67a7 to
dd8d87a
Compare
|
Good catch, did not see the gtest, I only searched for 'googletest' in packages. Thank you for your help, it tested/compiled again on my end. |
|
Hi, While updating Because of that, I modified the build system logic to only enable tests on By observing the CI system, I believe it doesn’t run crossbuilds with The updated template is below: Template Updated# Template file for 'Cockatrice'
pkgname=Cockatrice
version=2.10.2
revision=1
build_style=cmake
configure_args="-DWITH_SERVER=1 -DWITH_CLIENT=1 -DWITH_ORACLE=1"
hostmakedepends="qt6-tools qt6-base pkg-config extra-cmake-modules protobuf zlib"
makedepends="qt6-base-devel liblzma-devel protobuf-devel qt6-svg-devel qt6-tools-devel
qt6-websockets-devel qt6-multimedia-devel abseil-cpp-devel"
checkdepends="gtest-devel"
short_desc="Cross-platform virtual tabletop for multiplayer card games"
maintainer="Jason Elswick <jason@jasondavid.us>"
license="GPL-2.0-only"
homepage="https://github.com/Cockatrice/Cockatrice"
distfiles="https://github.com/Cockatrice/Cockatrice/archive/refs/tags/2025-04-03-Release-${version}.tar.gz"
checksum=73cabec34604261b3ec2beb66b6a11faff0b0d1ca50f25cc58a45325a39225d4
if [ -n "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DTEST=1"
fi
if [ -n "$CROSS_BUILD" ]; then
configure_args+=" -DQt6_DIR=${XBPS_CROSS_BASE}/usr/lib/cmake/Qt6"
fi
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" libexecinfo-devel"
configure_args+=" -DENABLE_LIBEXECINFO=1"
fi |
|
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it. |
Testing the changes
New package
Local build testing