Can't Compile jtreg

Jonathan Gibbons jonathan.gibbons at oracle.com
Tue Jul 30 10:58:25 PDT 2013


On 07/30/2013 10:51 AM, Nick Williams wrote:
> On Jul 30, 2013, at 12:40 PM, Jonathan Gibbons wrote:
>
>> On 07/30/2013 10:33 AM, Nick Williams wrote:
>>> On Jul 30, 2013, at 12:29 PM, Jonathan Gibbons wrote:
>>>
>>>> On 07/30/2013 10:25 AM, Nick Williams wrote:
>>>>> On Jul 30, 2013, at 12:11 PM, Jonathan Gibbons wrote:
>>>>>
>>>>>> On 07/30/2013 10:04 AM, Nick Williams wrote:
>>>>>>> On Jul 30, 2013, at 11:58 AM, Jonathan Gibbons wrote:
>>>>>>>
>>>>>>>> On 07/30/2013 09:19 AM, Nick Williams wrote:
>>>>>>>>> First, please let me say that the build readme at http://openjdk.java.net/jtreg/build.html (and in HG) is sorely lacking. Here's what I've learned on my own so far, from analyzing error messages and reading Defs.gmk:
>>>>>>>>>
>>>>>>>>> - JAVAHELP_HOME, which usually points to the JavaHelp home directory (we'll call this $JavaHelp) and contains demos, doc, src, license, etc., actually must point to $JavaHelp/javahelp (which contains bin and lib). This is not clear on the readme.
>>>>>>>>> - JUnit is NOT optional. jtreg won't "make" without it. Furthermore, JUNIT_JAR must point to junit.jar (which the readme does not say).
>>>>>>>>> - TestNG is NOT optional. jtreg won't "make" without it. Furthermore, TESTNG_HOME must point to a directory containing LICENSE.txt (which does not exist for TestNG, so I had to invent one) and TESTNG_JAR must point to testng.jar. The readme doesn't indicate any of this.
>>>>>>>>> - Ant is NOT optional. Unlike usual systems where ANT_HOME indicates where Ant lives, jtreg requires ANTHOME (which the readme does not say).
>>>>>>>>>
>>>>>>>>> After this is where I hit the roadblock I cannot overcome:
>>>>>>>>>
>>>>>>>>> There's some thing called "jcov" that is NOT optional. Worse, jcov, what it is, and where you can find/download it isn't indicated anywhere on the readme. I spent the last hour scouring Google for jcov. I've found plenty of references to jcov.jar in JDK source repositories and mirrors (and apparently it's supposed to contain classes in the com.sun.tdk.jcov package), but as far as I can tell jcov doesn't exist. I can't find it anywhere, and jtreg won't "make" without it. If JCOV_HOME doesn't exist, "make" looks in /java/re/jcov/2.0/promoted/latest/binaries/jcov_2.0/, but that certainly doesn't exist, and there's nothing anything like that underneath the home directories for my JDKs or JREs.
>>>>>>>>>
>>>>>>>>> Can someone help me sort this out and point me to where I can download jcov?
>>>>>>>>>
>>>>>>>>> And can someone update the readmes?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> Nick
>>>>>>>> Nick,
>>>>>>>>
>>>>>>>> I am sorry for your frustration.
>>>>>>>>
>>>>>>>> jcov is a Java Code Coverage tool.  As of now, it is not open source, so I will have to update the README and Makefile to ensure that you can build without it.
>>>>>>>>
>>>>>>>> -- Jon
>>>>>>> Okay. How soon do you think you can get that done? I'm on a time crunch here and I can't submit this patch without running tests. If there's a simple change I can make locally to disable the need for jcov, feel free to instruct me.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Nick
>>>>>>>
>>>>>> The code is written so that you don't need the jcov libraries to compile jtreg.  You just need to fix the Makefiles to comment out where it is trying to copy the jcov jar file into the final image.
>>>>>>
>>>>>> -- Jon
>>>>> Indeed. I commented out this in make/Defs.gmk:
>>>>>
>>>>> #ifndef JCOV_HOME
>>>>> #  JCOV_HOME = /java/re/jcov/2.0/promoted/latest/binaries/jcov_2.0/
>>>>> #endif
>>>>>
>>>>> And this in make/jtreg.gmk:
>>>>>
>>>>> #ifdef JCOV_HOME
>>>>> #
>>>>> #$(JTREG_IMAGEDIR)/lib/jcov.jar: $(JCOV_HOME)/lib/jcov.jar
>>>>> #       $(RM) -f $@
>>>>> #       $(MKDIR) -p $(@D)
>>>>> #       $(CP) $< $@
>>>>> #
>>>>> #$(JTREG_IMAGEDIR)/lib/jcov_implant.jar: $(JCOV_HOME)/lib/jcov_implant.jar
>>>>> #       $(RM) -f $@
>>>>> #       $(MKDIR) -p $(@D)
>>>>> #       $(CP) $< $@
>>>>> #
>>>>> #TARGETS.ZIP.jtreg += \
>>>>> #    $(JTREG_IMAGEDIR)/lib/jcov.jar \
>>>>> #    $(JTREG_IMAGEDIR)/lib/jcov_implant.jar
>>>>> #
>>>>> #endif JCOV_HOME
>>>>>
>>>>> And now it builds. Thanks.
>>>>>
>>>>> Nick
>>>> Thanks for the update.   So the "broken" part that needs fixing is just the first 3 lines you commented out, right?  If you just comment those lines out, the ifdef in the second block will take care of the rest.
>>>>
>>>> -- Jon
>>> You'd think, but just commenting out the first three lines (from Defs.gmk) didn't work. I had to comment out the second block (jtreg.gmk), too. Doesn't make any sense to me, but that's what worked.
>>>
>>> Nick
>>
>> Hmm. OK.  Thanks for the info.
>>
>> -- Jon
> If it helps any, originally the error message was something like "Required file /java/re/jcov/2.0/promoted/latest/binaries/jcov_2.0/lib/jcov.jar not found." When I commented out the three lines the error changed to something like "Failed to copy file lib/jcov.jar to build/images/jtreg/lib/jcov.jar." Commenting out the second block got rid of the second error. It's almost like JCOV_HOME was getting set to blank somehow.
>
> Nick
>

Yeah, I'll play around with it, and make sure all the messages make 
sense when the various variables are unset. I'll also update the README 
files.

-- jon


More information about the jtreg-use mailing list