Created attachment 460522 [details, diff] Fix the visibility of astyle::ASFormatter and astyle::ASBeautifier When updating to dev-util/astyle-2.06, its library is now built with -fvisibility=hidden. This causes Code::Blocks with "contrib" USE flag to no longer merge. The reason is, that the astyle plugin does include <astyle.h>, which is then the system one, and links against -lastyle, which is no longer the bundled one. AFAIK Code::Blocks still builds its bundled variant, if no system installed astyle is found. Unfortunately the plugin tries to use the astyle::ASFormatter class directly, which is now hidden. The linker then complains about unresolved symbols, of course. Please see upstream Issue https://sourceforge.net/p/astyle/bugs/406 for more information. I have created the attached patch, which makes astyle::ASFormatter and astyle::ASBeautifier visible again, and Code::Blocks builds and links just fine with it. Mabye the visibility change will be reverted, maybe my patch (submitted in said upstream issue) will be accepted eventually. But until then it would be nice, if the patch could be added to the tree for astyle-2.06, as this would make life easier for Code::Blocks live ebuild users. Note: As far as I understood Jim Pattee, astyle.h was never meant to be distributed and used directly anyway.
If I'm understanding the linked conversations correctly, this is an issue caused by code::blocks relying on an API that was meant to be hidden? And Fedora has changes to their astyle package that facilitate unbundling astyle from code::blocks (probably similar to us)? The proposed patch appears to be moving the #ifdefs and the accompanying functionality from astyle_main.h to astyle.h. Were there any important changes to the underlying code? A brief glance showed nothing different. Then the classes have 'EXPORT' added so that they are visible when #include'd, which codeblocks depends on (for now, it seems), correct? I've never used codeblocks before, so what should I be testing to ensure this patch works correctly? Thanks for reporting.
(In reply to Daniel Campbell from comment #1) > I've never used codeblocks before, so what should I be testing to ensure > this patch works correctly? The minimal test program I have posted in my first comment. Although, at least with astyle-2.06, it is fixed. :-)
Sorry for this, I am in a bad shape it seems. I was so happy that my astyle did not come from a local ebuild or something, that I totally forgot that I added my patch to /etc/portage/patches/dev-util/astyle-2.06 Upstream might change this in their next release. But for now the patch at least works for all consumers of /usr/include/astyle.h
please retry with 3.0.1