You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "webhiker@tiscali.fr" <we...@tiscali.fr> on 2003/06/02 10:47:27 UTC

Re: Ant-contrib workaround for CC task?

There is no trace indicating why it blocks. Even with the verbose 
option, Ant stops just after it prints the task name.
Here are my system details :

CC - Sun WorkShop C++ Compiler 5.0
located in /opt/SUNWspro/bin/CC

Apache Ant version 1.5.1 compiled on October 2 2002

java -version
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)

SunOS 5.8 Generic_108528-14 sun4u sparc SUNW,Sun-Blade-100

Any the contents of my task :

<target name="cxx_solaris_cc" depends="pre_cxx" if="solaris">
   <property name="architecture" value="solaris" />
   <mkdir dir="${linguisticserver.native.lib.dir}/${architecture}" />

   <cc
       name = "CC"
       debug = "true"
       objdir="${linguisticserver.native.obj.dir}"
       warnings="none"
       link="shared"
       outtype="shared"
       runtime="dynamic"
       multithreaded="true"
       
outfile="${linguisticserver.native.lib.dir}/${architecture}/${myxip.lib.name}.so">
    <defineset>
       <define name="__unix"/>
       <define name="__sparc"/>
       <define name="__sun"/>
       <define name="__SVR4"/>
       <define name="__solaris" value="2008"/>
       <define name="NTMCONNECTION"/>
       <define name="MACHINE" value="sparc-solaris8-forte6u1"/>
    </defineset>
    <fileset dir="${linguisticserver.cxx.source.dir}" includes="*.cxx"/>
    <includepath>
       <pathelement location="${java.home}/../include"/>
       <pathelement location="${java.home}/../include/${architecture}"/>
       <pathelement location="${xip.include.dir}"/>
       <pathelement location="${linguisticserver.native.include.dir}"/>
    </includepath>
    <libset dir="${xip.lib.dir}/${architecture}"
            libs="nhXip,stdc++">
    </libset>
   </cc>
</target>

I'd appreciate any help on this.

Thanks
WH


Curt Arnold wrote:

>> Has anyone found a workaround for this?
>
>
> I haven't used the sun compiler adapter myself.  You might try to run 
> your build with a -verbose flag to see if it gives any hints.  Does it 
> fail on simple projects too?  Identifying your JVM, version of Ant, 
> version of CC and version of Solaris might be helpful.
>
>
>> I've tried asking on the ant-contrib forums on Sourceforge, but 
>> no-one seems to be alive there.
>>
>
> Sorry, I thought that I had monitors on those forums to inform me of 
> any posts there.  All the activity is on the mailing list.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



Re: Ant-contrib workaround for CC task?

Posted by "webhiker@tiscali.fr" <we...@tiscali.fr>.
Well since the version from CVS which I built by hand seems to work, I 
assume it's a bug which is fixed for the next release.
I will open a task against the current release so that it is tracked, 
but I think no fix is neccesary.

Many thanks for your help.

WH


Antoine Levy-Lambert wrote:

>Webhiker,
>this means that CC has been invoked by ant with wrong command line
>arguments.
>I do not know well myself these tasks (CPP from ant contrib), but I
>understood that there are attributes to use to tell the CC task which
>compiler you are using, so that the task "knows" which command line
>arguments are to be used. From the doc of the <cc/> task, you should write
><cc name="CC">
>.... other attributes, ...
></cc>
>so that the cc task knows you want to use Sun's CC.
>If you are already doing this, then there is a bug in ant contrib, which you
>probably should fix for yourself and report to their mailing list.
>Cheers.
>Antoine
>
>
>  
>
>>I think there may be a problem here, when I look at the running processes
>>    
>>
>:
>  
>
>> webhiker  1685  1673  0 12:54:12 pts/44   0:00 /opt/SUNWspro/bin/CC -help
>>
>>Can't think of any reason why the task should call CC with the -help
>>option...
>>
>>
>>Any ideas?
>>
>>    
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>  
>



Re: Ant-contrib workaround for CC task?

Posted by Antoine Levy-Lambert <le...@tiscali-dsl.de>.
Webhiker,
this means that CC has been invoked by ant with wrong command line
arguments.
I do not know well myself these tasks (CPP from ant contrib), but I
understood that there are attributes to use to tell the CC task which
compiler you are using, so that the task "knows" which command line
arguments are to be used. From the doc of the <cc/> task, you should write
<cc name="CC">
.... other attributes, ...
</cc>
so that the cc task knows you want to use Sun's CC.
If you are already doing this, then there is a bug in ant contrib, which you
probably should fix for yourself and report to their mailing list.
Cheers.
Antoine


