Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519006 - 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"
Summary: media-libs/lensfun-0.2.8-r1 - .../work/lensfun-0.2.8_build/lensfun.h:68:13: e...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2014-08-04 08:13 UTC by Priit Laes (IRC: plaes)
Modified: 2014-09-16 11:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
support-clang-visibility-as-gcc.patch (support-clang-visibility-as-gcc.patch,685 bytes, patch)
2014-08-05 06:55 UTC, Fabio Scaccabarozzi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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/