You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We tried to run the code, but when we run the command "python install.py --tool --ot --sh2pc", this error occurs:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h: In member function ‘void emp::PRG::random_data_unaligned(void*, int)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h:76:6: error: ‘align’ is not a member of ‘std’
if(std::align(sizeof(block), sizeof(block), aligned_data, size)) {
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:4:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/prg.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h: In member function ‘void emp::PRG::random_data_unaligned(void*, int)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h:76:6: error: ‘align’ is not a member of ‘std’
if(std::align(sizeof(block), sizeof(block), aligned_data, size)) {
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:4:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/hash.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h: In member function ‘void emp::PRG::random_data_unaligned(void*, int)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h:76:6: error: ‘align’ is not a member of ‘std’
if(std::align(sizeof(block), sizeof(block), aligned_data, size)) {
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:4:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/netio.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h: In member function ‘void emp::PRG::random_data_unaligned(void*, int)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h:76:6: error: ‘align’ is not a member of ‘std’
if(std::align(sizeof(block), sizeof(block), aligned_data, size)) {
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/prp.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::send_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:56:26: error: ‘align’ is not a member of ‘std’
const void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::recv_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:69:20: error: ‘align’ is not a member of ‘std’
void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/hash.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::send_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:56:26: error: ‘align’ is not a member of ‘std’
const void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::recv_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:69:20: error: ‘align’ is not a member of ‘std’
void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/prg.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::send_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:56:26: error: ‘align’ is not a member of ‘std’
const void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::recv_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:69:20: error: ‘align’ is not a member of ‘std’
void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/netio.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::send_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:56:26: error: ‘align’ is not a member of ‘std’
const void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::recv_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:69:20: error: ‘align’ is not a member of ‘std’
void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:15:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/prp.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/circuits/sha3_256.h: In function ‘int emp::sha3_256(uint8_t*, const T*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/circuits/sha3_256.h:32:37: error: there are no arguments to ‘EVP_sha3_256’ that depend on a template parameter, so a declaration of ‘EVP_sha3_256’ must be available [-fpermissive]
const EVP_MD * algo = EVP_sha3_256();
The text was updated successfully, but these errors were encountered:
The errors you're encountering seem to stem from two issues:
std::align Not Found:
The std::align function is available starting from C++17. If your compiler or build system is not set to use C++17, this error will occur.
EVP_sha3_256 Undefined:
This function is part of OpenSSL 1.1.1 or newer. If your system has an older version of OpenSSL or is missing it, this error will occur.
Resolution Steps:
1. Fixing std::align Error
Ensure your compiler supports C++17. Run the following command to check the version of g++ or clang:
g++ --version
For GCC, version 7 or newer is recommended.
Update your compiler flags to include -std=c++17. Modify the CMakeLists.txt file in the emp-sh2pc project. Find the line that sets the compiler flags and ensure it includes:
We tried to run the code, but when we run the command "python install.py --tool --ot --sh2pc", this error occurs:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h: In member function ‘void emp::PRG::random_data_unaligned(void*, int)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h:76:6: error: ‘align’ is not a member of ‘std’
if(std::align(sizeof(block), sizeof(block), aligned_data, size)) {
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:4:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/prg.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h: In member function ‘void emp::PRG::random_data_unaligned(void*, int)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h:76:6: error: ‘align’ is not a member of ‘std’
if(std::align(sizeof(block), sizeof(block), aligned_data, size)) {
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:4:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/hash.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h: In member function ‘void emp::PRG::random_data_unaligned(void*, int)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h:76:6: error: ‘align’ is not a member of ‘std’
if(std::align(sizeof(block), sizeof(block), aligned_data, size)) {
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:4:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/netio.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h: In member function ‘void emp::PRG::random_data_unaligned(void*, int)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/utils/prg.h:76:6: error: ‘align’ is not a member of ‘std’
if(std::align(sizeof(block), sizeof(block), aligned_data, size)) {
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/prp.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::send_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:56:26: error: ‘align’ is not a member of ‘std’
const void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::recv_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:69:20: error: ‘align’ is not a member of ‘std’
void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/hash.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::send_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:56:26: error: ‘align’ is not a member of ‘std’
const void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::recv_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:69:20: error: ‘align’ is not a member of ‘std’
void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/prg.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::send_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:56:26: error: ‘align’ is not a member of ‘std’
const void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::recv_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:69:20: error: ‘align’ is not a member of ‘std’
void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/file_io_channel.h:5:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:2,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/netio.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::send_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:56:26: error: ‘align’ is not a member of ‘std’
const void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h: In member function ‘void emp::IOChannel::recv_bool(bool*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/io/io_channel.h:69:20: error: ‘align’ is not a member of ‘std’
void * aligned = std::align(alignof(uint64_t), sizeof(uint64_t), ptr, space);
^
In file included from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/emp-tool.h:15:0,
from /home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/test/prp.cpp:1:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/circuits/sha3_256.h: In function ‘int emp::sha3_256(uint8_t*, const T*, size_t)’:
/home/users/dase212lxy/tmp/emp-sh2pc-master/emp-tool/emp-tool/circuits/sha3_256.h:32:37: error: there are no arguments to ‘EVP_sha3_256’ that depend on a template parameter, so a declaration of ‘EVP_sha3_256’ must be available [-fpermissive]
const EVP_MD * algo = EVP_sha3_256();
The text was updated successfully, but these errors were encountered: