📄 install
字号:
GSL - GNU Scientific Library============================Installation Instructions=========================GSL follows the standard GNU installation procedure. To compile GSLyou will need an ANSI C-compiler. After unpacking the distributionthe Makefiles can be prepared using the configure command, ./configureYou can then build the library by typing, makeBoth static and shared versions of the libraries will be compiled bydefault. Compilation of shared libraries can be turned off byspecifying the `--disable-shared' option to `configure', e.g. ./configure --disable-sharedIf you encounter problems building the library try using the aboveoption, because some platforms do not support shared libraries.For notes about problems with specific platforms and compilers see thenext section of this file (below).An extensive test suite is available. It can be invoked with "makecheck" in each directory. All tests can be run together with "makecheck" at the top level. The test output should be directed to a filerather than a terminal, with the command, make check > log 2>&1since it is several megabytes in size.If you run "make check" and get some failures, please see the notes onplatform specific problems below. If you find failures that are notmentioned, please report them.The library can be installed using the command, make installThe default install directory prefix is /usr/local. Consult the"Further Information" section below for instructions on installing thelibrary in another location or changing other default compilationoptions. ------------------------------Platform Specific Compilation Notes===================================This section documents any known issues with installing GSL onspecific platforms.Hints for any platform======================1) If there are problems building the library try using ./configure --disable-sharedThis will turn off the compilation of shared libraries and may allowthe build process to complete successfully. If you get any problems try this first.2) With gcc-2.95/2.96 the tests fail in the eigen/ directory. This isdue to a compiler optimization bug which causes errors in themanipulation of complex numbers. Do not use the library if youencounter this problem.This is fixed in more recent versions of gcc. Compiling withoutoptimisation will work around the bug.3) Attempts to run 'strip' on the static library libgsl.a will probablyproduce a broken library (it is known to happen with GNU binutilsstrip, and probably affects others too). The libgsl.a ar archive madeby libtool contains files with the same filenames from differentdirectories, and this causes the strip program to overwrite thesearchive entries. If you need to produce a compact version of thelibrary compile without -g instead of using strip.make install-strip does not work, due to a minor problem with autoconfwhich is fixed in the 2.5 development version of autoconf. In themeantime compile without -g instead if you need to reduce the file size.4) The configure script can fail with a segmentation fault on bash-2.01 $ ./configure Segmentation faultThis is due to a bug in bash, related to the MAIL environmentvariable. To work around it use $ unset ENV MAIL MAILPATH $ ./configurewhich should avoid the problem.Hints for AIX=============For compilation problems with the native compiler xlc, try disablingshared libraries, setenv CC 'xlc' setenv CFLAGS '-O -qmaxmem=8192' ./configure --disable-shared makeIf you get the error, ld: 0711-781 ERROR: TOC overflow. you can try building the library with a larger linkertable-of-contents by setting LDFLAGS before compilation, LDFLAGS="-Wl,-bbigtoc" ./configureHints for Compaq/DEC Alpha==========================The library should compile successfully with Compaq's C compiler usingthe -std and -ieee options. Use CC=cc ./configure make CFLAGS="-std -ieee"to build the library this way.Use GNU tar to unpack the tar file, as Tru64 tar gives an errorhalfway through.Hints for DOS=============When using DJGPP The default stack size of 512k may be insufficient forthe specfunc tests and will cause them to crash. To increase thestack size by a suitable amount use, stubedit test.exe minstack=1536kon the executable and then rerun it manually. (5/01: The specfunctests have been rewritten to use less stack space now).Hints for HP-UX===============The default mode of the HP-UX C compiler does not use ANSI C.To compile GSL you need to select ANSI C mode with the followingconfiguration option: CFLAGS="-Ae" ./configureTo switch on optimization use CFLAGS="-Ae -O".Hints for Intel (Pentium)========================For the Pentium 4 with GCC-3.2 the flags, CFLAGS="-O2 -march=pentium4 -mfpmath=sse -msse -msse2"increase performance (as reported by Sam Halliday <fommil@yahoo.ie>).Note that P3 machines can also use the above CFLAGS, if the "-msse2"is removed and "pentium4" is changed to "pentium3".Hints for IRIX (SGI)====================The library should be compiled with the CFLAGS option-OPT:IEEE_NaN_inf=ON to ensure correct IEEE arithmetic. The tests insys/ will fail without this option. The older deprecated option-OPT:IEEE_comparisons=ON will also work.The 32 bit IRIX compiler gives warnings about "long double" not beingsupported. These can be ignored or turned off with, CFLAGS="-woff 728" ./configureor make CFLAGS="-woff 728"The compiler also gives warnings about certain libraries that are "notused for resolving any symbol". This is harmless and the warnings canbe ignored.You may get warnings about " /usr/bin/ld: arg list too long" whenbuilding shared libraries. If so, try increasing the ncargs kernelparameter with the systune(1m) command.For 64-bit compilation use the following options, CC=cc CFLAGS="-64" LDFLAGS="-64" ./configureor for gcc CFLAGS="-mabi-64" LDFLAGS="-mabi=64 -mips4 -L/usr/local/lib/mabi=64"Hints for MacOS X=================Note that GSL contains files with filenames of 32 characters or more.Therefore you need to be careful in unpacking the tar file, as someMacOS applications such as Stuffit Expander will truncate filenames to31 characters. Using GNU tar and gunzip directly is the safe way tounpack the distribution.There are problems with dynamic linker, so the library should becompiled with, ./configure --disable-sharedTo build shared libraries you can install MacOS X versions of libtool,automake and autoconf, and then reconfigure: 1. Get the fink packaging tool (http://fink.sourceforge.net) 2, Install fink's libtool14, automake, autoconf25. 3. Regenerate GSL's configuration using ./autogen.sh in the top-level directory. 4. ./configure, make
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -