FLUKA4-0.0 installation on macOS Catalina error

Dear FLUKA experts,
I was installing the new version of FLUKA, FLUKA4.0, on my Mac, following the instruction Installing FLUKA on GNU/Linux or macOS. However, when I type make command in the src directory, the terminal returns the following error:

gfortran -o /Users/z/FLUKA/fluka4-0.0//bin/fluka -L/Users/z/FLUKA/fluka4-0.0//lib -lfluka
ld: can’t open output file for writing ‘/Users/z/FLUKA/fluka4-0.0//bin/fluka.ld_dF9mfO’, errno=13 for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [/Users/z/FLUKA/fluka4-0.0//bin/fluka] Error 1

Thanks in advance!
Z.

Dear @Ephemera,
can you provide the version of gfortran you are using?
gfortran --version

And which package are you using?

Dear Luigi,
Yes!
The output of gfortran --version is:

GNU Fortran (MacPorts gcc10 10.1.0_0) 10.1.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The package I downloaded is: fluka-4-0.0.Darwin-gfor10.tar

Thank you!
Z.

Hi @Ephemera,
the setup seems ok.
Your message suggests that you have permission issues on the destination folder
/Users/z/FLUKA/fluka4-0.0

Could you check the permissions of this folder and of the files inside?
For example, can you create a file inside with the following command?
touch /Users/z/FLUKA/fluka4-0.0/x

Hi, Luigi
Thank you! I used sudo make, and it worked for fluka4-0.0.
However, when I’m following the flair installation instruction (https://flair.web.cern.ch/flair/download.html), having successfully installed flair3.1, the flair-geoviewer-3.1 compilation failed.

Compile

To compile flair-geoviewer do the following:

$ tar xzvf flair-geoviewer-X-XX.tgz
$ cd flair-geoviewer-X-XX
$ make -j 8
$ make install DESTDIR=PATH_FLAIR
and replace PATH_FLAIR with the directory path where Flair was expanded.

Compile in parallel: -j 8 replace with the number of cores you have available

The first three steps were alright, but the forth step $ sudo make install DESTDIR=/Users/z/FLUKA/flair-3.1/, it gives the following error message.

Sorry for keeping bothering you.
Thank you!
Z.

Hi @Ephemera,
I understand that you have solved the problem of the FLUKA installation.
From the last snapshot, it’s not clear if you still have problems with Flair/geoviewer.
Of course, let us know in case you need further assistance.

I would also add that you need the sudo command only to install MacPorts ports, but
I recommend not to use it to compile FLUKA/Flair/geoviewer
Cheers, luigi

Hi, Luigi
Sorry I didn’t express myself clearly in the last post.
I still have a problem installing geoviewer. When I type in the command make install DESTDIR=/Users/z/FLUKA/flair-3.1/, the terminal returns the following error:


Then, when I open flair, the flair output window would show:

w> Warning: Geometry Viewer not found
e> ERROR: dynamic module does not define module export function (PyInit_geoviewer)

And the geometry tab would only show a static image like this:

How would I install geoviewer correctly?

Thank you!
Z.

Dear @Ephemera,
the instructions to install Flair/Geoviewer are in the Flair page

In your previous message I see that you had a different setup based on python37.
Here the error mentions python36… Moreover, the error suggests that you are not using the MacPorts python.

What is the output of these commands?
echo $PATH
which python3

Dear Luigi,
Yes, I was following the instruction on the Official flair site.
Here is the output of those commands.

z@MacBook-Pro flair-geoviewer-3.1 % echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/z/FLUKA/fluka4-0.0/bin
z@MacBook-Pro flair-geoviewer-3.1 % which python3
/opt/local/bin/python3

Thank you!
Z.

Hi @Ephemera,
I was finally able to reproduce your problem.
It is due to the presence of the *.d files in the tarball.

Please run before the command make clean in the geoviewer folder and then follow in the instructions on the official flair site.

Let me know if you manage to install Flair/geoviewer
Cheers luigi

Dear Luigi,
It worked, now I’m able to see my geometry in the Geometry tab.

Thank you!!
Z.