tomcat-native icon indicating copy to clipboard operation
tomcat-native copied to clipboard

scripts, maven pom.xml and class to help to load libraries from a jar

Open jfclere opened this issue 7 years ago • 8 comments

That requires a small add in tomcat-trunk load the class and call the method and loops loading the libraries list the method has returned. If no one complains I will commit both later this week.

jfclere avatar Sep 04 '18 20:09 jfclere

The Java class would need to be added to trunk (and 8.5.x and 7.0.x?) The other files look like they belong in native/build/jar or a similar location rather than the root of the repo. What is the plan for ensuring these binaries are available on each of those platforms? How many committers have access to all four? (I have 3 and I could add a Solaris VM fairly easily.)

markt-asf avatar Sep 05 '18 16:09 markt-asf

On 05/09/18 18:19, Mark Thomas wrote:

The Java class would need to be added to trunk (and 8.5.x and 7.0.x?) The other files look like they belong in native/build/jar or a similar location rather than the root of the repo.

Well apart pom.xml and copylibs_deps.sh nothing gets in the root repo.

What is the plan for ensuring these binaries are available on each of those platforms?

First it allows packagers like rhel or ubuntu to use they own libraries.

How many committers have access to all four? (I have 3 and I could add a Solaris VM fairly easily.)

Same here I also have access to SPARC64 box too.

This is mostly for the cloud, that will allow to build an uberjar and have tc-native, apr and openssl in it (openssl is often already in the images but it is tricky for tomcat to find it)

Cheers

Jean-Frederic

jfclere avatar Sep 05 '18 17:09 jfclere

The Java class would need to be added to trunk (and 8.5.x and 7.0.x?) the JarLoader needs to be in the same jar where the libraries are. Otherwise the logic can't find them and we don't want to list all the possible library name as the ldd or otool can give them at the build time.

jfclere avatar Sep 05 '18 17:09 jfclere

That might be problematic from a JPMS point of view that expects a package to appear in one and only one JAR.

markt-asf avatar Sep 05 '18 17:09 markt-asf

To check I understand this correctly, the plan is not for the Tomcat project to provide a single JAR for all platforms but to provide the hooks necessary for downstream packagers to package the native library (and dependencies) for their platform if they wish?

markt-asf avatar Sep 05 '18 17:09 markt-asf

On 05/09/18 19:38, Mark Thomas wrote:

To check I understand this correctly, the plan is not for the Tomcat project to provide a single JAR for all platforms but to provide the hooks necessary for downstream packagers to package the native library (and dependencies) for their platform if they wish?

We can do windows and macosx and probably linux. But I am sure the downstream packagers will use it to package the native libraries they have.

-- Cheers

Jean-Frederic

jfclere avatar Sep 05 '18 20:09 jfclere

well for windows we already have one binary, we can put it in the jar ;-)

jfclere avatar Sep 05 '18 20:09 jfclere

Re-opening after auto-close due to repo changes made during migration from svn to git. If you are able to rebase this PR against master rather than trunk that would be helpful. If not, we#ll take care oif that when we review the PR.

markt-asf avatar Jun 18 '19 14:06 markt-asf