corymickelson / NoPoDoFo

node pdf native bindings
GNU Affero General Public License v3.0
26 stars 6 forks source link

Cmake-js build failed #114

Open Dannymoreno530 opened 2 years ago

Dannymoreno530 commented 2 years ago
info CMD BUILD
info RUN cmake --build "/mnt/d/Workspace/Esign/pdf-text-edit/server/node_modules/nopodofo/build" --config Release
[44/44] Linking CXX shared library Release/nopodofo.node
FAILED: Release/nopodofo.node 
: && /usr/bin/c++ -fPIC -fPIC -O3   -shared -Wl,-soname,nopodofo.node -o Release/nopodofo.node src/CMakeFiles/nopodofo.dir/Configure.cc.o src/CMakeFiles/nopodofo.dir/Defines.cc.o src/CMakeFiles/nopodofo.dir/ErrorHandler.cc.o src/CMakeFiles/nopodofo.dir/ValidateArguments.cc.o src/CMakeFiles/nopodofo.dir/addon.cc.o src/CMakeFiles/nopodofo.dir/base/Array.cc.o src/CMakeFiles/nopodofo.dir/base/Color.cc.o src/CMakeFiles/nopodofo.dir/base/ContentsTokenizer.cc.o src/CMakeFiles/nopodofo.dir/base/Data.cc.o src/CMakeFiles/nopodofo.dir/base/Date.cc.o src/CMakeFiles/nopodofo.dir/base/Dictionary.cc.o src/CMakeFiles/nopodofo.dir/base/Obj.cc.o src/CMakeFiles/nopodofo.dir/base/Ref.cc.o src/CMakeFiles/nopodofo.dir/base/Stream.cc.o src/CMakeFiles/nopodofo.dir/base/XObject.cc.o src/CMakeFiles/nopodofo.dir/doc/Action.cc.o src/CMakeFiles/nopodofo.dir/doc/Annotation.cc.o src/CMakeFiles/nopodofo.dir/doc/BaseDocument.cc.o src/CMakeFiles/nopodofo.dir/doc/Button.cc.o src/CMakeFiles/nopodofo.dir/doc/CheckBox.cc.o src/CMakeFiles/nopodofo.dir/doc/ComboBox.cc.o src/CMakeFiles/nopodofo.dir/doc/Destination.cc.o src/CMakeFiles/nopodofo.dir/doc/Document.cc.o src/CMakeFiles/nopodofo.dir/doc/Encoding.cc.o src/CMakeFiles/nopodofo.dir/doc/Encrypt.cc.o src/CMakeFiles/nopodofo.dir/doc/ExtGState.cc.o src/CMakeFiles/nopodofo.dir/doc/Field.cc.o src/CMakeFiles/nopodofo.dir/doc/FileSpec.cc.o src/CMakeFiles/nopodofo.dir/doc/Font.cc.o src/CMakeFiles/nopodofo.dir/doc/Form.cc.o src/CMakeFiles/nopodofo.dir/doc/Image.cc.o src/CMakeFiles/nopodofo.dir/doc/ListBox.cc.o src/CMakeFiles/nopodofo.dir/doc/ListField.cc.o src/CMakeFiles/nopodofo.dir/doc/Outline.cc.o src/CMakeFiles/nopodofo.dir/doc/Page.cc.o src/CMakeFiles/nopodofo.dir/doc/Painter.cc.o src/CMakeFiles/nopodofo.dir/doc/PushButton.cc.o src/CMakeFiles/nopodofo.dir/doc/Rect.cc.o src/CMakeFiles/nopodofo.dir/doc/SignatureField.cc.o src/CMakeFiles/nopodofo.dir/doc/Signer.cc.o src/CMakeFiles/nopodofo.dir/doc/SimpleTable.cc.o src/CMakeFiles/nopodofo.dir/doc/StreamDocument.cc.o src/CMakeFiles/nopodofo.dir/doc/TextField.cc.o  /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/local/lib/libpodofo.a -lstdc++fs -lpthread && cd /mnt/d/Workspace/Esign/pdf-text-edit/server/node_modules/nopodofo/build/src && /usr/bin/cmake -E copy /mnt/d/Workspace/Esign/pdf-text-edit/server/node_modules/nopodofo/build/Release/nopodofo.node /mnt/d/Workspace/Esign/pdf-text-edit/server/node_modules/nopodofo/build/Release
/usr/bin/ld: /usr/local/lib/libpodofo.a(PdfArray.cpp.o): relocation R_X86_64_PC32 against symbol `_ZNSt6vectorIN6PoDoFo9PdfObjectESaIS1_EEC2Ev' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Here is the log and I have no idea why this has been failed. I have followed install instruction and I have faced this issue.

Anyone can help me?