Opened 3 years ago

Closed 3 years ago

Last modified 22 months ago

#62806 closed defect (fixed)

qt5-qtdeclarative fails to build with type redefinition error on UChar

Reported by: ghosthound Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mtiberti (Matteo Tiberti), chrstphrchvz (Christopher Chavez)
Port: qt5-qtdeclarative

Description

qt5-qtdeclarative fails to build with type redefinition error on UChar, this is happening for me on both macOS 10.15.7 / Xcode 12.4 and macOS 11.3 / Xcode 12.5.

Initial definition is in a header from the icu port, which is in the dependency chain of qt5-qtdeclarative.

Error:


In file included from ../3rdparty/masm/yarr/YarrInterpreter.cpp:33: In file included from ../3rdparty/masm/yarr/YarrCanonicalize.h:29: In file included from /opt/DP/include/unicode/utypes.h:38: /opt/DP/include/unicode/umachine.h:376:22: error: typedef redefinition with different types ('char16_t' vs 'unsigned short')

typedef char16_t UChar;

../3rdparty/masm/stubs/wtf/unicode/Unicode.h:45:24: note: previous definition is here typedef unsigned short UChar;


Change History (10)

comment:1 Changed 3 years ago by kencu (Ken)

that's an icu file:

$ port provides /opt/local/include/unicode/umachine.h
/opt/local/include/unicode/umachine.h is provided by: icu

and it's is conflicting with the one in qt (older version of icu, no doubt).

Something like this:

https://bugs.webkit.org/show_bug.cgi?id=101179

Probably hasn't been rebuilt since icu was updated.

Try disabling icu if it will let you. Otherwise you/me/marcus/somebody needs to find a patch or a fix or a define or a declare or a change in include ordering or --- to get past it.

comment:2 Changed 3 years ago by slarew

Cc: slarew added

comment:3 Changed 3 years ago by slarew

Cc: slarew removed

comment:4 Changed 3 years ago by mtiberti (Matteo Tiberti)

Cc: mtiberti added

comment:5 Changed 3 years ago by mtiberti (Matteo Tiberti)

hi, I have the same problem. If I try disabling icu I get:

Note: It is not recommended to uninstall/deactivate a port that has dependents as it breaks the dependents.
The following ports will break:
 libxml2 @2.9.10_1
 qt5-qtbase @5.15.2_2

which doesn't seem very wise trying to install qt5. Any workaround for this? Thanks a lot

comment:6 Changed 3 years ago by ghosthound

In ae742de3590a4e4a262ecef59a2a41aa4de787f6/macports-ports (master):

aqua/qt5: add a couple of fughly patches to qt5-qtdeclarative to sidestep compile issues with icu.
resolves #62806

comment:7 Changed 3 years ago by ghosthound

Resolution: fixed
Status: assignedclosed

Patches fix the compile problems I ran into, but they are not pretty nor good and should only ever be used as an example of what not to do.

comment:8 Changed 22 months ago by chrstphrchvz (Christopher Chavez)

qt513-qtdeclarative is affected by this. Fix to be copied over in https://github.com/macports/macports-ports/pull/15454

comment:9 Changed 22 months ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:10 Changed 22 months ago by chrstphrchvz (Christopher Chavez)

In 6d02bcf2712981a9ba0f4d6a79348ecebc9486c7/macports-ports (master):

qt513-qtdeclarative: copy build fix over from qt5

Put changes intended to be applied simultaneously in a single patchfile

See: #62806

[skip ci]

Note: See TracTickets for help on using tickets.