You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2013/06/06 18:22:13 UTC

Where to put proposals for tcnative?

All,

Neither tcnative/trunk not tcnative/branches/1.1.x have a STATUS.txt
file... where should proposals be made? In Tomcat directly?

Thanks,
-chris


Re: Where to put proposals for tcnative?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Rainer,

On 6/6/13 5:24 PM, Rainer Jung wrote:
> On 06.06.2013 23:00, Caldarale, Charles R wrote:
>>> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
>>> Subject: Re: Where to put proposals for tcnative?
>>
>>> PS Here's what I get when trying to build tcnative-trunk:
>>
>>> $ sh buildconf --with-apr=../../apr-1.4.6/
>>
>>> checking for JDK os include directory... Cannot find jni_md.h in /usr/
>>> configure: error: You should retry --with-os-type=SUBDIR
>>
>> It's an error to ever look for jni_md.h explicitly, since it's existence is dependent on the JVM vendor.  (This was recently reported on the users' list.)  In Sun/Oracle JDKs, jni_md.h is automatically #included inside jni.h, which is the only header file the spec requires.
> 
> Hmm, yes it's automatically included, but the preprocessor will not find
> it, because it sits in an OS dependent sub directory.
> 
> So what configure does is trying to find jni_md.h to set up the include
> path correctly. Otherwise including jni.h will fail.
> 
> For the JVMs that don't have a jni_md.h (and are known to us), configure
> has additional script code running later.
> 
> The JNI spec doesn't seem to help and the FAQ knows about the problem
> but not the solution:
> 
> http://www.oracle.com/technetwork/java/jni-j2sdk-faq-141732.html#jni_md

It's a "frequently asked questions" document. It clearly doesn't say
"/answers to/ frequently asked questions". ;)

-chris


Re: Where to put proposals for tcnative?

