You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2020/01/09 07:02:58 UTC

[Bug 64063] New: The libtcnative library should be installed in $CATALINA_HOME/bin

https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

            Bug ID: 64063
           Summary: The libtcnative library should be installed in
                    $CATALINA_HOME/bin
           Product: Tomcat Native
           Version: 1.2.23
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Library
          Assignee: dev@tomcat.apache.org
          Reporter: mgrigorov@apache.org
  Target Milestone: ---

As explained by Remy Maucherat at http://markmail.org/message/3fb7o7xljawktilr
the native libraries should be installed at $CATALINA_HOME/bin instead of
$CATALINA_HOME/lib folder.

A Pull Request with the change: https://github.com/apache/tomcat-native/pull/6

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #16 from Michael Osipov <mi...@apache.org> ---
(In reply to Christopher Schultz from comment #13)
> (In reply to Michael Osipov from comment #12)
> > My proposal would be platform-aware in Tomcat 10 and 8.5 + 9 would support
> > both for a transition phase. Of course, this will require decent
> > documentation. We should stick to wellknown behavior rather rolling our own.
> 
> My contention is that there is no "well-known behavior" to stick to.

There is, if you handle with native libraries daily, like I do.

> I don't like that the answer to the question "where do I put my tcnative and
> APR libraries?" is "it depends".

As mentioned by Rémy, at best the OS package manager does that, at worst you
compile your own with GNU autoconf and in most cases it will either go to
/usr/local/lib on BSD or /opt/<package>/lib on System V Unices.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #1 from Michael Osipov <mi...@apache.org> ---
(In reply to mgrigorov from comment #0)
> As explained by Remy Maucherat at
> http://markmail.org/message/3fb7o7xljawktilr the native libraries should be
> installed at $CATALINA_HOME/bin instead of $CATALINA_HOME/lib folder.
> 
> A Pull Request with the change:
> https://github.com/apache/tomcat-native/pull/6

I have complied so much native software myself in the last 5 years on a lot
Unix-like OSes that that there are several reasons why this is wrong:

* GNU autoconf has well established conventions for libs going to libdir. Don't
break the convention.
* This is a native library and native libs on Un*x  go to libdir
* You might want to share the lib with several Tomcat installations, e.g., from
/usr/local/lib or /opt/lib.

An option I see is to provide multiple layouts like libapr does.

Rule of thumb, don't break wellknown conventions just because this is a JNI
wrapper.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #10 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Michael Osipov from comment #7)
> Apply POLA!

The proper application of POLA is that Tomcat doesn't switch the location of
these files even across versions. I've lost track of the history: they were in
lib and now they are in bin? In any case, users shouldn't have to look at a
matrix of Tomcat versions to figure out where the hell to put their libraries.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #17 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Michael Osipov from comment #16)
> (In reply to Christopher Schultz from comment #13)
> > (In reply to Michael Osipov from comment #12)
> > > My proposal would be platform-aware in Tomcat 10 and 8.5 + 9 would support
> > > both for a transition phase. Of course, this will require decent
> > > documentation. We should stick to wellknown behavior rather rolling our own.
> > 
> > My contention is that there is no "well-known behavior" to stick to.
> 
> There is, if you handle with native libraries daily, like I do.

The convention on Windows is "search the launch directory, then current
directory, then %windows%\system32, then %PATH% for DLLs". No lib. No bin.

"Because Michael says so" isn't a good justification.

> > I don't like that the answer to the question "where do I put my tcnative and
> > APR libraries?" is "it depends".
> 
> As mentioned by Rémy, at best the OS package manager does that, at worst you
> compile your own with GNU autoconf and in most cases it will either go to
> /usr/local/lib on BSD or /opt/<package>/lib on System V Unices.

You are going in circles. It doesn't matter what GNU autoconf does, or what the
tcnative build process itself does. Or what nmake/cname/vstudiowhatever does.
It matters where Tomcat bundles those output artifacts. Neither GNU autoconf
nor make nor any other tool should be dropping binaries directly into another
application (i.e. Tomcat).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #14 from Remy Maucherat <re...@apache.org> ---
(In reply to Christopher Schultz from comment #13)
> (In reply to Michael Osipov from comment #12)
> > My proposal would be platform-aware in Tomcat 10 and 8.5 + 9 would support
> > both for a transition phase. Of course, this will require decent
> > documentation. We should stick to wellknown behavior rather rolling our own.
> 
> My contention is that there is no "well-known behavior" to stick to.
> 
> I don't like that the answer to the question "where do I put my tcnative and
> APR libraries?" is "it depends".

In your library path, preferably from a package provided by your distribution.
The bin folder trick is only for me the lazy developer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #3 from Michael Osipov <mi...@apache.org> ---
(In reply to mgrigorov from comment #2)
> If the change is not correct then the documentation needs to be improved to
> explain that the libs should be either copied to $CATALINA_HOME/bin manually
> or put into a folder that in on the library path.
> 
> Other opinions ?

If that is the case with the docs, then your proposals are correct. I need to
look into docs for that.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #6 from Christopher Schultz <ch...@christopherschultz.net> ---
Maybe this is a Tomcat packaging issue and less of a libtcnative issue?

The confusion comes from the fact that "bin" usually means native-binary and
lib usually means .jar files (for Java applications). So where do you put a
native binary library? I think reasonable people can disagree about this.

tcnative's configure/make/make install should not deviate from native toolchain
standards.

But Tomcat can package the .so/.dll/.dylib wherever it wants.

If we behave differently on Windows-vs-*NIX, then documentation is more
complicated, confusing, etc. Tomcat ships with native .dll files for Windows
but not .so/.dylib for other OSs.

Is this just a request to make sure that each user is comfortable in their own
environment? It seems like choosing "bin" means that Windows-partisans "win"
and choosing "lib" means that UNIX-partisans "win". Can/should we support
either/or? Or do we have to pick one location to rule them all?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #4 from Michael Osipov <mi...@apache.org> ---
Now, what do we have:

https://tomcat.apache.org/native-doc/#Building:
* This document is correct, though I do not agree to install libtcnative into
--prefix=$CATALINA_HOME. It is a native library, it should live where other
native libraries live. Either default prefix /usr/local/lib, or else.
* It explicitly refers to LD_LIBRARY_PATH because java(1) does not know where
this library resides.

https://github.com/apache/tomcat-native/blob/master/native/BUILDING:
This one is OK, but largely duplicates the previous document. Both need to be
cleaned up. Neither this one is wrong, but not consistent with the first.

AprLifecycleListener:
Calls

> Library.initialize(null)

which then calls 

> private Library() throws Exception

which explicitly does:

> File binLib = new File(System.getProperty("catalina.home"), "bin");
>        for (int i = 0; i < NAMES.length; i++) {
>            File library = new File(binLib, System.mapLibraryName(NAMES[i]));
>            try {
>                System.load(library.getAbsolutePath());

Here is the first problem, Unix libs always reside in ./lib, but on Windows
next to the executable or ./bin. It is inconsistent with the system behavior.
Let's assume tcnative is neither in ./lib nor ./bin:

> System.loadLibrary(NAMES[i]);

is used which automatically queries java.library.path/LD_LIBRARY_PATH, you
provide the symbolic name only. Here you *need* either one set.

https://github.com/apache/tomcat/blob/master/build.xml:
* Line 87:
> <property name="test.apr.loc"          value="${test.basedir}/bin"/>

There is no way that APR and tcnative will exist in that output directory if
you don't change "test.apr.loc".
* Later on in line 1623:
> <jvmarg value="-Djava.library.path=${test.apr.loc}"/>

to make the library loadable.

Logically, this requires if/else for Windows/Unix for ./lib or ./bin. Moreover,
not APR is required, but tcnative is because tcnative is either statically or
dynamically linked against APR. We never load APR directly.

Also doing --prefix=/home/martin/git/apache/tomcat/output/build is non-sense
because this will be wiped away with "ant clean". Consider
'value="${test.basedir}/bin"' to be a guard value to satisfy arguments for
<jvmarg />.

What needs to be done?

* At worst recommend ./bin for Windows, ./lib for Unix(-like)
* At best recommend libtcnative.so/tcnative.dll to live outside of Tomcat to
survive upgrades. In most cases there is no need to recompile it if you update
Tomcat.
* Change "File binLib = new File(System.getProperty("catalina.home"), "bin");"
to be OS-dependent or iterate over {"lib", "bin"} to suit both OS families.
* Change build.xml not to mention test.apr.loc, but test.tcnative.loc and
document the default value to be a guard, but not to be used by default or drop
the default value completely and have an empty value handled appropriately.


The need for LD_LIBRARY_PATH also depends on the OS and loader config, e.g., on
HP-UX I need to supply LD_LIBRARY_PATH=/opt/ports/lib/hpux32 whereas on FreeBSD
the libtcnative is in /usr/local/lib and I do not set LD_LIBRARY_PATH because
it is by default included in ldconfig_paths
(https://github.com/freebsd/freebsd/blob/stable/12/libexec/rc/rc.conf#L650).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #11 from Remy Maucherat <re...@apache.org> ---
(In reply to Christopher Schultz from comment #10)
> (In reply to Michael Osipov from comment #7)
> > Apply POLA!
> 
> The proper application of POLA is that Tomcat doesn't switch the location of
> these files even across versions. I've lost track of the history: they were
> in lib and now they are in bin? In any case, users shouldn't have to look at
> a matrix of Tomcat versions to figure out where the hell to put their
> libraries.

This was never in lib. In some use cases, it was in bin/native though scripts.
In most others, only in the library path. So now, the library loading simply
tries bin as well as continuing to work in the library path.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #2 from mgrigorov <mg...@apache.org> ---
If the change is not correct then the documentation needs to be improved to
explain that the libs should be either copied to $CATALINA_HOME/bin manually or
put into a folder that in on the library path.

Other opinions ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

mgrigorov <mg...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED
         Resolution|WONTFIX                     |INVALID

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #15 from Michael Osipov <mi...@apache.org> ---
(In reply to Remy Maucherat from comment #14)
> (In reply to Christopher Schultz from comment #13)
> > (In reply to Michael Osipov from comment #12)
> > > My proposal would be platform-aware in Tomcat 10 and 8.5 + 9 would support
> > > both for a transition phase. Of course, this will require decent
> > > documentation. We should stick to wellknown behavior rather rolling our own.
> > 
> > My contention is that there is no "well-known behavior" to stick to.
> > 
> > I don't like that the answer to the question "where do I put my tcnative and
> > APR libraries?" is "it depends".
> 
> In your library path, preferably from a package provided by your
> distribution. The bin folder trick is only for me the lazy developer.

Exactly, and that is always ../lib on Unix-like operating system.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #7 from Michael Osipov <mi...@apache.org> ---
(In reply to Christopher Schultz from comment #6)
> Maybe this is a Tomcat packaging issue and less of a libtcnative issue?
> 
> The confusion comes from the fact that "bin" usually means native-binary and
> lib usually means .jar files (for Java applications). So where do you put a
> native binary library? I think reasonable people can disagree about this.

They should not, on Unix bin means for executables, lib for libraries from an
abstract point it does not matter native (.so) or Java, lib is lib. You may
introduce dirs inside lib for that.

> tcnative's configure/make/make install should not deviate from native
> toolchain standards.
> 
> But Tomcat can package the .so/.dll/.dylib wherever it wants.
> 
> If we behave differently on Windows-vs-*NIX, then documentation is more
> complicated, confusing, etc. Tomcat ships with native .dll files for Windows
> but not .so/.dylib for other OSs.

Because Windows does not come with a compiler toolchain. A decent OS does. Also
note that all binary artifacts are courtesy of us, ASF requires source tarballs
only.

> Is this just a request to make sure that each user is comfortable in their
> own environment? It seems like choosing "bin" means that Windows-partisans
> "win" and choosing "lib" means that UNIX-partisans "win". Can/should we
> support either/or? Or do we have to pick one location to rule them all?

Apply POLA!

I have provided two proposals:

> Change "File binLib = new File(System.getProperty("catalina.home"), "bin");" to be OS-dependent or iterate over {"lib", "bin"} to suit both OS families.

If you don't want to break the behavior in current versions go for the latter,
but correct it in Tomcat 10 to the former.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #12 from Michael Osipov <mi...@apache.org> ---
(In reply to Christopher Schultz from comment #10)
> (In reply to Michael Osipov from comment #7)
> > Apply POLA!
> 
> The proper application of POLA is that Tomcat doesn't switch the location of
> these files even across versions. I've lost track of the history: they were
> in lib and now they are in bin? In any case, users shouldn't have to look at
> a matrix of Tomcat versions to figure out where the hell to put their
> libraries.

My proposal would be platform-aware in Tomcat 10 and 8.5 + 9 would support both
for a transition phase. Of course, this will require decent documentation. We
should stick to wellknown behavior rather rolling our own.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #8 from mgrigorov <mg...@apache.org> ---
After re-reading https://tomcat.apache.org/native-doc/ I think the
documentation is good enough. It explains that $CATALINA_HOME/lib should be
added to LD_LIBRARY_PATH. Somehow I've missed this the previous time.

I'm fine to close this ticket as "Not a problem".

@Michael Osipov: Do you want to keep it open and make some improvements ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #5 from Michael Osipov <mi...@apache.org> ---
Hooray, we have org.apache.tomcat.util.compat.JrePlatform.IS_WINDOWS. So we can
test for Windows/non-Windows and also
http://ant.apache.org/manual/Tasks/conditions.html for Ant.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

Michael Osipov <mi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #9 from Michael Osipov <mi...@apache.org> ---
(In reply to mgrigorov from comment #8)
> After re-reading https://tomcat.apache.org/native-doc/ I think the
> documentation is good enough. It explains that $CATALINA_HOME/lib should be
> added to LD_LIBRARY_PATH. Somehow I've missed this the previous time.
> 
> I'm fine to close this ticket as "Not a problem".
> 
> @Michael Osipov: Do you want to keep it open and make some improvements ?

Improvement should happen in a new ticket.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #18 from Michael Osipov <mi...@apache.org> ---
(In reply to Christopher Schultz from comment #17)
> (In reply to Michael Osipov from comment #16)
> > (In reply to Christopher Schultz from comment #13)
> > > (In reply to Michael Osipov from comment #12)
> > > > My proposal would be platform-aware in Tomcat 10 and 8.5 + 9 would support
> > > > both for a transition phase. Of course, this will require decent
> > > > documentation. We should stick to wellknown behavior rather rolling our own.
> > > 
> > > My contention is that there is no "well-known behavior" to stick to.
> > 
> > There is, if you handle with native libraries daily, like I do.
> 
> The convention on Windows is "search the launch directory, then current
> directory, then %windows%\system32, then %PATH% for DLLs". No lib. No bin.
> 
> "Because Michael says so" isn't a good justification.

It is actually bin, because there is no distinction between bin and lib on
Windows. It loads DLLs from the same directory as executables. This is what I
am trying to say. Please look at the bin directory of OpenJDK 11 on Windows.
DLLs and EXEs side by side.

> > > I don't like that the answer to the question "where do I put my tcnative and
> > > APR libraries?" is "it depends".
> > 
> > As mentioned by Rémy, at best the OS package manager does that, at worst you
> > compile your own with GNU autoconf and in most cases it will either go to
> > /usr/local/lib on BSD or /opt/<package>/lib on System V Unices.
> 
> You are going in circles. It doesn't matter what GNU autoconf does, or what
> the tcnative build process itself does. Or what nmake/cname/vstudiowhatever
> does. It matters where Tomcat bundles those output artifacts. Neither GNU
> autoconf nor make nor any other tool should be dropping binaries directly
> into another application (i.e. Tomcat).

Though I do not fully understand why I am going circles here, I agree with that
> Neither GNU
> autoconf nor make nor any other tool should be dropping binaries directly
> into another application (i.e. Tomcat).

This would mean that we remove the loading of native libraries from
CATALINA_HOME/bin in Tomcat 10 as well as from the build.xml. They have always
to be externally hosted.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #13 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Michael Osipov from comment #12)
> My proposal would be platform-aware in Tomcat 10 and 8.5 + 9 would support
> both for a transition phase. Of course, this will require decent
> documentation. We should stick to wellknown behavior rather rolling our own.

My contention is that there is no "well-known behavior" to stick to.

I don't like that the answer to the question "where do I put my tcnative and
APR libraries?" is "it depends".

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #19 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Michael Osipov from comment #18)
> It is actually bin, because there is no distinction between bin and lib on
> Windows. It loads DLLs from the same directory as executables. This is what
> I am trying to say. Please look at the bin directory of OpenJDK 11 on
> Windows. DLLs and EXEs side by side.

I know of no other Windows programs that have a "bin" directory. They just have
"a directory". The fact that Java has one is because of its UNIX history.

> Though I do not fully understand why I am going circles here, I agree with
> that
> > Neither GNU
> > autoconf nor make nor any other tool should be dropping binaries directly
> > into another application (i.e. Tomcat).
> 
> This would mean that we remove the loading of native libraries from
> CATALINA_HOME/bin in Tomcat 10 as well as from the build.xml. They have
> always to be externally hosted.

No. It's perfectly fine for Tomcat to bundle libraries it wants, wherever it
wants. But libtcnative's build process dropping binaries into Tomcat's
directories? No, that's not okay with me unless the user (the one who runs
"make") specifically requests installation into the Tomcat directory, which can
be done with various command-line arguments to "configure".

Back to wherever Tomcat wants to bundle and where: I don't want the answer to
the question "where do I put my libtcnative library?" to be "it depends".

Q: "Where do I put my JDBC driver?"
A: "In the lib directory"

Q: "Where do I put my custom valve?"
A: "In the lib directory"

Why are those above always the same answer, regardless of platform, and yet the
answer for libtcnative will be different based upon the platform?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org