Package Details: catch2-git 3.1.1.r45.gb65c0e27-1

Git Clone URL: https://aur.archlinux.org/catch2-git.git (read-only, click to copy)
Package Base: catch2-git
Description: Modern, C++-native, header-only, test framework for unit-tests, TDD and BDD (developmental version)
Upstream URL: https://github.com/catchorg/catch2
Licenses: boost
Conflicts: catch2
Provides: catch2
Submitter: rsa
Maintainer: xiretza
Last Packager: xiretza
Votes: 5
Popularity: 0.000007
First Submitted: 2018-02-27 04:45 (UTC)
Last Updated: 2022-11-10 18:37 (UTC)

Dependencies (3)

Required by (68)

Sources (3)

Latest Comments

salimp commented on 2023-12-30 11:00 (UTC) (edited on 2023-12-30 11:36 (UTC) by salimp)

it still fails for me . same error as others;

patching file src/CMakeLists.txt
Hunk #1 FAILED at 332.
Hunk #2 FAILED at 385.

I believe the build() section should be similar to the one on the official repos; https://gitlab.archlinux.org/archlinux/packaging/packages/catch2/-/blob/main/PKGBUILD?ref_type=heads

zjeffer commented on 2023-12-29 19:17 (UTC) (edited on 2023-12-29 19:17 (UTC) by zjeffer)

Build fails on latest version:

==> Making package: catch2-git 3.1.1.r45.gb65c0e27-1 (Fri 29 Dec 2023 08:16:56 PM CET)
==> Retrieving sources...
  -> Updating Catch2 git repo...
remote: Enumerating objects: 2, done.
remote: Counting objects: 100% (2/2), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 2 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (2/2), 1.59 KiB | 1.59 MiB/s, done.
From https://github.com/catchorg/Catch2
 + bd900bf0...8abd6f1a refs/pull/2359/merge -> refs/pull/2359/merge  (forced update)
  -> Found 0001-Remove-misguided-attempt-at-reproducibility-that-bre.patch
  -> Found 0002-ApprovalTests-fix-path-rewriting-for-debug-builds.patch
==> Validating source files with sha256sums...
    Catch2 ... Skipped
    0001-Remove-misguided-attempt-at-reproducibility-that-bre.patch ... Passed
    0002-ApprovalTests-fix-path-rewriting-for-debug-builds.patch ... Passed
==> Making package: catch2-git 3.1.1.r45.gb65c0e27-1 (Fri 29 Dec 2023 08:16:57 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating Catch2 git repo...
  -> Found 0001-Remove-misguided-attempt-at-reproducibility-that-bre.patch
  -> Found 0002-ApprovalTests-fix-path-rewriting-for-debug-builds.patch
==> Validating source files with sha256sums...
    Catch2 ... Skipped
    0001-Remove-misguided-attempt-at-reproducibility-that-bre.patch ... Passed
    0002-ApprovalTests-fix-path-rewriting-for-debug-builds.patch ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of Catch2 git repo...
Cloning into 'Catch2'...
done.
==> Starting prepare()...
patching file src/CMakeLists.txt
Hunk #1 FAILED at 332.
Hunk #2 FAILED at 385.
2 out of 2 hunks FAILED -- saving rejects to file src/CMakeLists.txt.rej
==> ERROR: A failure occurred in prepare().
    Aborting...
error: failed to build 'catch2-git-3.1.1.r45.gb65c0e27-1':

abouvier commented on 2022-12-31 20:50 (UTC) (edited on 2022-12-31 20:51 (UTC) by abouvier)

You should add CXXFLAGS+=" -ffat-lto-objects" before the cmake invocation in build() to support LTO.

You should also replace make -C build by cmake --build build, make -C build test by ctest --test-dir build and make -C build DESTDIR="$pkgdir" install by DESTDIR="$pkgdir" cmake --install build to support different cmake generators.

xiretza commented on 2022-11-10 18:37 (UTC)

@atomo: thanks for the actionable issue report; fixed now.

atomo commented on 2022-11-10 11:51 (UTC)

==> Starting prepare()...
patching file src/CMakeLists.txt
Hunk #1 FAILED at 252.
Hunk #2 succeeded at 385 with fuzz 1 (offset 83 lines).
1 out of 2 hunks FAILED -- saving rejects to file src/CMakeLists.txt.rej
==> ERROR: A failure occurred in prepare().
    Aborting...
error: failed to build 'catch2-git-3.0.0.preview4.r48.g81f612c9-1': 
error: packages failed to build: catch2-git-3.0.0.preview4.r48.g81f612c9-1

kronikpillow commented on 2022-11-09 23:15 (UTC)

this package doesn't build :(

alecto commented on 2021-10-14 23:50 (UTC)

A few comments on the package:

  • It fails when starting check() because there's no longer a 'test' target in the makefile generated by CMake
  • would it be possible to build Catch2 in release mode?

jamespharvey20 commented on 2019-05-11 11:13 (UTC)

Adopted and fixed.

schnedan commented on 2019-02-28 22:07 (UTC)

just cloned the current from github... out of source builds works perfectly,...

neroburner commented on 2019-01-15 19:10 (UTC) (edited on 2019-01-15 19:11 (UTC) by neroburner)

package does not build anymore. I think it does not like the in-source build

[ 1%] Linking CXX executable SelfTest /bin/ld: cannot open output file SelfTest: Is a directory

can be fixed with out of tree build

build() {
    cmake -S "$srcdir/$_gitname" -B "$srcdir/$_gitname/_build" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" -DCMAKE_INSTALL_LIBDIR="lib"
    cmake --build "$srcdir/$_gitname/_build"
}
check() {
    cmake -S "$srcdir/$_gitname" -B "$srcdir/$_gitname/_build" -DBUILD_TESTING=ON
    cmake --build "$srcdir/$_gitname/_build" --target test
}
package() {
    cmake --build "$srcdir/$_gitname/_build" --target install
}