whai362 / PSENet

Official Pytorch implementations of PSENet.
Apache License 2.0
1.17k stars 344 forks source link

RuntimeError: Cannot compile pse: /home/shakey/deep-learning/PSENet/pse #82

Closed cuimiao187561 closed 3 years ago

goldwater668 commented 5 years ago

CXXFLAGS = -I include -std=c++11 -O3 -I /home/whj/anaconda3/envs/PSENet/include

DEPS = lanms.h $(shell find include -xtype f) CXX_SOURCES = adaptor.cpp include/clipper/clipper.cpp

OPENCV = pkg-config --cflags --libs opencv

OPENCV=/home/whj/anaconda3/envs/PSENet/lib/ -Wl,-rpath = LIB_SO = adaptor.so

LIB_SO = adaptor.so

$(LIB_SO): $(CXX_SOURCES) $(DEPS) $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(CXX_SOURCES) --shared -fPIC $(OPENCV)

clean: rm -rf $(LIB_SO)

goldwater668 commented 5 years ago

我是按照上述进行makefile的 你可以试试

cuimiao187561 commented 5 years ago

谢谢,你改完以后能成功编译吗?

goldwater668 commented 5 years ago

可以

------------------ Original ------------------ From: cuimiao187561 notifications@github.com Date: Thu,Jul 11,2019 4:23 PM To: whai362/PSENet PSENet@noreply.github.com Cc: jimi 247607771@qq.com, Comment comment@noreply.github.com Subject: Re: [whai362/PSENet] RuntimeError: Cannot compile pse: /home/shakey/deep-learning/PSENet/pse (#82)

谢谢,你改完以后能成功编译吗?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

cuimiao187561 commented 5 years ago

python2.7 opencv3.4.0 但是,我在make出现这个问题: [shakey@localhost pse]$ make g++ -o adaptor.so -I include -std=c++11 -O3 adaptor.cpp include/clipper/clipper.cpp --shared -fPIC pkg-config --cflags --libs opencv adaptor.cpp: In function ‘void pse_adaptor::growing_text_line(std::vector&, std::vector<std::vector >&, float)’: adaptor.cpp:35:86: error: ‘connectedComponents’ was not declared in this scope int label_num = connectedComponents(kernals[kernals.size() - 1], label_mat, 4); ^ In file included from include/pybind11/pytypes.h:12:0, from include/pybind11/cast.h:13, from include/pybind11/attr.h:13, from include/pybind11/pybind11.h:43, from adaptor.cpp:1: adaptor.cpp: In function ‘PyObject pybind11_init_wrapper()’: include/pybind11/detail/common.h:261:20: warning: ‘PyObject pybind11_init()’ is deprecated (declared at adaptor.cpp:120): PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE [-Wdeprecated-declarations] return pybind11_init(); \ ^ adaptor.cpp:120:1: note: in expansion of macro ‘PYBIND11_PLUGIN’ PYBIND11_PLUGIN(adaptor) { ^ include/pybind11/detail/common.h:261:34: warning: ‘PyObject* pybind11_init()’ is deprecated (declared at adaptor.cpp:120): PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE [-Wdeprecated-declarations] return pybind11_init(); \ ^ adaptor.cpp:120:1: note: in expansion of macro ‘PYBIND11_PLUGIN’ PYBIND11_PLUGIN(adaptor) { ^ make: *** [adaptor.so] Error 1

mengmeng716 commented 5 years ago

@cuimiao187561 Have you resolved this problem? I'm in the same case.

hetianduan commented 5 years ago

我是按照上述进行makefile的 你可以试试

您好,我按照您上面的修改的makefile,make之后没法生成adaptor.so,显示rm -rf 是什么情况呢 我也是在anaconda3下

ztoString commented 5 years ago

@hetianduan 老哥,现在怎么说,我遇到了一样的问题

hetianduan commented 5 years ago

@hetianduan 老哥,现在怎么说,我遇到了一样的问题

Contact QQ 529744208

loralyc commented 5 years ago

@hetianduan 请问下您解决问题了吗,我make之后同样也是显示rm -rf

Shualite commented 4 years ago

Please install Opencv3.4(C++ Version) and opencv-python==3.4.3.8 together.

skye95git commented 4 years ago

@hetianduan I meet the same problem with you ,print"rm -rf ",can you tell me how to solve this problem?

AmberMsy commented 4 years ago

I also meet the same error when compiling and got ‘rm -rf ’. No need to modify the Makefile, just install Opencv3.4(C++ Version)