1 Reply Latest reply: Jul 4, 2013 9:51 PM by lsgroup RSS

    buildall.sh env: javac: Arg list too long

    lsgroup

      Hi, Having trouble building dbxml in SmartOS (opensolaris). 

       

      While building Berkeley DB for Java in a long javac command, the script breaks with error:

       

      env: javac: Arg list too long

      make: *** [db.jar] Error 126

       

      $ getconf ARG_MAX

      1048320

       

      returns a fairly high number - I built the same on FreeBSD with a much smaller number. 

       

      Any suggestions on how to get this built and what is causing the problem?

       

      Thanks in advance!

        • 1. Re: buildall.sh env: javac: Arg list too long
          lsgroup

          WORK AROUND:

          cd ./dbxml-2.5.16/db-4.8.26/build_unix

          create file dbsrcs.txt that lists all the java source files listed in the JAVA_DBSRCS environment variable

          it should look like this:

          ../dist/../java/src/com/sleepycat/util/ErrorBuffer.java
          ../dist/../java/src/com/sleepycat/util/ExceptionWrapper.java
          ../dist/../java/src/com/sleepycat/util/ExceptionUnwrapper.java
          ../dist/../java/src/com/sleepycat/util/PackedInteger.java
          ../dist/../java/src/com/sleepycat/util/keyrange/KeyRange.java
          ...

          save dbsrcs.txt file inside dbxml-2.5.16/db-4.8.26/build_unix directory

           

          # nano Makefile

          find line:

            $(JAVAC) -d $(JAVA_CLASSTOP) $(JAVACFLAGS) $(JAVA_DBSRCS)

          and replace with

            $(JAVAC) -d $(JAVA_CLASSTOP) $(JAVACFLAGS) @dbsrcs.txt

           

          while inside the dbxml-2.5.16/db-4.8.26/build_unix directory, run make, to just compile Berkeley DB only

           

          once completed, go back to dbxml-2.5.16 and run

          ./buildall.sh --enable-java

           

          since Berkeley DB was already built, the build script will see this and skip the Berkeley DB compile since it's already compiled!