From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,WEIRD_PORT autolearn=unavailable autolearn_force=no version=3.4.4 Path: backlog4.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: compiler problems with libadacrypt-dev-0.1.3 Date: Sun, 30 Mar 2014 15:43:52 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="ce828a9d97ecfcd2439cf6d64a2d8dec"; logging-data="31505"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18j4BXvc64P1sZkkeCUHQfaMqKbK0mP8nY=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:AsPrmo01iiCG3bwin7t2SS1Zq7w= sha1:HOQUGSyr0ZVykuxW2c3r93C7Qa4= Xref: number.nntp.dca.giganews.com comp.lang.ada:185417 Date: 2014-03-30T15:43:52+01:00 List-Id: batoubrioche@googlemail.com writes: > For a project I need to use some of the libadacrypt library's > facilities. I downloaded the most recent version of > libadacrypt-dev-0.1.3 here at sourceforge > > http://sourceforge.net/projects/libadacrypt-dev/ > > First of all, I programmed some small test units with the library's > big number support. > > But I get these error messages while compiling the crypto-types.ads source: > > Compiling ... > crypto-types.ads:108:34: first argument for shift must have size 8. 16, 32 or 64 > crypto-types.ads:109:34: first argument for shift must have size 8. 16, 32 or 64 > crypto-types.ads:291:30: incorrect intrinsic subprogram, see spec > crypto-types.ads:292:30: incorrect intrinsic subprogram, see spec > Done--error detected. > > I have no clue what is wrong here. Could someone tell me what is wrong > with this source from the libadacrypt library? I've tried this with GCC 4.8.1 ... and get the same. The problem is that, for the first error, the code says function Shift_Left (Value : Natural; Amount : Natural) return Natural; and Natural'Size (on this machine, x86_64-apple-darwin12) is 31, not 32. Likewise for the second error. Having "corrected" this by using Integer for Value and the result, the next problem is with crypto-symmetric-algorithm-tripledes.ads:103 to :106; this is less tractable, since the code is trying to implement intrinsic shifts for a 6-bit type. It is in a section of code marked obsolete, though! I posted bugs to https://sourceforge.net/p/libadacrypt-dev/bugs/.