andreww / fox

A Fortran XML library
https://andreww.github.io/fox/
Other
58 stars 50 forks source link

Build using configure and make breaks for spaces in the path #76

Open kashkoulimohammad opened 2 years ago

kashkoulimohammad commented 2 years ago

Dear all,

I am trying to install Fox on Ubuntu 18.04 but I am faced with this error:

mkdir -p objs/lib objs/finclude
(cd fsys; make VPATH=/fsys)
make[1]: Entering directory '/home/mkashkouli/Desktop/EMTF FCU/fox-master/fsys'
gfortran -c -g -O2  -DPACKAGE_NAME=\"FoX\" -DPACKAGE_TARNAME=\"fox\" -DPACKAGE_VERSION=\"4.1.2\" -DPACKAGE_STRING=\"FoX\ 4.1.2\" -DPACKAGE_BUGREPORT=\"a.walker@ucl.ac.uk\" -DPACKAGE_URL=\"\" -DFC_HAVE_FLUSH=1 -DFC_HAVE_ABORT=1 -DFC_EOR_LF=1    fox_m_fsys_abort_flush.F90
gfortran -c -g -O2  -DPACKAGE_NAME=\"FoX\" -DPACKAGE_TARNAME=\"fox\" -DPACKAGE_VERSION=\"4.1.2\" -DPACKAGE_STRING=\"FoX\ 4.1.2\" -DPACKAGE_BUGREPORT=\"a.walker@ucl.ac.uk\" -DPACKAGE_URL=\"\" -DFC_HAVE_FLUSH=1 -DFC_HAVE_ABORT=1 -DFC_EOR_LF=1    fox_m_fsys_array_str.F90
gfortran -c -g -O2  -DPACKAGE_NAME=\"FoX\" -DPACKAGE_TARNAME=\"fox\" -DPACKAGE_VERSION=\"4.1.2\" -DPACKAGE_STRING=\"FoX\ 4.1.2\" -DPACKAGE_BUGREPORT=\"a.walker@ucl.ac.uk\" -DPACKAGE_URL=\"\" -DFC_HAVE_FLUSH=1 -DFC_HAVE_ABORT=1 -DFC_EOR_LF=1    fox_m_fsys_realtypes.f90
gfortran -c -g -O2  -DPACKAGE_NAME=\"FoX\" -DPACKAGE_TARNAME=\"fox\" -DPACKAGE_VERSION=\"4.1.2\" -DPACKAGE_STRING=\"FoX\ 4.1.2\" -DPACKAGE_BUGREPORT=\"a.walker@ucl.ac.uk\" -DPACKAGE_URL=\"\" -DFC_HAVE_FLUSH=1 -DFC_HAVE_ABORT=1 -DFC_EOR_LF=1    fox_m_fsys_format.F90
gfortran -c -g -O2  -DPACKAGE_NAME=\"FoX\" -DPACKAGE_TARNAME=\"fox\" -DPACKAGE_VERSION=\"4.1.2\" -DPACKAGE_STRING=\"FoX\ 4.1.2\" -DPACKAGE_BUGREPORT=\"a.walker@ucl.ac.uk\" -DPACKAGE_URL=\"\" -DFC_HAVE_FLUSH=1 -DFC_HAVE_ABORT=1 -DFC_EOR_LF=1    fox_m_fsys_parse_input.F90
gfortran -c -g -O2  -DPACKAGE_NAME=\"FoX\" -DPACKAGE_TARNAME=\"fox\" -DPACKAGE_VERSION=\"4.1.2\" -DPACKAGE_STRING=\"FoX\ 4.1.2\" -DPACKAGE_BUGREPORT=\"a.walker@ucl.ac.uk\" -DPACKAGE_URL=\"\" -DFC_HAVE_FLUSH=1 -DFC_HAVE_ABORT=1 -DFC_EOR_LF=1    fox_m_fsys_count_parse_input.F90
gfortran -c -g -O2  -DPACKAGE_NAME=\"FoX\" -DPACKAGE_TARNAME=\"fox\" -DPACKAGE_VERSION=\"4.1.2\" -DPACKAGE_STRING=\"FoX\ 4.1.2\" -DPACKAGE_BUGREPORT=\"a.walker@ucl.ac.uk\" -DPACKAGE_URL=\"\" -DFC_HAVE_FLUSH=1 -DFC_HAVE_ABORT=1 -DFC_EOR_LF=1    fox_m_fsys_string.F90
gfortran -c -g -O2  -DPACKAGE_NAME=\"FoX\" -DPACKAGE_TARNAME=\"fox\" -DPACKAGE_VERSION=\"4.1.2\" -DPACKAGE_STRING=\"FoX\ 4.1.2\" -DPACKAGE_BUGREPORT=\"a.walker@ucl.ac.uk\" -DPACKAGE_URL=\"\" -DFC_HAVE_FLUSH=1 -DFC_HAVE_ABORT=1 -DFC_EOR_LF=1    fox_m_fsys_string_list.F90
gfortran -c -g -O2  -DPACKAGE_NAME=\"FoX\" -DPACKAGE_TARNAME=\"fox\" -DPACKAGE_VERSION=\"4.1.2\" -DPACKAGE_STRING=\"FoX\ 4.1.2\" -DPACKAGE_BUGREPORT=\"a.walker@ucl.ac.uk\" -DPACKAGE_URL=\"\" -DFC_HAVE_FLUSH=1 -DFC_HAVE_ABORT=1 -DFC_EOR_LF=1    fox_m_fsys_varstr.F90
  ==> Creating libFoX_fsys.a with fox_m_fsys_abort_flush.o fox_m_fsys_array_str.o fox_m_fsys_format.o fox_m_fsys_parse_input.o fox_m_fsys_count_parse_input.o fox_m_fsys_string.o fox_m_fsys_string_list.o fox_m_fsys_realtypes.o fox_m_fsys_varstr.o
