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

error adding symbols: file in wrong format #6

Closed
Cord3th opened this issue Dec 9, 2019 · 3 comments
Closed

error adding symbols: file in wrong format #6

Cord3th opened this issue Dec 9, 2019 · 3 comments

Comments

@Cord3th
Copy link

Cord3th commented Dec 9, 2019

Hello, compiling with your instructions (using cross compile) I face this problem. How can I solve it?

[ 74%] Linking CXX executable ../../../image/bin/test_image_processing
/home/<user>/Downloads/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/8.3.0/../../../../aarch64-linux-gnu/bin/ld: ../../../image/dependency/png/lib/libpng.a(png.o): Relocations in generic ELF (EM: 62)
/home/<user>/Downloads/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/8.3.0/../../../../aarch64-linux-gnu/bin/ld: ../../../image/dependency/png/lib/libpng.a(png.o): Relocations in generic ELF (EM: 62)
/home/<user>/Downloads/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/8.3.0/../../../../aarch64-linux-gnu/bin/ld: ../../../image/dependency/png/lib/libpng.a(png.o): Relocations in generic ELF (EM: 62)
/home/<user>/Downloads/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/8.3.0/../../../../aarch64-linux-gnu/bin/ld: ../../../image/dependency/png/lib/libpng.a: error adding symbols: file in wrong format

@yuxianzhi
Copy link
Contributor

Please check whether you have used same compiler aarch64-linux-gnu-gcc to compile bolt and png. you can use readelf tool to check the library.

You need to add following variables before compiling png.

export PATH=<directory to aarch64-linux-gnu-gcc>/bin:$PATH
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++ 

@Cord3th
Copy link
Author

Cord3th commented Dec 10, 2019

@yuxianzhi, thanks for your reply. Recompiled all the libs with aarch64-linux-gnu-gcc, but still getting the same error.

@Cord3th
Copy link
Author

Cord3th commented Dec 10, 2019

@yuxianzhi nevermind, now I'm getting error:
imTrans.c:56:10: fatal error: X11/Xatom.h: No such file or directory #include <X11/Xatom.h>
and similar. Do I need to link X11 from /usr/include to aarch64-linux-gnu-gcc somehow? By the way, there is no configure file in libxau, libxcb and libx11, @jianfeifeng, edit build_dependency.sh in bolt/image, please.

@Cord3th Cord3th closed this as completed Dec 13, 2019
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