diff --git a/cmake/catkin_generate_environment.cmake b/cmake/catkin_generate_environment.cmake index a54e27e44..5fab526be 100644 --- a/cmake/catkin_generate_environment.cmake +++ b/cmake/catkin_generate_environment.cmake @@ -14,9 +14,10 @@ function(catkin_generate_environment) set(CATKIN_MULTIARCH_LIB_DESTINATION "'${CATKIN_GLOBAL_LIB_DESTINATION}'") set(CATKIN_MULTIARCH_PKGCONFIG_DESTINATION "os.path.join('${CATKIN_GLOBAL_LIB_DESTINATION}', 'pkgconfig')") if (UNIX) - execute_process(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH + execute_process(COMMAND gcc -print-multiarch OUTPUT_VARIABLE CATKIN_MULTIARCH OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET ) if (NOT "${CATKIN_MULTIARCH}" STREQUAL "") set(CATKIN_MULTIARCH_LIB_DESTINATION "['${CATKIN_GLOBAL_LIB_DESTINATION}', os.path.join('${CATKIN_GLOBAL_LIB_DESTINATION}', '${CATKIN_MULTIARCH}')]") diff --git a/python/catkin/builder.py b/python/catkin/builder.py index f55e580a7..6a36c8b07 100644 --- a/python/catkin/builder.py +++ b/python/catkin/builder.py @@ -248,10 +248,10 @@ def isolation_print_command(cmd, path=None, add_env=None): ) -def get_multiarch(build_dir): +def get_multiarch(): # this function returns the suffix for lib directories on supported systems or an empty string out, err = subprocess.Popen( - 'dpkg-architecture -qDEB_HOST_MULTIARCH', + 'gcc -print-multiarch', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).communicate() return out.strip()