Score:0

Compiling with make gives me the error: cc1plus: error: unrecognized argument to ‘-flto=’ option: ‘auto -ffat-lto-objects -flto=auto’

um flag

I'm trying to compile this code whith the procedure that apears in the site. I make a new "build" folder and i use the command "cmake .." after i enter the folder, but when i use the "make" command it gives me the error. I have Ubuntu version 22.04, gcc version 11.3.0, make version 4.3 and already installed mpi. The whole error is this:

cc1plus: error: unrecognized argument to ‘-flto=’ option: ‘auto -ffat-lto-objects -flto=auto’
make[2]: *** [CMakeFiles/vpic.dir/build.make:76: CMakeFiles/vpic.dir/src/boundary/absorb_tally.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/vpic.dir/all] Error 2 make: *** [Makefile:136: all] Error 2
muru avatar
us flag
Please don't post screenshots of text. Copy the text here and use code formatting instead: https://askubuntu.com/editing-help#code. Also add the version of Ubuntu you're running to the question.
hr flag
Can you be more specific than *"whith the procedure that apears in the site"*? Which implementation of MPI are you using? Which `../arch/xxx` script did you select? I just tried it on a 22.04 VM with openmpi and `../arch/gcc/reference-Release` and everything seemed to build OK
Dokalozu avatar
um flag
The procedure is making a new folder in "vpic" called "build", after that i use "cmake .." in the folder. Until this point everything runs good, but when i use make the error apears. I've tried using "../arch/reference-Release" and the problem persists
Dokalozu avatar
um flag
I'm using the MPI that is included in gcc
Score:0
iq flag

Have you suceed in solving this problem? I've encountered a similar question when compiling a self-made code on a new computer.

lcs_27 avatar
iq flag
I've succeeded to solve this problem. A way to solve this is that you can remove the ```‘-flto=auto -ffat-lto-objects -flto=auto’``` flag in your cmakecache file or your cmakelist file.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.