linbox-team / givaro

Givaro - C++ library for arithmetic and algebraic computations
https://casys.gricad-pages.univ-grenoble-alpes.fr/givaro
Other
51 stars 21 forks source link

"unrecognized command line option ‘-march=native’; did you mean ‘-mcpu=native’?" on ppc64el #164

Closed d-torrance closed 3 years ago

d-torrance commented 3 years ago

From a PPA build of the master branch on Ubuntu 20.04 (https://launchpadlibrarian.net/526787899/buildlog_ubuntu-focal-ppc64el.givaro_4.1.1.169.gcf0f715e~ubuntu20.04.1_BUILDING.txt.gz):

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I../../../src/kernel/memory -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -march=native -Wall -DNDEBUG -UDEBUG -g -O3 "-fdebug-prefix-map=/<<PKGBUILDDIR>>=." -fstack-protector-strong -Wformat -Werror=format-security -c givinit.C  -fPIC -DPIC -o .libs/givinit.o
g++: error: unrecognized command line option ‘-march=native’; did you mean ‘-mcpu=native’?
make[5]: *** [Makefile:475: giverror.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
g++: error: unrecognized command line option ‘-march=native’; did you mean ‘-mcpu=native’?
g++: error: unrecognized command line option ‘-march=native’; did you mean ‘-mcpu=native’?
g++: error: unrecognized command line option ‘-march=native’; did you mean ‘-mcpu=native’?
make[5]: *** [Makefile:475: givbasictype.lo] Error 1

The same thing happened in other Ubuntu releases as well:

cyrilbouvier commented 3 years ago

According to GCC documentation [1] and [2], the option -march does not exist on PowerPC. We should update the configure script to add -mcpu=native instead of -march=native when compiling on a PowerPC.

[1] https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html [2] https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html

ClementPernet commented 3 years ago

Reopened it, as merging#168 closed it automatically. @d-torrance can you please confirm that #168 solved the issue on ppc64el ? Thanks.

d-torrance commented 3 years ago

It worked! All the ppc64el builds based on 58f817cd were successful: