You are not logged in.
I'm trying to compile a computational chemistry software (GAMESS) on Arch. I've compiled this on Debian Buster, OpenBSD 6.9, MacOS Big Sur, and Ubuntu 21.04.
In all of those cases, the build process works without error. On Arch, I get the following error with 'VERBOSE=1' added to the makefile:
gfortran -c -fdefault-integer-8 -g -O2 -std=legacy -w -fno-aggressive-loop-optimizations -funconstrained-commons -Werror=uninitialized -Werror=align-commons -Wtabs -Wno-maybe-uninitialized libxc_empty
gfortran: warning: libxc_empty: linker input file unused because linking not done
gfortran: error: libxc_empty: linker input file not found: No such file or directory
unset echo
Division by 0.
make: *** [/home/User/Build/gamess/Makefile.in:99: /home/User/Build/gamess/object/libxc_empty.o] Error 1
The "libxc_empty" is the first of many files which are compiled to an object file to be linked later in the process. I'm not understanding where it is going wrong on Arch because it seems to run fine on the other systems I've compiled for.
I'm new to posting on the forums so hopefully I'm putting this in the right location. Let me know if more information is needed. My system is fully up to date. I've done this on a clean Arch build. The packages in use during this compile are:
gcc-11.1, gcc-fortran-11.1, tcsh-6.22.03-1, make 4.3-3
I've spent about a week searching and trying to troubleshoot and figured I would try my luck here.
EDIT: Additional Information
I’ll add a detail. For some reason, when I compile this on other systems, the gfortran commands echos like this:
gfortran -c -fdefault-integer-8 -g -O2 -std=legacy -w -fno-aggressive-loop-optimizations -funconstrained-commons -Werror=uninitialized -Werror=align-commons -Wtabs -Wno-maybe-uninitialized libxc_empty.*
where, the ‘*’ extension is either ‘.f’, ‘.F’, ‘.F90’, etc. As you can see above, running the build on Arch does not have that extension.
This makes me wonder if the problem is occurring in the scripts which are csh. Is it possible that Arch has a mutant version of csh which is causing this issue?
EDIT: Dry run of make
This is the output with 'make -n' to show what make is trying to do during line 99 in 'Makefile.in':
if [ -e /home/User/Build/gamess/object/libxc_empty.f ]; then rm /home/User/Build/gamess/object/libxc_empty.f;fi
/home/User/Build/gamess/comp libxc_empty 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/prec.f ]; then rm /home/User/Build/gamess/object/prec.f;fi
/home/User/Build/gamess/comp prec 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/constants.f ]; then rm /home/User/Build/gamess/object/constants.f;fi
/home/User/Build/gamess/comp constants 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mx_limits.f ]; then rm /home/User/Build/gamess/object/mx_limits.f;fi
/home/User/Build/gamess/comp mx_limits 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/gausshermite.f ]; then rm /home/User/Build/gamess/object/gausshermite.f;fi
/home/User/Build/gamess/comp gausshermite 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/modules_dft.f ]; then rm /home/User/Build/gamess/object/modules_dft.f;fi
/home/User/Build/gamess/comp modules_dft 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/efpmodule.f ]; then rm /home/User/Build/gamess/object/efpmodule.f;fi
/home/User/Build/gamess/comp efpmodule 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/params.f ]; then rm /home/User/Build/gamess/object/params.f;fi
/home/User/Build/gamess/comp params 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/modmnfun.f ]; then rm /home/User/Build/gamess/object/modmnfun.f;fi
/home/User/Build/gamess/comp modmnfun 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_sformas.f ]; then rm /home/User/Build/gamess/object/mod_sformas.f;fi
/home/User/Build/gamess/comp mod_sformas 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/modmcpdft.f ]; then rm /home/User/Build/gamess/object/modmcpdft.f;fi
/home/User/Build/gamess/comp modmcpdft 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mpcdatpm6.f ]; then rm /home/User/Build/gamess/object/mpcdatpm6.f;fi
/home/User/Build/gamess/comp mpcdatpm6 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mpchbond.f ]; then rm /home/User/Build/gamess/object/mpchbond.f;fi
/home/User/Build/gamess/comp mpchbond 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/rmddat.f ]; then rm /home/User/Build/gamess/object/rmddat.f;fi
/home/User/Build/gamess/comp rmddat 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/secor.f ]; then rm /home/User/Build/gamess/object/secor.f;fi
/home/User/Build/gamess/comp secor 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_nosp_basis.f ]; then rm /home/User/Build/gamess/object/mod_nosp_basis.f;fi
/home/User/Build/gamess/comp mod_nosp_basis 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_grid_storage.f ]; then rm /home/User/Build/gamess/object/mod_grid_storage.f;fi
/home/User/Build/gamess/comp mod_grid_storage 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_dft_partfunc.f ]; then rm /home/User/Build/gamess/object/mod_dft_partfunc.f;fi
/home/User/Build/gamess/comp mod_dft_partfunc 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_dft_molgrid.f ]; then rm /home/User/Build/gamess/object/mod_dft_molgrid.f;fi
/home/User/Build/gamess/comp mod_dft_molgrid 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_dft_fuzzycell.f ]; then rm /home/User/Build/gamess/object/mod_dft_fuzzycell.f;fi
/home/User/Build/gamess/comp mod_dft_fuzzycell 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_dft_gridint.f ]; then rm /home/User/Build/gamess/object/mod_dft_gridint.f;fi
/home/User/Build/gamess/comp mod_dft_gridint 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
Thank you
Last edited by brokaryote (2021-05-30 22:10:10)
Offline
Offline
Seth,
I have come across that suggestion in my searches and removing the ‘-c’ didn’t help. The ‘-c’ is present for the other systems I’ve compiled on and they don’t give this same error that Arch gives.
There are over 200 object files that need to be created before linking in this build. The linking is handled in a different step at the very end.
Thank you for the suggestion
EDIT:
I’ve added some information to my first post which may be relevant
Last edited by brokaryote (2021-05-28 13:05:40)
Offline
I'm going to guess this is a gcc-11 issue. I see similar errors reported in Debian that are found with gcc-11 but not gcc-10. e.g. https://lists.debian.org/debian-qa-pack … 00034.html
Offline
Allan,
I did also experience this same issue with gcc-10.2 on Arch before the repo switched to gcc-11
I initially thought gcc-10 was the issue because I was able to compile on other systems without issues. I’m able to compile with no errors on macOS Big Sur using gcc-11 from the homebrew packages
Thank you
Offline
To rule out any csh related problems, just try bash.
Also please post the complete build I/O, preferably a VERBOSE=1 make.
The warning is there because of the "-c", it prevents linking but this has to take place at some point - otherwise you'll get resolution errors.
Offline
Seth,
Later today I will post a verbose make output.
I did spend a day trying to convert their csh scripts into bash; the csh scripts use non-bash syntax.
Unfortunately there are two commands in their scripts for which I do not know of a bash alternative for.
I checked my syntax with shellcheck and it all seems to be okay aside from those two commands I don’t know how to convert, which I omitted and I don’t think they are critical to the part which would execute the FORTRAN (they are mostly debug options for the devs).
The scripts did not work as replacements. The original csh scripts are a few thousand lines so it’s possible I made a mistake somewhere.
Offline
Seth,
This is the error message with 'VERBOSE=1' added to the makefile:
gfortran -c -fdefault-integer-8 -g -O2 -std=legacy -w -fno-aggressive-loop-optimizations -funconstrained-commons -Werror=uninitialized -Werror=align-commons -Wtabs -Wno-maybe-uninitialized libxc_empty
gfortran: warning: libxc_empty: linker input file unused because linking not done
gfortran: error: libxc_empty: linker input file not found: No such file or directory
unset echo
Division by 0.
make: *** [/home/User/Build/gamess/Makefile.in:99: /home/User/Build/gamess/object/libxc_empty.o] Error 1
This is the output with 'make -n' to show what make is trying to do during line 99 in 'Makefile.in':
if [ -e /home/User/Build/gamess/object/libxc_empty.f ]; then rm /home/User/Build/gamess/object/libxc_empty.f;fi
/home/User/Build/gamess/comp libxc_empty 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/prec.f ]; then rm /home/User/Build/gamess/object/prec.f;fi
/home/User/Build/gamess/comp prec 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/constants.f ]; then rm /home/User/Build/gamess/object/constants.f;fi
/home/User/Build/gamess/comp constants 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mx_limits.f ]; then rm /home/User/Build/gamess/object/mx_limits.f;fi
/home/User/Build/gamess/comp mx_limits 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/gausshermite.f ]; then rm /home/User/Build/gamess/object/gausshermite.f;fi
/home/User/Build/gamess/comp gausshermite 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/modules_dft.f ]; then rm /home/User/Build/gamess/object/modules_dft.f;fi
/home/User/Build/gamess/comp modules_dft 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/efpmodule.f ]; then rm /home/User/Build/gamess/object/efpmodule.f;fi
/home/User/Build/gamess/comp efpmodule 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/params.f ]; then rm /home/User/Build/gamess/object/params.f;fi
/home/User/Build/gamess/comp params 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/modmnfun.f ]; then rm /home/User/Build/gamess/object/modmnfun.f;fi
/home/User/Build/gamess/comp modmnfun 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_sformas.f ]; then rm /home/User/Build/gamess/object/mod_sformas.f;fi
/home/User/Build/gamess/comp mod_sformas 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/modmcpdft.f ]; then rm /home/User/Build/gamess/object/modmcpdft.f;fi
/home/User/Build/gamess/comp modmcpdft 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mpcdatpm6.f ]; then rm /home/User/Build/gamess/object/mpcdatpm6.f;fi
/home/User/Build/gamess/comp mpcdatpm6 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mpchbond.f ]; then rm /home/User/Build/gamess/object/mpchbond.f;fi
/home/User/Build/gamess/comp mpchbond 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/rmddat.f ]; then rm /home/User/Build/gamess/object/rmddat.f;fi
/home/User/Build/gamess/comp rmddat 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/secor.f ]; then rm /home/User/Build/gamess/object/secor.f;fi
/home/User/Build/gamess/comp secor 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_nosp_basis.f ]; then rm /home/User/Build/gamess/object/mod_nosp_basis.f;fi
/home/User/Build/gamess/comp mod_nosp_basis 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_grid_storage.f ]; then rm /home/User/Build/gamess/object/mod_grid_storage.f;fi
/home/User/Build/gamess/comp mod_grid_storage 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_dft_partfunc.f ]; then rm /home/User/Build/gamess/object/mod_dft_partfunc.f;fi
/home/User/Build/gamess/comp mod_dft_partfunc 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_dft_molgrid.f ]; then rm /home/User/Build/gamess/object/mod_dft_molgrid.f;fi
/home/User/Build/gamess/comp mod_dft_molgrid 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_dft_fuzzycell.f ]; then rm /home/User/Build/gamess/object/mod_dft_fuzzycell.f;fi
/home/User/Build/gamess/comp mod_dft_fuzzycell 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
if [ -e /home/User/Build/gamess/object/mod_dft_gridint.f ]; then rm /home/User/Build/gamess/object/mod_dft_gridint.f;fi
/home/User/Build/gamess/comp mod_dft_gridint 2>&1 1>/dev/null # | sed -e 's%\([a-z0-9]*\)\.f%/home/User/Build/gamess/source\/\1\.src%'
Offline
This seems to deal in sources that are suffixied *.f - they're deleted, then /home/User/Build/gamess/comp runs on the unsuffixed object name and , though commented, the output is run through sed, filtered by that suffix.
=> What's /home/User/Build/gamess/comp ? The somethousand lines csh script?
Offline
Seth,
There are three main scripts that control the flow of the compile:
comp - csh script at 2943 lines which runs the *.src passed to it by compall. It checks the *.src against many if;then and case statements to control what happens with it
compall - csh script at 930 lines which passes *.src to comp based on the target architecture and optional addons such as gpu acceleration, mkl/blas, openmp, mpi and other computational chem package integration
lked - csh script at 1481 lines which handles the final linking of all of the *.src that was compiled to an object file during the first two steps as well as linking to static or shared system libraries like math libraries for example
The source is suffixed in *.src and the comp script will rename in the early stages to either *.f, *.F, *.F90 depending on the structure of the FORTRAN code and then it is compiled after going through many more branching and case statements.
That sed that is commented does nothing which I'm assuming is why they ended up commenting it out. I've removed it and the output is the same, just without color code on the error and warning statements.
Last edited by brokaryote (2021-05-29 20:09:36)
Offline
Can you legally post or link the comp script?
Offline
I'm not legally allowed to distribute the code but the code is free for you to retrieve if you would like to. Basically it just requires you to put an email address in and they will send you a link and a password for download.
The license agreement is pretty simple and just asks that you do not distribute the code, do not integrate their code into other projects, and cite them properly if you are to publish work that utilizes the software. It normally doesn't take more than a day for them to send that email but with the holiday this weekend, it may take longer. Thank you again for helping out with this
Offline
I'm far too laz… "paranoid" for that - is it https://raw.githubusercontent.com/strea … /unix/comp ?
Offline
That is the script but that one is older. I’m not sure how much different it is but it’s the same idea
Offline
From that script it would seem that line #68ff
if ( $MODULE_DIR != $MODULE ) then
if ( $?GMS_OTHER_OBJDIR == 0 ) set GMS_OTHER_OBJDIR = $MODULE_DIR/
set GMS_OTHER_SRCDIR = $MODULE_DIR/
set GMS_DO_NOT_REMOVE = 1
set MODULE_F = $MODULE
# Guess the object file name (to test later whether it will be generated)
set MODULE_OBJ = `cd $GMS_OTHER_OBJDIR && pwd`/"$MODULE:t:r".o
endif
hits, ie "$1 = $1:h"
You could try to comment that section. A quick test suggests that they'll always turn out different
% set FOO = /foo/bar
% echo $FOO:h
/foo
% set FOO = foo/bar
% echo $FOO:h
foo
% echo $FOO:h
% set FOO = foo/
% echo $FOO:h
foo
% set FOO = foo
% echo $FOO:h
# actually blank output
% set FOO = /foo
% echo $FOO:h
# actually blank output
% set FOO = /foo/
% echo $FOO:h
/foo
test ! -d `realpath $MODULE`
is more expensive, but should™ be more reliable.
Offline
Commenting that out fixed the issue. I'm so confused about why that section would break functionality on Arch but not the other systems that I've built on. Do you have any ideas? The reasoning you gave makes perfect sense; it evaluates differently depending on how information is passed to it. What could it be about Arch that causes that if statement to fail? Thank you for the help here because this was driving me nuts. I knew enough to know that the path was getting messed up but obviously not enough for that particular statement to jump out at me as being wrong.
Besides marking this thread as solved, is there some type of vote system for good responses that I can give out to you?
Thank you
EDIT:
Also, we have a gamess package on the AUR, would you be okay with me bringing your solution to that page or would you like to bring it there yourself?
Last edited by brokaryote (2021-05-30 21:59:22)
Offline
Do the other systems run tcsh or a different csh implementation?
Be aware that simply commenting this might run you into different trouble since apparently there's at least a concept to pass a directory rather than a file to the script.
The board has no karma system, so I'll simply be very impressed by myself for five minutes or so
Edit: since you care about the package, you'll interact w/ its maintainer. Feel free to refer them over here if there open questions.
Last edited by seth (2021-05-30 22:03:29)
Offline
The other systems are also using calling csh but I'm not sure if they truly call csh or have tcsh symlinked to csh. That being said, I have tried changing the shebang in the scripts on Arch to both tcsh and tcsh -f to rule out csh and startup files.
Each of the other systems do use tcsh-6.23 and Arch is still on tcsh-6.22 so that very well could be a bug
Offline
I don't see a 6.23 release, but I do see https://github.com/tcsh-org/tcsh/commit … 1056995ac1
Offline
That commit appears to be included in 6.22.04 , apparently released on 26 april 2021 .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
I'm not sure why the number 6.23 was in my head but you're right. There is tcsh 6.22.03 and 6.22.04. Both Arch and OpenBSD are running 6.22.03. Ubuntu 21.04 and macOS are both on 6.21 and Debian is on 6.20
https://cdn.openbsd.org/pub/OpenBSD/6.9/packages/amd64/
https://archlinux.org/packages/community/x86_64/tcsh/
The problem somehow did not occur on OpenBSD 6.9 when I built it this past week though, which is still very strange. But based on that commit and the results I got from your fix, that part of the script is definitely unreliable
Offline