On Wed, Aug 08, 2018 at 05:34:06PM +0100, Patrick Welche wrote: > I thought I would try out HPX, and hit: > > /tmp/pkgsrc/parallel/hpx/work.x86_64/hpx_1.1.0/src/exception.cpp:207:2: > error: #error "Don't know, how to access the execution environment on this > platform" > #error "Don't know, how to access the execution environment on this platform" > > I don't think a hand-coded list of operating systems is maintainable. > Staring at it, I can't spot the difference between linux and __APPLE__ > for instance. Maybe linux, AIX, and __APPLE__ should just be the #else > so that chances are, your code would compile on a not-listed OS, and > you would only receive bug reports from the few that don't. > (Is FreeBSD really different? I must check...)
After the attached patch I got to: tmp/pkgsrc/parallel/hpx/work.x86_64/hpx_1.1.0/hpx/util/plugin/detail/dll_dlopen.hpp: In member function 'std::string hpx::util::plugin::dll::get_directory(hpx::error_code&) const': /tmp/pkgsrc/parallel/hpx/work.x86_64/hpx_1.1.0/hpx/util/plugin/detail/dll_dlopen.hpp:318:45: error: 'RTLD_DI_ORIGIN' was not declared in this scope if (!ec && ::dlinfo(dll_handle, RTLD_DI_ORIGIN, directory) < 0) { ^~~~~~~~~~~~~~ but that is going to be harder... Cheers, Patrick
$NetBSD$ Avoid maintaining lists of names of operating systems. --- src/exception.cpp.orig 2018-02-23 08:43:42.000000000 +0000 +++ src/exception.cpp @@ -190,21 +190,15 @@ namespace hpx { namespace detail std::size_t len = get_arraylen(_environ); env.reserve(len); std::copy(&_environ[0], &_environ[len], std::back_inserter(env)); -#elif defined(linux) || defined(__linux) || defined(__linux__) || defined(__AIX__) - std::size_t len = get_arraylen(environ); - env.reserve(len); - std::copy(&environ[0], &environ[len], std::back_inserter(env)); #elif defined(__FreeBSD__) std::size_t len = get_arraylen(freebsd_environ); env.reserve(len); std::copy(&freebsd_environ[0], &freebsd_environ[len], std::back_inserter(env)); -#elif defined(__APPLE__) +#else std::size_t len = get_arraylen(environ); env.reserve(len); std::copy(&environ[0], &environ[len], std::back_inserter(env)); -#else -#error "Don't know, how to access the execution environment on this platform" #endif std::sort(env.begin(), env.end());
_______________________________________________ hpx-users mailing list hpx-users@stellar.cct.lsu.edu https://mail.cct.lsu.edu/mailman/listinfo/hpx-users