ENCRYPTO_utils icon indicating copy to clipboard operation
ENCRYPTO_utils copied to clipboard

Compilation of relic fails with “size of array element is not a multiple of its alignment”

Open gnull opened this issue 4 years ago • 4 comments

I was trying to compile the current ENCRYPTO_utils master (331c22f) and got this error while compiling relic.

To reproduce the error, I ran

mkdir build
cd build
cmake ..
make

from the project root.

gnull avatar May 29 '21 18:05 gnull

Interestingly, if I

  1. upgrade to the latest version of relic by

    cd extern/relic
    git checkout main
    git pull
    
  2. and then comment out the lines

    https://github.com/encryptogroup/ENCRYPTO_utils/blob/331c22f69c09da40c9b85a786f06c7795c2261b6/CMakeLists.txt#L34-L53

    in CMakeLists.txt,

the compilation succeeds.

Hope this helps.

gnull avatar May 29 '21 18:05 gnull

Also, if I only upgrade relic to main but don't comment out the mentioned lines, I get a “target specific option mismatch” error. It could be related to https://github.com/relic-toolkit/relic/issues/177.

But I'm almost sure this isn't a relic bug, because I can compile relic with cmake .. && make on my machine. Could something be wrong with the compile options that ENCRYPTO_utils uses to build relic?

gnull avatar May 29 '21 19:05 gnull

This problem is known and fixed with recent relic commits: https://github.com/relic-toolkit/relic/issues/202 Please consider updating the relic submodule.

TKussel avatar Jun 17 '21 10:06 TKussel

I am facing the same problem in another project (OTExtension) that depends on this project. It is failing in the same place while compiling relic. Any chance of updating the relic dependency in this project, otherwise building this project and other dependent projects would need workaround in the build scrips

hros avatar May 27 '22 13:05 hros