EGSnrc
EGSnrc copied to clipboard
Compilation fails if path names become too long
Hello again,
I also noticed another problem, when compiling EGSnrc: Whenever the path-names are too long (not exactly sure how long), the configure-script will fail with
Compiling pegs4 ... Failed
configure.log then says
Mortran compiling ... compilation error (stop 12)
gmake: *** [Makefile:43: pegs4_linux.f] Error 12
Looking into pegs4_linux.f reveals only binary garbage and nothing useful. So no wonder that its compilation fails.
Workaround: if I either rename some directories above to shorter names or move EGSnrc directory more towards the root-directory, all works nicely.
This issue might be related to issue #304 (https://github.com/nrc-cnrc/EGSnrc/issues/304). However, there you conclude that the problem might be caused be the "@"-sign in the path-name. But since I don't have this sign in my path-names, and I can re-create the error with long path-names and avoid the problem with short path-names, I think the actual problem is somewhere else.
@SiebertChris a few of the devs helped me play whack-a-mole with long filename issues
Please try compiling and running from the Develop branch and let us know if it helps (#36 )
I confirm that this issue arises when the absolute path to the active .conf
file in the $HEN_HOUSE/specs/
directory is longer than 75 characters. String length limits in Mortran is a real nuisance in EGSnrc. I see that we have left Issue #36 dangling for years now, I suggest we increase the line length to 132 chars on the develop
branch right away!
Of course, that does not solve the fundamental issue that there is still a hard limit. So yes, as long as it relies on Mortran, EGSnrc cannot be installed too deep in the file system. One way around that is to create a symbolic link near the top of the filesystem if EGSnrc is buried too far...