Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app-arch/lzop: Fix building with GCC-6 and purge deprecated 'dohtml' #4699

Closed
wants to merge 1 commit into from

Conversation

Peter-Levine
Copy link
Contributor

@Peter-Levine Peter-Levine commented May 21, 2017

Bug: https://bugs.gentoo.org/show_bug.cgi?id=594472
Package-Manager: Portage-2.3.5, Repoman-2.3.2

For GCC-6, signed overflow in a declared array's size is treated as a non-constant (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69746).

This causes a conftest failure at configure time. In particular:

src/miniacc.h:4475:24: warning: result of '1 << 31' requires 33 bits to represent, but 'int' only has 32 bits [-Wshift-overflow=]
     ACCCHK_ASSERT((1   << (8*SIZEOF_INT-1)) < 0)
                        ^
src/miniacc.h:1712:75: note: in definition of macro 'ACC_COMPILE_TIME_ASSERT_HEADER'
 \#    define ACC_COMPILE_TIME_ASSERT_HEADER(e)  extern int __acc_cta[1-2*!(e)];
                                                                           ^
src/miniacc.h:4475:5: note: in expansion of macro 'ACCCHK_ASSERT'
     ACCCHK_ASSERT((1   << (8*SIZEOF_INT-1)) < 0)
     ^~~~~~~~~~~~~
src/miniacc.h:1712:59: error: variably modified '__acc_cta' at file scope
 #    define ACC_COMPILE_TIME_ASSERT_HEADER(e)  extern int __acc_cta[1-2*!(e)];
                                                           ^
tst.c:134:33: note: in expansion of macro 'ACC_COMPILE_TIME_ASSERT_HEADER'
 #define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT_HEADER(expr)
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/miniacc.h:4475:5: note: in expansion of macro 'ACCCHK_ASSERT'
     ACCCHK_ASSERT((1   << (8*SIZEOF_INT-1)) < 0)
     ^~~~~~~~~~~~~
src/miniacc.h: In function 'test_acc_run_time_assert':
src/miniacc.h:4475:24: warning: result of '1 << 31' requires 33 bits to represent, but 'int' only has 32 bits [-Wshift-overflow=]
     ACCCHK_ASSERT((1   << (8*SIZEOF_INT-1)) < 0)
                        ^
src/miniacc.h:4475:5: note: in expansion of macro 'ACCCHK_ASSERT'
     ACCCHK_ASSERT((1   << (8*SIZEOF_INT-1)) < 0)
     ^~~~~~~~~~~~~
src/miniacc.h:4480:24: warning: result of '1l << 63' requires 65 bits to represent, but 'long int' only has 64 bits [-Wshift-overflow=]
     ACCCHK_ASSERT((1l  << (8*SIZEOF_LONG-1)) < 0)
                        ^
src/miniacc.h:4480:5: note: in expansion of macro 'ACCCHK_ASSERT'
     ACCCHK_ASSERT((1l  << (8*SIZEOF_LONG-1)) < 0)
     ^~~~~~~~~~~~~
src/miniacc.h:4709:42: warning: result of '128 << 24' requires 33 bits to represent, but 'int' only has 32 bits [-Wshift-overflow=]
     ACCCHK_ASSERT( (((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
                                          ^
src/miniacc.h:4709:5: note: in expansion of macro 'ACCCHK_ASSERT'
     ACCCHK_ASSERT( (((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
     ^~~~~~~~~~~~~

There exist two patches. One from Debian and one from Patrick McLean on Gentoo Bug-Tracker (via OpenSUSE et al.). The patch from Debian uses C11's _Static_assert(). The patch from Gentoo Bug-Tracker enables the originally intended bitwise-shifted expression while avoiding overflow. The latter is chosen.

@gentoo-repo-qa-bot gentoo-repo-qa-bot added the assigned PR successfully assigned to the package maintainer(s). label May 21, 2017
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull Request assignment

Areas affected: ebuilds
Packages affected: app-arch/lzop

app-arch/lzop: @mgorny

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants