minionn icon indicating copy to clipboard operation
minionn copied to clipboard

Error running test.py: undefined reference to pybind11

Open zghodsi opened this issue 5 years ago • 2 comments

I am getting the following error when running test.py:

/tmp/tmpgop0gw3c/minionn/lib/.rendered.minionn.o: In function `bool std::operator==<char, std::char_traits<char>, std::allocator<char> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*)':
/usr/include/c++/6/bits/basic_string.h:5101: undefined reference to `pybind11::format_descriptor<long, void>::value'
/usr/bin/ld: /tmp/tmpgop0gw3c/minionn/lib/.rendered.minionn.o: relocation R_X86_64_PC32 against undefined hidden symbol `_ZN8pybind1117format_descriptorIlvE5valueE' can not be used when making a shared object
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-g++' failed with exit status 1

I verified the cppimport and pybind11 installation with the example in https://github.com/tbenthompson/cppimport, and pulled a mirrored SEAL v2.3.1 which is the version mentioned in the README. Other package versions are cmake (3.13.2) and gcc/g++ (6.3.0).

Here is my Dockerfile for reproducing the error:

FROM debian:stable

RUN apt-get update && apt-get install -y --no-install-suggests --no-install-recommends \
    git vim libssl-dev python3 python3-pip python3-dev libgmp-dev libglib2.0-dev build-essential make

# Get a newer version of cmake for SEAL (>3.10)
RUN echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list && \
 apt-get update && apt-get -t stretch-backports install -y "cmake" 

RUN git clone https://github.com/SSGAalto/minionn && cd minionn && \
    git submodule update --init --recursive && cd lib && make all

# Get SEAL 2.3.1
RUN cd minionn/lib && git clone https://github.com/deeptechlabs/SEAL \
    && cd SEAL/SEAL && echo "set(CMAKE_POSITION_INDEPENDENT_CODE ON)" >> CMakeLists.txt && cmake . \
    && make && make install 

RUN apt-get install -y python3-setuptools
RUN pip3 install pybind11 cppimport onnx
RUN cd /minionn/lib/ && python3 test.py

I'd appreciate it if you could help me resolve this issue and create the correct environment for this.

zghodsi avatar May 14 '19 17:05 zghodsi

hi,@zghodsi excuse me please,have you run this program successfully?how did you solve this problem?

SweetCandy1117 avatar Mar 02 '22 08:03 SweetCandy1117

If you end up solving the backwards compatibility with current software, please send in a PR. I'm not actively supporting this code anymore but am happy to put in a few hours to verify a PR and merge it.

fritzalder avatar Mar 02 '22 09:03 fritzalder