Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 628298 - app-i18n/scim-anthy-1.2.7-r1 fails to build
Summary: app-i18n/scim-anthy-1.2.7-r1 fails to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-19 13:48 UTC by dtr
Modified: 2018-09-10 07:57 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,56.03 KB, text/x-log)
2017-08-19 13:48 UTC, dtr
Details
emerge --info scim-anthy (eminfo,2.82 KB, text/plain)
2017-08-19 13:48 UTC, dtr
Details
Adjust structure literals that do not match type declaration to the declaration (patch.txt,1.28 KB, patch)
2018-01-25 03:16 UTC, Takamasa Mitsuji
Details | Diff
modified patch to work with epatch (scim-anthy-1.2.7-gcc6.patch,1.28 KB, patch)
2018-05-23 09:26 UTC, skrinakron
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dtr 2017-08-19 13:48:14 UTC
Created attachment 489676 [details]
build.log

scim_anthy_prefs.cpp:226:1: error: cannot convert ‘bool’ to ‘void*’ in initialization
 };
 ^
scim_anthy_prefs.cpp:226:1: error: cannot convert ‘bool’ to ‘void*’ in initialization
scim_anthy_prefs.cpp:226:1: error: cannot convert ‘bool’ to ‘void*’ in initialization
scim_anthy_prefs.cpp:226:1: error: cannot convert ‘bool’ to ‘void*’ in initialization
scim_anthy_prefs.cpp:226:1: error: cannot convert ‘bool’ to ‘void*’ in initialization
scim_anthy_prefs.cpp:278:1: error: cannot convert ‘bool’ to ‘void*’ in initialization
 };
 ^
make[2]: *** [Makefile:827: anthy_imengine_setup_la-scim_anthy_prefs.lo] Error 1
Comment 1 dtr 2017-08-19 13:48:55 UTC
Created attachment 489678 [details]
emerge --info scim-anthy
Comment 2 Takamasa Mitsuji 2018-01-25 03:16:23 UTC
Created attachment 516508 [details, diff]
Adjust structure literals that do not match type declaration to the declaration