> I think there may be a problem here, when I look at the running processes
:
>  webhiker  1685  1673  0 12:54:12 pts/44   0:00 /opt/SUNWspro/bin/CC -help
>
> Can't think of any reason why the task should call CC with the -help
> option...
>
>
> Any ideas?
>



Re: Ant-contrib workaround for CC task?

Posted by "webhiker@tiscali.fr" <we...@tiscali.fr>.
No problem with licensees etc - as a workaround I'm using a simple exec 
of the same CC task.
Truss doesn't work either, because the CC task does a fork, and no more 
traces are seen after this point.
I've tried on Ant 1.5.3 - no change in behaviour.
Running it with the debug option gives me this :

...
Finding class 
net.sf.antcontrib.cpptasks.TargetHistoryTable$TargetHistoryTableHandler
Class 
net.sf.antcontrib.cpptasks.TargetHistoryTable$TargetHistoryTableHandler 
loaded from ant loader
Class javax.xml.parsers.SAXParserFactory loaded from parent loader
Class javax.xml.parsers.SAXParser loaded from parent loader
Class org.xml.sax.Attributes loaded from parent loader
Class java.lang.Long loaded from parent loader
Finding class net.sf.antcontrib.cpptasks.SourceHistory
Class net.sf.antcontrib.cpptasks.SourceHistory loaded from ant loader
Finding class net.sf.antcontrib.cpptasks.TargetHistory
Class net.sf.antcontrib.cpptasks.TargetHistory loaded from ant loader
Class java.util.Enumeration loaded from parent loader
Class java.lang.StringBuffer loaded from parent loader
Finding class net.sf.antcontrib.cpptasks.compiler.CaptureStreamHandler
Class org.apache.tools.ant.taskdefs.ExecuteStreamHandler loaded from 
parent loader
Class net.sf.antcontrib.cpptasks.compiler.CaptureStreamHandler loaded 
from ant loader
Class java.io.InputStreamReader loaded from parent loader
Class org.apache.tools.ant.taskdefs.Execute loaded from parent loader


I think there may be a problem here, when I look at the running processes :
 webhiker  1685  1673  0 12:54:12 pts/44   0:00 /opt/SUNWspro/bin/CC -help

Can't think of any reason why the task should call CC with the -help 
option...


Any ideas?

WH
Antoine Levy-Lambert wrote:

>I do not know at all the roots of your problem.
>You might want to try the following possibilities :
>- check whether your compiler is requesting some input on standard input,
>(complaining about missing license for instance), ...
>- truss (trace) ant to see what ant is looking for before it blocks - this
>might give you a hint,
>- download ant 1.5.3 or even better 1.6alpha and see if it works any better
>than ant 1.5.1 in this respect
>- download sources for both ant and ant-contrib and debug
>Hope this helps
>Antoine
>----- Original Message -----
>From: <we...@tiscali.fr>
>To: "Ant Users List" <us...@ant.apache.org>
>Sent: Monday, June 02, 2003 10:47 AM
>Subject: Re: Ant-contrib workaround for CC task?
>
>
>  
>
>>There is no trace indicating why it blocks. Even with the verbose
>>option, Ant stops just after it prints the task name.
>>Here are my system details :
>>
>>CC - Sun WorkShop C++ Compiler 5.0
>>located in /opt/SUNWspro/bin/CC
>>
>>Apache Ant version 1.5.1 compiled on October 2 2002
>>
>>java -version
>>java version "1.4.1"
>>Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
>>Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
>>
>>SunOS 5.8 Generic_108528-14 sun4u sparc SUNW,Sun-Blade-100
>>
>>Any the contents of my task :
>>
>><target name="cxx_solaris_cc" depends="pre_cxx" if="solaris">
>>   <property name="architecture" value="solaris" />
>>   <mkdir dir="${linguisticserver.native.lib.dir}/${architecture}" />
>>
>>   <cc
>>       name = "CC"
>>       debug = "true"
>>       objdir="${linguisticserver.native.obj.dir}"
>>       warnings="none"
>>       link="shared"
>>       outtype="shared"
>>       runtime="dynamic"
>>       multithreaded="true"
>>
>>
>>    
>>
>outfile="${linguisticserver.native.lib.dir}/${architecture}/${myxip.lib.name
>}.so">
>  
>
>>    <defineset>
>>       <define name="__unix"/>
>>       <define name="__sparc"/>
>>       <define name="__sun"/>
>>       <define name="__SVR4"/>
>>       <define name="__solaris" value="2008"/>
>>       <define name="NTMCONNECTION"/>
>>       <define name="MACHINE" value="sparc-solaris8-forte6u1"/>
>>    </defineset>
>>    <fileset dir="${linguisticserver.cxx.source.dir}" includes="*.cxx"/>
>>    <includepath>
>>       <pathelement location="${java.home}/../include"/>
>>       <pathelement location="${java.home}/../include/${architecture}"/>
>>       <pathelement location="${xip.include.dir}"/>
>>       <pathelement location="${linguisticserver.native.include.dir}"/>
>>    </includepath>
>>    <libset dir="${xip.lib.dir}/${architecture}"
>>            libs="nhXip,stdc++">
>>    </libset>
>>   </cc>
>></target>
>>
>>I'd appreciate any help on this.
>>
>>Thanks
>>WH
>>
>>
>>Curt Arnold wrote:
>>
>>    
>>
>>>>Has anyone found a workaround for this?
>>>>        
>>>>
>>>I haven't used the sun compiler adapter myself.  You might try to run
>>>your build with a -verbose flag to see if it gives any hints.  Does it
>>>fail on simple projects too?  Identifying your JVM, version of Ant,
>>>version of CC and version of Solaris might be helpful.
>>>
>>>
>>>      
>>>
>>>>I've tried asking on the ant-contrib forums on Sourceforge, but
>>>>no-one seems to be alive there.
>>>>
>>>>        
>>>>
>>>Sorry, I thought that I had monitors on those forums to inform me of
>>>any posts there.  All the activity is on the mailing list.
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>>For additional commands, e-mail: user-help@ant.apache.org
>>>
>>>
>>>      
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>>    
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>  
>



