0
votes

I am getting the following error when compiling opencv with ffmpeg.

..../arm-none-linux-gnueabi/bin/ld: ../../bin/opencv_test_core: hidden symbol `__sync_val_compare_and_swap_4' in ..../arm-none-linux-gnueabi/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status

I have no idea what this means. How do I fix this?

Edit: I am cross compiling for ARM using codesourcery's arm-2009q3 compiler. I using cmake and make to compile.

1
What are you compiling with? What was the command line used to compile this? This is related to GCC's visibility extensions: see gcc.gnu.org/wiki/Visibility -- it can probably be fixed with -fPIC, but I'm just speculating because you've provided little information. - Charles

1 Answers

1
votes

Please check all the libraries that you use and go through this stackoverflow thread as well.

To me, I got the below error when I migrated my product to new GCC version (3.3.3 to 4.5.4)

hidden symbol `__clz_tab' in /../lib/gcc/mipsel-unknown-linux-uclibc/4.5.4/libgcc.a(_clz.o) is referenced by DSO

Later I found that one of the library that I tried to link was built using GCC 3.3.3. After building the other library under GCC 4.5.4, the 'hidden symbol' error disappeared.