Bug #445

Compilation of Environment.cpp fails on MacOs

Added by S. Wrede almost 13 years ago. Updated almost 13 years ago.

Status:ResolvedStart date:07/26/2011
Priority:NormalDue date:
Assignee:S. Wrede% Done:

100%

Category:Util
Target version:-

Description

with the following reason:

-- Could NOT find Lcov (missing:  LCOV_EXECUTABLE GENHTML_EXECUTABLE) 
-- Could NOT find gcovr (missing:  GCOVR_EXECUTABLE) 
-- Could NOT find sloccount (missing:  SLOCCOUNT_EXECUTABLE) 
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Could NOT find Cppcheck (missing:  CPPCHECK_EXECUTABLE CPPCHECK_VERSION) 
-- This is a checked out version: TRUE
-- Current revision is 303
-- Selected UnixSubprocess
-- Selected LinuxDebugTools
-- Installing CMake modules to: share/cmake/Modules
-- Cannot enable coverage targets because neither lcov nor gcovr are found.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/swrede/Workspace/RSC/build
[  1%] Building CXX object src/CMakeFiles/rsc.dir/rsc/config/Environment.cpp.o
/Users/swrede/Workspace/RSC/src/rsc/config/Environment.cpp: In member function ‘virtual void rsc::config::EnvironmentVariableSource::emit(rsc::config::OptionHandler&)’:
/Users/swrede/Workspace/RSC/src/rsc/config/Environment.cpp:83: error: ‘environ’ was not declared in this scope
/opt/local/include/boost/system/error_code.hpp: At global scope:
/opt/local/include/boost/system/error_code.hpp:214: warning: ‘boost::system::posix_category’ defined but not used
/opt/local/include/boost/system/error_code.hpp:215: warning: ‘boost::system::errno_ecat’ defined but not used
/opt/local/include/boost/system/error_code.hpp:216: warning: ‘boost::system::native_ecat’ defined but not used
make[2]: *** [src/CMakeFiles/rsc.dir/rsc/config/Environment.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/rsc.dir/all] Error 2
make: *** [all] Error 2
ubi-1-165-236:build swrede$

With just a quick look at the implementation, it was not obvious where environ shall come from. Any ideas?

History

#1 Updated by J. Moringen almost 13 years ago

Seems to be defined in unistd.h on POSIX systems (At least that's what man environ says).

#2 Updated by S. Wrede almost 13 years ago

  • Category set to Util
  • Status changed from New to Resolved
  • Assignee set to S. Wrede
  • % Done changed from 0 to 100

For dynamic libraries the environ variable is not available on MacOS, hence a workaround is needed. See also:
http://article.gmane.org/gmane.comp.lib.boost.devel/103843

#3 Updated by S. Wrede almost 13 years ago

  • Subject changed from Compilation fails on MacOs to Compilation of Environment.cpp fails on MacOs

Also available in: Atom PDF