Boost build errors on Arch Linux

Support for running, installing or compiling OpenMW
Locked
User avatar
lgromanowski
Site Admin
Posts: 1151
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland
Github profile: https://github.com/lgromanowski
Contact:

Boost build errors on Arch Linux

Post by lgromanowski » 15 Aug 2011, 13:45

pvdk wrote: Hey.

I tried to compile OpenMW today on my Arch box and some errors showed up. It's caused by Boost's Filesystem module. I use Boost version 1.46.0.

The error is:

Code: Select all

error: â??class boost::filesystem3::pathâ?? has no member named â??file_stringâ??
And is caused by file_string being deprecated, as you can see here:
http://live.boost.org/doc/libs/1_46_1/l ... cated.html

string() should be used instead of file_string().
Here's a patch for this problem:

Code: Select all

diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp
index 9bf8058..b24d6e3 100644
--- a/apps/openmw/engine.cpp
+++ b/apps/openmw/engine.cpp
@@ -244,7 +244,7 @@ void OMW::Engine::loadBSA()
         if (boost::filesystem::extension (iter->path())==".bsa")
         {
             std::cout << "Adding " << iter->path().string() << std::endl;
-            addBSA(iter->path().file_string());
+            addBSA(iter->path().string());
         }
     }
 }
@@ -254,7 +254,7 @@ void OMW::Engine::loadBSA()
 
 void OMW::Engine::addResourcesDirectory (const boost::filesystem::path& path)
 {
-    mOgre.getRoot()->addResourceLocation (path.file_string(), "FileSystem",
+    mOgre.getRoot()->addResourceLocation (path.string(), "FileSystem",
         Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, true);
 }
 
diff --git a/apps/openmw/mwsound/soundmanager.cpp b/apps/openmw/mwsound/soundmanager.cpp
index ae01bc6..564ebe9 100644
--- a/apps/openmw/mwsound/soundmanager.cpp
+++ b/apps/openmw/mwsound/soundmanager.cpp
@@ -312,7 +312,7 @@ namespace MWSound
   {
     MP3Lookup(dataDir / "Music/Explore/");
     if(useSound)
-      mData = new SoundImpl(root, camera, store, (dataDir / "Sound").file_string());
+      mData = new SoundImpl(root, camera, store, (dataDir / "Sound").string());
   }
 
   SoundManager::~SoundManager()
@@ -349,7 +349,7 @@ namespace MWSound
         {
             fileIter++;
         }
-        std::string music = fileIter->file_string();
+        std::string music = fileIter->string();
         try
         {
             std::cout << "Playing " << music << "\n";
diff --git a/apps/openmw/mwworld/world.cpp b/apps/openmw/mwworld/world.cpp
index 10117d8..c08dc42 100644
--- a/apps/openmw/mwworld/world.cpp
+++ b/apps/openmw/mwworld/world.cpp
@@ -419,7 +419,7 @@ namespace MWWorld
         std::cout << "Loading ESM " << masterPath.string() << "\n";
 
         // This parses the ESM file and loads a sample cell
-        mEsm.open (masterPath.file_string());
+        mEsm.open (masterPath.string());
         mStore.load (mEsm);
 
         mPlayer = new MWWorld::Player (mScene.getPlayer(), mStore.npcs.find ("player"), *this);
diff --git a/components/file_finder/file_finder.hpp b/components/file_finder/file_finder.hpp
index 1071212..cfa07dc 100644
--- a/components/file_finder/file_finder.hpp
+++ b/components/file_finder/file_finder.hpp
@@ -20,7 +20,7 @@ class FileFinderT
 
     void add(const boost::filesystem::path &pth)
     {
-      std::string file = pth.file_string();
+      std::string file = pth.string();
       std::string key = file.substr(cut);
       owner->table[key] = file;
     }
@@ -35,7 +35,7 @@ public:
 
     // Remember the original path length, so we can cut it away from
     // the relative paths used as keys
-    std::string pstring = path.file_string();
+    std::string pstring = path.string();
     inserter.cut = pstring.size();
 
     // If the path does not end in a slash, then boost will add one
Zini wrote: We usually don't do patches around here. IIRC you already have pushed code to github once, so you should know what to do.
pvdk wrote: True dat, will push tomorrow.

Also there's another problem when OpenMW is compiled. There's no plugins.cfg anymore.
Zini wrote: There is. Quoting from CMakeLists.txt:

Code: Select all

if (LINUX)
configure_file(${OpenMW_SOURCE_DIR}/files/plugins.cfg.linux
    "${OpenMW_BINARY_DIR}/plugins.cfg")
endif (LINUX)
I am not sure what kind of problem you are experiencing here.
pvdk wrote: Well I thought it was kinda strange too. Will try again with a fresh git clone when I get home.
best regards,
Lukasz

Locked

Who is online

Users browsing this forum: No registered users and 1 guest