Results 1 to 8 of 8
Hi,
I hope you can help with this little situation that I have. I know it
might be not fair to ask you help me but it's a month I've ...
- 06-07-2011 #1Just Joined!
- Join Date
- Jun 2011
- Posts
- 4
Installing a program which requires fftw 2.x
Hi,
I hope you can help with this little situation that I have. I know it
might be not fair to ask you help me but it's a month I've been trying
to install MPGrafic (google it to see open the package, I cannot post links yet) without succeeding.
(I also have in my home
directory).
The problem is that, in order to install it, I need the 2 version of
the fftw (I've downloaded the 2.1.5 from the fftw website). I install
everything in the folder /libraries (I don't have writing permission on the /usr/lib folder)
./configure --enable-mpi --enable-type-prefix --enable-float
--prefix=/libraries
make install
make clean
./configure --enable-mpi --enable-type-prefix --prefix=/libraries
make install
But when I try to install MPGrafic:
./configure --prefix=/users/mtomas/bin LDFLAGS=-L/libraries/lib/ CPPFLAGS=-I/libraries/include/
I got an error: I need the fftw with double precision.
So I think the ./configure does not read the library properly, or I need another version of the library or I need other flags.
Can you please help me?
Cheers
- 06-08-2011 #2Linux Newbie
- Join Date
- Nov 2008
- Location
- Tokyo, Japan
- Posts
- 243
What is the error message?
Can you post a few lines of the error message that is produced by the make execution?
Just copy and paste the errors, not the whole "make-output.txt" file.Code:make 2>&1 | tee ~/make-output.txt
Oh and one more thing, you usually need to install using "sudo make install" and you need an admin password. If you don't have the admin password, then forget it. But if you can create the "/libraries" directory in the root filesystem, you probably have some kind of admin password.
- 06-08-2011 #3Just Joined!
- Join Date
- Jun 2011
- Posts
- 4
checking for fftw3d_f77_create_plan in -ldfftw... no
Error! You need to have (double precision) fftw library.
I do not have any permission to write in these folders. The libraries folder is created by myself in my home directory. Again, the problem is with the program mpgrafic, that I have to install. I am not even able to do the "make". I receive this error with the "configure". I need a way to tell linux to search the fftw in the directory /libraries, this is the reason why I used the flags in my first post.
Do I need to post the whole ./configure? Can you download it from the internet searching MPgrafic 0.2?
- 06-08-2011 #4Linux Newbie
- Join Date
- Nov 2008
- Location
- Tokyo, Japan
- Posts
- 243
I'm sorry, I misunderstood your first post. I see, so you have a dependency in MPgrafic, but you cannot configure that. I see. Well, usually when I see this error, I have forgot to set my LD_LIBRARY_PATH variable. I don't think it is enough to simply set LDFLAGS and CPPFLAGS.
So the mpgrafic auto-configure cannot find libfttw.so. If this library is in /library/libfttw.so (you said you installed it there), then what you should do is export LD_LIBRARY_PATH:When you set LD_LIBRARY_PATH, the LDFLAGS should be set by configure in the Makefile.Code:#this is in bash LD_LIBRARY_PATH="./library:/users/mtomas/lib:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH cd mpgrafic-0.2 ./configure --prefix=/users/mtomas make make install
It would be good to modify your "~/.profile" or "~/.bash_profile" so it contains the line:This makes your shell set the variable automatically when you start it.Code:export LD_LIBRARY_PATH="./libraries:/users/mtomas/lib:$LD_LIBRARY_PATH"
After you have successfully compiled your program, the program must always check the LD_LIBRARY_PATH environment variable for the location of shared libraries. If this variable is not set, it defaults to LD_LIBRARY_PATH="/usr/local/lib:/usr/lib:/lib", and if this path does not contain the correct libraries, the compiled program will not run.
- 06-08-2011 #5Just Joined!
- Join Date
- Jun 2011
- Posts
- 4
Thanks for the fast reply, but the ./configure still doesn't work.
I explain it better:
In the folder /users/mtomas/libraries there are three folders:
lib, include and info
after installing the fftw libraries in this directory I did:
export LD_LIBRARY_PATH="/users/mtomas/libraries/lib:$LD_LIBRARY_PATH"
then, in the mpgrafic folder
./configure --prefix=/users/mtomas/bin LDFLAGS=-L/users/mtomas/libraries/lib/ CPPFLAGS=-I/users/mtomas/libraries/include/
and it still doesn't work. This is driving me crazy. I think the problem might be the libraries. I don't have .so files but .la and .a files in the libraries/lib directory.
Any other suggestions?
And again thanks for the help
- 06-08-2011 #6Linux Newbie
- Join Date
- Nov 2008
- Location
- Tokyo, Japan
- Posts
- 243
Libraries that end with ".a" are statically linked libraries ("a" means archive), and ".so" are "shared object" libraries.
It may be possible that the mpgrafic auto configure script requires a shared object. Did you use auto configure to install libfftw? Usually, the default behavior of auto configure will define Makefile such that it builds a shared library, but this is not always the case. Since you don't have any ".so" files, it seems the install process of libfftw did not create shared objects. It may be possible you need to re-configure your libfftw with the "--enable-shared" option, and then remake it. Check the output of the libfftw's "./configure --help" command, and see if it accepts this option.
It might also be possibile to force mpgrafic to build a statically linked binary. Check "./configure --help" for mpgrafic and see if it allows the "--enable-static" option, then re-configure and see if it works. However, it is almost always better to use shared objects, because static linking increases the size of the executable binary, and also the binary will need to be re-linked if you make any change to your ".a" library file. But you can decide for yourself if static linking is acceptable for your purposes.
- 06-08-2011 #7Just Joined!
- Join Date
- Jun 2011
- Posts
- 4
I add the --enable-shared option but I have the same error.
Other suggestion?
- 06-08-2011 #8Linux Newbie
- Join Date
- Nov 2008
- Location
- Tokyo, Japan
- Posts
- 243
I downloaded the code myself to see if I could compile it. I think I know what your problem is.
The error message you posted earlier said:This means it is looking for a file called "libdfftw.so", and it is searching inside this file for a Fortran77 function called "fftw3d_f77_create_plan". Do you have Fortran installed?Code:fftw3d_f77_create_plan in -ldfftw... no Error! You need to have (double precision) fftw library.
If you read the output from "libfftw-2.1.5/configure --help", there is this statement:So you need to include the "--enable-shared" and the "--enable-type-prefix" options when you compile "libfftw". It seems shared libraries are not built by default. Also, the default behavior is to simply create a library called "libfftw.so". But mpgrafic wants "libdffw.so", so the "--enable-type-prefix" option is necessary to label the ".so" file correctly.Code:--enable-type-prefix prefix files with d/s to indicate precision
Check the output of "fftw-2.1.5/configure". Look at these reports:The shared libraries should be "yes". If the "warning, switching to disable-fortran" occurs, you do not have fortran. As a result, your libfftw.so will be compiled -- but without the Fortran77 function required by "mpgrafic".Code:checking whether the linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes creating libtool checking for perl... perl checking for g77... no checking for f77... no .... checking whether we are using the GNU Fortran 77 compiler... no checking whether accepts -g... no configure: WARNING: *** Couldn't find f77 compiler; switching to --disable-fortran.
Last edited by ramin.honary; 06-08-2011 at 05:47 PM.


Reply With Quote

