encryptogroup / ABY

ABY - A Framework for Efficient Mixed-protocol Secure Two-party Computation
GNU Lesser General Public License v3.0
463 stars 132 forks source link

cmake_constants.h is not found #197

Open qyuan97 opened 1 year ago

qyuan97 commented 1 year ago

When i build my own application used target_link_libraries(my_application ABY::aby) and make, the program outputs error cmake_constants.h is not found. Is there some solution with my problem? Looking forward to your reply!

Country-If commented 1 year ago

Have you solved this problem? I have the same problem. Looking forward to your reply!

Country-If commented 1 year ago

I found a solution that might be helpful:

  1. copy the cmake_constants.h file to where the constants.h file is saved. The cmake_constraints.h is saved in ABY/build/extern/ENCRYPTO_utils/include/ and the constants.h file, for me, is saved in /usr/local/include/ENCRYPTO_utils/.
  2. Modify the file constrains.h: #include <cmake_constrains.h> -> #include "cmake_constrains.h"

I hope the solution above may help. If you have any better solutions, pls reply. Really appreciate it.

Refer to: https://blog.csdn.net/weixin_45993094/article/details/126417101

maruker commented 1 year ago

There is a file called extern/ENCRYPTO_utils/src/ENCRYPTO_utils/cmake_constants.h.in, which cmake processes to produce ABY/build/extern/ENCRYPTO_utils/include/cmake_constants.h.

If you are using ABY to build your own application, I suspect you haven't executed: mkdir build && cd build && cmake .. Of course depending on what build tool you are using there might be a better solution than calling cmake manually.

AFLuo commented 1 month ago

I did exactly according to the readme file and i also got this problem. @Country-If 's solution works perfectly.