Compiling libmraa error

Hi,

I tried to compile the libmraa from the git repo radxa/mraa but it failed.
During make I got the error message as following:

[ 35%] Linking C shared library libmraa.so

/usr/bin/ld: CMakeFiles/mraa.dir/version.c.o:(.data.rel.local+0x0): multiple definition of `gVERSION’; CMakeFiles/mraa.dir/mraa.c.o:(.bss+0x0): first defined here

/usr/bin/ld: CMakeFiles/mraa.dir/version.c.o:(.data.rel.local+0x8): multiple definition of `gVERSION_SHORT’; CMakeFiles/mraa.dir/mraa.c.o:(.bss+0x8): first defined here

collect2: error: ld returned 1 exit status

make[2]: *** [src/CMakeFiles/mraa.dir/build.make:539: src/libmraa.so.2.1.0] Error 1

make[1]: *** [CMakeFiles/Makefile2:364: src/CMakeFiles/mraa.dir/all] Error 2

make: *** [Makefile:160: all] Error 2

Please help me on this problem. Thank you very much.

@jack Thank you.

found any solution. facing the same issue.

I came across this when making an AUR package and wrote this patch to fix…

download to source directory and run:
$ git apply extern_gVERSION.patch