Re: [COMPRESS] Pack200 support in pack200 branch

2020-08-23 Thread Peter Lee
After some debugging I found this at org.apache.harmony.pack200.Archive#171 : if (classes.size() > 0 && files.size() > 0) { segmentUnitList.add(new SegmentUnit(classes, files)); } Seems the Pack200 implementation in harmony requires existing of both classes AND files at the same time. The tests a

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Alex Remily
FWIW I have the same basic setup. The original LibreSSL is still installed and I used homebrew to install the various versions of OpenSSL, which I put first on my PATH. I don't routinely call the main function when I test, I usually just run the unit tests, so it's quite possible this is an error

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Alex Remily
Let me see if I can reproduce the error. I'm just speculating from memory at this point. On Sun, Aug 23, 2020 at 9:50 PM Gary Gregory wrote: > > I do have LibreSSL but I used homebrew to install OpenSSL 1.1.1g which I > put first on the PATH. Maybe something is off in my setup... > > Gary > > On

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Gary Gregory
I do have LibreSSL but I used homebrew to install OpenSSL 1.1.1g which I put first on the PATH. Maybe something is off in my setup... Gary On Sun, Aug 23, 2020, 21:46 Alex Remily wrote: > Gary, > > I'll have a look. I did the 1.1 support stuff and I'm familiar with > that class and that error,

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Alex Remily
Gary, I'll have a look. I did the 1.1 support stuff and I'm familiar with that class and that error, although I don't recall seeing that specific error in that class. The JNI libraries check the OpenSSL version at runtime, but maybe a compile time dependency got through. Out of curiosity, I ass

Re: Creating a Kotlin Commons Lang Package

2020-08-23 Thread Miguel Muñoz
Kotlin has an "extensions" feature that is more powerful than simply calling a Java method from Kotlin. Here's an example, from the Kotlin language guide: fun MutableList.swap(index1: Int, index2: Int) { val swap = this[index1] // 'this' corresponds to the list this[index1] = this[index2]

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Gary Gregory
Side note: Your English is good, no need to apologize :-) Gary On Sun, Aug 23, 2020 at 1:56 PM Xeno Amess wrote: > @Gary Gregory > Hi. > I done it at https://github.com/XenoAmess/commons-crypto-smoke-test > Please have a look. > > > I don't quite see how but I am obviously not comprehending yo

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Xeno Amess
@Gary Gregory Hi. I done it at https://github.com/XenoAmess/commons-crypto-smoke-test Please have a look. > I don't quite see how but I am obviously not comprehending your plan. Then I will explain it again :) Step 1, I wrote a maven-plugin, whose usage is to copy tests from another repo when b

[COMPRESS] Pack200 support in pack200 branch

2020-08-23 Thread Gary Gregory
Hi All, I created a branch called *pack200* which contains the Apache Harmony Pack200 code. If there are 2 failing unit test ATM if anyone wants to help out. Gary

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Gary Gregory
I wondering if anyone can confirm the following issue and/or help explain it, on MacOS 10.15.6 with OpenSSL 1.1.1g, running: mvn package then: java -Xdiag -Xcheck:jni -cp target/classes -Dcommons.crypto.lib.tempdir=target/ org.apache.commons.crypto.Crypto WARNING in native method: JNI call made

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Gary Gregory
On Sun, Aug 23, 2020 at 10:46 AM Xeno Amess wrote: > Got it. > I will explain my plan first. > First, I will write a maven-plugin today. > The maven plugin can accept two parameters, one be repo git url, the other > be test codes relatice dir. > When the plugin invoke (at phase prepare-test-sourc

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Xeno Amess
Got it. I will explain my plan first. First, I will write a maven-plugin today. The maven plugin can accept two parameters, one be repo git url, the other be test codes relatice dir. When the plugin invoke (at phase prepare-test-source), it will use jgit to clone the repo you set, and copy its test

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Gary Gregory
The Apache snapshot repository is here: https://repository.apache.org/snapshots/ You just need a repository entry in your POM pointing to it in order for Maven to resolve versions postfixed with "-SNAPSHOT". Gary On Sun, Aug 23, 2020 at 10:31 AM Xeno Amess wrote: > Hi Gary. > Where is the snaps

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Xeno Amess
Hi Gary. Where is the snapshot jar? Is it at oss snapshot center? If so, then I will have a very, very tricky way to test it, and that test is reusable. Gary Gregory 于2020年8月23日周日 下午9:53写道: > Building the binaries can be tricky, be warned. > > The trickiest to validate are aarch64, arm, and art

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Gary Gregory
Building the binaries can be tricky, be warned. The trickiest to validate are aarch64, arm, and artmhf. All help is welcome of course. A smoke test would be to make sure that the native code from the SNAPSHOT jar from our SNAPSHOT repo can be loaded, for example, by calling from the command line

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Gary Gregory
On Sun, Aug 23, 2020 at 8:31 AM Alex Remily wrote: > Gary, > > I can test the 64 bit Mac, Windows and Linx builds this week. Did you > want to include this test fix in the snapshot: > > https://issues.apache.org/jira/browse/CRYPTO-149 > > There's a pending PR with the fix. It's only one line of

Re: [Crypto] requesting help testing native binaries

2020-08-23 Thread Alex Remily
Gary, I can test the 64 bit Mac, Windows and Linx builds this week. Did you want to include this test fix in the snapshot: https://issues.apache.org/jira/browse/CRYPTO-149 There's a pending PR with the fix. It's only one line of code so it should merge easily. In the past I've had some succes