Getting following build error with media-libs/lensfun-0.2.8-r1: [snip] /var/tmp/portage/media-libs/lensfun-0.2.8-r1/work/lensfun-0.2.8_build/lensfun.h:68:13: error: "I don't know how to change symbol visibility for your compiler" # error "I don't know how to change symbol visibility for your compiler" ^ /var/tmp/portage/media-libs/lensfun-0.2.8-r1/work/lensfun-0.2.8_build/lensfun.h:111:1: error: unknown type name 'LF_EXPORT' LF_EXPORT void lf_free (void *data); ^ /var/tmp/portage/media-libs/lensfun-0.2.8-r1/work/lensfun-0.2.8_build/lensfun.h:111:11: error: expected unqualified-id LF_EXPORT void lf_free (void *data); ... [/snip]
Created attachment 382304 [details, diff] support-clang-visibility-as-gcc.patch Patch to enable clang compiler recognition and use.
I have attached a patch that allows for correct building. It uses the __clang__ preprocessor macro to trigger the same section used for GCC. The build is fine, there are no tests though. I have verified that the visible exported symbols are the same by comparing the dynamic symbol tables between a gcc compile and a clang compile.
(In reply to Fabio Scaccabarozzi from comment #2) > I have attached a patch that allows for correct building. It uses the > __clang__ preprocessor macro to trigger the same section used for GCC. > The build is fine, there are no tests though. > I have verified that the visible exported symbols are the same by comparing > the dynamic symbol tables between a gcc compile and a clang compile. Thanks, works for me too :)
Thanks for the report and patch. I've added it to the tree! It would be great if you could report this upstream, that we don't have to carry around this patch forever... 14 Sep 2014; Markus Meier <maekke@gentoo.org> lensfun-0.2.8-r1.ebuild, +files/lensfun-0.2.8-support-clang-visibility-as-gcc.patch: add support for building with clang by Fabio Scaccabarozzi in bug #519006
Upstreamed: https://sourceforge.net/p/lensfun/bugs/9/