Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 519006

Summary: 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"
Product: Gentoo Linux Reporter: Priit Laes (IRC: plaes) <plaes>
Component: [OLD] LibraryAssignee: Gentoo Graphics Project <graphics+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: fsvm88
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 408963    
Attachments: support-clang-visibility-as-gcc.patch

Description Priit Laes (IRC: plaes) 2014-08-04 08:13:11 UTC
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]
Comment 1 Fabio Scaccabarozzi 2014-08-05 06:55:02 UTC
Created attachment 382304 [details, diff]
support-clang-visibility-as-gcc.patch

Patch to enable clang compiler recognition and use.
Comment 2 Fabio Scaccabarozzi 2014-08-05 07:00:52 UTC
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.
Comment 3 Priit Laes (IRC: plaes) 2014-08-05 07:16:23 UTC
(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 :)
Comment 4 Markus Meier gentoo-dev 2014-09-14 09:07:30 UTC
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
Comment 5 Fabio Scaccabarozzi 2014-09-16 11:25:29 UTC
Upstreamed:
https://sourceforge.net/p/lensfun/bugs/9/