-
Notifications
You must be signed in to change notification settings - Fork 5
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
vf2c [punc] uninit.c fails to build on MIPS architecture #71
Comments
For linux, uninit.c has
On standard intel (amd64), /usr/include/x86_64-linux-gnu/fpu_control.h defines the masks in question:
On mips (mips64el), /usr/include/mips64el-linux-gnuabi64/fpu_control.h provides different mask definitions:
|
We can see the MIPS maskes are essentially the same (in name). The "standard" masks simply append an extra 'M' at the end. |
@nsoblath do you have time to look at this? |
Actually, since riscv64 is also affected, a more general test at l.302 would probably work better, e.g.
|
@sobolevnrm Yes, I can work on this. |
Aha, this is not work on riscv64: /<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:305:17: error: ‘_FPU_MASK_I’ undeclared (first use in this function)
305 | cw &= ~(_FPU_MASK_I | _FPU_MASK_Z | _FPU_MASK_O);
| ^~~~~~~~~~~
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:305: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:305:31: error: ‘_FPU_MASK_Z’ undeclared (first use in this function)
305 | cw &= ~(_FPU_MASK_I | _FPU_MASK_Z | _FPU_MASK_O);
| ^~~~~~~~~~~
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:305:45: error: ‘_FPU_MASK_O’ undeclared (first use in this function)
305 | cw &= ~(_FPU_MASK_I | _FPU_MASK_Z | _FPU_MASK_O);
| ^~~~~~~~~~~
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
|
That is a pity. @yuzibo , do you have access to the riscv64 system? It might be possible to figure out what riscv64 needs from the definitions in |
riscv64 might not be so simple. The code can be found in
so it doesn't have the _FPU_MASKs that the other arches have. |
Hi, I got it work at last to define these macroes in uninit.c, here: |
Thanks @yuzibo . riscv64 seems to build fine with that patch. |
The patch come from yuzibo, Is it need to apply to this repo and release a new version? |
I am not sure about it. |
Yes, the fpu_control.h is under glibc:
libc6-dev:riscv64: /usr/include/riscv64-linux-gnu/fpu_control.h
Perhaps forward this to glibc is a better way.
Thanks!
在 2022/6/15 17:38, vimer 写道:
…
I am not sure about it.
Does it seem that the fpu_control.h is under glibc? I was wondering if
it would be appropriate to forward this to glibc?
|
Is this issue still a problem? I'm not sure how to troubleshoot without access to the relevant system. I don't think Docker is an option to mimic the environment and troubleshoot this, right? |
hi, @sobolevnrm, |
These can also be added to support
These masks have been defined since |
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 withA 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
then the build fails with
Full build log here. This error also occurs on riscv64.
mipsel (32-bit) gives the same build errors as mips64el.
The text was updated successfully, but these errors were encountered: