FAQ
From PilibWiki
Contents |
How to get pilib
How can I download the CVS version of pilib?
You need to have installed CVS. How to do this depends on your operating system and is not covered here. Once CVS has been installed, you can use the following commands, to checkout (=download) the CVS version of pilib:
cvs -d:pserver:anonymous@pilib.cvs.sourceforge.net:/cvsroot/pilib login cvs -z3 -d:pserver:anonymous@pilib.cvs.sourceforge.net:/cvsroot/pilib co -P pilib
This will create a new directory called pilib.
To update an already checked out CVS version of pilib, just type:
cvs update
in pilib's root directory.
Errors during installation/compilation of pilib
Internal compiler error
Question: I was trying to install Pilib on Linux, and there is a trouble during the installation. Here is the error :
[...] -> Processing file ../src/symem.c as C source... -> Processing file ../src/sysocketaccept.c as C source... -> Processing file ../src/sysocketclose.c as C source... -> Processing file ../src/sysocketopen.c as C source... -> Processing file ../src/sysocketread.c as C source... -> Processing file ../src/sysocketwrite.c as C source... -> Processing file ../src/sythread.c as C source... make all-am make[3]: Entering directory `/home/ben/FORTRAN/pilib/pilib-0.2/src' gfortran -g -O2 -c mamatinv.f90 if(test -e mamatinv.obj) then cp mamatinv.obj mamatinv.o; fi gfortran -g -O2 -c pimod.f90 pimod.f90: In function 'strne3': pimod.f90:131: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:https://qa.mandriva.com/> for instructions. make[3]: *** [pimod.o] Error 1 make[3]: Leaving directory `/home/ben/FORTRAN/pilib/pilib-0.2/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/ben/FORTRAN/pilib/pilib-0.2/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/ben/FORTRAN/pilib/pilib-0.2' make: *** [all] Error 2 [root@localhost pilib-0.2]#
Answer: Please make sure, that you are using a working Fortran 9x compiler. gfortran (which comes with gcc) is known to fail compiling pilib on versions prior to gcc-4.1.0. This is not a bug of pilib but of gfortran.
Problem setting up configure for g95 under Linux
Question: I try to configure pilib-0.3 on Suse 10.0 for compilation with g95, but I always get the setup for gfortran (./configure F77=g95 FC=g95)
Answer: You have to use F95=g95 to get the desired result.
Errors during compiling/linking fortran programs against pilib
Undefined reference to `__pimodtypes__f_char2str'
Question: I am trying to use your pilib on Linux with gfortran. The compilation and instalation seem fine, however, when I try to compile the example source from the documentation I get
undefined reference to `__pimodtypes__f_char2str'
Aswer: Please make sure, that you link against pilibf, and that the linking order is correct. On Linux/UNIX you can do this by adding "-lpilibf" to the command line of your compiler/linker before specifying the source files / objects.
Pilib is indeed devided into two parts: the shared library pilib contains all C routines and references to external libraries. The static library pilibf contains all fortran routines. This seperation is necessary, because on some platforms it meight be difficult to build both parts into a single library.
Also make sure, that pilib has been compiled with the same fortran compiler as the example program from the first time. If this is not the case, uninstall pilib ("make uninstall" as root), rebuild the complete library ("make clean && make") and install it again ("make install" as root).

