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

再麒麟系统下,昇腾300Iduo 编译c++代码出错 #15

Open
cqray1990 opened this issue Jan 17, 2024 · 0 comments
Open

再麒麟系统下,昇腾300Iduo 编译c++代码出错 #15

cqray1990 opened this issue Jan 17, 2024 · 0 comments

Comments

@cqray1990
Copy link

cqray1990 commented Jan 17, 2024

Makefile 文件内容

CXXFLAGS = -I include -std=c++11 -O3 $(shell python3.9-config --cflags)
LDFLAGS = $(shell python3.9-config --ldflags)

DEPS = $(shell find include -xtype f)
CXX_SOURCES = ab.cpp

LIB_SO = ab.so

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

clean:
rm -rf $(LIB_SO)
错误输出:

再linux ubantu 20上编译没有问题,在麒麟上是否要改架构参数,怎么改呢?

g++ -o ab.so -I include -std=c++11 -mabi=lp64 -O3 -I/home/HwHiAiUser/anaconda3/include/python3.8 -I/home/HwHiAiUser/anaconda3/include/python3.8 -Wno-unused-result -Wsign-compare -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -mtune=neoverse-n1 -march=armv8.2-a+fp16+rcpc+dotprod+crypto -isystem /home/HwHiAiUser/anaconda3/include -fdebug-prefix-map=/opt/conda/conda-bld/python_1619148080213/work=/usr/local/src/conda/python-3.8.8 -fdebug-prefix-map=/home/HwHiAiUser/anaconda3=/usr/local/src/conda-prefix -fno-semantic-interposition -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -flto -DNDEBUG -fwrapv -O3 -Wall -L/home/HwHiAiUser/anaconda3/lib/python3.8/config-3.8-aarch64-linux-gnu -L/home/HwHiAiUser/anaconda3/lib -lcrypt -lpthread -ldl -lutil -lm -lm ab.cpp --shared -fPIC
cc1plus: 错误:invalid feature modifier in ‘-march=armv8.2-a+fp16+rcpc+dotprod+crypto’
cc1plus: 错误:-mtune 参数的值 ‘neoverse-n1’ 未知

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

1 participant