Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219896 - [GCC 4] dev-libs/botan-1.6.1-r1 fails to compile with GCC 4.2 on 32-bit platforms
Summary: [GCC 4] dev-libs/botan-1.6.1-r1 fails to compile with GCC 4.2 on 32-bit platf...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Jack Lloyd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-01 07:00 UTC by Nickolay Kolchin-Semyonov
Modified: 2008-05-02 15:14 UTC (History)
1 user (show)

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


Attachments
add ULL postfix to (hopefully) all 64bit constants in Botan. (botan-ull.patch,201.68 KB, patch)
2008-05-01 07:02 UTC, Nickolay Kolchin-Semyonov
Details | Diff
Patch for configure.pl (botan_gcc42_fix.patch,815 bytes, patch)
2008-05-01 13:00 UTC, Jack Lloyd
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nickolay Kolchin-Semyonov 2008-05-01 07:00:06 UTC
BUG 117548 strikes back! 

error: integer constant is too large for ‘long’ type

P.S. Somebody, please fix misc/config/cc/gcc -mcpu settings. I don't completely understand Gentoo policy on C-flags to do that.

Reproducible: Always

Steps to Reproduce:
Comment 1 Nickolay Kolchin-Semyonov 2008-05-01 07:02:45 UTC
Created attachment 151486 [details, diff]
add ULL postfix to (hopefully) all 64bit constants in Botan.

Patch was created against 1.7.5 version, but applies to 1.6.1.
Comment 2 Jack Lloyd 2008-05-01 12:58:15 UTC
The problem is configure.pl will recognize that (say) GCC 4.1 needs -fpermissive, but not GCC 4.2 (yes, this should be a compile-time test instead of hardcoded, one of the many infelicities of the build system, it's just a version test). Patch is commited to the stable branch (net.randombit.botan.stable), I will attach to this PR as well.
Comment 3 Jack Lloyd 2008-05-01 13:00:22 UTC
Created attachment 151507 [details, diff]
Patch for configure.pl
Comment 4 Alon Bar-Lev (RETIRED) gentoo-dev 2008-05-01 19:05:58 UTC
Should I apply only attachment#151507 [details, diff]? Nickolay, can you please confirm?
Comment 5 Nickolay Kolchin-Semyonov 2008-05-01 19:40:17 UTC
(In reply to comment #4)
> Should I apply only attachment#151507 [details, diff] [edit]? Nickolay, can you please confirm?
> 

AFAIK, Lloyd is official Botan maintainer. So his patch is preferable.
Comment 6 Alon Bar-Lev (RETIRED) gentoo-dev 2008-05-02 06:56:55 UTC
Added this patch.
But Jack, I have another issue with this package.
It looks like it chooses to use g++ and not ${CHOST}-g++ as expected. I tried to analyze your configure.pl script but it is not standard (Why don't you use autoconf/automake/)... Can you please fix this too?
Comment 7 Alon Bar-Lev (RETIRED) gentoo-dev 2008-05-02 07:04:52 UTC
Made it work... In the future please separate the AR flags from the AR command.
But it would be great if you enable passing host prefix into configure like autoconf.
Thanks!
Comment 8 Jack Lloyd 2008-05-02 15:10:54 UTC
Autoconf/automake are avoided because while they solve some problems on Unix they create many more for Windows users, and b/c autoconf's support for compilers that aren't GCC is pitiful: what is currently ~1K lines of Perl would have to become ~3K lines of configure.ac :( Sadly there are no good solutions here (that I have found), believe me I don't like maintaining my own build system any more than people like using it.

AR flags problem noted. You can override compiler binary name via CXX variable (eg CXX=<CHOST>-g++ make); is more needed here?
Comment 9 Alon Bar-Lev (RETIRED) gentoo-dev 2008-05-02 15:14:56 UTC
Thanks!
I hope you add the host prefix into configure... It will make it simpler... Just mimic autoconf --host= --target= --build= parameters.
Also take the LIB_OPT from configure as well...

But for now we are OK.