Bug 272880 - devel/ccache4: Build failes with STATIC option
Summary: devel/ccache4: Build failes with STATIC option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-01 21:19 UTC by Adam Weinberger
Modified: 2023-08-02 11:33 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (bdrewery)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Weinberger freebsd_committer freebsd_triage 2023-08-01 21:19:45 UTC
With the STATIC option enabled, ccache4 fails because it tries to statically link with libzstd.so:

-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Using zstd from /usr/local/lib/libzstd.so
[...]
--- ccache ---
[ 98%] Linking CXX executable ccache
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/ccache.dir/link.txt --verbose=1
/ccache/libexec/ccache/c++ -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -DNDEBUG  -static -fstack-protector-strong CMakeFiles/ccache.dir/src/main.cpp.o -o ccache  -Wl,-rpath,/usr/local/lib: src/libccache_framework.a /usr/local/lib/libzstd.so -pthread src/third_party/libthird_party.a src/third_party/blake3/libblake3.a
ld: error: attempted static link of dynamic object /usr/local/lib/libzstd.so
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** [ccache] Error code 1

make[3]: stopped in /wrkdirs/usr/ports/devel/ccache4/work/.build
1 error

make[3]: stopped in /wrkdirs/usr/ports/devel/ccache4/work/.build
*** [CMakeFiles/ccache.dir/all] Error code 2

make[2]: stopped in /wrkdirs/usr/ports/devel/ccache4/work/.build
--- src/CMakeFiles/test-lockfile.dir/all ---
ld: error: attempted static link of dynamic object /usr/local/lib/libzstd.so
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** [src/test-lockfile] Error code 1

make[3]: stopped in /wrkdirs/usr/ports/devel/ccache4/work/.build
1 error
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-08-02 11:33:13 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=533e1cea6cd9c9b6b1afc2ece1648c70e8d7a4ed

commit 533e1cea6cd9c9b6b1afc2ece1648c70e8d7a4ed
Author:     Adam Weinberger <adamw@FreeBSD.org>
AuthorDate: 2023-08-02 10:53:26 +0000
Commit:     Adam Weinberger <adamw@FreeBSD.org>
CommitDate: 2023-08-02 10:54:07 +0000

    devel/ccache4: Fix build with STATIC option

    PR:             272880

 devel/ccache4/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)