You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Robin Parker <pa...@googlemail.com> on 2009/08/26 19:47:35 UTC

Ant for C/C++?

Hi all,

We have an application written in C/C++ (no java) that is currently
built using recursive clearmake, the source being stored in Rational
ClearCase.  The build process currently tries to build parts of the
application several times and so it needs an overhaul.

There are currently two opinions on the table for this; rewrite the
makefiles and continue using clearmake or use ant (and cpptasks).

What are everyones thoughts here?

Are there any advantages to using Ant in this type of environment?
If we use ant will we retain the same level of build auditing and
configuration records?
Does ant support parallel/distributed builds?  (ok, maybe I should
rtfm for this one)

Thanks in advance,

Robin

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Ant for C/C++?

Posted by Martin Gainty <mg...@hotmail.com>.
this came up on maven users recently
you still have 
2 sourcecode repositories..(how would you branch/merge native binaries and ant jars)
2 testsuites
2 build environments
2 sets of build tools
2 different Database connection libraries

the release manager will certainly have his hands full!

Martin 
______________________________________________ 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Wed, 26 Aug 2009 15:49:53 -0500
> Subject: Re: Ant for C/C++?
> From: ddevienne@gmail.com
> To: user@ant.apache.org
> 
> On Wed, Aug 26, 2009 at 2:00 PM, Martin Gainty<mg...@hotmail.com> wrote:
> >
> > then install the nar plugin which will natively compile your binaries for you
> > http://java.freehep.org/freehep-nar-plugin/index.html
> 
> Interesting. Looks like they've basically forked / taken over
> maintenance of CppTasks,
> if I read http://java.freehep.org/freehep-nar-plugin/cpptasks.html
> correctly, right?
> 
> Thanks for sharing. --DD
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

_________________________________________________________________
Hotmail® is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_faster:082009

Re: Ant for C/C++?

Posted by Dominique Devienne <dd...@gmail.com>.
On Wed, Aug 26, 2009 at 2:00 PM, Martin Gainty<mg...@hotmail.com> wrote:
>
> then install the nar plugin which will natively compile your binaries for you
> http://java.freehep.org/freehep-nar-plugin/index.html

Interesting. Looks like they've basically forked / taken over
maintenance of CppTasks,
if I read http://java.freehep.org/freehep-nar-plugin/cpptasks.html
correctly, right?

Thanks for sharing. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Ant for C/C++?

Posted by Martin Gainty <mg...@hotmail.com>.
2 options that I know of

have ant spawn a makefile..this is the most dangerous option as if an error happens
cannot create process(user doesnt have createprocess prov)..or cannot locate library(LD_LIBRARY_PATH incorrect) then you'll have to grind out each error to correct each 
environment attribute/property
ants execution in the jvm would never know the makefile is abending until some arcane error code is returned ..if you get both ant and make working together you'll still need to propely configure the makefile dependency (sometimes there is a registration function for the new binary) before continuing to execute the remaining java targets ..here is an illustration 

http://www.nabble.com/how-to-call-a-file-in-build.xml-td18706667.html

if you mavenize the whole process you can use the nar plugin to accomplish native code builds
http://stackoverflow.com/questions/603189/differences-between-ant-and-maven

then install the nar plugin which will natively compile your binaries for you
http://java.freehep.org/freehep-nar-plugin/index.html

maven is available here ..the 2.2.1 is fairly stable now
http://maven.apache.org/download.html

discussion lists are located here
http://www.apache.org/foundation/mailinglists.html

Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Wed, 26 Aug 2009 18:47:35 +0100
> Subject: Ant for C/C++?
> From: parke1r@googlemail.com
> To: user@ant.apache.org
> 
> Hi all,
> 
> We have an application written in C/C++ (no java) that is currently
> built using recursive clearmake, the source being stored in Rational
> ClearCase.  The build process currently tries to build parts of the
> application several times and so it needs an overhaul.
> 
> There are currently two opinions on the table for this; rewrite the
> makefiles and continue using clearmake or use ant (and cpptasks).
> 
> What are everyones thoughts here?
> 
> Are there any advantages to using Ant in this type of environment?
> If we use ant will we retain the same level of build auditing and
> configuration records?
> Does ant support parallel/distributed builds?  (ok, maybe I should
> rtfm for this one)
> 
> Thanks in advance,
> 
> Robin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery

Re: Ant for C/C++?

Posted by Dominique Devienne <dd...@gmail.com>.
On Wed, Aug 26, 2009 at 12:47 PM, Robin Parker<pa...@googlemail.com> wrote:
> We have an application written in C/C++ (no java) that is currently
> built using recursive clearmake, the source being stored in Rational
> ClearCase.  The build process currently tries to build parts of the
> application several times and so it needs an overhaul.
>
> There are currently two opinions on the table for this; rewrite the
> makefiles and continue using clearmake or use ant (and cpptasks).

http://stackoverflow.com/questions/1034138/antcpptasks-vs-scons-vs-make
might be of interest. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant for C/C++?

Posted by David Raich <d....@att.net>.
The cpptasks part of the ant-contrib package works very well to do 
what you need, if your needs fit within its limitations.  Otherwise, 
you may need to consider alternatives.

I am using Ant for C/C++ compiles, but had to invoke the compiler and 
linker commands myself with <apply>, looping through my fileset and 
doing my logging with other ant-contrib tasks, and this can make it 
harder to get the detailed build auditing logs you might 
want.  Listing compiler error messages is a challenge.

I chose Ant instead of make because I found it easier to configure 
the necessary infrastructure on the over-half-dozen different 
platforms and architectures for my multiplatform builds.  But 
cpptasks was a disappointment because it does not support all of the 
compilers I needed to use, and it does not allow you to specify the 
path to the compiler (must be configured in your environment 
instead).  In particular, it could not distinguish properly between 
the CC and cc compilers on Solaris, and xlC and cc on AIX, 
distinctions that are critical for me.  And I had trouble separating 
the compiles and links into separate tasks.

I'm told that it's "simple" to add more compilers to cpptasks, but 
that was just one too many more barriers to getting the multiplatform 
configurations all working, and I went with the <apply> solution 
instead.  I'm pretty happy with how it works but wish cpptasks 
out-of-the-box had been up to my needs.


At 10:47 AM 8/26/2009, Robin Parker wrote:
>Hi all,
>
>We have an application written in C/C++ (no java) that is currently
>built using recursive clearmake, the source being stored in Rational
>ClearCase.  The build process currently tries to build parts of the
>application several times and so it needs an overhaul.
>
>There are currently two opinions on the table for this; rewrite the
>makefiles and continue using clearmake or use ant (and cpptasks).
>
>What are everyones thoughts here?
>
>Are there any advantages to using Ant in this type of environment?
>If we use ant will we retain the same level of build auditing and
>configuration records?
>Does ant support parallel/distributed builds?  (ok, maybe I should
>rtfm for this one)
>
>Thanks in advance,
>
>Robin
>
>---------------------------------------------------------------------
>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