Bug 227666

Summary: sysutils/gdisk: Fail to build with UTF16 enabled after icu upgrades
Product: Ports & Packages Reporter: Ting-Wei Lan <lantw44>
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (sunpoet)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Fix ICU 61 issue and update to 1.0.4
none
Fix ICU 61 issue none

Description Ting-Wei Lan 2018-04-21 03:51:26 UTC
It is broken by the update to icu 61.

c++ -O2 -pipe -march=nehalem -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -std=gnu++11 -isystem /usr/local/include -Wall -D_FILE_OFFSET_BITS=64 -DUSE_UTF16 -isystem /usr/local/include -c basicmbr.cc -o basicmbr.o
In file included from basicmbr.cc:22:
In file included from ./mbr.h:8:
In file included from ./gptpart.h:22:
./parttypes.h:59:4: error: unknown type name 'UnicodeString'; did you mean 'icu::UnicodeString'?
   UnicodeString UTypeName(void) const;
   ^~~~~~~~~~~~~
   icu::UnicodeString
/usr/local/include/unicode/unistr.h:286:20: note: 'icu::UnicodeString' declared here
class U_COMMON_API UnicodeString : public Replaceable
                   ^
In file included from basicmbr.cc:22:
In file included from ./mbr.h:8:
./gptpart.h:62:7: error: unknown type name 'UnicodeString'; did you mean 'icu::UnicodeString'?
      UnicodeString GetUTypeName(void);
      ^~~~~~~~~~~~~
      icu::UnicodeString
/usr/local/include/unicode/unistr.h:286:20: note: 'icu::UnicodeString' declared here
class U_COMMON_API UnicodeString : public Replaceable
                   ^
In file included from basicmbr.cc:22:
In file included from ./mbr.h:8:
./gptpart.h:69:7: error: unknown type name 'UnicodeString'; did you mean 'icu::UnicodeString'?
      UnicodeString GetDescription(void);
      ^~~~~~~~~~~~~
      icu::UnicodeString
/usr/local/include/unicode/unistr.h:286:20: note: 'icu::UnicodeString' declared here
class U_COMMON_API UnicodeString : public Replaceable
                   ^
In file included from basicmbr.cc:22:
In file included from ./mbr.h:8:
./gptpart.h:84:26: error: unknown type name 'UnicodeString'; did you mean 'icu::UnicodeString'?
      void SetName(const UnicodeString & theName);
                         ^~~~~~~~~~~~~
                         icu::UnicodeString
/usr/local/include/unicode/unistr.h:286:20: note: 'icu::UnicodeString' declared here
class U_COMMON_API UnicodeString : public Replaceable
                   ^
4 errors generated.
*** Error code 1

Stop.
Comment 1 Ting-Wei Lan 2018-07-19 16:31:40 UTC
Created attachment 195279 [details]
Fix ICU 61 issue and update to 1.0.4
Comment 2 Ting-Wei Lan 2018-07-30 15:20:48 UTC
Created attachment 195644 [details]
Fix ICU 61 issue
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2018-07-31 00:00:14 UTC
(In reply to Ting-Wei Lan from comment #2)

The patch does not work if UTF16 option is off (default).
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-07-31 00:06:39 UTC
A commit references this bug:

Author: sunpoet
Date: Tue Jul 31 00:05:39 UTC 2018
New revision: 475960
URL: https://svnweb.freebsd.org/changeset/ports/475960

Log:
  Fix UTF16 option

  PR:		227666
  Submitted by:	Ting-Wei Lan <lantw44@gmail.com>

Changes:
  head/sysutils/gdisk/files/patch-parttypes.h
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2018-07-31 00:06:46 UTC
Committed. Thanks!