← Back to team overview

instant team mailing list archive

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

 

On Mon, January 12, 2009 10:47, Ola Skavhaug wrote:
> On Mon, Jan 12, 2009 at 9:07 AM, Johannes Ring <johannr@xxxxxxxxx> 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 <johannr@xxxxxxxxx>
# 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: 

Follow ups