Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 616074 - <sys-libs/libhugetlbfs-2.20 fails to build with sys-devel/gcc-5.4.0-r3
Summary: <sys-libs/libhugetlbfs-2.20 fails to build with sys-devel/gcc-5.4.0-r3
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2017-04-20 06:54 UTC by Jaak Ristioja
Modified: 2017-09-07 00:51 UTC (History)
1 user (show)

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


Attachments
libhugetlbfs-2.18-gcc5.patch (file_616074.txt,1.09 KB, patch)
2017-04-20 06:54 UTC, Jaak Ristioja
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaak Ristioja 2017-04-20 06:54:17 UTC
Created attachment 470442 [details, diff]
libhugetlbfs-2.18-gcc5.patch

After upgrading to the new stable sys-devel/gcc-5.4.0-r3, sys-libs/libhugetlbfs-2.18 fails to compile:

hugeutils.c: In function '__lh_hugetlbfs_setup_env':
hugeutils.c:304:40: error: expected identifier or '(' before 'restrict'
   char *p, *tok, *exe, buf[MAX_EXE+1], restrict[MAX_EXE];
                                        ^
hugeutils.c:309:11: error: expected expression before 'restrict'
   strncpy(restrict, env, sizeof restrict);
           ^
hugeutils.c:309:3: error: too few arguments to function 'strncpy'
   strncpy(restrict, env, sizeof restrict);
   ^
hugeutils.c:310:11: error: expected identifier or '(' before '[' token
   restrict[sizeof(restrict)-1] = 0;
           ^
hugeutils.c:311:12: error: expected expression before 'restrict'
   for (p = restrict; (tok = strtok(p, ":")) != NULL; p = NULL) {
            ^

Attached patch renames that variable from "register" to "register_".

PS: The ebuild is also missing a call to epatch_user.
Comment 1 Jaak Ristioja 2017-04-20 06:58:27 UTC
(In reply to Jaak Ristioja from comment #0)
> Attached patch renames that variable from "register" to "register_".

Sry, I meant from "restrict" to "restrict_".
Comment 2 Felix Janda 2017-04-20 11:38:49 UTC
This should be fixed in version 2.20. Do you specifically need version 2.18?
Comment 3 Jaak Ristioja 2017-04-20 20:59:21 UTC
(In reply to Felix Janda from comment #2)
> This should be fixed in version 2.20. Do you specifically need version 2.18?

I have no idea. I just ran into this bug right after gcc-5.4.0-r3 was stabilized. Maybe you should then consider stabilizing libhugetlbfs-2.20 as well?
Comment 4 Felix Janda 2017-04-22 01:24:47 UTC
No version of sys-libs/libhugetlbfs is stable but you could request the
latest version to be stabilized.
Comment 5 Jaak Ristioja 2017-04-22 08:05:40 UTC
(In reply to Felix Janda from comment #4)
> No version of sys-libs/libhugetlbfs is stable but you could request the
> latest version to be stabilized.

Ah ok. My bad for not noticing this. I can confirm that 2.20 emerges properly.

So as it turns out this is no longer a big issue. Feel free to resolve this as WONTFIX or however you see fit. Thanks!
Comment 6 Kent Fredric (IRC: kent\n) gentoo-dev 2017-09-07 00:51:17 UTC
Given its getting increasingly unlikely that people will be using GCC < 5.0,
it may be smart to consider dropping versions older than 2.20

Maintainers choice though ofc.