christophe-calmejane / Hive

ProAudio, AVnu Alliance Milan compatible, ATDECC (AVDECC) Controller
GNU General Public License v3.0
121 stars 16 forks source link

Compilation on ARCH Linux #176

Open revast opened 1 month ago

revast commented 1 month ago

With latest Release Tag => Compiles

git clone --branch v1.3.1.1 https://github.com/christophe-calmejane/Hive cd Hive && cp .hive_config.sample .hive_config && ./setup_fresh_env.sh

./gen_cmake.sh -release -qtvers 6.7.2 -qtdir /usr/lib/cmake/ cd _build_linux_x64_makefiles_release/ && cmake --build . --config Release

Simple WIP PKGBUILD File:

# Maintainer: revast  <revast@revast.com>
pkgname=hive
pkgver=1.3.1.1  
pkgrel=1
pkgdesc="Hive: An open-source ProAudio, AVnu Alliance Milan compatible, ATDECC (AVDECC) Controller"
arch=('x86_64')
url="https://github.com/christophe-calmejane/Hive"
license=('GPL')  # Replace with the correct license
depends=('qt6-base')
makedepends=('cmake' 'qt6-base' 'git')
source=("git+https://github.com/christophe-calmejane/Hive.git#tag=v1.3.1.1")
sha256sums=('SKIP')  # Replace with actual checksums or leave as SKIP for git sources

build() {
    cd "${srcdir}/Hive"

    # Copy the configuration file
    cp .hive_config.sample .hive_config

    # Set up the fresh environment
    ./setup_fresh_env.sh

    # Generate CMake files with specific Qt version and directory
    ./gen_cmake.sh -release -qtvers 6.7.2 -qtdir /usr/lib/cmake/

    # Change to build directory
    cd _build_linux_x64_makefiles_release

    # Build the project
    cmake --build . --config Release
}

package() {

    cd "${srcdir}/Hive/_build_linux_x64_makefiles_release/Install"

    # Install the built files
    install -Dm755 "bin/Hive" "${pkgdir}/usr/bin/Hive"
    install -Dm755 "bin/AEMDumper" "${pkgdir}/usr/bin/AEMDumper"
    install -Dm755 "bin/json2msgPack" "${pkgdir}/usr/bin/json2msgPack"
    install -Dm755 "bin/msgPack2json" "${pkgdir}/usr/bin/msgPack2json"
    install -Dm755 "lib/libla_avdecc_controller_cxx.so.4" "${pkgdir}/usr/lib/libla_avdecc_controller_cxx.so.4"
    install -Dm755 "lib/libla_avdecc_controller_cxx.so.4.0.0.15" "${pkgdir}/usr/bin/libla_avdecc_controller_cxx.so.4.0.0.15"
    install -Dm755 "lib/libla_avdecc_cxx.so.4" "${pkgdir}/usr/bin/libla_avdecc_cxx.so.4"
    install -Dm755 "lib/libla_avdecc_controller_cxx.so.4.0.0.11" "${pkgdir}/usr/lib/libla_avdecc_controller_cxx.so.4.0.0.11"
    # Manually strip libraries (/usr/lib/)
    find "${pkgdir}/usr/lib" -name '*.so' -exec strip --strip-unneeded {} +
    # Generate .desktop file dynamically
    echo "[Desktop Entry]
 Version=1.0
 Type=Application
 Name=Hive
 Exec=Hive
 Comment=A pro audio, AVB/Milan-compatible Avdecc (IEEE Std 1722.1) controller. Hive allows you to inspect, configure and connect AVB Entities on your network, specifically targeting AVnu Milan compatible devices
 Icon=hive
 Terminal=false
 Categories=Utility;" > "${pkgdir}/usr/share/applications/hive.desktop"
    install -Dm644 ${srcdir}/Hive/resources/Raw/Icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/hive.svg"

}

With git master => Currently Fails (as of 10/09/24)

git clone https://github.com/christophe-calmejane/Hive cd Hive && cp .hive_config.sample .hive_config && ./setup_fresh_env.sh

Fetching submodules... done
Fetching submodules... done
done
All done!

./gen_cmake.sh -release -qtvers 6.7.2 -qtdir /usr/lib/cmake/

Full Output: https://pastebin.com/HqUg8LyR

cd _build_linux_x64_makefiles_release/ && cmake --build . --config Release

Full Output: https://pastebin.com/ZsjWXhcW

  3%] Building CXX object 3rdparty/avdecc/src/CMakeFiles/la_avdecc_cxx.dir/avdecc.cpp.o
[  3%] Building CXX object 3rdparty/avdecc/src/CMakeFiles/la_avdecc_cxx.dir/endStationImpl.cpp.o
In file included from /home/hero/Build/Hive/Hive/3rdparty/avdecc/externals/3rdparty/fmtlib/include/fmt/format.h:36,
                 from /home/hero/Build/Hive/Hive/3rdparty/avdecc/src/logHelper.hpp:39,
                 from /home/hero/Build/Hive/Hive/3rdparty/avdecc/src/entity/entityImpl.hpp:34,
                 from /home/hero/Build/Hive/Hive/3rdparty/avdecc/src/entity/controllerEntityImpl.hpp:33,
                 from /home/hero/Build/Hive/Hive/3rdparty/avdecc/src/endStationImpl.cpp:26:
/home/hero/Build/Hive/Hive/3rdparty/avdecc/externals/3rdparty/fmtlib/include/fmt/core.h:369:6: error: identifier ‘char8_t’ is a keyword in C++20 [-Werror=c++20-compat]
  369 | enum char8_t : unsigned char {};
      |      ^~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [3rdparty/avdecc/src/CMakeFiles/la_avdecc_cxx.dir/build.make:90: 3rdparty/avdecc/src/CMakeFiles/la_avdecc_cxx.dir/endStationImpl.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1278: 3rdparty/avdecc/src/CMakeFiles/la_avdecc_cxx.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
christophe-calmejane commented 1 month ago

Hi. Neither Qt7 not c++20 is supported by hive/avdecc yet. What is strange here is that I specifically ask for c++17, so I don't understand why the compiler complains.

revast commented 1 month ago

Hi, I sadly have no clue either, but am happy that the tagged release version is compiling well. I will try to get that PKGBUILD into AUR if time permits.