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

Build/install on Ubuntu 20.04 #17

Open
paugier opened this issue Jan 31, 2022 · 7 comments
Open

Build/install on Ubuntu 20.04 #17

paugier opened this issue Jan 31, 2022 · 7 comments

Comments

@paugier
Copy link

paugier commented Jan 31, 2022

I try to build p3dfft on Ubuntu 20.04.

On Debian based systems, the fftw libs are in /usr/lib/x86_64-linux-gnu so it does not to just use --with-fftw=/usr.

I copied the headers and the libraries in a special directory to please p3dfft:

mkdir -p $HOME/opt/fftw/include/
mkdir -p $HOME/opt/fftw/lib/
cp /usr/include/fftw* $HOME/opt/fftw/include
cp /usr/lib/x86_64-linux-gnu/libfftw3* $HOME/opt/fftw/lib

Then, this configure command seems to work fine:

./configure --prefix=$HOME --enable-fftw --enable-openmpi --enable-gnu --with-fftw=$HOME/opt/fftw  CC=mpicc CCLD=mpif90

However, the make command fails:

$ make                                                                                                                    
 cd . && automake-1.13 --gnu --ignore-deps
/bin/bash: line 4: automake-1.13: command not found
make: *** [Makefile:341: Makefile.in] Error 1

So I tried to run:

libtoolize
aclocal -I . && autoheader && autoconf && automake --add-missing -c

Finally, make starts to compile something but finally, I get

/usr/bin/ld: /home/pierre/opt/fftw/lib/libfftw3.a(mapflags.o): undefined reference to symbol 'log@@GLIBC_2.29'
/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line

From this point, I don't know what to do... Help would be greatly appreciated to compile p3dfft on Ubuntu 20.04.

@bkmgit
Copy link

bkmgit commented Jan 31, 2022

Have you tried building FFTW yourself?

@bkmgit
Copy link

bkmgit commented Jan 31, 2022

The following worked for me:

 ./configure --enable-gnu --enable-fftw --enable-openmpi --with-fftw=$HOME/fftw-3.3.10-install FC=mpif90 CC=mpicc LDFLAGS=-L/lib/x86_64-linux-gnu LIBS=-lm --prefix=$HOME/p3dfft-install

@bkmgit
Copy link

bkmgit commented Jan 31, 2022

This is using commit b9d9528 - head of the repository at present.

@bkmgit
Copy link

bkmgit commented Jan 31, 2022

Building FFTW

wget http://fftw.org/fftw-3.3.10.tar.gz
tar -xf fftw-3.3.10.tar.gz 
cd fftw-3.3.10/
./configure --prefix=$HOME/fftw-3.3.10-install
make -j2
make install
 ./configure --prefix=$HOME/fftw-3.3.10-install --enable-shared
make -j2
make install
cd ..

@paugier
Copy link
Author

paugier commented Jan 31, 2022

Thanks @bkmgit. It works for me with your configure command (even without building fftw).

It would be nice to have the install procedure for Ubuntu/Debian systems written somewhere.

I don't know if we could be possible to install without libtool, autoconf, automake ?

@bkmgit
Copy link

bkmgit commented Feb 1, 2022

@paugier Great. For many projects, configure script is part of releases, but not part of the Git sources, though possibly the configure script and dependencies used to generate it could be updated to resolve #13

@bkmgit
Copy link

bkmgit commented Feb 1, 2022

One can update the documentation at:

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