ar: `u' modifier ignored since `D' is the default (see `U')
cp -p libFoX_fsys.a /home/mkashkouli/Desktop/EMTF FCU/fox-master/objs/lib 
cp: target 'FCU/fox-master/objs/lib' is not a directory
makefile:24: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/home/mkashkouli/Desktop/EMTF FCU/fox-master/fsys'
Makefile:130: recipe for target 'fsys_lib' failed
make: *** [fsys_lib] Error 2

Also, my configure is:

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gfortran... gfortran
checking whether the Fortran compiler works... yes
checking for Fortran compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking for ranlib... ranlib
configure: gfortran seems to be a Gfortran compiler
checking for kind number produced by kind(1.0)... 4
checking for kind number produced by kind(1.0d0)... 8
checking for kind number produced by selected_real_kind(6,34)... 4
checking for kind number produced by selected_real_kind(15,300)... 8
checking how to compile a call to FLUSH... default
checking how to compile a call to ABORT... default
checking for EOR character used by gfortran... LF
checking for ASSOCIATED in restricted expression bug... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking Fortran 90 module inclusion flag... -I
checking Fortran 90 module extension... mod
configure: creating ./config.status
config.status: creating arch.make
config.status: creating FoX-config

How can I fix this issue?

Regards, Mohammad

andreww commented 2 years ago

The build system seems to be failing because of the space in the directory name EMTF FCU. Removing the space ought to work around this. It should be possible to tweak the build system to properly handle this case. Probably worth leaving this issue open to remind us that this should be done.

andreww commented 2 years ago

@kashkoulimohammad - if this does fix it could you leave a note here so I remember this is something that needs looking at.

kashkoulimohammad commented 2 years ago

Hi @andreww, Thank you for your quick reply. Yes it is fixed.

andreww commented 2 years ago

Super - thanks for the confirmation - this should be an easy-ish fix.