taskManeage - Tasks: task #15756, Robustly decide which OS we are on


You are not allowed to post comments on this tracker with your current authentication level.

task #15756: Robustly decide which OS we are on

Submitted by:  Boud Roukema <boud>
Submitted on:  Thu 20 Aug 2020 02:50:29 PM UTC  
Should Start On:  Thu 20 Aug 2020 12:00:00 AM UTC Should be Finished on:  Thu 20 Aug 2020 12:00:00 AM UTC
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Percent Complete:  0% Assigned to:  None
Open/Closed:  Open Effort:  0.00

Thu 20 Aug 2020 02:50:29 PM UTC, original submission:  

In commit 9573d4e of maneage, in file reproduce/software/shell/configure.sh , we presently have

   207  kernelname=$(uname -s)
   208  if [ x$kernelname = xLinux ]; then
   209      on_mac_os=no
   211      # Don't forget to add the respective C++ compiler below (leave 'cc' in
   212      # the end).
   213      c_compiler_list="gcc clang cc"
   214  else
   215      host_cc=1
   216      on_mac_os=yes
   218      # Don't forget to add the respective C++ compiler below (leave 'cc' in
   219      # the end).
   220      c_compiler_list="clang gcc cc"
   221  fi

preceded by a warning that we should do better. :)

At https://ss64.com/osx/uname.html I see that uname -s on OSX seems to print the operating system name, not the kernel name.

Here's a stackoverflow recommended script plus discussion: https://stackoverflow.com/questions/714100/os-detecting-makefile

I think that as a minimum, we should check that "Darwin" is the OS https://en.wikipedia.org/wiki/Darwin_%28operating_system%29 , and report a failure to detect the OS if both Linux and Darwin fail. That way we'll get more useful error reports for encouraging updates/extensions in portability/reproducibility.

As a matter of principle, we should be able to run on GNU/Hurd, which is not a Linux system... :)

Boud Roukema <boud>
Project Member


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by boud (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.7