Problem running MadGraph5 v2.6.4 in Mac OSX Mojave

Asked by Brenda Fab on 2019-01-09

Dear MadGraph experts,

I installed and tried to run the newest version of Madgraph5 v.2.6.4 in my personal Mac with macOS Mojave 10.14.2, but I had a similar issue as the reported in: (the same output errors). The version of gfortran currently set in my computer are:

gcc --version
Configured with: --prefix=/Applications/ --with-gxx-include-dir=/Applications/
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/

gfortran --version
GNU Fortran (GCC) 7.1.0
Copyright (C) 2017 Free Software Foundation, Inc.

I updated xcode by typing: xcode-select --install and also installed all the command line tools of xcode today but I still had the same error. Then, I changed the "MACFLAG=-mmacosx-version-min=10.8" to "MACFLAG=" in the make_opts directory of a simple test run (generate p p > e- ve~ @1 with all the default cards) and after doing all of the above I get the following output:

INFO: compile directory
compile Source Directory
Error detected in "generate_events run_01"
write debug file /Users/bfabelae/Software/MG5_aMC_v2_6_4/PROC_sm_0/run_01_tag_1_debug.log
If you need help with this issue please contact us on
MadGraph5Error : A compilation Error occurs when trying to compile /Users/bfabelae/Software/MG5_aMC_v2_6_4/PROC_sm_0/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 -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++ -lbias
     ld: warning: tentative definition of '_heprup_' with size 2848 from 'setrun.o' is being replaced by real definition of smaller size 104 from 'combine_events.o'
     collect2: fatal error: /usr/local/bin/gnm returned 1 exit status
     compilation terminated.
     make: *** [../bin/internal/combine_events] Error 1

 Please try to fix this compilations issue and retry.
 Help might be found at
 If you think that this is a bug, you can report this at

Before upgrading to OSX Mojave my previous MG5 installations were working just fine (v.2.6.1, v.2.6.2 and v.2.6.3), but now all of them including v.2.6.4 have that problem.

Could you provide me some guidance on how to solve this issue?
Thank you very much in advance.

Question information

English Edit question
MadGraph5_aMC@NLO Edit question
No assignee Edit question
Solved by:
Brenda Fab
Last query:
Last reply:


Did you read the following link?

Looks like you have some issue with the gnm code (first that I heard about that executable)
In the above thread they suggest various way to avoid the issue.
They are also a bug report associated to this on the binutils forum, but I did not read that thread (maybe you should, since this might indicate that you "only" need to update that package)



Brenda Fab (faebrenda-33) said : #2

Hello Olivier,

Thank you for your reply. Yes, I read that link before but I was not sure how to implement the solutions. What I did is to set nm as gnm (suggested in the link):

mv /usr/local/bin/gnm /usr/local/bin/gnm-backup
ln -s /usr/bin/nm /usr/local/bin/gnm

and now I can run without problems.

Thanks again.