serge-sans-paille / frozen

a header-only, constexpr alternative to gperf for C++14 users
Apache License 2.0
1.27k stars 103 forks source link

Use ARCH_INDEPENDENT when available #167

Closed topazus closed 7 months ago

topazus commented 7 months ago

Close #166

serge-sans-paille commented 7 months ago

Maybe we should add some tests for this... would you be in to do so?

topazus commented 7 months ago

@serge-sans-paille I open a PR of frozen package on Fedora src, https://src.fedoraproject.org/rpms/frozen/pull-request/1 . After using the new frozen-1.1.1-4 package on Fedora koji, the error was solved, which the error appeared when using frozen-devel-1.1.1-3.fc39.noarch.

Ref: https://kojipkgs.fedoraproject.org//work/tasks/8608/110458608/frozen-devel-1.1.1-4.fc40.noarch.rpm

some digging tests:

```bash ❯ rpm -q frozen-devel frozen-devel-1.1.1-3.fc39.noarch ruby in 🌐 fedora in ~/fedora-src/cmake-test via △ v3.28.0-rc3 ❯ rm -rf build/ && cmake . -B build -- The CXX compiler identification is GNU 13.2.1 -- The C compiler identification is GNU 13.2.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/lib64/ccache/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/lib64/ccache/cc - skipped -- Detecting C compile features -- Detecting C compile features - done CMake Error at CMakeLists.txt:9 (find_package): Could not find a configuration file for package "frozen" that is compatible with requested version "". The following configuration files were considered but not accepted: /usr/share/cmake/frozen/frozenConfig.cmake, version: 1.1.0 (32bit) -- Configuring incomplete, errors occurred! ruby in 🌐 fedora in ~/fedora-src/cmake-test via △ v3.28.0-rc3 ❯ sudo dnf5 install https://kojipkgs.fedoraproject.org//work/tasks/8608/110458608/frozen-devel-1.1.1-4.fc40.noarch.rpm Updating and loading repositories: Repositories loaded. https://kojipkgs.fedoraproject.org//work/tasks/8608/110458608/frozen-devel-1.1.1-4.fc40.noarch.rpm 100% | 10.0 KiB/s | 46.9 KiB | 00m05s Package Arch Version Repository Size Upgrading: frozen-devel noarch 1.1.1-4.fc40 @commandline 245.4 KiB replacing frozen-devel noarch 1.1.1-3.fc39 rawhide 245.9 KiB Transaction Summary: Upgrading: 1 packages Replacing: 1 packages Total size of inbound packages is 47 KiB. Need to download 0 B. After this operation 459 B will be freed (install 245 KiB, remove 246 KiB). Is this ok [y/N]: y Running transaction [1/4] Verify package files 100% | 333.0 B/s | 1.0 B | 00m00s [2/4] Prepare transaction 100% | 4.0 B/s | 2.0 B | 00m00s [3/4] Upgrading frozen-devel-0:1.1.1-4.fc40.noarch 100% | 6.4 MiB/s | 250.7 KiB | 00m00s [4/4] Erasing frozen-devel-0:1.1.1-3.fc39.noarch 100% | 69.0 B/s | 35.0 B | 00m01s Warning: skipped PGP checks for 1 package(s). ruby in 🌐 fedora in ~/fedora-src/cmake-test via △ v3.28.0-rc3 took 10s ❯ rm -rf build/ && cmake . -B build -- The CXX compiler identification is GNU 13.2.1 -- The C compiler identification is GNU 13.2.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/lib64/ccache/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/lib64/ccache/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Configuring done (0.3s) -- Generating done (0.0s) -- Build files have been written to: /home/ruby/fedora-src/cmake-test/build ruby in 🌐 fedora in ~/fedora-src/cmake-test via △ v3.28.0-rc3 ❯ cat CMakeLists.txt cmake_minimum_required(VERSION 3.24) project( test VERSION "1.0.0" LANGUAGES CXX C ) find_package(frozen REQUIRED) ```