-
Bug
-
Resolution: Done
-
P2: Important
-
5.11.1
-
None
-
Linux, Ubuntu 64-bit, GCC 7/Clang6
-
-
5
-
ee49537f31aff32fa674292d3d413d8d40f661a7 (qt/qttools/5.15)
-
DaVinci sprint 3, DaVinci sprint 4, DaVinci sprint 5
So I encountered another issue where previously working setup of qdoc suddenly stopped working. I narrowed it down to GCC standard headers, specifically macro:
_GLIBCXX_VISIBILITY(default)
The problem is, that there is no definition for this macro anywhere since it comes from command line option:
-fvisibility=default
When qdoc parses the files using clang this option seems not to be present and qdoc (or rather clang) fails to parse the files.
Workaround for this would be to define this macro either in qdocconf or in one of the headers, possibly as the first thing in the module header to be safe.
EDIT: Neither works because it is defined like this in its header:
{code}
#define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1
#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
#define GLIBCXX_VISIBILITY(V) __attribute_ ((_visibility_ (#V)))
#else
// If this is not supplied by the OS-specific or CPU-specific
// headers included below, it will be defined to an empty default.
#define _GLIBCXX_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY(V)
#endif
{code}
Not sure why it causes problems for clang...
Proper fix however should be to use the mentioned flag when running clang by qdoc.