ecdaa icon indicating copy to clipboard operation
ecdaa copied to clipboard

Include issues when attempting to compile on Raspbian.

Open glfejer opened this issue 4 years ago • 3 comments

I got errors from the compiler saying that the AMCL include files could not be found. I built and installed the AMCL, but there were no amcl/big_256_28.h files anywhere on my system... but they were under amcl/include/big_256_28.h. There were a number of files like that -- all under /opt/amcl/include

To get it to compile, I changed all of the source files to add the /include path. I also had to add an include directory in the CMakeLists.txt file.

I'm not certain that I did the correct thing, but it seemed to work.

I checked it in under fej/rpi-compile

I had similar issues when compiling under a clean debian VM.

glfejer avatar Jul 23 '20 23:07 glfejer

When compiling AMCL, you need to specify ACML_INCLUDE_SUBDIR=amcl:

cmake .. -DAMCL_INCLUDE_SUBDIR=acml [-D<...>]

This is because AMCL (originally) installed it's headers directly in include, not include/amcl. This is wrong, but when I rewrote the CMake, I couldn't change that behavior as the default without breaking existing non-Xaptum users. So you have to specify that option to get the correct behavior. See the debian/stretch branch here for the CMake options we use when building for Debian.

With /opt/amcl/include in your include_directories(...), then the existing #include "amcl/<header>.h" lines work fine. The headers will be installed under /opt/amcl/include/amcl/<header>.h

drbild avatar Jul 24 '20 00:07 drbild

My second question, why install ACML in /opt/amcl rather than in the usual /usr or /usr/local? Is that a Raspbian convention?

If you install in /usr, then ecdaa should build fine.

drbild avatar Jul 24 '20 00:07 drbild

Agreed with drbild's responses above.

Also, another place for guidance on building required libraries for this project is in the .travis directory, if that helps

zanebeckwith avatar Jul 24 '20 15:07 zanebeckwith