Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
986 views
in Technique[技术] by (71.8m points)

g++ - "Conditional branch out of range" when trying to cross-compile C++ code for Ubuntu 18.04 and ARM Cortex-A9

I've recently asked a similar question, but have since gathered new information - I hope someone can help now.

I am trying to cross-compile code from a GitHub project for my Ubuntu 18.04. distribution and the ARM Cortex-A9 processor on a Xilinx Zedboard. Unfortunately, when compiling the project, I run into the following error:

/tmp/ccJ10dX1.s: Assembler messages:
/tmp/ccJ10dX1.s:192265: Error: conditional branch out of range
/tmp/ccJ10dX1.s:192270: Error: conditional branch out of range
Makefile:32: recipe for target 'library' failed
make: *** [library] Error 1

I am using the arm-linux-gnueabihf-g++-6 cross-compiler, but have also tried other versions to the same result; running arm-linux-gnueabihf-g++-6 --version gives

arm-linux-gnueabihf-g++-6 (Ubuntu/Linaro 6.5.0-2ubuntu1~18.04) 6.5.0 20181026

Compiling the project using g++ (just for Ubuntu) works as expected.

I've been trying to create a minimal working example and, in the process, found that the file causing the error is a large header file (which is 1.1 MB large). This header file contains several array definitions, for instance

const ap_uint<8> a [128][126] = {{ ... }};

which I assume to be the problem.

Is there any way I can circumvent this compiler error?

question from:https://stackoverflow.com/questions/65902881/conditional-branch-out-of-range-when-trying-to-cross-compile-c-code-for-ubun

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...