Subject: Re: [Instant-dev] [DOLFIN-dev] Binaries for new Dolfin release

From: "Johannes Ring" <[email-masked]>
Date: Mon, 12 Jan 2009 17:16:30 +0100 (CET)

On Mon, January 12, 2009 10:47, Ola Skavhaug wrote:
> On Mon, Jan 12, 2009 at 9:07 AM, Johannes Ring <[email-masked]> wrote:
>> Hi Ali,
>>
>> On Mon, January 12, 2009 02:51, A Navaei wrote:
>>> Hi,
>>>
>>> Is there a plan tp provid the debian packages for the new version of
>>> Dolfin?
>>
>> Yes, we are only waiting for a new release of Viper before we will
>> upload
>> new packages. This will probably happen one of the first days this week.
>>
>> Johannes
>>
>
> The new Viper is just released, so the binary packages may be distributed.

New packages for Ubuntu 8.04 and 8.10 are now uploaded to
packages.simula.no, however, there is a problem with the DOLFIN demos that
uses FFC and Instant. The problem is with pkg-config and the fact that
/usr/include is not included if not PKG_CONFIG_ALLOW_SYSTEM_CFLAGS is set
to 1. This results in that swig is unable to locate dolfin.i. The attached
patch for Instant should fix this issue.

Johannes

# HG changeset patch
# User Johannes Ring <[email-masked]>
# Date 1231776829 -3600
# Node ID f3ea57a62fdf62923d7bb185aa858b123a5d7c1b
# Parent  31d94e8cc9eeb9dc9b5fdb39c4cf0c6c9908557a
Set PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 by default.

diff -r 31d94e8cc9ee -r f3ea57a62fdf src/instant/config.py
--- a/src/instant/config.py	Mon Dec 29 15:23:16 2008 +0100
+++ b/src/instant/config.py	Mon Jan 12 17:13:49 2009 +0100
@@ -1,5 +1,6 @@
 """This module contains helper functions for configuration using pkg-config."""
 
+import os
 from output import get_status_output
 
 def header_and_libs_from_pkgconfig(*packages, **kwargs):
@@ -13,27 +14,33 @@
     if result != 0: 
         raise OSError("The pkg-config package is not installed on the system.")
 
+    env = os.environ.copy()
+    try:
+        assert env("PKG_CONFIG_ALLOW_SYSTEM_CFLAGS") == "0"
+    except:
+        env["PKG_CONFIG_ALLOW_SYSTEM_CFLAGS"] = "1"
+
     includes = []
     flags = []
     libs = []
     libdirs = []
     linkflags = []
     for pack in packages:
-        result, output = get_status_output("pkg-config --exists %s " % pack)
+        result, output = get_status_output("pkg-config --exists %s " % pack, env=env)
         if result == 0: 
-            tmp = get_status_output("pkg-config --cflags-only-I %s " % pack)[1].split()
+            tmp = get_status_output("pkg-config --cflags-only-I %s " % pack, env=env)[1].split()
             includes.extend(i[2:] for i in tmp)
             
-            tmp = get_status_output("pkg-config --cflags-only-other %s " % pack)[1].split()
+            tmp = get_status_output("pkg-config --cflags-only-other %s " % pack, env=env)[1].split()
             flags.extend(tmp)
             
-            tmp = get_status_output("pkg-config --libs-only-l  %s " % pack)[1].split()
+            tmp = get_status_output("pkg-config --libs-only-l  %s " % pack, env=env)[1].split()
             libs.extend(i[2:] for i in tmp)
             
-            tmp = get_status_output("pkg-config --libs-only-L  %s " % pack)[1].split()
+            tmp = get_status_output("pkg-config --libs-only-L  %s " % pack, env=env)[1].split()
             libdirs.extend(i[2:] for i in tmp)
 
-            tmp = get_status_output("pkg-config --libs-only-other  %s " % pack)[1].split()
+            tmp = get_status_output("pkg-config --libs-only-other  %s " % pack, env=env)[1].split()
             linkflags.extend(tmp)
 
         else:

---

From: Ilmar Wilbers <[email-masked]>
Date: Mon, 12 Jan 2009 17:21:42 +0100

Patched...

ilmar

Johannes Ring wrote:
> ------------------------------------------------------------------------
>
> _______________________________________________
> Instant-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/instant-dev

---

From: [email-masked]
Date: Mon, 12 Jan 2009 19:39:54 +0100 (CET)

> Johannes_______________________________________________
> Instant-dev mailing list
> [email-masked]

OK, would you like a new release then ?  Or do you package from hg ?

Kent

---

From: "Johannes Ring" <[email-masked]>
Date: Mon, 12 Jan 2009 21:18:36 +0100 (CET)

> OK, would you like a new release then ?  Or do you package from hg ?

It is not necessary to make a new release only for the Ubuntu packaging. I
can simply include the same patch when generating a new package for
Instant. I will do that tomorrow.

Johannes

---

From: "Johannes Ring" <[email-masked]>
Date: Tue, 13 Jan 2009 09:56:59 +0100 (CET)

> Instant. I will do that tomorrow.

This should be fixed now.

Johannes