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

Build error on hitags #2547

Open
JohnDoeIsKIng opened this issue Oct 1, 2024 · 2 comments
Open

Build error on hitags #2547

JohnDoeIsKIng opened this issue Oct 1, 2024 · 2 comments

Comments

@JohnDoeIsKIng
Copy link

Dear community,

last week I encountered an error during building. The error evolved on the target hitags.
Here 's the build log:
compiler version: arm-none-eabi-gcc (15:6.3.1+svn253039-1build1) 6.3.1 20170620 [-] GEN fpga_version_info.c [-] CC fpga_version_info.c [-] GEN obj/fpga_all.bit.z [-] GEN obj/fpga_all.o [-] CC start.c [-] CC iso15693.c [-] CC ../common/iso15693tools.c [-] CC thinfilm.c [-] CC lfops.c [-] CC lfsampling.c [-] CC pcf7931.c [-] CC ../common/lfdemod.c [-] CC lfadc.c [-] CC ../common/lz4/lz4.c [-] CC legicrf.c [-] CC legicrfsim.c [-] CC ../common/legic_prng.c [-] CC ../common/hitag2/hitag2_crypto.c [-] CC hitag2.c [-] CC hitagS.c hitagS.c: In function 'hts_select_tag': hitagS.c:1158:13: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] key_le = *(uint64_t *)packet->key; ^~~~~~ hitagS.c:1160:13: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] uint64_t state = ht2_hitag2_init(reflect48(key_le), reflect32(tag.data.s.uid_le), reflect32(*(uint32_t *)rnd)); ^~~~~~~~ hitagS.c:1252:13: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] uint64_t state = ht2_hitag2_init(reflect48(key_le), reflect32(tag.data.s.uid_le), reflect32(*(uint32_t *)rnd)); ^~~~~~~~ cc1: all warnings being treated as errors ../common_arm/Makefile.common:118: recipe for target 'obj/hitagS.o' failed make[1]: *** [obj/hitagS.o] Error 1 Makefile:167: recipe for target 'armsrc/all' failed make: *** [armsrc/all] Error 2

john@pc:~/Githubs/proxmark3$ cc --version cc (Ubuntu 10.3.0-1ubuntu1~18.04~1) 10.3.0

Any hints to solve that are appreciated.
Best regards

JD.

@iceman1001
Copy link
Collaborator

No idea. GH Actions doesn't show any build errors or warnings.

Have you cleaned your env? make clean; make -j ?

@JohnDoeIsKIng
Copy link
Author

Greets iceman,

yes I have cleaned and build new.
The issue seems to relate to a compiler standard, see here:

https://stackoverflow.com/questions/7630150/dereferencing-type-punned-pointer-will-break-strict-aliasing-rules

I will try to build a fix and come back.
Regards

JD.

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

2 participants