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

[MP-2.1.0 on ARM arches] Compile error of src/asl/solvers/fpinit.c #87

Closed
sagitter opened this issue Mar 1, 2016 · 4 comments
Closed

Comments

@sagitter
Copy link

sagitter commented Mar 1, 2016

Another issue (execuse my insistence) compiling source code as reported in #86 on ARM arches:

[  1%] Building CXX object CMakeFiles/format.dir/src/format.cc.o
/usr/bin/c++    -I/builddir/build/BUILD/mp-2.1.0/include  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -march=armv7-a -mfpu=vfpv3-d16  -mfloat-abi=hard  -std=c++11 -Wall -Wextra -pedantic -DNDEBUG -fPIC   -o CMakeFiles/format.dir/src/format.cc.o -c /builddir/build/BUILD/mp-2.1.0/src/format.cc
make[2]: Leaving directory '/builddir/build/BUILD/mp-2.1.0/build'
make -f test/CMakeFiles/gtest-extra.dir/build.make test/CMakeFiles/gtest-extra.dir/build
make[2]: Entering directory '/builddir/build/BUILD/mp-2.1.0/build'
/builddir/build/BUILD/mp-2.1.0/src/asl/solvers/fpinit.c: In function 'fpinit_ASL':
/builddir/build/BUILD/mp-2.1.0/src/asl/solvers/fpinit.c:139:7: error: 'How' undeclared (first use in this function)
  !!!! How does this system work?
       ^~~
/builddir/build/BUILD/mp-2.1.0/src/asl/solvers/fpinit.c:139:7: note: each undeclared identifier is reported only once for each function it appears in
/builddir/build/BUILD/mp-2.1.0/src/asl/solvers/fpinit.c:139:11: error: expected ';' before 'does'
  !!!! How does this system work?
           ^~~~
src/asl/CMakeFiles/arithchk.dir/build.make:89: recipe for target 'src/asl/CMakeFiles/arithchk.dir/solvers/fpinit.c.o' failed
@vitaut
Copy link
Contributor

vitaut commented Mar 1, 2016

I don't have access to the ARM machine right now unfortunately. Could you by any chance check if adding

#include <fenv.h>

at the top of src/asl/solvers/fpinit.c solves the problem?

@sagitter
Copy link
Author

sagitter commented Mar 2, 2016

Hi.

Package mantainer of MP (Fedora) suggests to me this (functioning) patch:

--- src/asl/solvers/fpinit.orig.c   2016-02-12 18:50:00.000000000 +0100
+++ src/asl/solvers/fpinit.c    2016-03-01 15:04:16.204784941 +0100
@@ -135,6 +135,9 @@
    _FPU_SETCW(__fpu_control);
 #elif defined(FE_ALL_EXCEPT)
    fedisableexcept(FE_ALL_EXCEPT);
+#elif defined(_FPU_IEEE)
+   __fpu_control = _FPU_IEEE;
+   _FPU_SETCW(__fpu_control);
 #else
    !!!! How does this system work?
    !!!! Either figure it out (and modify this text),

vitaut added a commit that referenced this issue Mar 2, 2016
@sagitter
Copy link
Author

sagitter commented Mar 2, 2016

#include <fenv.h> >> at the top of src/asl/solvers/fpinit.c

also works.

@vitaut
Copy link
Contributor

vitaut commented Mar 2, 2016

Fixed both on master and 2.0 branches by adding a missing include which should have been there anyway. Thanks for reporting!

@vitaut vitaut closed this as completed Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants