Executable is not generated

Versions

FLUKA:4-5.0
Flair:3.4

FLUKA:4-5.0
Flair:3.4

Description

I created a custom source file named source_newgen.f for my FLUKA project. The code compiles successfully in the terminal using:fff source_newgen.f

which produces the object file source_newgen.o.

However, when I try to compile the same file through FLAIR, it fails to generate an executable.
Here are the steps I followed:

  1. Copied source_newgen.f into my project directory.

  2. Edited and saved the code in Flair.

  3. In the Executable field, I entered mine.exe.

  4. Clicked Build.

FLAIR shows the error: Error: executable is not generated

Why is the executable not being created even though compilation in the terminal works fine?

Input files

source_newgen.f (3.4 KB)

TAG.inp (1.4 KB)

TAG.flair (1.8 KB)

Dear @akshad997

for me, your files build without an issue.

please try the following:

  1. Update Flair to the newest version 3.4-5
  2. delete all *.o and *.mod files in the directory and build again from Flair only. If the error still occurs, look up the Output tab and copy the details here.

Yes I updated the flair.

Deleted all the .o and .mod files in the directory and clicked build. Same error came.

Error : *-* Linking: /mnt/volume/Flukafinal/fluka4-5.0/bin/lfluka -o source
source_newgen.o
gfortran -o source -fuse-ld=bfd source_newgen.o
-L/mnt/volume/Flukafinal/fluka4-5.0/lib -lfluka -lgeometry -ldata -lmath
-ltool -lstdc++ -lz -lpthread
/usr/bin/ld.bfd: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status
Ended: 2025.11.07 09:47:09

Error linking
Error: executable is not generated

according to this post you are missing the g++ package. Please install that and try again.

it is already installed.

Hi everyone…

Finally it ran successfully. I reinstalled the software again.

Now the new error is : Cannot open source_events.dat

Please help! The source file (source_newgen.f) is already uploaded in the first message where I have given a command to open ‘source_events.dat’

Dear Shad,

if you use the general Fortran open() function, then the data file must be present in the temporary fluka_xxxxx directory.

I would suggest to use the FLUKA function oauxfi(), which searches for the file in multiple locations.

See slide 18 from https://indico.cern.ch/event/1200922/contributions/5411803/attachments/2659603/4606825/03_Fortran_basics_2023_Advanced_ANL.pdf

Cheers,
David

Thank you David.

The code ran, when I reinstalled fluka again.