Posted by Rainer Jung <ra...@kippdata.de>.
On 06.06.2013 23:00, Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
>> Subject: Re: Where to put proposals for tcnative?
> 
>> PS Here's what I get when trying to build tcnative-trunk:
> 
>> $ sh buildconf --with-apr=../../apr-1.4.6/
> 
>> checking for JDK os include directory... Cannot find jni_md.h in /usr/
>> configure: error: You should retry --with-os-type=SUBDIR
> 
> It's an error to ever look for jni_md.h explicitly, since it's existence is dependent on the JVM vendor.  (This was recently reported on the users' list.)  In Sun/Oracle JDKs, jni_md.h is automatically #included inside jni.h, which is the only header file the spec requires.

Hmm, yes it's automatically included, but the preprocessor will not find
it, because it sits in an OS dependent sub directory.

So what configure does is trying to find jni_md.h to set up the include
path correctly. Otherwise including jni.h will fail.

For the JVMs that don't have a jni_md.h (and are known to us), configure
has additional script code running later.

The JNI spec doesn't seem to help and the FAQ knows about the problem
but not the solution:

http://www.oracle.com/technetwork/java/jni-j2sdk-faq-141732.html#jni_md

Regards,

Rainer



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


RE: Where to put proposals for tcnative?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Subject: Re: Where to put proposals for tcnative?

> PS Here's what I get when trying to build tcnative-trunk:

> $ sh buildconf --with-apr=../../apr-1.4.6/

> checking for JDK os include directory... Cannot find jni_md.h in /usr/
> configure: error: You should retry --with-os-type=SUBDIR

It's an error to ever look for jni_md.h explicitly, since it's existence is dependent on the JVM vendor.  (This was recently reported on the users' list.)  In Sun/Oracle JDKs, jni_md.h is automatically #included inside jni.h, which is the only header file the spec requires.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Where to put proposals for tcnative?

Posted by Rainer Jung <ra...@kippdata.de>.
On 07.06.2013 16:05, Christopher Schultz wrote:
> Rainer,

> In this particular case, it seems like my changes should be relatively
> compatible between the two. Should I patch trunk and back-port, patch
> 1.1 and forward-port, or patch 1.1 and ignore trunk (thus making the
> problem worse). I suspect trunk -> 1.1 since it looks straightforward.

If it is OK for you and the code applies trunk then 1.1.x sounds good.

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Where to put proposals for tcnative?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Rainer,

On 6/6/13 5:06 PM, Rainer Jung wrote:
> On 06.06.2013 22:54, Rainer Jung wrote:
>> On 06.06.2013 19:56, Christopher Schultz wrote:
>>> Rainer,
>>>
>>> On 6/6/13 1:32 PM, Rainer Jung wrote:
>>>> On 06.06.2013 18:22, Christopher Schultz wrote:
>>
>>>> Proposals mostly for the C files probably make sense in a STATUS file
>>>> here if they are backports from native trunk.
>>>
>>> I was going to make a C-language proposal.
>>>
>>> I can't seem to get "configure" to work in trunk because some macros
>>> aren't working properly (see below), so I've been working in the 1.1.x
>>> branch.
>>
>> See below below :)
>>
>>> PS Here's what I get when trying to build tcnative-trunk:
>>
>> ... snip ...
>>
>> configure.in was broken as was the new java detection macro. Hopefully
>> fixed in the last two commits. "svn up" and there you go.
> 
> I should also warn you: native trunk is not in good shape. Many C files
> are behind the 1.1 ones. trunk was created for some new features and
> increased APR minimum version
> 
> 
> http://mail-archives.apache.org/mod_mbox/tomcat-dev/200810.mbox/%3C48E6302B.7060704@kippdata.de%3E
> 
> but later lots of changes were applied directly to 1.1 and trunk was
> forgotten. See the January 2013 discussion thread on tcnative. The clean
> up for the native c files didn't happen.

In this particular case, it seems like my changes should be relatively
compatible between the two. Should I patch trunk and back-port, patch
1.1 and forward-port, or patch 1.1 and ignore trunk (thus making the
problem worse). I suspect trunk -> 1.1 since it looks straightforward.

(Commit after review, of course)

Thanks,
-chris


Re: Where to put proposals for tcnative?

Posted by Rainer Jung <ra...@kippdata.de>.
On 06.06.2013 22:54, Rainer Jung wrote:
> On 06.06.2013 19:56, Christopher Schultz wrote:
>> Rainer,
>>
>> On 6/6/13 1:32 PM, Rainer Jung wrote:
>>> On 06.06.2013 18:22, Christopher Schultz wrote:
> 
>>> Proposals mostly for the C files probably make sense in a STATUS file
>>> here if they are backports from native trunk.
>>
>> I was going to make a C-language proposal.
>>
>> I can't seem to get "configure" to work in trunk because some macros
>> aren't working properly (see below), so I've been working in the 1.1.x
>> branch.
> 
> See below below :)
> 
>> PS Here's what I get when trying to build tcnative-trunk:
> 
> ... snip ...
> 
> configure.in was broken as was the new java detection macro. Hopefully
> fixed in the last two commits. "svn up" and there you go.

I should also warn you: native trunk is not in good shape. Many C files
are behind the 1.1 ones. trunk was created for some new features and
increased APR minimum version


http://mail-archives.apache.org/mod_mbox/tomcat-dev/200810.mbox/%3C48E6302B.7060704@kippdata.de%3E

but later lots of changes were applied directly to 1.1 and trunk was
forgotten. See the January 2013 discussion thread on tcnative. The clean
up for the native c files didn't happen.

Regards,

Rainer




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Where to put proposals for tcnative?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Rainer,

On 6/6/13 4:54 PM, Rainer Jung wrote:
> On 06.06.2013 19:56, Christopher Schultz wrote:
>> Rainer,
>>
>> On 6/6/13 1:32 PM, Rainer Jung wrote:
>>> On 06.06.2013 18:22, Christopher Schultz wrote:
> 
>>> Proposals mostly for the C files probably make sense in a STATUS file
>>> here if they are backports from native trunk.
>>
>> I was going to make a C-language proposal.
>>
>> I can't seem to get "configure" to work in trunk because some macros
>> aren't working properly (see below), so I've been working in the 1.1.x
>> branch.
> 
> See below below :)

