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

[Build] Cross Compiling for armv7(hisi platform) got "redefined" error. #16

Closed
Alnlll opened this issue May 7, 2019 · 2 comments
Closed

Comments

@Alnlll
Copy link

Alnlll commented May 7, 2019

1. System Info

2. Operation

cd path/to/MNN
./schema/generate.sh

mkdir build
cmake .. -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_VERSION=1 -DCMAKE_SYSTEM_PROCESSOR=armv7 -DCMAKE_C_COMPILER=path/to/arm-himix200-linux-gcc -DCMAKE_CXX_COMPILER=path/to/arm-himix200-linux-g++

make -j4

Problem

All files were compiled but got some redefination errors for linking:

CMakeFiles/MNN.dir/source/backend/cpu/arm/arm32/MNNAddBias.S.o: In function `MNNAddBias':
(.text+0x0): multiple definition of `MNNAddBias'
CMakeFiles/MNN.dir/source/backend/cpu/compute/CommonOptFunction.cpp.o:CommonOptFunction.cpp:(.text.MNNAddBias+0x0): first defined here
CMakeFiles/MNN.dir/source/backend/cpu/arm/arm32/MNNAddBiasRelu.S.o: In function `MNNAddBiasRelu':
(.text+0x0): multiple definition of `MNNAddBiasRelu'
CMakeFiles/MNN.dir/source/backend/cpu/compute/CommonOptFunction.cpp.o:CommonOptFunction.cpp:(.text.MNNAddBiasRelu+0x0): first defined here

...

collect2: error: ld returned 1 exit status
CMakeFiles/MNN.dir/build.make:3533: recipe for target 'libMNN.so' failed
make[2]: *** [libMNN.so] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/MNN.dir/all' failed
make[1]: *** [CMakeFiles/MNN.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
@Alnlll
Copy link
Author

Alnlll commented May 7, 2019

Tried script in MNN/project/cross-compile, that just works well, So I'll close this.

Nice work, by the way.

@850977164
Copy link

image
I'm executing cmake..The -dmnn_build_converter =true && make -j4 command appears,what should I do

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

2 participants