Skip to content

vf2c [punc] uninit.c fails to build on MIPS architecture #71

@drew-parsons

Description

@drew-parsons

vf2c (punc component) is failing to build on MIPS architecture (specifically mips64el and 32-bit mipsel) on Debian Linux. The problem arises in uninit.c

There is a __mips section in uninit.c with

#ifdef __mips	/* must link with -lfpe */
#define IEEE0_done
/* code from Eric Grosse */
#include <stdlib.h>
#include <stdio.h>
#include "/usr/include/sigfpe.h"        /* full pathname for lcc -N */
#include "/usr/include/sys/fpu.h"

A standard build attempt fails since these header files don't exist (with gcc on linux). A full build log can be found here.

If I skip that section by patching to

#if defined (__mips) && !defined (__linux__)

then the build fails with

[  9%] Building C object _deps/fetk-build/punc/src/vf2c/CMakeFiles/vf2c.dir/uninit.c.o
cd /<<PKGBUILDDIR>>/obj-mips64el-linux-gnuabi64/_deps/fetk-build/punc/src/vf2c && /usr/bin/cc -Dvf2c_EXPORTS -I/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c -I/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/punc -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fcommon -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/tirpc -O2 -g -DNDEBUG -fPIC -fPIC -MD -MT _deps/fetk-build/punc/src/vf2c/CMakeFiles/vf2c.dir/uninit.c.o -MF CMakeFiles/vf2c.dir/uninit.c.o.d -o CMakeFiles/vf2c.dir/uninit.c.o -c /<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c: In function ‘ieee0’:
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:302:17: error: ‘_FPU_MASK_IM’ undeclared (first use in this function)
  302 |         cw &= ~(_FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM);
      |                 ^~~~~~~~~~~~
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:302:17: note: each undeclared identifier is reported only once for each function it appears in
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:302:32: error: ‘_FPU_MASK_ZM’ undeclared (first use in this function)
  302 |         cw &= ~(_FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM);
      |                                ^~~~~~~~~~~~
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:302:47: error: ‘_FPU_MASK_OM’ undeclared (first use in this function)
  302 |         cw &= ~(_FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM);
      |                                               ^~~~~~~~~~~~
make[3]: *** [_deps/fetk-build/punc/src/vf2c/CMakeFiles/vf2c.dir/build.make:331: _deps/fetk-build/punc/src/vf2c/CMakeFiles/vf2c.dir/uninit.c.o] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-mips64el-linux-gnuabi64'
make[2]: *** [CMakeFiles/Makefile2:764: _deps/fetk-build/punc/src/vf2c/CMakeFiles/vf2c.dir/all] Error 2

Full build log here. This error also occurs on riscv64.

mipsel (32-bit) gives the same build errors as mips64el.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions