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

Error while making the libscapi #92

Open
anujamodi0107 opened this issue Oct 24, 2023 · 2 comments
Open

Error while making the libscapi #92

anujamodi0107 opened this issue Oct 24, 2023 · 2 comments

Comments

@anujamodi0107
Copy link

Hi,
I am having trouble while making the libscapi. I am attaching the error herewith.

gcc  blake2b.c -c -Wall -O3 -std=c99 -fPIC -o blake2b.o
blake2b.c:52:22: warning: ‘blake2b_sigma’ defined but not used [-Wunused-const-variable=]
   52 | static const uint8_t blake2b_sigma[12][16] =
      |                      ^~~~~~~~~~~~~
gcc  blake2bp.c -c -Wall -O3 -std=c99 -fPIC -o blake2bp.o
ar rcs libblake2.a blake2b.o blake2bp.o
ranlib libblake2.a
make[1]: Leaving directory '/home/aaanuja/libscapi/build/BLAKE2'
make[1]: Entering directory '/home/aaanuja/libscapi/build/BLAKE2'
install -d /home/aaanuja/libscapi/install/lib
install -d /home/aaanuja/libscapi/install/include/BLAKE2/sse
install -m 0644 libblake2.a /home/aaanuja/libscapi/install/lib
install -m 0644 /home/aaanuja/libscapi/build/BLAKE2/*.h /home/aaanuja/libscapi/install/include/BLAKE2/sse
make[1]: Leaving directory '/home/aaanuja/libscapi/build/BLAKE2'
Compiling libOTe library...
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Option: CMAKE_BUILD_TYPE = Release
	Release
	Debug
	RelWithDebInfo
-- Option: ENABLE_SIMPLESTOT = OFF
-- Option: ENABLE_KYBEROT    = OFF
-- Option: KOS hashing (current = OTE_DAVIE_MEYER_AES):

--       OTE_KOS_HASH=OTE_RANDOM_ORACLE         use the random oracle (slower)
--       OTE_KOS_HASH=OTE_DAVIE_MEYER_AES       use AES in the Davie Meyer compression function

-- Option: OTE_KOS_FIAT_SHAMIR = OFF
-- Option: ENABLE_SILENTOT   = OFF
CMake Deprecation Warning at cryptoTools/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Option: ENABLE_MIRACL     = OFF
-- Option: ENABLE_RELIC      = OFF
-- Option: ENABLE_CIRCUITS   = OFF
-- Option: ENABLE_CPP_14     = ON
-- Option: ENABLE_NASM       = OFF
-- Option: ENABLE_NET_LOG    = OFF
-- Could NOT find Boost: missing: system (found /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0"))
-- Boost_include  /usr/local/include
-- Configuring done (0.0s)
CMake Warning (dev) in cryptoTools/cryptoTools/CMakeLists.txt:
  Policy CMP0111 is not set: An imported target missing its location property
  fails during generation.  Run "cmake --help-policy CMP0111" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  IMPORTED_LOCATION not set for imported target "Boost::thread" configuration
  "Release".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in cryptoTools/cryptoTools/CMakeLists.txt:
  Policy CMP0111 is not set: An imported target missing its location property
  fails during generation.  Run "cmake --help-policy CMP0111" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  IMPORTED_LOCATION not set for imported target "Boost::thread" configuration
  "Release".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in cryptoTools/cryptoTools/CMakeLists.txt:
  Policy CMP0111 is not set: An imported target missing its location property
  fails during generation.  Run "cmake --help-policy CMP0111" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  IMPORTED_LOCATION not set for imported target "Boost::thread" configuration
  "Release".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in cryptoTools/cryptoTools/CMakeLists.txt:
  Policy CMP0111 is not set: An imported target missing its location property
  fails during generation.  Run "cmake --help-policy CMP0111" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  IMPORTED_LOCATION not set for imported target "Boost::thread" configuration
  "Release".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in cryptoTools/cryptoTools/CMakeLists.txt:
  Policy CMP0111 is not set: An imported target missing its location property
  fails during generation.  Run "cmake --help-policy CMP0111" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  IMPORTED_LOCATION not set for imported target "Boost::thread" configuration
  "Release".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in cryptoTools/cryptoTools/CMakeLists.txt:
  Policy CMP0111 is not set: An imported target missing its location property
  fails during generation.  Run "cmake --help-policy CMP0111" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  IMPORTED_LOCATION not set for imported target "Boost::thread" configuration
  "Release".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done (0.0s)
-- Build files have been written to: /home/aaanuja/libscapi
make[1]: Entering directory '/home/aaanuja/libscapi/build/libOTe'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory '/home/aaanuja/libscapi/build/libOTe'
make: *** [makefile:171: compile-libote] Error 2

I have installed the packages and executed the same command while installing boost 1.71.0 and libscapi as suggested in this link. Can anyone please help me to resolve this issue?

@anujamodi0107
Copy link
Author

anujamodi0107 commented Oct 25, 2023

So to resolve this error, I went to libOTe folder and ran the command 'cmake CMakeLists.txt'. After this, I ran the command 'make BOOST_ROOT='. But then it gives me the following error.

[ 41%] Linking CXX static library ../../lib/libtests_cryptoTools.a [ 41%] Built target tests_cryptoTools cryptoTools/frontend_cryptoTools/CMakeFiles/frontend_cryptoTools.dir/build.make:130: *** target pattern contains no '%'. Stop. make[1]: *** [CMakeFiles/Makefile2:282: cryptoTools/frontend_cryptoTools/CMakeFiles/frontend_cryptoTools.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

Any idea of how to proceed?

@yu1bo
Copy link

yu1bo commented Jan 19, 2024

Enable Boost to use dynamic libraries in libscapi/lib/libOTe/cryptoTools/cryptoTools/CMakeLists.txt.

# set(Boost_USE_STATIC_LIBS        ON) # only find static libs
set(Boost_USE_MULTITHREADED      ON)
# set(Boost_USE_STATIC_RUNTIME     ON)

Change code in libscapi/makefile to

@cmake $(builddir)/libOTe/CMakeLists.txt -DCMAKE_BUILD_TYPE=Release -DLIBSCAPI_ROOT=$(PWD) -B $(builddir)/libOTe

Although I still can not pass the test part, I can target libscapi.a with cmake.

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