Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefile有问题 #713

Open
the-one-ace opened this issue Sep 1, 2023 · 7 comments
Open

makefile有问题 #713

the-one-ace opened this issue Sep 1, 2023 · 7 comments

Comments

@the-one-ace
Copy link

pi@raspberrypi:~/snowboy/swig/Python3 $ make
g++ -I…/…/ -O3 -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++0x -shared snowboy-detect-swig.o
…/…//lib/aarch64-ubuntu1604/libsnowboy-detect.a -L/usr/lib/python3.9/config-3.9-arm-linux-gnueabihf -L/usr/lib -lcrypt -lpthread -ldl -lutil -lm -lm -lm -ldl -lf77blas -lcblas -llapack -latlas -o _snowboydetect.so
/usr/bin/ld: …/…//lib/aarch64-ubuntu1604/libsnowboy-detect.a: error adding symbols: file format not recognized
collect2: error: ld returned 1 exit status
make: *** [Makefile:76:_snowboydetect.so] 错误 1

@1176551922
Copy link

我也遇到了相同的问题,请问您解决了吗?

1 similar comment
@Bestbbb
Copy link

Bestbbb commented Oct 5, 2023

我也遇到了相同的问题,请问您解决了吗?

@Hi-Barry
Copy link

Hi-Barry commented Oct 15, 2023

试试这个,替换库文件,还搞不顶就没辙了
mv snowboy/lib/aarch64-ubuntu1604/libsnowboy-detect.a snowboy/lib/aarch64-ubuntu1604/libsnowboy-detect.a.bak
cp -a snowboy/lib/rpi/libsnowboy-detect.a snowboy/lib/aarch64-ubuntu1604/libsnowboy-detect.a

@dengxxw
Copy link

dengxxw commented Oct 19, 2023

https://b23.tv/rcQtnM6 参考b站评论里的解决方案

@Roboticshwx
Copy link

修改Makefile中的libsnowboy-detect.a文件,看你用的系统是什么架构,我的是树莓派,架构是aarch64,然后就可以把Makefile中的 SNOWBOYDETECTLIBFILE = $(TOPDIR)/lib/ubuntu64/libsnowboy-detect.a 改为 SNOWBOYDETECTLIBFILE = $(TOPDIR)/lib/aarch64-ubuntu1604/libsnowboy-detect.a. 就可以成功编译出_snowboydetect.so文件了

@0Lisixian0
Copy link

遇到类似的make报错但不完全一样,说一下我的解决办法:
首先我的系统是ubuntu22.04, 在make之后报错:
/bin/sh: 1: swig: not found
expr: 语法错误:未预期的参数 "30010"
make: python-config: 没有那个文件或目录
make: python-config: 没有那个文件或目录
swig -I../../ -c++ -python -o snowboy-detect-swig.cc snowboy-detect-swig.i
make: swig: 没有那个文件或目录
make: *** [Makefile:63:snowboy-detect-swig.cc] 错误 127
打开makefile发现备注里写着至少需要3.0.10:You need at least Swig 3.0.10 to run;
于是sudo apt-get install swig,
之后make就成功了,如果一样是linux系统可以先检查以下swig版本。

@Sunk011
Copy link

Sunk011 commented Apr 22, 2024

我也遇到了相同的问题,请问您解决了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants