error building release 0.6.0 from tarball: duplicate case value FFI_TYPE_LONGDOUBLE

Issue #93 resolved
Marco Maggi created an issue

On my x86_64-slackware-linux-gnu, while building release 0.6.0 from the tarball I get this:

[ 38%] Building C object build/ext/ffi/libffi/CMakeFiles/libffi.dir/src/x86/ffi64.c.o
/home/marco/var/build/devel/sagittarius-0.6.0/ext/ffi/libffi-3.0.13/src/x86/ffi64.c: In function 'classify_argument':
/home/marco/var/build/devel/sagittarius-0.6.0/ext/ffi/libffi-3.0.13/src/x86/ffi64.c:205:5: error: duplicate case value
     case FFI_TYPE_LONGDOUBLE:
     ^
/home/marco/var/build/devel/sagittarius-0.6.0/ext/ffi/libffi-3.0.13/src/x86/ffi64.c:202:5: error: previously used here
     case FFI_TYPE_DOUBLE:
     ^
make[2]: *** [build/ext/ffi/libffi/CMakeFiles/libffi.dir/src/x86/ffi64.c.o] Error 1
make[1]: *** [build/ext/ffi/libffi/CMakeFiles/libffi.dir/all] Error 2
make: *** [all] Error 2

Comments (3)

  1. Takashi Kato repo owner

    Thank you for the report!

    For the quick fix, could you change the following like this:

    #set(HAVE_LONG_DOUBLE 0)
    set(HAVE_LONG_DOUBLE 1)
    

    This is located on sagittarius/ext/ffi/libffi-3.0.13/CMakeLists.txt line 88. I'll also change to check if long double is supported properly.

    Intentionally, bundled libffi is only for Windows (which doesn't have package manager). There might be other issue that CMake couldn't find libffi for some reason. I'll also check.

  2. Log in to comment