You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Emilian Bold <em...@protonmail.ch> on 2018/02/02 22:03:18 UTC

Re: info requested regarding build fail

I believe OpenSUSE could get a bug report that just says 'Apache NetBeans cannot be built with your custom Ant'.

Of course, your deep investigation should help a lot and get you / them closer to a patch.

But not all bug reports need a patch.

​--emi

-------- Original Message --------
 On 29 January 2018 3:52 PM, Peter Hull <pe...@gmail.com> wrote:

>I've done a bit more on this - I believe it is the 'xjc' task that causes
> the problem.
> I've added my information to
>https://issues.apache.org/jira/browse/NETBEANS-239.
> Hope it helps.
>
>
> On Sat, 27 Jan 2018 at 11:02 Peter Hull peterhull90@gmail.com wrote:
>
>>On Sat, 27 Jan 2018 at 08:51 Emilian Bold emilian.bold@protonmail.ch
>> wrote:
>>>Would be nice to also see this bug reported to SUSE so we can reference
>>> it in the future.
>>>I've looked into this a bit - I think we would need to provide a bit more
>>> information to SUSE/Fedora to help them take some action. Unfortunately I
>>> have not found the root cause yet. I am assuming that Debian-based distros
>>> are OK and fedora-based ones are not, though there is the complication that
>>> Debian has version 1.9 and Fedora 1.10. Neither distro makes many changes
>>> to the stock ant source code.
>>> Fedora applies a patch to remove setting the classpath from the ant.jar
>>> manifest, details here:
>>>http://pkgs.fedoraproject.org/cgit/rpms/ant.git/tree/
>>> Debian has some patches which are to help reproducible builds.
>>>https://packages.debian.org/stretch/ant
>>>So it seems to me the problem lies in the classpath patch.
>>I have been testing with FC27. If I run ant from the netbeans directory it
>> fails building the websvc.saas.api module as previously noted; it can't
>> find the default manifest. This I tracked down to the call to
>> org.apache.tools.ant.taskdefs.Manifest.getDefaultManifest() (
>>https://git-wip-us.apache.org/repos/asf?p=ant.git;a=blob;f=src/main/org/apache/tools/ant/taskdefs/Manifest.java;h=483d8c689ce35e28cf5118cc13c4c80c2db99361;hb=HEAD#l786
>> )
>> If I re-run ant (without ant clean) I get a different error, which
>> shouldn't happen. I should get the same error repeatedly.
>>Also note that the Manifest class is in the same jar as the default
>> manifest, so, if it were a classpath thing, I can't understand why
>> Manifest.class is accessible but the default manifest is not.
>>That's as far as I have got, if anyone has any insights as to how this can
>> happen please let me know.
>>Peter
>>
>


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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: info requested regarding build fail

Posted by Peter Hull <pe...@gmail.com>.
I have a work-around for building on Fedora, here it is:
--- incubator-netbeans-9.0-beta-rc3/websvc.saas.api/build.xml    2018-02-09
11:06:36.124001000 +0000
+++ /tmp/incubator-netbeans-9.0-beta-rc3/websvc.saas.api/build.xml
2018-01-31 17:49:31.000000000 +0000
@@ -33,7 +33,7 @@
     <property name="oauth.model"
value="src/org/netbeans/modules/websvc/saas/model/oauth"/>

     <target name="xjc-init" depends="build-init">
-        <taskdef name="xjc" classname="com.sun.tools.xjc.XJC2Task">
+        <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
             <classpath>
                 <fileset
dir="${netbeans.dest.dir}/${nb.cluster.ide.dir}/modules/ext/jaxb/api"
includes="*.jar"/>
                 <fileset
dir="${netbeans.dest.dir}/${nb.cluster.ide.dir}/modules/ext/jaxb"
includes="*.jar"/>

There's no documentation I can find but looking at the code, XJC2Task ends
up executing the same code as XJCTask but without manipulating the class
loaders quite as much.
 "Fix your NetBeans with this one weird trick"!!
Would be great if someone could test on SUSE too.
Pete


On Wed, 7 Feb 2018 at 10:53 Peter Hull <pe...@gmail.com> wrote:

> On Sat, 3 Feb 2018 at 07:37 Emilian Bold <em...@protonmail.ch>
> wrote:
>
>> The bug that keeps on giving.
>>
>> I was able to recreate something which I *believe* is the same issue that
> stops the NB  build on fedora, using only packages from their distro. So,
> our hands are clean ;) Seriously, though, this means they are able to
> reproduce it more easily.
> I filed this as https://bugzilla.redhat.com/show_bug.cgi?id=1542899
> Will keep you informed if anything happens.
> Peter
>
>
>

Re: info requested regarding build fail

Posted by Peter Hull <pe...@gmail.com>.
On Sat, 3 Feb 2018 at 07:37 Emilian Bold <em...@protonmail.ch> wrote:

