EAST
EAST copied to clipboard
can not compile lanms
make: Entering directory '/home/????/EAST-master/lanms'
g++ -o adaptor.so -I include -std=c++11 -O3 -I/home/??/anaconda2/envs/tf3_w/include/python3.5m -I/home/??/anaconda2/envs/tf3_w/include/python3.5m -Wno-unused-result -Wsign-compare -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -I/home/??/anaconda2/envs/tf3_wqq/include -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -flto -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -L/home/??/anaconda2/envs/tf3_w/lib/python3.5/config-3.5m -L/home/??/anaconda2/envs/tf3_w/lib -lpython3.5m -lpthread -ldl -lutil -lrt -lm -Xlinker -export-dynamic adaptor.cpp include/clipper/clipper.cpp --shared -fPIC
g++: error: unrecognized command line option ‘-fno-plt’
Makefile:10: recipe for target 'adaptor.so' failed
make: *** [adaptor.so] Error 1
make: Leaving directory '/home/????/EAST-master/lanms'
Traceback (most recent call last):
File "eval.py", line 9, in <module>
import lanms
File "/home/????/EAST-master/lanms/__init__.py", line 8, in <module>
raise RuntimeError('Cannot compile lanms: {}'.format(BASE_DIR))
RuntimeError: Cannot compile lanms: /home/????/EAST-master/lanms
when i tempt to execute eval.py, raise this error, can you help me ??
Please paste the result of g++ --version
On Fri, May 11, 2018 at 8:25 PM tsing-cv [email protected] wrote:
make: Entering directory '/home/????/EAST-master/lanms' g++ -o adaptor.so -I include -std=c++11 -O3 -I/home/aikaka/anaconda2/envs/tf3_wqq/include/python3.5m -I/home/aikaka/anaconda2/envs/tf3_wqq/include/python3.5m -Wno-unused-result -Wsign-compare -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -I/home/??/anaconda2/envs/tf3_wqq/include -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -flto -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -L/home/??/anaconda2/envs/tf3_wqq/lib/python3.5/config-3.5m -L/home/??/anaconda2/envs/tf3_wqq/lib -lpython3.5m -lpthread -ldl -lutil -lrt -lm -Xlinker -export-dynamic adaptor.cpp include/clipper/clipper.cpp --shared -fPIC g++: error: unrecognized command line option ‘-fno-plt’ Makefile:10: recipe for target 'adaptor.so' failed make: *** [adaptor.so] Error 1 make: Leaving directory '/home/????/EAST-master/lanms' Traceback (most recent call last): File "eval.py", line 9, in
import lanms File "/home/????/EAST-master/lanms/init.py", line 8, in raise RuntimeError('Cannot compile lanms: {}'.format(BASE_DIR))RuntimeError: Cannot compile lanms: /home/????/EAST-master/lanms when i tempt to execute eval.py, raise this error, can you help me ??
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/argman/EAST/issues/156, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2QT2DPmZMjRKNwilgm4pDvRKhQpFptks5txYMtgaJpZM4T7YMM .
gcc version 5.4.0 20160609
@zxytim
I have the same issue, my gcc version is 'g++ (Ubuntu 7.3.0-16ubuntu3) 7.3.0'
I have the same issue, my g++ version is also 5.4.0 20160609
@YHCodes @tsing-cv You have to compile inside the lanms directory
@YHCodes if you have both python3.5 and python3.6 in your Ubantu, please point out which python version to be used in lanms/Makefile. like: CXXFLAGS = -I include -std=c++11 -O3 $(shell python3.5-config --cflags) LDFLAGS = $(shell python3.5-config --ldflags) or: CXXFLAGS = -I include -std=c++11 -O3 $(shell python3.6-config --cflags) LDFLAGS = $(shell python3.6-config --ldflags)
@maichm Your answer helps me , thanks ~!
It seems that you need gcc 6 or higher for -fno-plt
option. I was running the code on two computers, Ubuntu 14.04 on which it's supposedly difficult to upgrade gcc to version 6 according to a stackoverflow Q&A, and a server with gcc 5.4 where I don't have root access so I couldn't try to upgrade gcc.
However, I've found a workaround solution. I first printed python-config --cflags
in the terminal, then copied the output, removed -fno-plt
, and replaced $(shell python-config --cflags)
in the makefile with it.
I tried to solve the same problem as kurapan did(I use python 3.6, gcc 4.8), it came across another problem: adaptor.cpp:1:0: error: bad value (haswell) for -mtune= switch #include "pybind11/pybind11.h" ^ include/clipper/clipper.cpp:1:0: error: bad value (haswell) for -mtune= switch /******************************************************************************* ^ so, as the same thoughts with kurapan, I print python2-config --cflag, found that python2.7 use -mtune= generic, but python3.6 use -mtune= switch, just replace it, I resolved my problem.
Anybody solved this issue?
@jiangmiaotong this helped me a lot!!
I tried to solve the same problem as kurapan did(I use python 3.6, gcc 4.8), it came across another problem: adaptor.cpp:1:0: error: bad value (haswell) for -mtune= switch #include "pybind11/pybind11.h" ^ include/clipper/clipper.cpp:1:0: error: bad value (haswell) for -mtune= switch /******************************************************************************* ^ so, as the same thoughts with kurapan, I print python2-config --cflag, found that python2.7 use -mtune= generic, but python3.6 use -mtune= switch, just replace it, I resolved my problem.
Anyone can help regarding ,LANMS Compile cmds for Ubuntu 16.04 LTS with G++ Compiler 5.4.0. When try compile, got this below error.
g++ -o adaptor adaptor.cpp adaptor.cpp:1:31: fatal error: pybind11/pybind11.h: No such file or directory
Solution can be found in the below link! https://blog.csdn.net/weixin_39461307/article/details/95881408
Thank you
There is a simple solution for Mac user:
- open folder "lanms",
- change the name of the file "adapter.pcc" to "adapter.pyd",
- open the file "init.py" and delete/comment line 7-8.
This works for me. Good luck :)
i have gcc version 6.3.0but still getting same error..any solution?
i solved lanms issue with windows 10 using below link. https://www.codeleading.com/article/65452401345/ updated as per the instructions & now executing without any error
window10
1 install Visual Studio 2019 or higher version
2 git clone https://github.com/gen-ko/lanms-neo.git
3 python setup.py install