Subject: [Dorsal-dev] libxml on leopard

From: Robert Kirby <[email-masked]>
Date: Fri, 26 Jun 2009 20:53:16 -0500

I am trying to configure/build using dorsal.
The default libxml2 installed in /usr/include/libxml2 and /usr/lib is out of
date relative to the one found
on fink.  However, I am having a hard time passing arguments through dorsal
to force it to use the one in /sw.

In particular, there seem to be two functions missing in the version in
/usr:

dolfin/io/XMLFile.cpp:88: error: 'xmlRelaxNGSetParserStructuredErrors' was
not declared in this scope
dolfin/io/XMLFile.cpp:93: error: 'xmlRelaxNGSetValidStructuredErrors' was
not declared in this scope

Any advice on what magic switch I should pass, perhaps in
dorsal/packages/dolfin.package or dorsal/platforms/leopard.platform?

Thanks,
Rob

---

From: Ilmar Wilbers <[email-masked]>
Date: Sat, 27 Jun 2009 10:26:19 +0200

Rob,

What version of XCode are you using? I seem to remember that a previous 
version of XCode had a ridiculous old libxml version.

ilmar

Robert Kirby wrote:
> The default libxml2 installed in /usr/include/libxml2 and /usr/lib is 
> out of date relative to the one found
> on fink.  However, I am having a hard time passing arguments through 
> dorsal to force it to use the one in /sw.
> 
> dolfin/io/XMLFile.cpp:88: error: 'xmlRelaxNGSetParserStructuredErrors' 
> was not declared in this scope
> dolfin/io/XMLFile.cpp:93: error: 'xmlRelaxNGSetValidStructuredErrors' 
> was not declared in this scope
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Dorsal-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/dorsal-dev

---

From: Harish Narayanan <[email-masked]>
Date: Sat, 27 Jun 2009 06:45:59 -0400

> version of XCode had a ridiculous old libxml version.

I use XCode 3.1.2 (or whatever the latest/near latest version is). It
runs into the same problem. The way I get around this now is to comment
out calls to those two functions.

I think the build system needs to allow for the specification of a
custom libxml path, and this needs to be used on silly Leopard.

Harish

---

From: Harish Narayanan <[email-masked]>
Date: Sat, 27 Jun 2009 10:28:05 -0400

Robert Kirby wrote:
> Thanks -- I am also using the new XCode and did a massive fink update of
> all my software.  Will commenting these files out create anything else
> suspicious?

I commented out just those function calls and haven't seen anything bad
happen.

Harish

---

From: Robert Kirby <[email-masked]>
Date: Sat, 27 Jun 2009 06:19:28 -0500

Thanks -- I am also using the new XCode and did a massive fink update of all
my software.  Will commenting these files out create anything else
suspicious?
Thanks,
Rob

---

From: Ilmar Wilbers <[email-masked]>
Date: Sun, 28 Jun 2009 22:48:32 +0200

The problem is because of the XML validation functions. Those have been 
part of libxml since 2006, so Leopard uses a very old version. We fixed 
this on the Mac buildbot by making sure all environment variables from 
Fink come before the others (DYLD_LIBRARY_PATH etc).

ilmar

---

From: Harish Narayanan <[email-masked]>
Date: Sun, 28 Jun 2009 19:43:29 -0400

> Fink come before the others (DYLD_LIBRARY_PATH etc).

Could the build system be modified to look for these in the fink paths
before the system path on darwin?

Harish

---

From: "Johannes Ring" <[email-masked]>
Date: Mon, 29 Jun 2009 09:43:33 +0200

>> Fink come before the others (DYLD_LIBRARY_PATH etc).

Actually, /sw/lib is not in DYLD_LIBRARY_PATH on the buildbot. Only PATH,
PYTHONPATH, and PKG_CONFIG_PATH are prepended with Fink related paths.

> before the system path on darwin?

I'm not sure if it is a good idea to force any particular order on the
build system flags that we get from the pkg-config files. I guess the
problem is that both -L/sw/lib and -L/usr/lib is being used when building
DOLFIN? Is both really needed? On the buildbot only -L/sw/lib is used.

Johannes

---

From: Harish Narayanan <[email-masked]>
Date: Mon, 29 Jun 2009 14:16:31 -0400

Robert Kirby wrote:
> The problem is in the include path rather than the lib path.
> 
> Now I just need to not give it invalid xml files!
> 
> Commenting out the two lines worked great this morning.
> So the hg pull that dorsal does doesn't clobber local changes like, say,
> CVS might?

No, the hg pull will keep a track of this change and allow you to have
your locally modified file. It is cool like that.

Harish

---

From: Harish Narayanan <[email-masked]>
Date: Thu, 30 Jul 2009 21:12:48 +0200

> DOLFIN? Is both really needed? On the buildbot only -L/sw/lib is used.

I know it has been a while, but could you try this (or show me what I
must change to only pass -L/sw/lib, -I/sw/lib)? I run into this problem
every time I clone a fresh copy of dolfin.

Harish

---

From: "Johannes Ring" <[email-masked]>
Date: Fri, 31 Jul 2009 10:52:50 +0200

> every time I clone a fresh copy of dolfin.

You need to make sure that none of the pkg-config files used by DOLFIN
contains -I/usr/include or -L/usr/lib. Remove /usr/lib/pkgconfig from
$PKG_CONFIG_PATH (if present) and make sure that pkg-config from fink is
first in $PATH. If you still have -I/usr/include or -L/usr/lib on the
compile line you need to figure out where they are added. It might be
added by mpic++. Try to disable MPI. Maybe you also need to use a
different compiler. On the mac buildslave we use gcc 4.3.3 from fink.

Johannes

---

From: Harish Narayanan <[email-masked]>
Date: Fri, 31 Jul 2009 11:12:20 +0200

> different compiler. On the mac buildslave we use gcc 4.3.3 from fink.

I will try this, but I would like to use mpic++ so I'll see what I can do.

Thanks!
Harish