Linker error: cannot find /: File format not recognized

Hi everyone,

After apparently successfully installing Geant4, when I try to compile any of my codes, I get this linker error:

Any ideas as to why it could be?



Geant4 Version:10.02
Operating System:Ubuntu 18.04
Compiler/Version: 7.5.0 and cmake version: 3.10.02

Looks like it’s trying to use / as a file name - not clear where that comes from though. Run the build with CPPVERBOSE=1 make and post the output here (please use fenced code blocks rather than screenshots) as this should show more detail on where that path is coming from.

might be a whitespace in file name / path.

did you choose version 10.02 on purpose? there are more recent 10.x versions…

Thank you so much. I saved the output on this log fie:

make_log.txt (13.9 KB)


The problem is that I am not sure which file this is stemming from. I am using this version, because this one is tested for phantom voxelization in our lab and quality assured. I just want to be consistent with my compiler and cmake versions and the other lab mates, but I might end up just downloading a different one. Nonetheless, I don’t think the error is because of the version. Do you think something is not working anymore?

Thanks for the info. The / is appearing the link step:

-o /home/shirin/geant4_workdir/bin/Linux-g++/TG43 /home/shirin/geant4_workdir/tmp/Linux-g++/TG43/exe/TG43.o  
-L/home/shirin/geant4_workdir/tmp/Linux-g++/TG43 -Wl,-rpath /home/shirin/geant4_workdir/tmp/Linux-g++/TG43

The relevant lines that set the overall command line are here: geant4/binmake.gmk at v10.2.2 · Geant4/geant4 · GitHub

The \ therefore looks like it’s getting injected somewhere in LDFLAGS, so you’ll have to check first in your application’s GNUmakefile to see if that’s adjusting any link related flags, and then through the Geant4GMake files to track down what’s getting expanded/set to /.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.