View Issue Details

IDProjectCategoryView StatusLast Update
0003284GNUnetutil librarypublic2014-04-08 16:42
Reporterbeberking Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
OSDebian/GNU Linux 
Product Version0.9.5a 
Target Version0.10.1Fixed in Version0.10.1 
Summary0003284: GNUnet doesn't support libdir of the form ${prefix}/lib/x86_64-linux-gnu
DescriptionWhen building GNUnet with the new standards location in Debian for Multiarch [1], e.g. libdir=${prefix}/lib/x86_64-linux-gnu, any call to GNUnet fails with a message like:
util-9778 WARNING `stat' failed on file `/usr/lib/x86_64-linux-gnu/share/gnunet/config.d' at disk.c:1199 with error: Aucun fichier ou dossier de ce type

[1] https://wiki.debian.org/Multiarch/Tuples
Steps To ReproduceBuild GNUnet with prefix=/usr and libdir=${prefix}/lib/x86_64-linux-gnu (or the directory corresponding to your architecture), install and launch any gnunet-*.
Additional InformationI think this is caused in src/util/os_installation.c, in
GNUNET_OS_installation_get_path. It handles the cases of lib32 and lib64, but not the new standards in Debian.

The attached patch is WRONG. It fixes the issue on amd64 only, but shows where the issue is.
TagsNo tags attached.
Attached Files
multiarch_tuple.diff (847 bytes)   
Description: Strip the multiarch tuple when looking for the installation path.
Author: Bertrand Marc <beberking@gmail.com>
Forwarded: no
Last-Update: 2014-01-27

--- gnunet-0.9.5a.orig/src/util/os_installation.c
+++ gnunet-0.9.5a/src/util/os_installation.c
@@ -490,7 +490,20 @@ GNUNET_OS_installation_get_path (enum GN
     execpath[--n] = '\0';
 
   isbasedir = 1;
-  if ((n > 5) &&
+  if ((n > 20) &&
+      (0 == strcasecmp (&execpath[n - 20], "lib/x86_64-linux-gnu")))
+  {
+    if ( (GNUNET_OS_IPK_LIBDIR != dirkind) &&
+	 (GNUNET_OS_IPK_LIBEXECDIR != dirkind) )
+    {
+      /* strip the multiarch tuple */
+      execpath[n - 20] = '\0';
+      n -= 20;
+    }
+    else
+      isbasedir = 0;
+  }
+  else if ((n > 5) &&
       ((0 == strcasecmp (&execpath[n - 5], "lib32")) ||
        (0 == strcasecmp (&execpath[n - 5], "lib64"))))
   {
multiarch_tuple.diff (847 bytes)   

Activities

Christian Grothoff

2014-01-30 15:49

manager   ~0008041

Should be fixed in SVN 32119.

Issue History

Date Modified Username Field Change
2014-01-27 16:17 beberking New Issue
2014-01-27 16:17 beberking File Added: multiarch_tuple.diff
2014-01-27 21:16 Christian Grothoff Assigned To => Christian Grothoff
2014-01-27 21:16 Christian Grothoff Status new => assigned
2014-01-30 15:49 Christian Grothoff Note Added: 0008041
2014-01-30 15:49 Christian Grothoff Status assigned => resolved
2014-01-30 15:49 Christian Grothoff Fixed in Version => 0.10.1
2014-01-30 15:49 Christian Grothoff Resolution open => fixed
2014-01-30 15:49 Christian Grothoff Target Version => 0.10.1
2014-01-30 15:49 Christian Grothoff Product Version Git master => 0.10.0
2014-01-30 15:49 Christian Grothoff Product Version 0.10.0 => 0.9.5a
2014-04-08 16:42 Christian Grothoff Status resolved => closed