fkie-cad / bpmac

3 stars 0 forks source link

Native Compiling on Linux #1

Closed pietrotedeschi closed 1 year ago

pietrotedeschi commented 2 years ago
eric-wagner commented 2 years ago

The problem seem to be that the USE_HW_ACCEL cannot be used for the native compilaton. I.e. there is a difference between -DUSE_HW_ACCEL=0 and removing the flag entirely.

CFLAGS += -DWITH_DTLS=1 -DMAC_LEN=16 -DIS_ZOUL=1 should do the job.

pietrotedeschi commented 2 years ago

The problem seem to be that the USE_HW_ACCEL cannot be used for the native compilaton. I.e. there is a difference between -DUSE_HW_ACCEL=0 and removing the flag entirely.

CFLAGS += -DWITH_DTLS=1 -DMAC_LEN=16 -DIS_ZOUL=1 should do the job.

Thank you @eric-wagner. However, I am using gcc version 11.2.0 and I also received other errors during the building process such as:

eric-wagner commented 1 year ago

I finally had time to investigate this issue further. The problem seem to stem from the compiler version, as using gcc version 11.1.0 causes issues for me as well. However, the first two errors occur in code that is not by myself, which I want to adjust as little as possible to not cause issues with any benchmarking.

Moving the declaration of xor_tags seems like a good idea and also does not break the compilation for any other tested devices. I pushed this change and also made the Makefile directly compatible with native compilation.

Furthermore, I put a note in the README that gcc version 9.4 seems to work best.