[Xapian-tickets] [Xapian] #820: mingw build failure with Windows header
Xapian
nobody at xapian.org
Wed Nov 9 08:08:16 GMT 2022
#820: mingw build failure with Windows header
--------------------------------------+------------------------
Reporter: Ralf Habacker | Owner: Olly Betts
Type: defect | Status: new
Priority: normal | Milestone:
Component: Other | Version: 1.4.21
Severity: normal | Keywords:
Blocked By: | Blocking:
Operating System: Microsoft Windows |
--------------------------------------+------------------------
An error was reported by openSUSE Build Service at
https://bugzilla.opensuse.org/show_bug.cgi?id=1205190 that xapian core
could not be built with mingw gcc12.
The reason for this problem is the extensive use of "using namespace std"
in the sources, which makes the definition of 'byte'
{{{
enum class byte : unsigned char;
}}}
maps from the std namespace into the global namespace, which then
conflicts with definitions from Windows headers:
{{{
/usr/i686-w64-mingw32/sys-root/mingw/include/rpcndr.h:397:170: error:
reference to 'byte' is ambiguous
}}}
and within the source code:
{{{
./common/internaltypes.h:32:17: note: 'typedef uint8_t byte'
32 | typedef uint8_t byte;
}}}
A corresponding patch based on version 1.4.21 that fixes the problem can
be found at
https://build.opensuse.org/package/view_file/windows:mingw:win32/mingw32
-xapian-core/xapian-core-1.4.21-std-fixes.patch?expand=1.
--
Ticket URL: <https://trac.xapian.org/ticket/820>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list