dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #10560
Re: [HG DOLFIN] Added SubFunction to dolfin_function.h so swig interface compile\nRename of function.in to function._in\nAdded __contains__ in FunctionSpace so one can write u in V.\nAdded % import ufc.h in dolfin_dunction_pre.i as dolfi
On Mon, Nov 03, 2008 at 02:07:20PM +0100, Johan Hake wrote:
> On Monday 03 November 2008 13:31:29 Martin Sandve Alnæs wrote:
> > 2008/11/3 Johan Hake <hake@xxxxxxxxx>:
> > > On Monday 03 November 2008 13:07:38 Garth N. Wells wrote:
> > >> DOLFIN wrote:
> > >> > One or more new changesets pushed to the primary dolfin repository.
> > >> > A short summary of the last three changesets is included below.
> > >> >
> > >> > changeset: 5069:fbbadf8f8b7ac1d0320109bb0c1e0f3a90a32f8a
> > >> > tag: tip
> > >> > user: "Johan Hake <hake@xxxxxxxxx>"
> > >> > date: Sun Nov 02 16:16:54 2008 +0100
> > >> > files: dolfin/function/dolfin_function.h dolfin/scons.cfg
> > >> > dolfin/swig/dolfin_docstrings.i dolfin/swig/dolfin_function_post.i
> > >> > dolfin/swig/dolfin_function_pre.i dolfin/swig/dolfin_headers.i
> > >> > description:
> > >> > Added SubFunction to dolfin_function.h so swig interface
> > >> > compile\nRename of function.in to function._in\nAdded __contains__ in
> > >> > FunctionSpace so one can write u in V.\nAdded % import ufc.h in
> > >> > dolfin_dunction_pre.i as dolfin::function inherits ufc::function\nand
> > >> > last added ufc-1 as swig dependencies so swig find ufc.h
> > >>
> > >> Related to this change, I'm getting the swig error
> > >>
> > >> dolfin/swig/dolfin_function_pre.i:2: Error: Unable to find 'ufc.h'
> > >
> > > Hmmm, this should work...
> > >
> > > I added 'ufc-1' to SwigDependencies so simula_scons would pick up the
> > > dependency. I guess that ufc.h is located in a directory that is included
> > > anyway on my computer, and thats why I did not get the error.
> > >
> > > Johannes any clue why this is not working?
> > >
> > > Johan
> >
> > My previous experience is that pkg-config usually skips printing
> > default include directories like /usr/include and /usr/local/include,
> > while SWIG does not include those by default.
> > If UFC is in one of those, just asking pkg-config won't work.
>
> It's only when something is installed under /usr that pkg-config does not give
> any output. This beaviour can be configured by setting the environment
> variable
>
> PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
>
> before calling pkg-config.
Sounds like this could be useful to add to
instant.header_and_libs_from_pkgconfig?
I'm currently using the following code to extract the path to UFC in FFC:
# Get include directory for ufc.h (might be better way to do this?)
(path, dummy, dummy, dummy) = instant.header_and_libs_from_pkgconfig("ufc-1")
if len(path) == 0:
path = [("/").join(sysconfig.get_python_inc().split("/")[:-2]) + "/include"]
ufc_include = '%%include "%s/ufc.h"' % path[0]
> ufc.h is installed under /usr if not given any prefix. We should probably set
> default installation directory to /usr/local instead of /usr when not set by
> user while running ufc/setup.py.
>
> If no one have any objection maybee Johannes can do that?
Sounds good.
--
Anders
Attachment:
signature.asc
Description: Digital signature
References