Issues while building OG (Master)


#1

Hi all,

I did a checkout from master branch of OG and tried building it using ant build command from the root directory.
I am facing issues this issue while compiling OG-Language module - https://gist.github.com/2935866

How can i solve this issue and move forward. Was there something i missed ?

~Shyam


#2

I’m sorry that you’ve had difficulty building our system. Please can you confirm the version of ant that you are using.

Andrew.


#3

~$ ant -v
Apache Ant version 1.8.1 compiled on October 13 2010


#4

It looks like the basedir property is not having the expected value when the subant task from projects/OG-Language invokes the build.xml in projects/OG-Language/Service. I had hoped this might have been due to different versions of ant but downgrading to a 1.8.1 build did not reproduce the problem.

I’ve asked one of the other OpenGamma developers to investigate further.

A temporary workaround until we can resolve this may be for you to edit the import directive in projects/OG-Language/Service/build.xml to read {basedir}/build-core-cpp.xml instead of {basedir}/…/build-core-cpp.xml


#5

@andrew - Dude thanks for the quick reply.
I tried your fix but again , the same issue came up with another build.xml inside OG-language.
So i coped build-core-cpp.xml to projects folder and things went fine.

I have few other questions too.

When i give a ant jetty-debug in OG-Example , it is taking a huge time for the JAR’s to be resolved , copied to lib folder and then start the platform.
Few questions here

  1. Cant we separate , jetty-debug target from resolve target. This way , we might need ant resolve once if there is a dependency change but it saves a lot of time. Its kinda frustrating when it take so much time just to see a tiny code change in action. Or at-least cant ant intelligently see that there are dependent jar files in lib and then decide to resolve the dependency or not.

  2. Why are the dependent JAR’s copied to lib folder. Cant ant directly refer them from ivy local cache ?

  3. And when i disconnected from internet and tries ant jetty-debug , it failed telling it cant resolve the dependencies. Its not taking the JAR from local cache instead it is picking it from ivy repository or somewhere.

Dude , this is kinda slow and irritating at most times.
I would simply love to know how you guys are handling this from eclipse.
Is there some simple way i can do the ant jetty-debug equalant from eclipse without much fuss ?

~Shyam


#6

You’re right, it could be better, but I don’t think referring to stuff directly out of the ivy cache is the way to do it - we started with that approach and it was problematic (I forget how actually).

When you have a local copy of the repo, it’s actually not as big an overhead as it looks - we did some timings and found it was only 10-20% of the launch time. What really kills you is not having a local repo. We need to add an ant task to build a local copy of the repo, but for now, you can copy the one that comes with the full-deps download package. I think you just need to drop the directory containing the repo copy into your OG-Platform directory and it just gets picked up, although there might be a config tweak you need.

The other way we don’t really hit this internally is we launch from Eclipse. If you’re looking at the examples, you can launch the ExampleComponentServerDev class with these VM arguments:

-Dlogback.configurationFile=com/opengamma/util/test/warn-logback.xml -Xms4096m -Xmx4096m -XX:MaxPermSize=512M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -ea

Give those two things a try.

Jim


#7

I can not reproduce the original error with ant >= 1.8.0. Older version do override the basedir when subant is called with inheritAll=true though which gives me the same error as you. Not sure how you get the old behaviour with a new ant, if you can give some more info about your setup it will help.

The default ttl for the ivy cache is 10 seconds, after the timeout ivy will hit the network but it will not download the jars again (assuming they haven’t changed). You can use a different ttl with something like “ant -Divy.cache.ttl.default=30m jetty-debug” which should be faster for you.