Menu

#2246 reSIDfp build error

v3.x
open
dqh
None
GTK3
Buildsystem
2026-08-08
2026-08-07
rice123
No

https://github.com/VICE-Team/svn-mirror/commit/008423c869d694784ed9ad99055add5d8a27fbbd added -fno-exceptions to CXXFLAGS:

    dnl Set CXXFLAGS. Use -fno-exceptions for G++ if supported.
    if test "$ac_test_CXXFLAGS" != set; then
      if test "$GXX" = yes; then
        old_CXXFLAGS=$CXXFLAGS
        CXXFLAGS="$CXXFLAGS -fno-exceptions"

but residfp throws:

https://github.com/VICE-Team/svn-mirror/blob/main/vice/src/lib/libresidfp/src/SID.cpp#L256

    default:
        throw SIDError("Unknown chip type");
    }

so the build fails:

/home/name/src/vice-emu-code/vice/src/lib/libresidfp/src/SID.cpp: In member function void reSIDfp::SID::setChipModel(reSIDfp::ChipModel):
/home/name/src/vice-emu-code/vice/src/lib/libresidfp/src/SID.cpp:256:43: error: exception handling disabled, use -fexceptions to enable
  256 |         throw SIDError("Unknown chip type");
      |                                           ^

-fno-exceptions is also added in the "$with_resid" block, so it's actually added twice.

Discussion

  • gpz

    gpz - 2026-08-07

    what is your build system? (And configure options) (maybe an issue to report upstream)

     
  • rice123

    rice123 - 2026-08-07

    Ubuntu 24.04.4 LTS, ./configure --enable-cmake

     
  • gpz

    gpz - 2026-08-07

    did that even work before? please try regular build system :)

     
  • rice123

    rice123 - 2026-08-07

    I don't know if --enable-cmake worked before, I worked around this particular failure with CXXFLAGS="" ./cmake-bootstrap.sh and the compilation succeeded.

    The error doesn't happen in the regular build system because libresidfp is built using its own Makefile. With cmake, configure.ac runs:

    if test x"$enable_cmake" = x"yes" ; then
      "$srcdir/cmake-bootstrap.sh"
    fi
    

    with CXXFLAGS containing -fno-exceptions, so the flag is actually propagated to the generated build scripts for libresidfp.

    btw, both cmake and regular build system fail ./autogen.sh with:

    ERROR: aclocal failed in /home/name/src/vice-emu-code-test/vice/src/lib/libresidfp
    check '.aclocal.out' for details
    
    $ cat /home/name/src/vice-emu-code-test/vice/src/lib/libresidfp/.aclocal.out
    configure.ac:42: error: invalid first argument `23' to AX_CXX_COMPILE_STDCXX
    /usr/share/aclocal/ax_cxx_compile_stdcxx.m4:51: AX_CXX_COMPILE_STDCXX is expanded from...
    configure.ac:42: the top level
    autom4te: error: /usr/bin/m4 failed with exit status: 1
    aclocal: error: autom4te failed with exit status: 1
    

    due to Ubuntu 24 having an older version of autoconf-archive where the AX_CXX_COMPILE_STDCXX macro doesn't support C++23. Can be worked around by downloading a newer version of the macro definition:

    cd ~/src/vice-emu-code/vice/src/lib/libresidfp
    
    mkdir -p m4
    
    wget -O m4/ax_cxx_compile_stdcxx.m4 \
    'https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_cxx_compile_stdcxx.m4'
    
    export ACLOCAL_PATH="$PWD/m4${ACLOCAL_PATH:+:$ACLOCAL_PATH}"
    

    Should be fixed when Ubuntu 24 is upgraded to Ubuntu 26 shortly.

     
  • gpz

    gpz - 2026-08-08
    • assigned_to: dqh
     
  • gpz

    gpz - 2026-08-08

    ok, the cmake generator stuff must be updated then

     

Log in to post a comment.