aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-02-11 01:04:22 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-02-11 01:16:22 +0100
commit5d24c87d4bade9661cb4becc2c23853d47e6f55c (patch)
treee211189baef60ab6849f61fea706b94595d460cf /reproduce
parent6d68865a5d083b8892c3f4854284bb2036f1efdf (diff)
Configure script won't crash without Fortran compiler, only a warning
Until now, when a Fortran compiler didn't exist on the host operating system, the configure script would crash with a warning. But some projects may not need Fortran, so this is just an extra/annoying crash! With this commit, it will still print the warning, but instead of a crash, it will just sleep for some seconds, then continue. Later, when if a software needs Fortran, it's building will crash, but atleast the user was warned. In the future, we should add a step to check on the necessary software and see if Fortran is necessary for the project or not. The project configuration should indeed crash if Fortran is necessary, but we should tell the user that software XXXX needs Fortran so we can't continue without a Fortran compiler. Also, a small sentence ("Project's configuration will continue in XXXX seconds.") was added after all the warnings that won't cause a crash, so user's don't think its a crash.
Diffstat (limited to 'reproduce')
-rwxr-xr-xreproduce/software/shell/configure.sh73
1 files changed, 46 insertions, 27 deletions
diff --git a/reproduce/software/shell/configure.sh b/reproduce/software/shell/configure.sh
index e8f2736..4c6c29a 100755
--- a/reproduce/software/shell/configure.sh
+++ b/reproduce/software/shell/configure.sh
@@ -273,6 +273,21 @@ static_build=no
if type otool > /dev/null 2>/dev/null; then
host_cc=1
on_mac_os=yes
+ cat <<EOF
+
+______________________________________________________
+!!!!!!!!!!!!!!! Warning !!!!!!!!!!!!!!!!
+
+The GNU Compiler Collection (GCC, including compilers for C, C++, Fortran
+and etc) is currently not built on macOS systems for this project. To build
+the project's necessary software on this system, we need to use your
+system's C compiler.
+
+Project's configuration will continue in 5 seconds.
+______________________________________________________
+
+EOF
+ sleep 5
else
host_cc=0
on_mac_os=no
@@ -349,9 +364,8 @@ EOF
host_cc=1
cat <<EOF
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!!!!!!!!!!!!!!!!!!!!!! Warning !!!!!!!!!!!!!!!!!!!!!!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+_______________________________________________________
+!!!!!!!!!!!! Warning !!!!!!!!!!!!
The 'sys/cdefs.h' header cannot be included, or a usable static C library
('libc.a', in any directory) cannot be used with the current settings of
@@ -376,7 +390,7 @@ re-configure the project to fix this problem.
$ export LDFLAGS="-L/PATH/TO/STATIC/LIBC \$LDFLAGS"
$ export CPPFLAGS="-I/PATH/TO/SYS/CDEFS_H \$LDFLAGS"
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+_______________________________________________________
EOF
fi
@@ -393,6 +407,8 @@ seconds and use your system's C compiler (it won't build a custom GCC). But
please consider installing the necessary package(s) to complete your C
compiler, then re-run './project configure'.
+Project's configuration will continue in 5 seconds.
+
EOF
sleep 5
fi
@@ -418,33 +434,32 @@ if [ $host_cc = 1 ]; then
______________________________________________________
!!!!!!! Fortran Compiler NOT FOUND !!!!!!!
-Because the project won't be building its own GCC (which includes a Fortran
-compiler), you need to have a Fortran compiler available. Fortran is
-commonly necessary for many lower-level scientific programs. Currently we
-search for 'gfortran'. If you have a Fortran compiler that is not checked,
-please get in touch with us (with the form below) so we add it:
+The project won't be building its own GCC (which includes a Fortran
+compiler) on this system. If you need software that need a Fortran
+compiler, it will crash with an error. Fortran is necessary for many
+lower-level scientific programs, hence this warning. Currently we search
+for 'gfortran'. If you have a Fortran compiler that is not checked, please
+get in touch with us (with the form below) so we add it:
https://savannah.nongnu.org/support/?func=additem&group=reproduce
-Note: GCC will not be built because you are either using the '--host-cc'
-option, or you are using an operating system that currently has bugs when
-building GCC.
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+Project's configuration will continue in 5 seconds.
+______________________________________________________
EOF
- exit 1
- fi
-
- # See if the Fortran compiler works
- testsource=$compilertestdir/test.f
- echo; echo; echo "Checking host Fortran compiler...";
- echo " PRINT *, \"... Fortran Compiler works.\"" > $testsource
- echo " END" >> $testsource
- if gfortran $testsource -o$testprog && $testprog; then
- rm $testsource $testprog
+ sleep 5
else
- rm $testsource
- cat <<EOF
+
+ # See if the Fortran compiler works
+ testsource=$compilertestdir/test.f
+ echo; echo; echo "Checking host Fortran compiler...";
+ echo " PRINT *, \"... Fortran Compiler works.\"" > $testsource
+ echo " END" >> $testsource
+ if gfortran $testsource -o$testprog && $testprog; then
+ rm $testsource $testprog
+ else
+ rm $testsource
+ cat <<EOF
______________________________________________________
!!!!!!! Fortran compiler doesn't work !!!!!!!
@@ -465,10 +480,12 @@ existing configuration:
$ ./project configure -e
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+Project's configuration will continue in 5 seconds.
+______________________________________________________
EOF
- exit 1
+ sleep 5
+ fi
fi
fi
@@ -1053,6 +1070,8 @@ configured (in another terminal, but on this same directory: 'pwd'):
$ ./project --check-config
+Project's configuration will continue in $tsec seconds.
+
-------------------------
EOF