Source: jcc
Severity: normal
Tags: patch
User: debian-powe...@lists.debian.org

Dear Maintainer,

The hardcoded 512k jvm stacksize setting is causing pylucene (possibly others?)
to fail to build from source with the following error:

        Traceback (most recent call last):
          File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
            "__main__", fname, loader, pkg_name)
          File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
            exec code in run_globals
          File "/usr/lib/python2.7/dist-packages/jcc/__main__.py", line 107, in 
<module>
            cpp.jcc(sys.argv)
          File "/usr/lib/python2.7/dist-packages/jcc/cpp.py", line 558, in jcc
        
        The stack size specified is too small, Specify at least 768k
            env = initVM(os.pathsep.join(classpath) or None, **initvm_args)
        ValueError: An error occurred while creating Java VM

Thus, with the patch attached, I included, in cpp.py, a condition that tests if 
os.uname 
contains the string 'ppc64le' and sets a greater stack size.
I did that way so it would not need to import any modules, but I am aware that
it can also be done importing modules (eg platform), or by not setting a static 
stack size.

Please let me know if you have any comments.

Thank you.
Fernando


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: ppc64el (ppc64le)

Kernel: Linux 3.16-trunk-powerpc64le (SMP w/32 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
diff -Nru jcc-2.20/debian/changelog jcc-2.20/debian/changelog
--- jcc-2.20/debian/changelog	2014-09-21 19:51:53.000000000 +0000
+++ jcc-2.20/debian/changelog	2014-11-04 15:36:42.000000000 +0000
@@ -1,3 +1,9 @@
+jcc (2.20-1ppc64el1) UNRELEASED; urgency=medium
+
+  * Raise stack size setting for ppc64el. 
+
+ -- Fernando Seiti Furusato <ferse...@br.ibm.com>  Tue, 04 Nov 2014 15:35:45 +0000
+
 jcc (2.20-1) unstable; urgency=medium
 
   * Imported Upstream version 2.20.
diff -Nru jcc-2.20/debian/patches/ppc64el-stacksize.patch jcc-2.20/debian/patches/ppc64el-stacksize.patch
--- jcc-2.20/debian/patches/ppc64el-stacksize.patch	1970-01-01 00:00:00.000000000 +0000
+++ jcc-2.20/debian/patches/ppc64el-stacksize.patch	2014-11-04 15:35:38.000000000 +0000
@@ -0,0 +1,18 @@
+Description: Raise jvm stack size for ppc64el.
+Author: Fernando Seiti Furusato <ferse...@br.ibm.com> 
+
+--- jcc-2.20.orig/jcc/cpp.py
++++ jcc-2.20/jcc/cpp.py
+@@ -552,7 +552,11 @@ def jcc(args):
+     if libpath:
+         vmargs.append('-Djava.library.path=' + os.pathsep.join(libpath))
+ 
+-    initvm_args['maxstack'] = '512k'
++    if "ppc64le" in os.uname():
++        initvm_args['maxstack'] = '768k'
++    else:
++        initvm_args['maxstack'] = '512k'
++
+     initvm_args['vmargs'] = vmargs
+ 
+     env = initVM(os.pathsep.join(classpath) or None, **initvm_args)
diff -Nru jcc-2.20/debian/patches/series jcc-2.20/debian/patches/series
--- jcc-2.20/debian/patches/series	2014-09-21 19:26:21.000000000 +0000
+++ jcc-2.20/debian/patches/series	2014-11-04 15:34:20.000000000 +0000
@@ -1 +1,2 @@
 avoid-ftbfs-unknown-archs.patch
+ppc64el-stacksize.patch

Reply via email to