> The bug that keeps on giving.
>
> I was able to recreate something which I *believe* is the same issue that
stops the NB  build on fedora, using only packages from their distro. So,
our hands are clean ;) Seriously, though, this means they are able to
reproduce it more easily.
I filed this as https://bugzilla.redhat.com/show_bug.cgi?id=1542899
Will keep you informed if anything happens.
Peter

Re: info requested regarding build fail

Posted by Emilian Bold <em...@protonmail.ch>.
The bug that keeps on giving.

--emi

-------- Original Message --------
 On 3 February 2018 8:52 AM, Peter Hull <pe...@gmail.com> wrote:

>On Fri, 2 Feb 2018 at 22:03 Emilian Bold emilian.bold@protonmail.ch wrote:
>
>>I believe OpenSUSE could get a bug report that just says 'Apache NetBeans
>> cannot be built with your custom Ant'.
>>Yes, you are entirely right. But the temptation for them will be to ignore
> it and/or blame the NetBeans build scripts for the problem.
>
> I have made some progress. I've narrowed it down to the xjc tool in JAXB
> (specifically their use of com.sun.istack.tools.ProtectedTask to mess
> around with classloaders) and can produce an error using a build.xml with
> only two tasks in it. I thought the version of JAXB (2.2.5, pretty old)
> bundled with NB might be the issue, unfortunately the latest release has a
> bug which prevents its use (already reported on GitHub). Argh! Anyway, I
> tried to rebuild Fedora's ant using their source RPM and, guess what, no
> error. Argh 2! However, this is an itch I have to scratch and I will get
> there in the end...
> Pete
>


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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: info requested regarding build fail

Posted by Emilian Bold <em...@protonmail.ch>.
Good idea!

--emi

-------- Original Message --------
 On 3 February 2018 6:03 AM, cowwoc <co...@bbs.darktech.org> wrote:

>I'd go one step further (if possible). Can you detect whether a user is
> attempting to build Netbeans using OpenSUSE Ant? If so, I would file a
> bug against OpenSUSE and point users to this bug report if try attempt
> to build Netbeans using this wrong version of Ant. Make sure to provide
> a workaround in the bug report explaining how to use a different version
> of Ant.
>
> Gili
>
> On 2018-02-02 5:03 PM, Emilian Bold wrote:
>>I believe OpenSUSE could get a bug report that just says 'Apache NetBeans cannot be built with your custom Ant'.
>>Of course, your deep investigation should help a lot and get you / them closer to a patch.
>>But not all bug reports need a patch.
>>​--emi
>>-------- Original Message --------
>> On 29 January 2018 3:52 PM, Peter Hull peterhull90@gmail.com wrote:
>>>I've done a bit more on this - I believe it is the 'xjc' task that causes
>>> the problem.
>>> I've added my information to
>>>https://issues.apache.org/jira/browse/NETBEANS-239.
>>> Hope it helps.
>>>On Sat, 27 Jan 2018 at 11:02 Peter Hull peterhull90@gmail.com wrote:
>>>>On Sat, 27 Jan 2018 at 08:51 Emilian Bold emilian.bold@protonmail.ch
>>>> wrote:
>>>>>Would be nice to also see this bug reported to SUSE so we can reference
>>>>> it in the future.
>>>>> I've looked into this a bit - I think we would need to provide a bit more
>>>>> information to SUSE/Fedora to help them take some action. Unfortunately I
>>>>> have not found the root cause yet. I am assuming that Debian-based distros
>>>>> are OK and fedora-based ones are not, though there is the complication that
>>>>> Debian has version 1.9 and Fedora 1.10. Neither distro makes many changes
>>>>> to the stock ant source code.
>>>>> Fedora applies a patch to remove setting the classpath from the ant.jar
>>>>> manifest, details here:
>>>>>http://pkgs.fedoraproject.org/cgit/rpms/ant.git/tree/
>>>>> Debian has some patches which are to help reproducible builds.
>>>>>https://packages.debian.org/stretch/ant
>>>>> So it seems to me the problem lies in the classpath patch.
>>>>> I have been testing with FC27. If I run ant from the netbeans directory it
>>>>> fails building the websvc.saas.api module as previously noted; it can't
>>>>> find the default manifest. This I tracked down to the call to
>>>>> org.apache.tools.ant.taskdefs.Manifest.getDefaultManifest() (
>>>>>https://git-wip-us.apache.org/repos/asf?p=ant.git;a=blob;f=src/main/org/apache/tools/ant/taskdefs/Manifest.java;h=483d8c689ce35e28cf5118cc13c4c80c2db99361;hb=HEAD#l786
>>>>> )
>>>>> If I re-run ant (without ant clean) I get a different error, which
>>>>> shouldn't happen. I should get the same error repeatedly.
>>>>> Also note that the Manifest class is in the same jar as the default
>>>>> manifest, so, if it were a classpath thing, I can't understand why
>>>>> Manifest.class is accessible but the default manifest is not.
>>>>> That's as far as I have got, if anyone has any insights as to how this can
>>>>> happen please let me know.
>>>>> Peter
>>>>>
>>>>
>>>
>>To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
>> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>>For further information about the NetBeans mailing lists, visit:
>>https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>
>
>
>To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>
> For further information about the NetBeans mailing lists, visit:
>https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>


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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: info requested regarding build fail

