Skip to content

CMakeLists.txt does not detect OpenSUSE correctly #17

@trel

Description

@trel
INFO -   stderr: Traceback (most recent call last):
  File "<string>", line 1, in <module>
IndexError: list index out of range
CMake Error at CMakeLists.txt:53 (message):
  Linux platform name detection failed

  1
INFO - 
ERROR - build failed

tripping up because MUNGEFS_LINUX_DISTRIBUTION_NAME is empty...

mungefs/CMakeLists.txt

Lines 46 to 57 in 7bb18e7

if (NOT MUNGEFS_LINUX_DISTRIBUTION_NAME)
execute_process(
COMMAND "python" "-c" "from __future__ import print_function; import platform; print(platform.linux_distribution()[0].split()[0].strip().lower(), end='')"
RESULT_VARIABLE MUNGEFS_EXECUTE_PROCESS_RESULT_LINUX_DISTRIBUTION_NAME
OUTPUT_VARIABLE MUNGEFS_LINUX_DISTRIBUTION_NAME
)
if (NOT ${MUNGEFS_EXECUTE_PROCESS_RESULT_LINUX_DISTRIBUTION_NAME} STREQUAL "0")
message(FATAL_ERROR "Linux platform name detection failed\n${MUNGEFS_EXECUTE_PROCESS_RESULT_LINUX_DISTRIBUTION_NAME}")
endif()
set(MUNGEFS_LINUX_DISTRIBUTION_NAME ${MUNGEFS_LINUX_DISTRIBUTION_NAME} CACHE STRING "Linux distribution name, e.g. {ubuntu, centos, ...}." FORCE)
message(STATUS "Setting unspecified MUNGEFS_LINUX_DISTRIBUTION_NAME to '${MUNGEFS_LINUX_DISTRIBUTION_NAME}'")
endif()

opensuse can use the distro module rather than platform

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbuild

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions