Alexey Ushakov wrote:
Hello Max,

Actually, we've already found this problem and passed to the team responsible for the code (Cannot provide you bug id at the moment though, but will do as soon as I get it). For now you can use following workaround in openjdk sources (that worked for me):

------- src/solaris/hpi/native_threads/src/sys_api_td.c -------
55a56,59
 > #if defined(__solaris__)
 > #include <sys/resource.h>
 > #endif
 >

Any program that calls rlimit should include sys/resource.h,
so the bug is definitely in sys_api_td.c.  Strictly speaking,
it's not a Solaris bug (it might even be considered a bug fix),
although Solaris should not be gratuitously incompatible.

The #include should be unconditional, since it's defined by the
Unix 2004 standard.

http://www.opengroup.org/onlinepubs/009695399/functions/getrlimit.html

So simply

#include <sys/resource.h>

Martin

Best Regards,
Alexey


Max (Weijun) Wang wrote:
Hi All

Just update my Solaris to nv82 and nightly build fails:

"/net/bounty.prc.sun.com/j2se-jsn/max/work/myjdk/jdk/src/solaris/hpi/native_threads/src/sys_api_td.c", line 101: syntax error before or at: limit "/net/bounty.prc.sun.com/j2se-jsn/max/work/myjdk/jdk/src/solaris/hpi/native_threads/src/sys_api_td.c", line 101: warning: undefined or missing type for: limit "/net/bounty.prc.sun.com/j2se-jsn/max/work/myjdk/jdk/src/solaris/hpi/native_threads/src/sys_api_td.c", line 105: undefined symbol: limit cc: acomp failed for /net/bounty.prc.sun.com/j2se-jsn/max/work/myjdk/jdk/src/solaris/hpi/native_threads/src/sys_api_td.c gnumake[5]: *** [/net/bounty.prc.sun.com/j2se-jsn/armory/java/re/max_huge/b7open/solaris-sparc/tmp/java/hpi/native_threads/obj/sys_api_td.o] Error 2
gnumake[5]: *** Waiting for unfinished jobs....
gnumake[5]: *** Waiting for unfinished jobs....
gnumake[5]: Leaving directory `/net/bounty.prc.sun.com/j2se-jsn/max/work/myjdk/jdk/make/java/hpi/native'

It seems that inside the file jdk/src/solaris/hpi/native_threads/src/sys_api_td.c, there's a line
     101:   int InitializeIO(rlim_t limit)
and the type rlim_t is not recognized.

I do a little search and find out that in my /usr/include/sys/stream.h:

#include <sys/isa_defs.h>
#ifdef _KERNEL
#include <sys/vnode.h>
#endif
#include <sys/poll.h>
#include <sys/strmdep.h>
#include <sys/cred.h>
#include <sys/t_lock.h>
#include <sys/model.h>

While in the old versions, the sys/vnode.h line is not surrounded in #ifdef.

Anyone can pass this to a Solaris guy?

Thanks
Max


Reply via email to