Package Details: pcm 202409-1

Git Clone URL: https://aur.archlinux.org/pcm.git (read-only, click to copy)
Package Base: pcm
Description: Processor Counter Monitor
Upstream URL: https://github.com/intel/pcm
Licenses: BSD-3-Clause
Submitter: hexchain
Maintainer: hexchain
Last Packager: hexchain
Votes: 2
Popularity: 0.002139
First Submitted: 2020-01-13 14:22 (UTC)
Last Updated: 2024-10-22 13:56 (UTC)

Latest Comments

bsdice commented on 2024-10-28 17:10 (UTC)

Some linker problem. I was guessing Intel is using clang for their compiles.

namcap also complains about missing dependency openssl.

[57/85] Linking CXX shared library lib/libpcm.so
FAILED: lib/libpcm.so 
: && /usr/bin/c++ -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -Wno-unknown-pragmas -fPIC -DCMAKE_INSTALL_PREFIX="/usr" -Wextra -DPCM_USE_PERF -Wl,-z,now -Wall -O3 -rdynamic -fPIE -fstack-protector  -ftrapv  -fwrapv -fno-delete-null-pointer-checks -fno-strict-overflow -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now          -Wl,-z,pack-relative-relocs -flto=auto -shared -Wl,-soname,libpcm.so -o lib/libpcm.so src/CMakeFiles/PCM_SHARED.dir/pcm-core.cpp.o  src/libPCM_STATIC_SILENT.a && :
/usr/bin/ld: /tmp/ccOvDj4S.ltrans0.ltrans.o: warning: relocation against `_ZTIi@@CXXABI_1.3' in read-only section `.text'
/usr/bin/ld: /tmp/ccOvDj4S.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol `_ZSt4cerr@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

hexchain commented on 2024-10-28 16:58 (UTC)

@bsdice: what error did you see from GCC?

bsdice commented on 2024-10-28 16:41 (UTC)

Package did not compile for me. Another day another gcc problem. So I switched to clang.

--- PKGBUILD.ORIG   2024-10-28 17:34:25.000000000 +0100
+++ PKGBUILD    2024-10-28 17:35:57.179906456 +0100
@@ -1,6 +1,7 @@
 # Maintainer: hexchain <i at hexchain dot org>

-pkgname=pcm
+groups=(custom)
+pkgname=pcm-custom
 pkgver=202409
 pkgrel=1
 pkgdesc="Processor Counter Monitor"
@@ -9,12 +10,13 @@ arch=('x86_64')
 license=('BSD-3-Clause')
 depends=('bash' 'gcc-libs' 'glibc')
 makedepends=('cmake' 'git' 'ninja')
+_commit="cdb8aa13d12c251b9fd85f57305af3a7aab18038"
 source=(
-    "$pkgname::git+$url#tag=$pkgver"
+    "$pkgname::git+$url#commit=$_commit"
     "simdjson::git+https://github.com/simdjson/simdjson.git"
     "perfmon::git+https://github.com/intel/perfmon.git"
 )
-b2sums= ('3da732646dc8bfb8f5da1212f43491d36227229febe32a58448984675d988c5274c3275aa94aec1a1f8e09052bd5c69a9bea2116a63be53d530fee5f3096e008'
+b2sums=('SKIP'
         'SKIP'
         'SKIP')

@@ -26,19 +28,21 @@ prepare() {
     git config submodule.perfmon.url "$srcdir/perfmon"
     git -c protocol.file.allow=always submodule update

-    sed -i \
-        -e 's/-D_FORTIFY_SOURCE=.//' \
-        -e '/set(LINUX_SYSTEMD_UNITDIR/c set(LINUX_SYSTEMD_UNITDIR "${CMAKE_INSTALL_LIBDIR}/systemd/system")' \
-        "CMakeLists.txt"
+   cp CMakeLists.txt CMakeLists.txt.orig
+    sed -i -e 's/-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=3/' CMakeLists.txt
+    sed -i -e 's/-fno-strict-overflow //' CMakeLists.txt
+   diff -Nurp CMakeLists.txt.orig CMakeLists.txt || true
 }

 build() {
     cd "$srcdir"

+    export CC=clang
+    export CXX=clang++
+
     cmake -B build -G Ninja "$pkgname" \
         -DCMAKE_INSTALL_SBINDIR=bin \
         -DCMAKE_INSTALL_PREFIX=/usr \
-        -DPCM_NO_ASAN=ON \
         -DLINUX_SYSTEMD=ON
     cmake --build build
 }

hexchain commented on 2023-12-10 12:25 (UTC)

@lahwaacz: simdjson isn't in official repos, and is only required by pcm. By switching to the bundled version, one can now use extra-x86_64-build to produce the package in one go, without the need to build simdjson first. I would also very much like to use a packaged simdjson if it is in the official repo.

Also, simdjson is introduced as a git submodule and its version is decided by the pcm repo. It isn't simply an untagged master branch.

lahwaacz commented on 2023-12-10 11:48 (UTC)

What's wrong with building with system simdjson package? Bundling the dependency is not right, especially when the PKGBUILD references untagged sources from the master branch...

krzyszto commented on 2023-06-24 08:20 (UTC)

I can't build the project:

==> Making package: pcm 202302-1 (sob, 24 cze 2023, 09:19:54)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading pcm-202302.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1096k    0 1096k    0     0  1061k      0 --:--:--  0:00:01 --:--:-- 1061k
==> Validating source files with sha512sums...
    pcm-202302.tar.gz ... Passed
==> Extracting sources...
  -> Extracting pcm-202302.tar.gz with bsdtar
==> Starting build()...
-- The C compiler identification is GNU 13.1.1
-- The CXX compiler identification is GNU 13.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /nobackup/krzysztof/.cache/yay/pcm/src/build/CMakeFiles/CMakeScratch/TryCompile-utDA9I

    Run Build Command(s):/usr/bin/ninja -v cmTC_69e99 && [1/2] /usr/bin/cc   -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         ,-D_GLIBCXX_ASSERTIONS         -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -o CMakeFiles/cmTC_69e99.dir/testCCompiler.c.o -c /nobackup/krzysztof/.cache/yay/pcm/src/build/CMakeFiles/CMakeScratch/TryCompile-utDA9I/testCCompiler.c
    FAILED: CMakeFiles/cmTC_69e99.dir/testCCompiler.c.o 
    /usr/bin/cc   -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         ,-D_GLIBCXX_ASSERTIONS         -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -o CMakeFiles/cmTC_69e99.dir/testCCompiler.c.o -c /nobackup/krzysztof/.cache/yay/pcm/src/build/CMakeFiles/CMakeScratch/TryCompile-utDA9I/testCCompiler.c
    cc: warning: ,-D_GLIBCXX_ASSERTIONS: linker input file unused because linking not done
    cc: error: ,-D_GLIBCXX_ASSERTIONS: linker input file not found: No such file or directory
    ninja: build stopped: subcommand failed.





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:6 (project)


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().
    Aborting...