Okay, but what about a review of the actual patch ;)

Thanks,
-chris


Re: Where to put proposals for tcnative?

Posted by Rainer Jung <ra...@kippdata.de>.
On 06.06.2013 19:56, Christopher Schultz wrote:
> Rainer,
> 
> On 6/6/13 1:32 PM, Rainer Jung wrote:
>> On 06.06.2013 18:22, Christopher Schultz wrote:

>> Proposals mostly for the C files probably make sense in a STATUS file
>> here if they are backports from native trunk.
> 
> I was going to make a C-language proposal.
> 
> I can't seem to get "configure" to work in trunk because some macros
> aren't working properly (see below), so I've been working in the 1.1.x
> branch.

See below below :)

> PS Here's what I get when trying to build tcnative-trunk:

... snip ...

configure.in was broken as was the new java detection macro. Hopefully
fixed in the last two commits. "svn up" and there you go.

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Where to put proposals for tcnative?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Rainer,

On 6/6/13 1:32 PM, Rainer Jung wrote:
> On 06.06.2013 18:22, Christopher Schultz wrote:
>> All,
>>
>> Neither tcnative/trunk not tcnative/branches/1.1.x have a STATUS.txt
>> file... where should proposals be made? In Tomcat directly?
> 
> The Java classes come from TC trunk via externals. So proposals which
> are mainly for those can be discussed just like any big trunk change
> (mail list).
> 
> Proposals mostly for the C files probably make sense in a STATUS file
> here if they are backports from native trunk.

I was going to make a C-language proposal.

I can't seem to get "configure" to work in trunk because some macros
aren't working properly (see below), so I've been working in the 1.1.x
branch.

> The old STATUS file can be seen under:
> 
> http://svn.apache.org/viewvc?view=revision&revision=881756
> 
> Proposals for the C part in native trunk probably also make sense to
> discuss on the mail list if necessary.

The patch in question is the one attached to this bug:

https://issues.apache.org/bugzilla/show_bug.cgi?id=51813

Normally, I'd just make the change and let someone object, but tcnative
is something I have less familiarity with, so I wanted to get some eyes
on it (probably Mladen's) before committing.

Thanks,
-chris

PS Here's what I get when trying to build tcnative-trunk:

$ sh buildconf --with-apr=../../apr-1.4.6/

Looking for apr source in ../../apr-1.4.6/
Creating configure ...
Generating 'make' outputs ...
rebuilding rpm spec file

./configure --with-apr=../../apr-1.4.6/ --with-ssl=yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
Tomcat Native Version: 1.2.0
checking for chosen layout... tcnative
checking for APR... yes
configure: APR 1.4.6 detected.
  setting CC to "gcc"
  setting CPP to "gcc -E"
./configure: line 2710: TCN_FIND_JDK: command not found
./configure: line 2711: TCN_SABLEVM: command not found
./configure: line 2712: TCN_J9VM: command not found
  adding "-I/usr/include" to TCNATIVE_PRIV_INCLUDES
checking for JDK os include directory... Cannot find jni_md.h in /usr/
configure: error: You should retry --with-os-type=SUBDIR

It looks like configure only looks at JAVA_HOME environment variable and
does not accept --with-java-home like tcnative 1.1.x does.

I think we should allow --with-java-home like tcnative 1.1.x, but I have
no idea how to work with buildconf/configure/etc.


Re: Where to put proposals for tcnative?

Posted by Rainer Jung <ra...@kippdata.de>.
On 06.06.2013 18:22, Christopher Schultz wrote:
> All,
> 
> Neither tcnative/trunk not tcnative/branches/1.1.x have a STATUS.txt
> file... where should proposals be made? In Tomcat directly?

The Java classes come from TC trunk via externals. So proposals which
are mainly for those can be discussed just like any big trunk change
(mail list).

Proposals mostly for the C files probably make sense in a STATUS file
here if they are backports from native trunk.

The old STATUS file can be seen under:

http://svn.apache.org/viewvc?view=revision&revision=881756

Proposals for the C part in native trunk probably also make sense to
discuss on the mail list if necessary.

My 2 cents.

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org