Re: Ant-contrib workaround for CC task?

Posted by Antoine Levy-Lambert <le...@tiscali-dsl.de>.
I do not know at all the roots of your problem.
You might want to try the following possibilities :
- check whether your compiler is requesting some input on standard input,
(complaining about missing license for instance), ...
- truss (trace) ant to see what ant is looking for before it blocks - this
might give you a hint,
- download ant 1.5.3 or even better 1.6alpha and see if it works any better
than ant 1.5.1 in this respect
- download sources for both ant and ant-contrib and debug
Hope this helps
Antoine
----- Original Message -----
From: <we...@tiscali.fr>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Monday, June 02, 2003 10:47 AM
Subject: Re: Ant-contrib workaround for CC task?


> There is no trace indicating why it blocks. Even with the verbose
> option, Ant stops just after it prints the task name.
> Here are my system details :
>
> CC - Sun WorkShop C++ Compiler 5.0
> located in /opt/SUNWspro/bin/CC
>
> Apache Ant version 1.5.1 compiled on October 2 2002
>
> java -version
> java version "1.4.1"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
> Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
>
> SunOS 5.8 Generic_108528-14 sun4u sparc SUNW,Sun-Blade-100
>
> Any the contents of my task :
>
> <target name="cxx_solaris_cc" depends="pre_cxx" if="solaris">
>    <property name="architecture" value="solaris" />
>    <mkdir dir="${linguisticserver.native.lib.dir}/${architecture}" />
>
>    <cc
>        name = "CC"
>        debug = "true"
>        objdir="${linguisticserver.native.obj.dir}"
>        warnings="none"
>        link="shared"
>        outtype="shared"
>        runtime="dynamic"
>        multithreaded="true"
>
>
outfile="${linguisticserver.native.lib.dir}/${architecture}/${myxip.lib.name
}.so">
>     <defineset>
>        <define name="__unix"/>
>        <define name="__sparc"/>
>        <define name="__sun"/>
>        <define name="__SVR4"/>
>        <define name="__solaris" value="2008"/>
>        <define name="NTMCONNECTION"/>
>        <define name="MACHINE" value="sparc-solaris8-forte6u1"/>
>     </defineset>
>     <fileset dir="${linguisticserver.cxx.source.dir}" includes="*.cxx"/>
>     <includepath>
>        <pathelement location="${java.home}/../include"/>
>        <pathelement location="${java.home}/../include/${architecture}"/>
>        <pathelement location="${xip.include.dir}"/>
>        <pathelement location="${linguisticserver.native.include.dir}"/>
>     </includepath>
>     <libset dir="${xip.lib.dir}/${architecture}"
>             libs="nhXip,stdc++">
>     </libset>
>    </cc>
> </target>
>
> I'd appreciate any help on this.
>
> Thanks
> WH
>
>
> Curt Arnold wrote:
>
> >> Has anyone found a workaround for this?
> >
> >
> > I haven't used the sun compiler adapter myself.  You might try to run
> > your build with a -verbose flag to see if it gives any hints.  Does it
> > fail on simple projects too?  Identifying your JVM, version of Ant,
> > version of CC and version of Solaris might be helpful.
> >
> >
> >> I've tried asking on the ant-contrib forums on Sourceforge, but
> >> no-one seems to be alive there.
> >>
> >
> > Sorry, I thought that I had monitors on those forums to inform me of
> > any posts there.  All the activity is on the mailing list.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>