Closed radekg closed 8 years ago
What does erlang:system_info(system_architecture)
return for your system?
pi@raspberrypi ~ $ erl
Erlang/OTP 17 [erts-6.3] [source] [smp:4:4] [async-threads:10] [kernel-poll:false]
Eshell V6.3 (abort with ^G)
1> erlang:system_info(system_architecture).
"armv7l-unknown-linux-gnueabihf"
This is a stock image directly from raspberry pi website.
In rebar.config
you can see that all architectures matching "arm" get the -m32
or -m64
flags as appropriate. Note that rebar
adds the "-32" or "-64" to the end of the architecture string based on whether the Erlang emulator in use is built for 32-bit or 64-bit mode. These lines in rebar.config
were added to address an issue raised some time ago by another user, so simply undoing them isn't the right solution. Perhaps tweaking the rules to not add -m32
or -m64
specifically for "armv7l" is a better approach?
Attached PR seems to be resolving the problem while maintaining backward compatibility.
I should have closed this a while ago. Apologies!
I have an application which uses
erlsha2
as a dependency. While trying to compile, I was getting the following error:It turned out that the reason is
-m32
inCFLAGS
(https://github.com/vinoski/erlsha2/blob/master/rebar.config#L8-L9). The failing executed command with CFLAGS is:While this works:
Platform detail:
Using the Raspbian 2015-05-05 Wheezy image.