Error when running tutorial on Mac(Xcode)

Asked by Xiaojun Yao on 2017-10-23

Dear Sir/Madam,

I was running the tutorial and met the following error when launch MY_FIRST_MG5_RUN. Can you help me out?

Error detected in "generate_events run_01"
write debug file /Users/Colo4K/Documents/Research/MG5_aMC_v2_6_0/bin/MY_FIRST_MG5_RUN/run_01_tag_1_debug.log
If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
MadGraph5Error : A compilation Error occurs when trying to compile /Users/Colo4K/Documents/Research/MG5_aMC_v2_6_0/bin/MY_FIRST_MG5_RUN/Source.
 The compilation fails with the following output message:
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o combine_events.o combine_events.f
     gfortran: warning: couldn’t understand kern.osversion ‘16.7.0
     gfortran -o ../bin/internal/combine_events combine_events.o rw_events.o ranmar.o kin_functions.o open_file.o rw_routines.o alfas_functions.o setrun.o -L../lib/ -lmodel -lpdf -lc++ -mmacosx-version-min=10.7 -lbias
     gfortran: error: libgfortran.spec: No such file or directory
     make: *** [../bin/internal/combine_events] Error 1

Many thanks,
Xiaojun

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
2017-10-23
Last query:
2017-10-23
Last reply:
2017-10-23

Did you try to run

xcode-select --install

This typically fixes those kind of Xcode error.

Cheers,

Olivier

> On Oct 23, 2017, at 21:03, Xiaojun Yao <email address hidden> wrote:
>
> New question #659828 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/659828
>
> Dear Sir/Madam,
>
> I was running the tutorial and met the following error when launch MY_FIRST_MG5_RUN. Can you help me out?
>
> Error detected in "generate_events run_01"
> write debug file /Users/Colo4K/Documents/Research/MG5_aMC_v2_6_0/bin/MY_FIRST_MG5_RUN/run_01_tag_1_debug.log
> If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
> MadGraph5Error : A compilation Error occurs when trying to compile /Users/Colo4K/Documents/Research/MG5_aMC_v2_6_0/bin/MY_FIRST_MG5_RUN/Source.
> The compilation fails with the following output message:
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o combine_events.o combine_events.f
> gfortran: warning: couldn’t understand kern.osversion ‘16.7.0
> gfortran -o ../bin/internal/combine_events combine_events.o rw_events.o ranmar.o kin_functions.o open_file.o rw_routines.o alfas_functions.o setrun.o -L../lib/ -lmodel -lpdf -lc++ -mmacosx-version-min=10.7 -lbias
> gfortran: error: libgfortran.spec: No such file or directory
> make: *** [../bin/internal/combine_events] Error 1
>
> Many thanks,
> Xiaojun
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Xiaojun Yao (colo4k) said : #2

Hi Olivier,

Thank you for the reply. I have already installed xcode. Indeed, when typing in the command

xcode-select --install

I was told "command line tools are already installed".

What other reasons could cause the error?

Cheers,
Xiaojun

Hi,

Then i do not know,
by googling your error, I found this link:
https://stackoverflow.com/questions/46519428/couldnt-understand-kern-osversion-16-7-0

Which has the same error as you due to a mess up installation of both Xcode and gcc coming from brew.
Would it be possible that you have also installed gcc or similar? If so then it is likely that your installation mess up the Xcode one and creates the above error.
If you use brew, I would suggest to remove gcc via the dedicated command.

Cheers,

Olivier

> On Oct 23, 2017, at 21:18, Xiaojun Yao <email address hidden> wrote:
>
> Question #659828 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/659828
>
> Status: Answered => Open
>
> Xiaojun Yao is still having a problem:
> Hi Olivier,
>
> Thank you for the reply. I have already installed xcode. Indeed, when
> typing in the command
>
> xcode-select --install
>
> I was told "command line tools are already installed".
>
> What other reasons could cause the error?
>
> Cheers,
> Xiaojun
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Xiaojun Yao (colo4k) said : #4

Thanks Olivier Mattelaer, that solved my question.