Huelse / SEAL-Python

Microsoft SEAL 4.X For Python
MIT License
319 stars 66 forks source link

Ubuntu 16.04中make发生错误 #43

Closed R4v3nl0 closed 3 years ago

R4v3nl0 commented 3 years ago

您好,我在ubuntu服务器上安装了环境,将SEAL-Python clone了下来,执行cmake .时并没有发生错误,在执行make时报错。目前人在外面,后续补上具体报错信息的截图,基本报错的内容都是说"}"不匹配。 系统为ubuntu 16.04,cmake版本为3.14,gcc版本为7,python版本为3.7。 希望您看到后能够解答我的疑惑。谢谢

R4v3nl0 commented 3 years ago

啊我解决了。。是我服务器的问题,不过我碰到了一个新的问题。我在执行python3 setup.py install后,一直卡在这里 16062890814595133463535932054650

Huelse commented 3 years ago

抱歉回复晚了,先尝试使用build_ext -i试下呢?

R4v3nl0 commented 3 years ago

抱歉回复晚了,先尝试使用build_ext -i试下呢?

emmm这个方式我也尝试了,两个命令都是卡在了同一个地方。在发出第二条问题时只使用了install,在之后又使用了python3 setup.py build_ext -i

R4v3nl0 commented 3 years ago

输出如下: root@iZuf6i8o07kxfsz3l093trZ:~/pyseal# python setup.py build_ext -i running build_ext building 'seal' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/root/.pyenv/versions/3.7.0/include/python3.7m -I./pybind11/include -I./SEAL/native/src -I/root/.pyenv/versions/3.7.0/include/python3.7m -c src/base64.cpp -o build/temp.linux-x86_64-3.7/src/base64.o -std=c++17 gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/root/.pyenv/versions/3.7.0/include/python3.7m -I./pybind11/include -I./SEAL/native/src -I/root/.pyenv/versions/3.7.0/include/python3.7m -c src/wrapper.cpp -o build/temp.linux-x86_64-3.7/src/wrapper.o -std=c++17

Huelse commented 3 years ago

可能和docker有关,在本地环境编译试试呢?只需要build_ext -i生成到当前目录即可。

R4v3nl0 commented 3 years ago

可能和docker有关,在本地环境编译试试呢?只需要build_ext -i生成到当前目录即可。

emmmm您好,我并没有使用docker。。直接在本地环境中编译也是卡在了这里。。

R4v3nl0 commented 3 years ago

您好,我通过重新安装环境成功install了,可能是因为我之前环境太过于驳杂导致卡住的。 我现在又遇到了一个新问题,在import seal时,发生错误ImportError: /SEAL-Python/seal.cpython-37m-x86_64-linux-gnu.so: undefined symbol: deflateInit_ 请问我需要为setup.py做一些修改来使得它可以成功被import吗?

R4v3nl0 commented 3 years ago

根据网上的内容说需要在g++编译时加上-Xlinker -export-dynamic选项,但是我不知如何为它加上该选项。我可以自己手动运行一次g++并加上该选项来编译生成seal.cpython-37m-x86_64-linux-gnu.so吗?

Huelse commented 3 years ago

FAQ

R4v3nl0 commented 3 years ago

FAQ

好的谢谢,我刚才没有注意到这一点,十分感谢

R4v3nl0 commented 3 years ago

谢谢您,我的问题都已经成功解决了。我现在准备关闭这个话题了。