iceman1001 / proxmark3

[Deprecated] Iceman Fork, the most totally wicked fork around if you are into proxmark3
http://www.icedev.se/pm3.aspx
GNU General Public License v2.0
466 stars 116 forks source link

Compilation problem [-Werror=address-of-packed-member] #294

Closed nemanjan00 closed 5 years ago

nemanjan00 commented 5 years ago
arm-none-eabi-gcc -c -I../include -I../common -I. -Wall -Werror -pedantic -Wunused -std=c99 -DWITH_CRC -DON_DEVICE -DWITH_LF -DWITH_HITAG -DWITH_ISO15693 -DWITH_LEGICRF -DWITH_ISO14443b -DWITH_ISO14443a -DWITH_ICLASS -DWITH_FELICA -DWITH_FLASH -DWITH_SMARTCARD -DWITH_HFSNOOP -DWITH_LF_SAMYRUN -fno-strict-aliasing -ffunction-sections -fdata-sections -DZ_SOLO -DZ_PREFIX -DNO_GZIP -DZLIB_PM3_TUNED -I../zlib -I. -Os -mthumb -mthumb-interwork -o obj/appmain.o appmain.c 
appmain.c: In function 'UsbPacketReceived':
appmain.c:622:40: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  622 |    setSamplingConfig((sample_config *) c->d.asBytes);
      |                                        ^
cc1: all warnings being treated as errors
make[1]: *** [../common/Makefile.common:77: obj/appmain.o] Error 1
make[1]: Leaving directory '/home/nemanjan00/gitProgs/proxmark3/armsrc'
make: *** [Makefile:35: armsrc/all] Error 2

Temporary solution is removing -Werror from common/Makefile.common... I am not C/C++ guy, so, was not able to solve real problem.

Building on Arch, gcc version: arm-none-eabi-gcc 9.1.0-1

iceman1001 commented 5 years ago

@doegox This one is for you, Arch linux... I suppose this exists in RRG repo aswell. Unaligned pointer access.

iceman1001 commented 5 years ago

@nemanjan00 you wouldn't mind testing https://github.com/RfidResearchGroup/proxmark3/blob/master/doc/md/Installation_Instructions/Linux-Installation-Instructions.md and compiling the RRG repo?

nemanjan00 commented 5 years ago

Compiles no problems

BTW, thanks for fast response, and also, for this dork and work in community

doegox commented 5 years ago

Yes I tested rrg on Arch docker, compiles fine

iceman1001 commented 5 years ago

sounds like I can close this one.

nemanjan00 commented 5 years ago

RRG does compile, but, this one does not

iceman1001 commented 5 years ago

use RRG, adjust Makefile.platform file to compile for your proxmark3 device

nemanjan00 commented 5 years ago

Ok, thanks!