Exact real arithmetic in C++.
A preliminary version can be found here: https://github.com/fbrausse/iRRAM-bigsteps
Exact real arithmetic in C++
License: Other
Exact real arithmetic in C++.
A preliminary version can be found here: https://github.com/fbrausse/iRRAM-bigsteps
On OSX Mavericks there is a ridicolously old bash whose builting read
command does not support the -i
option. Because of this, the QUICKINSTALL_I_forget_exact_name_run_me
script dies. I can submit a fix, but I'd like to know if the following is an acceptable solution:
Rather than putting the default answer for the user to edit:
Where should I install iRRAM: /usr/somewhere/else/
the user will see the default answer in parentheses and will hit Return to accept the default (this is common behavior):
Where should I install iRRAM (/usr/somewhere/else/):
By the way, what's the point of having this script when you already have configure
?
Unfortunately, I tried to install iRRAM but failed. By downloading the release version 2013 and using the quick-install, I get the error messages:
./../include/iRRAM/REAL.h:188:20: error: friend declaration specifying a default argument must be a definition friend std::string swrite (const REAL& x, const int p, const int for... ^ In file included from REALS.cc:29: In file included from ../../include/iRRAM/core.h:33: In file included from ../../include/iRRAM/lib.h:131: ../../include/iRRAM/STREAMS.h:72:32: error: no type named '_Ios_Openmode' in namespace 'std' orstream(std::string s, std::_Ios_Openmode mod=std::_S_out); ~~~~~^ ../../include/iRRAM/STREAMS.h:76:33: error: no type named '_Ios_Openmode' in namespace 'std' void open(std::string s, std::_Ios_Openmode mod=std::_S_out); ~~~~~^ ../../include/iRRAM/STREAMS.h:97:29: error: no template named '_Setfill' in namespace 'std'; did you mean 'setfill'? orstream& operator<<(std::_Setfill<char>); ~~~~~^~~~~~~~ setfill /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iomanip:196:1: note: 'setfill' declared here setfill(_CharT __c) ^ In file included from REALS.cc:29: In file included from ../../include/iRRAM/core.h:33: In file included from ../../include/iRRAM/lib.h:131: ../../include/iRRAM/STREAMS.h:97:24: error: expected parameter declarator orstream& operator<<(std::_Setfill<char>); ^ ../../include/iRRAM/STREAMS.h:97:13: error: overloaded 'operator<<' must be a binary operator (has 1 parameter) orstream& operator<<(std::_Setfill<char>); ^ ../../include/iRRAM/STREAMS.h:98:24: error: no type named '_Setiosflags' in namespace 'std'; did you mean '_SetRflags'? orstream& operator<<(std::_Setiosflags); ^~~~~~~~~~~~~~~~~ _SetRflags ../../include/iRRAM/STREAMS.h:44:8: note: '_SetRflags' declared here struct _SetRflags { int _M_n; }; ^ ../../include/iRRAM/STREAMS.h:100:29: error: no type named '_Resetiosflags' in namespace 'std' orstream& operator<<(std::_Resetiosflags); ~~~~~^ ../../include/iRRAM/STREAMS.h:101:29: error: no type named '_Setbase' in namespace 'std' orstream& operator<<(std::_Setbase); ~~~~~^ ../../include/iRRAM/STREAMS.h:102:29: error: no type named '_Setprecision' in namespace 'std' orstream& operator<<(std::_Setprecision); ~~~~~^ ../../include/iRRAM/STREAMS.h:103:29: error: no type named '_Setw' in namespace 'std' orstream& operator<<(std::_Setw); ~~~~~^ ../../include/iRRAM/STREAMS.h:72:55: error: no member named '_S_out' in namespace 'std' orstream(std::string s, std::_Ios_Openmode mod=std::_S_out); ~~~~~^ ../../include/iRRAM/STREAMS.h:76:56: error: no member named '_S_out' in namespace 'std' void open(std::string s, std::_Ios_Openmode mod=std::_S_out); ~~~~~^ ../../include/iRRAM/STREAMS.h:138:32: error: no type named '_Ios_Openmode' in namespace 'std' irstream(std::string s, std::_Ios_Openmode mod=std::_S_in); ~~~~~^ ../../include/iRRAM/STREAMS.h:142:33: error: no type named '_Ios_Openmode' in namespace 'std' void open(std::string s, std::_Ios_Openmode mod=std::_S_out); ~~~~~^ ../../include/iRRAM/STREAMS.h:161:29: error: no template named '_Setfill' in namespace 'std'; did you mean 'setfill'? irstream& operator>>(std::_Setfill<char>); ~~~~~^~~~~~~~ setfill /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iomanip:196:1: note: 'setfill' declared here setfill(_CharT __c) ^ In file included from REALS.cc:29: In file included from ../../include/iRRAM/core.h:33: In file included from ../../include/iRRAM/lib.h:131: ../../include/iRRAM/STREAMS.h:161:24: error: expected parameter declarator irstream& operator>>(std::_Setfill<char>); ^ ../../include/iRRAM/STREAMS.h:161:13: error: overloaded 'operator>>' must be a binary operator (has 1 parameter) irstream& operator>>(std::_Setfill<char>); ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated.
I wonder how can I solve the problem. Thank you very much!
Hi! I tried to run the QUICKINSTALL_run_me script and it aborts with the above error. I am running Ubuntu 14.04 and gcc version 4.8.2. Here is the resulting problem.log:
+------- QUICK-INSTALL for the iRRAM package ----------------------------------
|
| For the compilation of the iRRAM package, you need the packages GMP and MPFR:
|
| (1) you can use versions of GMP and MPFR already installed on
| your system (if available)
|
| or
|
| (2) this script can download and compile own versions (installed locally).
| The self-compiled versions might be a bit faster than those already
| contained in your system.
+------------------------------------------------------------------------------
Which option do you prefer? (1/2) ... using option 1...
+------------------------------------------------------------------------------
|
| Now the configuration, compilation and installation of iRRAM can start...
|
+------------------------------------------------------------------------------
This skript can install the iRRAM package either locally or system wide:
the resulting files will be copied to
(1) to a local directory, with default
'/home/florian/iRRAMgit/installed'
(can be changed below)
or
(2) to a system directory (later root access might be needed!)
Which option do you prefer? (1/2)
The configuration, compilation and installation of iRRAM will start now!
for i in obj/*/ ; do make -C $i clean; done
make[1]: Entering directory `/home/florian/iRRAMgit/obj/MPFR'
test -z "libiRRAM.la" || rm -f libiRRAM.la
rm -f ./so_locations
rm -rf .libs _libs
rm -f *.o
rm -f *.lo
make[1]: Leaving directory `/home/florian/iRRAMgit/obj/MPFR'
for i in examples tests; do make -C $i clean; done
make[1]: Entering directory `/home/florian/iRRAMgit/examples'
make[1]: Leaving directory `/home/florian/iRRAMgit/examples'
make[1]: Entering directory `/home/florian/iRRAMgit/tests'
rm -f t_DYADIC t_INTEGER t_RATIONAL t_double_conv t_size t_string_conv t_FUNCTION
rm -rf .libs _libs
rm -f *.o
test -z "t_DYADIC.log t_INTEGER.log t_RATIONAL.log t_double_conv.log t_size.log t_string_conv.log t_FUNCTION.log" || rm -f t_DYADIC.log t_INTEGER.log t_RATIONAL.log t_double_conv.log t_size.log t_string_conv.log t_FUNCTION.log
test -z "t_DYADIC.trs t_INTEGER.trs t_RATIONAL.trs t_double_conv.trs t_size.trs t_string_conv.trs t_FUNCTION.trs" || rm -f t_DYADIC.trs t_INTEGER.trs t_RATIONAL.trs t_double_conv.trs t_size.trs t_string_conv.trs t_FUNCTION.trs
test -z "test-suite.log" || rm -f test-suite.log
rm -f *.lo
make[1]: Leaving directory `/home/florian/iRRAMgit/tests'
rm -fr autom4te.cache
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --no-force
configure.ac:140: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
configure.ac:140: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
configure.ac:140: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
configure.ac:140: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
configure.ac:140: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
autoreconf: Leaving directory `.'
configure: WARNING: you should use --build, --host, --target
./configure: line 2151: LT_INIT: command not found
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/florian/iRRAMgit/missing: Unknown `--is-lightweight' option
Try `/home/florian/iRRAMgit/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for --disable-silent-rules-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for --disable-silent-rules-g++... no
checking for --disable-silent-rules-c++... no
checking for --disable-silent-rules-gpp... no
checking for --disable-silent-rules-aCC... no
checking for --disable-silent-rules-CC... no
checking for --disable-silent-rules-cxx... no
checking for --disable-silent-rules-cc++... no
checking for --disable-silent-rules-cl.exe... no
checking for --disable-silent-rules-FCC... no
checking for --disable-silent-rules-KCC... no
checking for --disable-silent-rules-RCC... no
checking for --disable-silent-rules-xlC_r... no
checking for --disable-silent-rules-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
checking for main in -lm... yes
checking gmp header...
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gmp.h usability... yes
checking gmp.h presence... yes
checking for gmp.h... yes
found recent GMP
GMP check successful!
checking mpfr headers
checking mpfr.h usability... yes
checking mpfr.h presence... yes
checking for mpfr.h... yes
MPFR backend: found
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... yes
linking obj/MPFR//REALS.cc
ln: failed to create symbolic link 'REALS.cc': File exists
linking obj/MPFR//REALmain.cc
ln: failed to create symbolic link 'REALmain.cc': File exists
linking obj/MPFR//REALLIB.cc
ln: failed to create symbolic link 'REALLIB.cc': File exists
linking obj/MPFR//limits.cc
ln: failed to create symbolic link 'limits.cc': File exists
linking obj/MPFR//errno.cc
ln: failed to create symbolic link 'errno.cc': File exists
linking obj/MPFR//convert.cc
ln: failed to create symbolic link 'convert.cc': File exists
linking obj/MPFR//stack.cc
ln: failed to create symbolic link 'stack.cc': File exists
linking obj/MPFR//STREAMS.cc
ln: failed to create symbolic link 'STREAMS.cc': File exists
linking obj/MPFR//DYADIC.cc
ln: failed to create symbolic link 'DYADIC.cc': File exists
linking obj/MPFR//COMPLEX.cc
ln: failed to create symbolic link 'COMPLEX.cc': File exists
linking obj/MPFR//Integer.cc
ln: failed to create symbolic link 'Integer.cc': File exists
linking obj/MPFR//RATIONAL.cc
ln: failed to create symbolic link 'RATIONAL.cc': File exists
linking obj/MPFR//LAZY_BOOLEAN.cc
ln: failed to create symbolic link 'LAZY_BOOLEAN.cc': File exists
linking obj/MPFR//sqrt.cc
ln: failed to create symbolic link 'sqrt.cc': File exists
linking obj/MPFR//exp_log.cc
ln: failed to create symbolic link 'exp_log.cc': File exists
linking obj/MPFR//sin_cos.cc
ln: failed to create symbolic link 'sin_cos.cc': File exists
linking obj/MPFR//pi_ln2.cc
ln: failed to create symbolic link 'pi_ln2.cc': File exists
linking obj/MPFR//REALMATRIX.cc
ln: failed to create symbolic link 'REALMATRIX.cc': File exists
linking obj/MPFR//SPARSEREALMATRIX.cc
ln: failed to create symbolic link 'SPARSEREALMATRIX.cc': File exists
linking obj/MPFR//INTERVAL.cc
ln: failed to create symbolic link 'INTERVAL.cc': File exists
linking obj/MPFR//GMP_int_ext.c
ln: failed to create symbolic link 'GMP_int_ext.c': File exists
linking obj/MPFR//GMP_rat_ext.c
ln: failed to create symbolic link 'GMP_rat_ext.c': File exists
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating obj/MPFR/Makefile
config.status: creating iRRAM_VERSION
config.status: creating include/iRRAM/version.h
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating tests/Makefile
config.status: creating examples/Makefile-pre
config.status: creating doc/Makefile
config.status: executing depfiles commands
for i in obj/*/ ; do make -C $i; done
make[1]: Entering directory `/home/florian/iRRAMgit/obj/MPFR'
CXX REALS.lo
/bin/bash: --silent: command not found
make[1]: *** [REALS.lo] Error 127
make[1]: Leaving directory `/home/florian/iRRAMgit/obj/MPFR'
make: *** [backends] Error 2
Sorry, something during the compilation failed.
Please get in contact with [email protected].
It would be a helpful to add information about your computing enviroment
(Linux version, gcc version etc) to the email.
You should also rerun this program with
./QUICKINSTALL_run_me -verbose 2>&1 | tee problem.log
to get a more verbose build process that might help finding the problem.
Please add the resulting file 'problem.log' to your email.
```sy
You have both COPYING
and LICENCE
, one is LGPL version 2, the other 2.1. You should probably keep only one. GitHub recommends that the file should be called LICENCE
.
The m4
subdirectory contains symbolic links which probably work on Linux, but do not in general. Instead of these you should include actual files. This stops iRRAM from compiling under OSX (and probably any other Linux which happens to have a slightly different autoconf
).
I know very little about c++ so probably this is going to be easily solvable. After running the "quick install" script now autoconf and configure work, but then compilation fails with:
In file included from ../../include/iRRAM/lib.h:133:
../../include/iRRAM/STREAMS.h:72:32: error: no type named '_Ios_Openmode' in
namespace 'std'
orstream(std::string s, std::_Ios_Openmode mod=std::_S_out);
~~~~~^
And a lot of other errors like this, about how some thing in std
does not exist.
Any ideas what might be going on? I am using gcc3
, it found gmp
and mpfr
during configuation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.