Send USRP-users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of USRP-users digest..."


Today's Topics:

   1. [Patch] Forward compatibility with boost 1.46 (Moritz Fischer)
   2. Re: [Patch] Forward compatibility with boost 1.46 (Josh Blum)


----------------------------------------------------------------------

Message: 1
Date: Tue, 15 Mar 2011 19:39:48 +0100
From: Moritz Fischer <[email protected]>
To: <[email protected]>
Subject: [USRP-users] [Patch] Forward compatibility with boost 1.46
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

Hi List,

when trying to get the archlinux packages to build again for GNU Radio and UHD 
I noticed,
that with arch's boost 1.46 libs UHD did not compile due to some changes in 
boost filesystem [1].

I tried it with an older version of boost (boost 1.45) and and according to 
their website [2] older
 releases, read: boost 1.44 and above should support the changes I made.

I attached a small patch to fix the deprecated function calls with calls the 
the new ones.

Cheers,
Moritz


[1] http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/deprecated.html
[2] http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/index.htm
-------------- next part --------------
>From aa09140508b1268091ff742099521f047725d52e Mon Sep 17 00:00:00 2001
From: Moritz Fischer <[email protected]>
Date: Tue, 15 Mar 2011 17:31:24 +0100
Subject: [PATCH] Replaced deprecated file_string() with string()

Didn't build with current boost 1.46.1 Version due to deprecation of 
filesystem::path::file_string().
Replaced with string() as suggested in 
http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/deprecated.html .
---
 host/lib/usrp/usrp_e100/usrp_e100_impl.cpp |    2 +-
 host/lib/utils/images.cpp                  |    4 ++--
 host/lib/utils/load_modules.cpp            |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp 
b/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp
index 40ea564..f430090 100644
--- a/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp
+++ b/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp
@@ -53,7 +53,7 @@ static device_addrs_t usrp_e100_find(const device_addr_t 
&hint){
     if (fs::exists(hint["node"])){
         device_addr_t new_addr;
         new_addr["type"] = "usrp-e";
-        new_addr["node"] = 
fs::system_complete(fs::path(hint["node"])).file_string();
+        new_addr["node"] = 
fs::system_complete(fs::path(hint["node"])).string();
         try{
             usrp_e100_iface::sptr iface = 
usrp_e100_iface::make(new_addr["node"]);
             new_addr["name"] = iface->mb_eeprom["name"];
diff --git a/host/lib/utils/images.cpp b/host/lib/utils/images.cpp
index 395e542..24a5993 100644
--- a/host/lib/utils/images.cpp
+++ b/host/lib/utils/images.cpp
@@ -30,11 +30,11 @@ std::vector<fs::path> get_image_paths(void); //defined in 
paths.cpp
  **********************************************************************/
 std::string uhd::find_image_path(const std::string &image_name){
     if (fs::exists(image_name)){
-        return fs::system_complete(image_name).file_string();
+        return fs::system_complete(image_name).string();
     }
     BOOST_FOREACH(const fs::path &path, get_image_paths()){
         fs::path image_path = path / image_name;
-        if (fs::exists(image_path)) return image_path.file_string();
+        if (fs::exists(image_path)) return image_path.string();
     }
     throw std::runtime_error("Could not find path for image: " + image_name);
 }
diff --git a/host/lib/utils/load_modules.cpp b/host/lib/utils/load_modules.cpp
index fa9b224..3315285 100644
--- a/host/lib/utils/load_modules.cpp
+++ b/host/lib/utils/load_modules.cpp
@@ -72,7 +72,7 @@ static void load_module(const std::string &file_name){
  */
 static void load_module_path(const fs::path &path){
     if (not fs::exists(path)){
-        //std::cerr << boost::format("Module path \"%s\" not found.") % 
path.file_string() << std::endl;
+        //std::cerr << boost::format("Module path \"%s\" not found.") % 
path.string() << std::endl;
         return;
     }
 
@@ -90,7 +90,7 @@ static void load_module_path(const fs::path &path){
 
     //its not a directory, try to load it
     try{
-        load_module(path.file_string());
+        load_module(path.string());
     }
     catch(const std::exception &err){
         std::cerr << boost::format("Error: %s") % err.what() << std::endl;
-- 
1.7.4.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: 
<http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20110315/f9e41763/attachment-0001.bin>

------------------------------

Message: 2
Date: Tue, 15 Mar 2011 17:36:02 -0700
From: Josh Blum <[email protected]>
To: [email protected]
Subject: Re: [USRP-users] [Patch] Forward compatibility with boost
        1.46
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1



On 03/15/2011 11:39 AM, Moritz Fischer wrote:
> Hi List,
> 
> when trying to get the archlinux packages to build again for GNU Radio and 
> UHD I noticed,
> that with arch's boost 1.46 libs UHD did not compile due to some changes in 
> boost filesystem [1].
> 
> I tried it with an older version of boost (boost 1.45) and and according to 
> their website [2] older
>  releases, read: boost 1.44 and above should support the changes I made.
> 
> I attached a small patch to fix the deprecated function calls with calls the 
> the new ones.
> 

It looks like boost 1.36 (which is the oldest we claim to support) has
string().
http://www.boost.org/doc/libs/1_36_0/libs/filesystem/doc/reference.html#basic_path-observers

I will get the patch into master after I make sure nothing breaks :-)

Thanks for the patch!
-Josh

> Cheers,
> Moritz
> 
> 
> [1] 
> http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/deprecated.html
> [2] http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/index.htm
> 
> 
> 
> _______________________________________________
> USRP-users mailing list
> [email protected]
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com



------------------------------

_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


End of USRP-users Digest, Vol 7, Issue 27
*****************************************

Reply via email to