Comments (15)
might be that a simple sed -i '/utils_test/d' CMakeLists.txt
makes the most sense in the context of the RPM spec, not sure but it's what I'll go with for now.
from dwarfs.
I've got an idea. Here's the code from googletest that the linker complains about:
Thanks for this, these explanations made it much easier to package the current version of dwarfs
in nixpkgs.
from dwarfs.
the specfile:
Name: dwarfs
Version: 0.8.0
Release: 1%{?dist}
Summary: A fast high compression read-only file system
License: GPLv3
URL: https://github.com/mhx/%{name}
Source0: https://github.com/mhx/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
Requires: boost-chrono
Requires: boost-iostreams
Requires: boost-program-options
Requires: bzip2-libs
Requires: double-conversion
Requires: fmt
Requires: gflags
Requires: glog
Requires: jemalloc
Requires: libacl
Requires: libarchive
Requires: libattr
Requires: libbrotli
Requires: libstdc++
Requires: libunwind
Requires: libxml2
Requires: libzstd
Requires: lz4-libs
Requires: openssl-libs
Requires: xxhash-libs
Requires: xz-libs
Requires: zlib
BuildRequires: binutils-devel
BuildRequires: bison
BuildRequires: boost-chrono
BuildRequires: boost-context
BuildRequires: boost-devel
BuildRequires: boost-filesystem
BuildRequires: boost-iostreams
BuildRequires: boost-program-options
BuildRequires: boost-regex
BuildRequires: boost-system
BuildRequires: boost-thread
BuildRequires: brotli-devel
BuildRequires: ccache
BuildRequires: clang
BuildRequires: cmake
BuildRequires: date-devel
BuildRequires: double-conversion-devel
BuildRequires: elfutils-devel
BuildRequires: file-devel
BuildRequires: flac-devel
BuildRequires: flex
BuildRequires: fmt-devel
BuildRequires: fuse3
BuildRequires: fuse3-devel
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: git
BuildRequires: glog-devel
BuildRequires: gmock-devel
BuildRequires: google-benchmark-devel
BuildRequires: gtest-devel
BuildRequires: jemalloc-devel
BuildRequires: libacl-devel
BuildRequires: libarchive-devel
BuildRequires: libdwarf-devel
BuildRequires: libevent-devel
BuildRequires: libunwind-devel
BuildRequires: lz4-devel
BuildRequires: make
BuildRequires: ninja-build
BuildRequires: openssl-devel
BuildRequires: pkgconf
BuildRequires: rubygem-ronn-ng
BuildRequires: utf8cpp-devel
BuildRequires: xxhash-devel
BuildRequires: xz-devel
%description
DwarFS is a read-only file system with a focus on achieving very high compression ratios in particular for very redundant data.
%prep
%autosetup
%build
%cmake -DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DWITH_TESTS=ON \
-DPREFER_SYSTEM_GTEST=ON \
-DPREFER_SYSTEM_LIBFMT=ON \
-DPREFER_SYSTEM_XXHASH=ON \
-DPREFER_SYSTEM_ZSTD=ON \
-DWITH_MAN_OPTION=OFF
%cmake_build
%check
%ctest
%install
%cmake_install
%files
%license LICENSE
%{_bindir}/dwarfsbench
%{_bindir}/dwarfsck
%{_bindir}/dwarfsextract
%{_bindir}/mkdwarfs
%{_sbindir}/dwarfs
%{_sbindir}/mount.dwarfs
%doc %{_mandir}/man1/dwarfs.1.gz
%doc %{_mandir}/man1/dwarfsck.1.gz
%doc %{_mandir}/man1/dwarfsextract.1.gz
%doc %{_mandir}/man1/mkdwarfs.1.gz
%doc %{_mandir}/man5/dwarfs-format.5.gz
%changelog
* Fri Jan 12 2024 silentnoodle - 0.7.4-1
- rewritten spec
from dwarfs.
You're not using PREFER_SYSTEM_GTEST
by any chance? Looks like it has a problem finding the right symbols in the gtest library.
from dwarfs.
I am using PREFER_SYSTEM_GTEST
yes
from dwarfs.
Did you try without? Maybe the system version is too old or otherwise broken.
from dwarfs.
It works without. The version of system gtest is 1.14.0 and it worked for dwarfs 0.7.5 and 0.7.4
from dwarfs.
I've got an idea. Here's the code from googletest that the linker complains about:
#ifdef __cpp_lib_char8_t
void PrintU8StringTo(const ::std::u8string& s, ostream* os) {
PrintCharsAsStringTo(s.data(), s.size(), os);
}
#endif
I reckon the system-installed version of googletest is built using an older C++ standard and the compiler isn't defining __cpp_lib_char8_t
.
This worked with 0.7.5 / 0.7.4 simply because there's a lot more tests in 0.8.0. :)
from dwarfs.
BTW, Google itself recommends that projects include gtest rather than using a system-installed version. Since this is only a build-time dependency, it doesn't matter at all for the build artifacts, which don't even link against gtest.
You can get into all sorts of issues when linking code produced with different -std=
flags if you're not extremely careful.
from dwarfs.
It's not a hard requirement but it would be preferable to be able to run the build offline, do you have any recommendations?
from dwarfs.
I actually do, because I occasionally work offline as well and have added a thing to the CMakeLists.txt
for that:
if(DEFINED ENV{DWARFS_LOCAL_REPO_PATH})
set(LIBFMT_GIT_REPO $ENV{DWARFS_LOCAL_REPO_PATH}/fmt)
set(GOOGLETEST_GIT_REPO $ENV{DWARFS_LOCAL_REPO_PATH}/googletest)
else()
set(LIBFMT_GIT_REPO https://github.com/fmtlib/fmt.git)
set(GOOGLETEST_GIT_REPO https://github.com/google/googletest.git)
endif()
So you could set DWARFS_LOCAL_REPO_PATH
to a local directory with clones of the fmt
and googletest
repos. It works fine for my development needs, but I'd be reluctant to add it to a packaging definition.
I could ship a copy of gtest in the dwarfs tarball, but then again, it's rather big already.
I reckon the system-installed version of googletest is built using an older C++ standard and the compiler isn't defining
__cpp_lib_char8_t
.
I just had a look at the gtest CMakeLists.txt, and it doesn't explicitly define a C++ standard, which means it'll use the compiler's default, which is currently C++17 (or even older, depending on the compiler version). C++17 indeed doesn't define __cpp_lib_char8_t
, so that why it doesn't work with the system-installed gtest.
As a last resort, you could patch utils_test
out of the CMakeLists.txt, I believe that's the only test dealing with UTF8-strings.
from dwarfs.
I could add the googletest tarball as an additional source, but would fmt also need to not be the system installed version for DWARFS_LOCAL_REPO_PATH
to ve usable?
from dwarfs.
If you set PREFER_SYSTEM_LIBFMT
, you don't need fmt
to be present. Keep in mind that you'd need to tarball the git repo of gtest for this to work.
from dwarfs.
might be that a simple
sed -i '/utils_test/d' CMakeLists.txt
makes the most sense in the context of the RPM spec, not sure but it's what I'll go with for now.
Definitely makes sense. These tests are primarily to make sure the code doesn't break when it's being worked on. If you're still running the remainder of the tests that's going to be good enough.
from dwarfs.
I'll close this as there isn't really much that can trivially be done here. The best option is really not to use the system installed gtest.
from dwarfs.
Related Issues (20)
- Fuse Passthrough
- Are the prebuilt binaries affected by xz/liblzma backdoor? HOT 6
- [Feature request] Allow providing dwarfs with a dedup library HOT 4
- official debian package, allow building without git? HOT 4
- mkdwarfs always crashes with SIGABRT HOT 13
- [MacOS] DwarFS mount not seen through Finder HOT 5
- [Core Dump] Signal 7 (SIGBUS) (code: nonexistent physical address) on making archive of currently running OS (possibly bad use case) HOT 2
- Homebrew formula HOT 27
- some problem on the README.md files. Please Check up and Fix. HOT 1
- read scalability issues with large archives HOT 9
- Unexpected exception: `inode has no file (any)` HOT 8
- [Feature Request] Mounting multiple archives to the same path HOT 12
- Segfault when using the mold linker HOT 2
- Cannot build v0.9.9 on Ubuntu 22.04 HOT 5
- Vendor fbthrift & folly using vcpkg HOT 2
- exception thrown in worker thread: class dwarfs::runtime_error: lzma_stream_encoder HOT 2
- [Feature Request] Provide non-generic packaging CI for major linux distributions HOT 2
- Document memory behaviour and give tips for dealing with many files HOT 4
- Gentoo ebuild for v0.10.0 HOT 5
- Window's build can't bind some files (big one) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dwarfs.