Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g++: error: unrecognized command line option ‘-msse2’ #33

Closed
Nehemoth opened this issue Dec 14, 2017 · 5 comments
Closed

g++: error: unrecognized command line option ‘-msse2’ #33

Nehemoth opened this issue Dec 14, 2017 · 5 comments

Comments

@Nehemoth
Copy link

Hi there.
Trying this for first time but I understand a little big about CPU architecture.
So I'm following this tutorial and I cloned this repository.
So when I need to compile on my Raspberry Pi 3 I'm using this command
make -f makefile.unix xCPUARCH=arm7l -j3

But I received this error:
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/root/magi/src -I/root/magi/src/hash -I/root/magi/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/root/magi/src/leveldb/include -I/root/magi/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -msse2 -MMD -MF obj/alert.d -o obj/alert.o alert.cpp /bin/sh ../share/genbuild.sh obj/build.h g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/root/magi/src -I/root/magi/src/hash -I/root/magi/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/root/magi/src/leveldb/include -I/root/magi/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -msse2 -MMD -MF obj/checkpoints.d -o obj/checkpoints.o checkpoints.cpp g++: error: unrecognized command line option ‘-msse2’ g++: error: unrecognized command line option ‘-msse2’ makefile.unix:187: recipe for target 'obj/checkpoints.o' failed make: *** [obj/checkpoints.o] Error 1 make: *** Waiting for unfinished jobs.... makefile.unix:187: recipe for target 'obj/alert.o' failed make: *** [obj/alert.o] Error 1

Obviously for some reason during the compilation it's trying to using the SSE Instructions which of course the ARM platform doesn't support

So I went to see the makefile.unix File and I can clearly see

If we have an ARM device, we can't use SSE2 instructions, so don't try to use them

xCPUARCH is passed in as a define (xCPUARCH=armv7l, xCPUARCH=armv6l)

ifeq ($(xCPUARCH),armv7l)
else ifeq ($(xCPUARCH),armv6l)
else
xCXXFLAGS+=-msse2
endif

So I shouldn't be receiving this error.

What can I change to force make not to use msse2

Regards

@Nehemoth
Copy link
Author

So with the help of a friend programmer we found out the error:
The command it's wrong.
Intead of: make -f makefile.unix xCPUARCH=arm7l -j3
should be: make -f makefile.unix xCPUARCH=arm**v**7l -j3

That v makes the whole world.

Thank you

@headstrong83
Copy link

Hi,

i tried make -f makefile.unix xCPUARCH=armv71 -j3 or -j4, but i bacome a simmilar error.

g++: error: unrecognized command line option `-msse2´
makefile.unix:186: recipe for target ´obj/alert.o faild
make: *** [obj/alert.o] Error 1
make *** Waiting for unfinishedjobs...
g++: error: unrecognized command line option ´-msse2´
makefile.unix:186:recipe for target ´obj/checkpoints.o´ failed
make: *** [obj/checkpoints.o] Error 1

What can i do, or have ich forgot some think :(.

Regards

@DoBi
Copy link

DoBi commented Aug 26, 2018

@headstrong83
You have to use xCPUARCH=armv7l instead of armv71. Then the -msse2 flag is not used and it should compile.

@Nehemoth
I think your issue is solved, isn't it? 😉

@aaronmee
Copy link

aaronmee commented Apr 5, 2024

@Nehemoth could you close this issue?

@Nehemoth
Copy link
Author

Nehemoth commented Apr 5, 2024

Closed as requested.

@Nehemoth Nehemoth closed this as completed Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants