← Back to team overview

dolfin team mailing list archive

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, November 3, 2008 14:07, 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.
>
> 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?

I guess someone with write access to the UFC hg repository should fix
that. However, it won't help if someone installs UFC under /usr
deliberately. A solution might be to force SWIG to always look under
/usr/include by adding it to the default SWIG flags. It shouldn't do any
harm i guess.

Johannes



Follow ups

References