[pdal] Minimum Boost, embedded Boost, and undefined symbols
Bradley Chambers
brad.chambers at gmail.com
Mon Mar 26 12:59:23 EDT 2012
So I removed the build directory and started fresh. Here's the CMake output.
Setting PDAL build type - Debug
Using embedded boost tree
Using boost lib: pdalboost
Building with PDAL unit tests
No non-embed static boost library found, setting BOOST_TEST_DYN_LINK
Configuring done
Generating done
While linking ../bin/libpdal.dylib, I get the following
Undefined symbols for architecture x86_64:
"boost::filesystem3::path::root_directory() const", referenced from:
boost::filesystem3::path::has_root_directory() constin FileUtils.cpp.o
...
make VERBOSE=1 confirms that only PDAL/boost is being included, and that
libpdal is linking against libpdalboost.a.
Brad
On Mon, Mar 26, 2012 at 12:32 PM, Howard Butler <hobu.inc at gmail.com> wrote:
>
> On Mar 26, 2012, at 11:01 AM, Bradley Chambers wrote:
>
> > I found two previous tickets stating that the minimum Boost version
> should be 1.41 (https://github.com/PDAL/PDAL/issues/51 and
> https://github.com/PDAL/PDAL/pull/55), and yet the main CMakeLists file
> requires 1.48 (references to 1.41 disappeared around
> https://github.com/PDAL/PDAL/commit/41b3b39d85c073a7325d03bf853477c71f37a05c).
> Should the CMakeLists file be downgraded once again to require 1.41?
> >
> > I believe the embedded PDAL Boost may be taking over a bit too
> gracefully if the initial find_package call fails. I discovered this when
> attempting to run CMake with Boost 1.47 (before noticing the dependency on
> 1.48). Because the embedded package took over, and CMake completed without
> errors, this took a while to figure out. In hindsight, there was a status
> message that Boost was not found, and embedded Boost would be used, but
> it's easy to overlook. If the user chooses to not use embedded Boost,
> should the default behavior really be to use it if CMake runs into any
> issues?
>
> There's definitely room to fix the CMake logic up here. I just did a
> quick and dirty on it, and I almost always build embedded now. I think the
> expectation should be that you're building embedded to simplify the build
> setup for folks and so that we can dictate a high boost version number.
> Right now the minimum Boost version number is 1.48, which is due to some
> newish boost::random being used in filters.stats.
>
> >
> > Finally, when building on OS X and using the embedded Boost libraries, I
> currently get a slew of errors about undefined symbols in
> Boost::filesystem3.
>
> If you were using the embedded boost, I think the errors here would be
> pdalboost::filesystem3:: of boost::filesystem3
>
> $ make VERBOSE=1 should give you an indication of the include path
> ordering and whether or not your boost is being used ahead of the system
> one. When the embedded boost is used, a single library that is built by
> CMake in ./boost is linked in. Otherwise, for a system boost, each
> individual library specified in the find_package invocation is required.
>
> >
> > Undefined symbols for architecture x86_64:
> > "boost::filesystem3::detail::remove(boost::filesystem3::path const&,
> boost::system::error_code*)", referenced from:
> > boost::filesystem3::remove(boost::filesystem3::path const&) in
> FileUtils.o
> > "boost::filesystem3::detail::rename(boost::filesystem3::path const&,
> boost::filesystem3::path const&, boost::system::error_code*)", referenced
> from:
> > boost::filesystem3::rename(boost::filesystem3::path const&,
> boost::filesystem3::path const&) in FileUtils.o
> > "boost::filesystem3::detail::status(boost::filesystem3::path const&,
> boost::system::error_code*)", referenced from:
> > boost::filesystem3::exists(boost::filesystem3::path const&) in
> FileUtils.o
> > "boost::filesystem3::detail::file_size(boost::filesystem3::path
> const&, boost::system::error_code*)", referenced from:
> > boost::filesystem3::file_size(boost::filesystem3::path const&) in
> FileUtils.o
> >
> "boost::filesystem3::detail::current_path(boost::system::error_code*)",
> referenced from:
> > boost::filesystem3::current_path() in FileUtils.o
> > "boost::filesystem3::absolute(boost::filesystem3::path const&,
> boost::filesystem3::path const&)", referenced from:
> > pdal::FileUtils::toAbsolutePath(std::string const&) in FileUtils.o
> > pdal::FileUtils::toAbsolutePath(std::string const&, std::string)
> in FileUtils.o
> > "boost::filesystem3::path::parent_path() const", referenced from:
> > pdal::FileUtils::getDirectory(std::string const&) in FileUtils.o
> > "boost::filesystem3::path::root_directory() const", referenced from:
> > boost::filesystem3::path::has_root_directory() const in FileUtils.o
> > "boost::filesystem3::path::filename() const", referenced from:
> > pdal::StageFactory::loadPlugins() in StageFactory.o
> > "boost::filesystem3::path::extension() const", referenced from:
> > pdal::StageFactory::loadPlugins() in StageFactory.o
> > "boost::filesystem3::path::stem() const", referenced from:
> > pdal::StageFactory::loadPlugins() in StageFactory.o
> >
> "boost::filesystem3::directory_entry::m_get_symlink_status(boost::system::error_code*)
> const", referenced from:
> > boost::filesystem3::directory_entry::symlink_status() const in
> StageFactory.o
> > "boost::filesystem3::path::begin() const", referenced from:
> > boost::filesystem3::operator<(boost::filesystem3::path const&,
> boost::filesystem3::path const&) in StageFactory.o
> > "boost::filesystem3::path::end() const", referenced from:
> > boost::filesystem3::operator<(boost::filesystem3::path const&,
> boost::filesystem3::path const&) in StageFactory.o
> >
> "boost::filesystem3::path::m_path_iterator_increment(boost::filesystem3::path::iterator&)",
> referenced from:
> > boost::filesystem3::path::iterator::increment() in StageFactory.o
> >
> "boost::filesystem3::detail::directory_iterator_increment(boost::filesystem3::directory_iterator&,
> boost::system::error_code*)", referenced from:
> > boost::filesystem3::directory_iterator::increment() in
> StageFactory.o
> >
> "boost::filesystem3::detail::directory_iterator_construct(boost::filesystem3::directory_iterator&,
> boost::filesystem3::path const&, boost::system::error_code*)", referenced
> from:
> >
> boost::filesystem3::directory_iterator::directory_iterator(boost::filesystem3::path
> const&) in StageFactory.o
> > "boost::filesystem3::detail::dir_itr_close(void*&, void*&)",
> referenced from:
> > boost::filesystem3::detail::dir_itr_imp::~dir_itr_imp() in
> StageFactory.o
> > "boost::filesystem3::detail::unique_path(boost::filesystem3::path
> const&, boost::system::error_code*)", referenced from:
> > boost::filesystem3::unique_path(boost::filesystem3::path const&)
> in Utils.o
> >
> "boost::filesystem3::detail::temp_directory_path(boost::system::error_code*)",
> referenced from:
> > boost::filesystem3::temp_directory_path() in Utils.o
> > "boost::filesystem3::path::operator/=(boost::filesystem3::path
> const&)", referenced from:
> > boost::filesystem3::operator/(boost::filesystem3::path const&,
> boost::filesystem3::path const&) in Utils.o
> > ld: symbol(s) not found for architecture x86_64
> >
> > Brad
> > _______________________________________________
> > pdal mailing list
> > pdal at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/pdal
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pdal/attachments/20120326/5817fcf1/attachment-0001.html
More information about the pdal
mailing list