Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 683374

Summary: dev-vcs/mercurial-4.9-r1: chg fails to compile on Solaris
Product: Gentoo Linux Reporter: Fabian Groffen <grobian>
Component: Current packagesAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED FIXED    
Severity: normal CC: prefix
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Solaris   
Whiteboard:
Package list:
Runtime testing required: ---

Description Fabian Groffen gentoo-dev 2019-04-15 09:11:48 UTC
Since fa555fd699a20d1c3cf379baa3f2666196fb9b29, contrib/chg is compiled and isntalled.

On Solaris, the socket passing code fails to compile.

hgclient.c: In function ‘attachio’:
hgclient.c:392:13: warning: implicit declaration of function ‘CMSG_SPACE’; did you mean ‘MSG_PEEK’? [-Wimplicit-function-declaration]
  char fdbuf[CMSG_SPACE(sizeof(fds))];
             ^~~~~~~~~~
             MSG_PEEK
hgclient.c:393:6: error: ‘struct msghdr’ has no member named ‘msg_control’
  msgh.msg_control = fdbuf;
      ^
hgclient.c:394:7: error: ‘struct msghdr’ has no member named ‘msg_controllen’; did you mean ‘msg_namelen’?
  msgh.msg_controllen = sizeof(fdbuf);
       ^~~~~~~~~~~~~~
       msg_namelen
hgclient.c:395:25: warning: implicit declaration of function ‘CMSG_FIRSTHDR’ [-Wimplicit-function-declaration]
  struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msgh);
                         ^~~~~~~~~~~~~

[and many more errors]

I don't want to fix this at this point, so can we hide chg behind a USE-flag which I can mask on Solaris?  I suspect other platforms to have issues with this as well, so it could be masked for those as well.  I can provide a patch for a IUSE=+chg solution.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-04-15 09:15:27 UTC
Feel free to introduce a USE flag and revbump straight to stable where -r1 is stable.
Comment 2 Fabian Groffen gentoo-dev 2019-04-15 09:24:06 UTC
Thanks, will do.
Comment 3 Fabian Groffen gentoo-dev 2019-04-15 09:25:06 UTC
sorry for the spam, I noticed that 9999 doesn't contain the chg changes, are you ok with me porting the changes to 9999 as I go?
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-04-15 09:29:49 UTC
(In reply to Fabian Groffen from comment #3)
> sorry for the spam, I noticed that 9999 doesn't contain the chg changes, are
> you ok with me porting the changes to 9999 as I go?

I don't feel spammed :)

To be honest, I haven't touched the live ebuild for quite a while. So it most likely has more issues as well. But if you want to fix the live ebuild too, that's fine by me.
Comment 5 Larry the Git Cow gentoo-dev 2019-04-15 09:42:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60ae26372c5dbb24dd9d22246eb78713483c1865

commit 60ae26372c5dbb24dd9d22246eb78713483c1865
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2019-04-15 09:40:25 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2019-04-15 09:40:36 +0000

    dev-vcs/mercurial: make chg optional behind USE=chg (use-default)
    
    chg client fails to compile on at least Solaris, so allow disabling this
    non-essential contrib addition.
    
    revbump from -r1 with stable keywords per maintainer's request.
    
    Closes: https://bugs.gentoo.org/683374
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>
    Package-Manager: Portage-2.3.62, Repoman-2.3.11
    RepoMan-Options: --force

 .../{mercurial-4.9-r1.ebuild => mercurial-4.9-r2.ebuild} | 16 +++++++++++-----
 dev-vcs/mercurial/mercurial-9999.ebuild                  | 12 +++++++++++-
 dev-vcs/mercurial/metadata.xml                           |  1 +
 3 files changed, 23 insertions(+), 6 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2019-04-15 09:46:42 UTC
The bug has been referenced in the following commit(s):

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

commit f54f26b7b905ed5e57236d893b5724b551753bf0
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2019-04-15 09:45:33 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2019-04-15 09:46:35 +0000

    prefix/sunos/solaris/package.use.mask: mask USE=chg for mercurial
    
    chg client utility fails to compile on Solaris
    
    Bug: https://bugs.gentoo.org/683374
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 profiles/prefix/sunos/solaris/package.use.mask | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)