I wrote a patch for this issue.
This is my first post in this Bugzilla.
What should I do next?
Comment 3 Benda Xu gentoo-dev 2018-01-27 05:03:56 UTC
Hi, I cannot reproduce this bug.  What USE flags are you using?
Comment 4 Takamasa Mitsuji 2018-01-27 11:35:31 UTC
(In reply to Benda Xu from comment #3)
> Hi, I cannot reproduce this bug.  What USE flags are you using?

The USE flag that is enabled is only nls.
It is reproduced after updating gcc to 6.4.0.
I am in trouble because build does not pass in profile 17.0.
Comment 5 skrinakron 2018-05-23 09:25:35 UTC
I had this same problem when migrating to profile 17.0 with GCC 6.4.0, with no other use flag than nls. As the original patch failed to apply, attached is a slightly modified patch that works and allows scim-anthy-1.2.7 to merge cleanly from a local overlay when the appropriate epatch command is added in the ebuild's src_prepare before eautoreconf:
epatch "${FILESDIR}/${P}-gcc6.patch"

The resulting Anthy SCIM module is fully functional, so I think the patch resolves this issue for this version of scim-anthy.
Comment 6 skrinakron 2018-05-23 09:26:39 UTC
Created attachment 532662 [details, diff]
modified patch to work with epatch
Comment 7 skrinakron 2018-05-23 09:28:07 UTC
On a related note, upstream has released a newer 1.3.2 version that also fixes this issue: https://github.com/scim-im/scim-anthy/releases/tag/v1.3.2
This newer version seems to have been adopted at least by openSUSE: https://software.opensuse.org/package/scim-anthy

The release builds and installs without modifications under GCC 6.4.0 (autoreconf -i && ./configure && make && make install) with only GTK2, but then causes scim-helper-launcher to hang at 100% CPU use when you actually try to use the Anthy module for input. In other words, adding scim-anthy 1.3.2 to the tree may turn out to not be simple.
Comment 8 Benda Xu gentoo-dev 2018-05-24 01:18:47 UTC
Thank you Takamasa and skrinakron for the analysis.

@Juanjie, are you interested in testing scin-anthy-1.3.2 and creating an ebuild for the new version?
Comment 9 Juanjie Xi 2018-05-24 05:55:56 UTC
(In reply to Benda Xu from comment #8)
> @Juanjie, are you interested in testing scin-anthy-1.3.2 and creating an
> ebuild for the new version?

Sure, I will do this.
Comment 10 Juanjie Xi 2018-05-28 11:08:07 UTC
@Benda

I've tested the new version 1.3.2, unfortunately I can reproduced the bug which mentioned by skrinakron.
It's not only 100% CPU but also have serious memory leak.
Do you have some suggestion on this case?
Comment 11 Benda Xu gentoo-dev 2018-05-29 08:33:43 UTC
(In reply to Juanjie Xi from comment #10)
> @Benda
> 
> I've tested the new version 1.3.2, unfortunately I can reproduced the bug
> which mentioned by skrinakron.
> It's not only 100% CPU but also have serious memory leak.
> Do you have some suggestion on this case?

That's interesting the OpenSUSE had no problem with version 1.3.2.  Have you tried to raise a issue to the upstream?
Comment 12 Juanjie Xi 2018-05-30 01:00:50 UTC
(In reply to Benda Xu from comment #11)
> That's interesting the OpenSUSE had no problem with version 1.3.2.  Have you
> tried to raise a issue to the upstream?

As a binary distribution, maybe OpenSUSE simply compile scim-anthy with GTK3 support.
It seems currently no active upstream, 1.3.2 on github was last updated three years ago as a bug fix fork.

Maybe we could enforce scim series compile with GTK3, as GTK2 is really outdated.
Comment 13 Benda Xu gentoo-dev 2018-05-30 02:30:36 UTC
(In reply to Juanjie Xi from comment #12)
> (In reply to Benda Xu from comment #11)
> > That's interesting the OpenSUSE had no problem with version 1.3.2.  Have you
> > tried to raise a issue to the upstream?
> 
> As a binary distribution, maybe OpenSUSE simply compile scim-anthy with GTK3
> support.
> It seems currently no active upstream, 1.3.2 on github was last updated
> three years ago as a bug fix fork.
> 
> Maybe we could enforce scim series compile with GTK3, as GTK2 is really
> outdated.

Got you.  I agree that removing the GTK2 support is the way to go.
Comment 14 skrinakron 2018-05-30 19:14:35 UTC
(In reply to Benda Xu from comment #13)
> Got you.  I agree that removing the GTK2 support is the way to go.

If the new(er) scim-anthy is the only thing that requires dropping GTK2, would it be too much trouble to also leave a 1.2.7-r2 with the patch from this bug in the tree for those who don't want the dependencies of GTK3? Though I appreciate that in time this becomes a more fringe demand and may then need to be served by an overlay.
Comment 15 Juanjie Xi 2018-05-31 02:08:21 UTC
Any way, I have made a pinpoint patch to fix this compile problem.
Maybe we could open another ticket to talk about GTK upgrade for scim-*

https://github.com/gentoo/gentoo/pull/8650
Comment 16 Arfrever Frehtes Taifersar Arahesis 2018-05-31 02:51:13 UTC
It is reasonable to build some packages in a way which allows to use given input methods in multiple versions of GUI libraries (e.g. for GTK+ 2 applications, GTK+ 3 applications).

However, in case of GUI configuration programs for input methods and other helper programs, there is no need to support building with older versions of GUI libraries (e.g. GTK+ 2).

If I understand correctly, the program discussed here belongs to the second category.
Comment 17 Benda Xu gentoo-dev 2018-08-31 09:48:29 UTC
Sorry I have lost track of this patch. Have it been closed?  Because I see the pull request has been merged.
Comment 18 Arfrever Frehtes Taifersar Arahesis 2018-09-01 05:26:27 UTC
All old pull requests have been malformed and closed during an incident with github.com/gentoo:
https://gentoo.org/news/2018/06/28/Github-gentoo-org-hacked.html
https://wiki.gentoo.org/wiki/Project:Infrastructure/Incident_Reports/2018-06-28_Github
Comment 19 Juanjie Xi 2018-09-05 00:38:19 UTC
I have created PR again, please review it
https://github.com/gentoo/gentoo/pull/9783
Comment 20 Larry the Git Cow gentoo-dev 2018-09-10 07:57:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=007ce9fee70c2629b264454ada067668cb808daf

commit 007ce9fee70c2629b264454ada067668cb808daf
Author:     Juanjie Xi <strangemk3@gmail.com>
AuthorDate: 2018-05-31 02:02:14 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2018-09-10 07:57:03 +0000

    app-i18n/scim-anthy: add patch to fix compilation with GTK2
    
      Bump to EAPI-6.
    
    Credit: Juanjie Xi, dtr, Takamasa Mitsuji, skrinakron
    Closes: https://bugs.gentoo.org/628298
    Closes: https://github.com/gentoo/gentoo/pull/9783
    Package-Manager: Portage-2.3.48, Repoman-2.3.10

 .../files/scim-anthy-1.2.7-gtk2_build.patch        | 1065 ++++++++++++++++++++
 app-i18n/scim-anthy/scim-anthy-1.2.7-r1.ebuild     |    8 +-
 2 files changed, 1071 insertions(+), 2 deletions(-)