Posted by cowwoc <co...@bbs.darktech.org>.
I'd go one step further (if possible). Can you detect whether a user is 
attempting to build Netbeans using OpenSUSE Ant? If so, I would file a 
bug against OpenSUSE and point users to this bug report if try attempt 
to build Netbeans using this wrong version of Ant. Make sure to provide 
a workaround in the bug report explaining how to use a different version 
of Ant.

Gili

On 2018-02-02 5:03 PM, Emilian Bold wrote:
> I believe OpenSUSE could get a bug report that just says 'Apache NetBeans cannot be built with your custom Ant'.
>
> Of course, your deep investigation should help a lot and get you / them closer to a patch.
>
> But not all bug reports need a patch.
>
> ​--emi
>
> -------- Original Message --------
>   On 29 January 2018 3:52 PM, Peter Hull <pe...@gmail.com> wrote:
>
>> I've done a bit more on this - I believe it is the 'xjc' task that causes
>> the problem.
>> I've added my information to
>> https://issues.apache.org/jira/browse/NETBEANS-239.
>> Hope it helps.
>>
>>
>> On Sat, 27 Jan 2018 at 11:02 Peter Hull peterhull90@gmail.com wrote:
>>
>>> On Sat, 27 Jan 2018 at 08:51 Emilian Bold emilian.bold@protonmail.ch
>>> wrote:
>>>> Would be nice to also see this bug reported to SUSE so we can reference
>>>> it in the future.
>>>> I've looked into this a bit - I think we would need to provide a bit more
>>>> information to SUSE/Fedora to help them take some action. Unfortunately I
>>>> have not found the root cause yet. I am assuming that Debian-based distros
>>>> are OK and fedora-based ones are not, though there is the complication that
>>>> Debian has version 1.9 and Fedora 1.10. Neither distro makes many changes
>>>> to the stock ant source code.
>>>> Fedora applies a patch to remove setting the classpath from the ant.jar
>>>> manifest, details here:
>>>> http://pkgs.fedoraproject.org/cgit/rpms/ant.git/tree/
>>>> Debian has some patches which are to help reproducible builds.
>>>> https://packages.debian.org/stretch/ant
>>>> So it seems to me the problem lies in the classpath patch.
>>> I have been testing with FC27. If I run ant from the netbeans directory it
>>> fails building the websvc.saas.api module as previously noted; it can't
>>> find the default manifest. This I tracked down to the call to
>>> org.apache.tools.ant.taskdefs.Manifest.getDefaultManifest() (
>>> https://git-wip-us.apache.org/repos/asf?p=ant.git;a=blob;f=src/main/org/apache/tools/ant/taskdefs/Manifest.java;h=483d8c689ce35e28cf5118cc13c4c80c2db99361;hb=HEAD#l786
>>> )
>>> If I re-run ant (without ant clean) I get a different error, which
>>> shouldn't happen. I should get the same error repeatedly.
>>> Also note that the Manifest class is in the same jar as the default
>>> manifest, so, if it were a classpath thing, I can't understand why
>>> Manifest.class is accessible but the default manifest is not.
>>> That's as far as I have got, if anyone has any insights as to how this can
>>> happen please let me know.
>>> Peter
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>


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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: info requested regarding build fail

Posted by Peter Hull <pe...@gmail.com>.
On Fri, 2 Feb 2018 at 22:03 Emilian Bold <em...@protonmail.ch> wrote:

> I believe OpenSUSE could get a bug report that just says 'Apache NetBeans
> cannot be built with your custom Ant'.
>
Yes, you are entirely right. But the temptation for them will be to ignore
it and/or blame the NetBeans build scripts for the problem.

I have made some progress. I've narrowed it down to the xjc tool in JAXB
(specifically their use of com.sun.istack.tools.ProtectedTask to mess
around with classloaders) and can produce an error using a build.xml with
only two tasks in it. I thought the version of JAXB (2.2.5, pretty old)
bundled with NB might be the issue, unfortunately the latest release has a
bug which prevents its use (already reported on GitHub). Argh! Anyway, I
tried to rebuild Fedora's ant using their source RPM and, guess what, no
error. Argh 2! However, this is an itch I have to scratch and I will get
there in the end...
Pete