sbrisard / janus

Discretization of the Lippmann--Schwinger equation with periodic boundary conditions
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Compilation failure under Lubuntu 16.04LTS #18

Closed sbrisard closed 7 years ago

sbrisard commented 7 years ago

python setup.py develop leads to the following error message

building 'janus.fft.parallel._parallel_fft' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent -I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -I/usr/include/python3.5m -I/home/sbrisard/py35/include/python3.5m -c janus/fft/parallel/_parallel_fft.c -o build/temp.linux-x86_64-3.5/janus/fft/parallel/_parallel_fft.o -pthread -Wl,-rpath -Wl,/usr/lib/openmpi/lib -Wl,--enable-new-dtags
x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-pthread -Wl,-rpath -Wl,/usr/lib/openmpi/lib -Wl,--enable-new-dtags’
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Configuration

[build_ext]
libraries = fftw3, fftw3_mpi
sbrisard commented 7 years ago

Issuing the exact same command in the console

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent -I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -I/usr/include/python3.5m -I/home/sbrisard/py35/include/python3.5m -c janus/fft/parallel/_parallel_fft.c -o build/temp.linux-x86_64-3.5/janus/fft/parallel/_parallel_fft.o -pthread -Wl,-rpath -Wl,/usr/lib/openmpi/lib -Wl,--enable-new-dtags

does not raise the error!

sbrisard commented 7 years ago

It seems that the various options must be correctly split into a list (rather than a single, large string). I use distutils.util.split_quoted to do so.