Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ola doesn't build with gcc 14.1.1 #448

Closed
cbix opened this issue Jul 15, 2024 · 3 comments · Fixed by #463
Closed

ola doesn't build with gcc 14.1.1 #448

cbix opened this issue Jul 15, 2024 · 3 comments · Fixed by #463
Assignees
Labels
bug Something isn't working

Comments

@cbix
Copy link
Member

cbix commented Jul 15, 2024

@cbix cbix added the bug Something isn't working label Jul 15, 2024
@topas-rec
Copy link

For me ola currently doesn't build with the current PKGBUILD from AUR ola on arch.
I guess, this issue is about this problem, since I have the same problems as the linked issue.

I have a patch that fixes the build and creates a package that c
an be used successfully.
fix_build_with_gcc_14.zip

I wonder how to proceed, because:

  • the patch only works for the source code from the release 0.10.9 of ola
  • ola master branch needs slightly different fixes.

Because of this I think doesn't make sense to submit this patch to upstream.
My suggestion is that

  • this patch is added to the arch PKGBUILD (the package)
  • I try to create a pull request that fixes the issue upstream

Do you agree?

@topas-rec
Copy link

PKGBUILD that uses the patch PKGBUILD that uses the patch
# Maintainer: OSAMC <https://github.com/osam-cologne/archlinux-proaudio>
# Contributor: Florian Hülsmann <[email protected]>

pkgbase=ola
pkgname=(ola ola-docs)
pkgver=0.10.9
pkgrel=7
pkgdesc='Open Lighting Architecture for controlling entertainment lighting equipment'
arch=(x86_64 aarch64)
url='https://www.openlighting.org'
license=(LGPL2.1 GPL2)
depends=()
makedepends=(avahi cppunit doxygen flake8 libftdi-compat liblo libmicrohttpd ncurses protobuf-21
  python-numpy python-protobuf util-linux-libs)
source=("$pkgbase-$pkgver.tar.gz::https://github.com/OpenLightingProject/$pkgbase/archive/refs/tags/$pkgver.tar.gz"
        "fix-protobuf-v20.patch::https://github.com/OpenLightingProject/$pkgbase/pull/1875.patch"
        "fix-liblo.patch::https://github.com/OpenLightingProject/$pkgbase/pull/1954.patch"
        "fix_build_with_gcc_14.patch")
sha256sums=('d2a80d907f5a0a5169583060bd32aa0fdbb2fdfe18d1194dd922595ab6d447b5'
            '6e57bb39c94981f62da6cd6b5c2744ace8ebe4b7b9fa8ee383800c1e3b8d6742'
            '3a85761affce7e6c1ea5bdc29b6c1774e8d3a2cc4bb6fc52daac871cf72cf3ca'
            'SKIP')
options=(!lto)

prepare() {
  cd $pkgbase-$pkgver
  # https://github.com/OpenLightingProject/ola/pull/1875
  patch -p1 -i ../fix-protobuf-v20.patch
  # https://github.com/OpenLightingProject/ola/pull/1954
  patch -Np1 -i ../fix-liblo.patch
  patch -p1 -i ../fix_build_with_gcc_14.patch
}

build() {
  local config_options=(
    --prefix=/usr
    --enable-silent-rules
    --enable-python-libs
    --enable-rdm-tests
    --enable-ja-rule
    --enable-e133
    --with-protoc=protoc-21
    #--enable-java-libs
  )
  cd $pkgbase-$pkgver
  autoreconf -i
  export CXXFLAGS="$CXXFLAGS -I/usr/include/abseil-cpp11 -I/usr/include/protobuf-21"
  export LDFLAGS="$LDFLAGS -L/usr/lib/protobuf-21"
  ./configure "${config_options[@]}"
  make
  make doxygen-doc
}

check() {
  cd $pkgbase-$pkgver
  make check || (cat ./test-suite.log && false)
}

package_ola() {
  depends+=(avahi libftdi-compat liblo.so libmicrohttpd.so libncursesw.so libprotobuf.so libuuid.so)
  optdepends=('python: for python bindings'
              'python-numpy: for python bindings'
              'python-protobuf: for python bindings')
  cd $pkgbase-$pkgver
  make DESTDIR="$pkgdir" install
}

package_ola-docs() {
  pkgdesc+=' (documentation)'
  arch=(any)
  cd $pkgbase-$pkgver
  mkdir -p "$pkgdir"/usr/share/doc/$pkgbase
  cp -a html/* "$pkgdir"/usr/share/doc/$pkgbase
}

@SpotlightKid
Copy link
Member

@topas-rec Many thanks for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants