[buildd-tools-devel] Bug#612510: Bug#612510: build issue with boost 1.46

Roger Leigh rleigh at codelibre.net
Tue Feb 8 22:17:12 UTC 2011


On Tue, Feb 08, 2011 at 01:23:30PM -0800, Zach Carter wrote:
> When I build schroot with boost 1.46, I get this error:
> 
> sbuild-chroot-config.cc: In member function 'void 
> sbuild::chroot_config::add_config_directory(const string&, const string&)':
> sbuild-chroot-config.cc:170:32: error: 'class 
> boost::filesystem3::directory_entry' has no member named 'leaf
> 
> As was suggested on the Fedora development list, substituting 
> path().filename().string() for leaf() seems to fix the problem.  I'm attaching a 
> patch which does this.

Thanks for the heads up.  Debian is currently still on Boost 1.42,
though this should change very soon now squeeze has been released,
and development kicks off again.

The provided patch doesn't build with Boost 1.42, and I'd like to
have backward compatibility if possible.  The final .string() is
not required to build with 1.42, and this might also be the case
with 1.64.  Please could you let me know if the attached modified
patch also builds OK with 1.64?  If not we'll need to check what's
supported in configure and conditionally compile the correct
version (which we already do for some Boost incompatibilities).


Many thanks,
Roger


diff --git a/sbuild/sbuild-chroot-config.cc b/sbuild/sbuild-chroot-config.cc
index ed33e76..ffc694d 100644
--- a/sbuild/sbuild-chroot-config.cc
+++ b/sbuild/sbuild-chroot-config.cc
@@ -174,7 +174,7 @@ chroot_config::add_config_directory (std::string const& chroot_namespace,
        dirent != end_iter;
        ++dirent)
     {
-      std::string name(dirent->leaf());
+      std::string name(dirent->path().filename());
 
       // Skip common directories.
       if (name == "." || name == "..")
diff --git a/sbuild/sbuild-run-parts.cc b/sbuild/sbuild-run-parts.cc
index e9fb10d..e0c4cc6 100644
--- a/sbuild/sbuild-run-parts.cc
+++ b/sbuild/sbuild-run-parts.cc
@@ -81,7 +81,7 @@ run_parts::run_parts (std::string const& directory,
        dirent != end_iter;
        ++dirent)
     {
-      std::string name(dirent->leaf());
+      std::string name(dirent->path().filename());
 
       // Skip common directories.
       if (name == "." || name == "..")

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20110208/72726186/attachment.pgp>


More information about the Buildd-tools-devel mailing list