Skip to content

print_toolchain_versions: print system and make's default shell.#10991

Closed
jcarrano wants to merge 1 commit into
RIOT-OS:masterfrom
jcarrano:print-shell-info
Closed

print_toolchain_versions: print system and make's default shell.#10991
jcarrano wants to merge 1 commit into
RIOT-OS:masterfrom
jcarrano:print-shell-info

Conversation

@jcarrano

@jcarrano jcarrano commented Feb 11, 2019

Copy link
Copy Markdown
Contributor

Contribution description

Some systems use dash as system shell, others use bash. The shell used by make can also be different, and unrelated to the system shell. Differences in this variable can cause problems when testing PRs and
reporting bugs.

The default shell is important system information that should be reported.

I had several instances where code would work on my machine but travis would reject it. Recently #10889 showed what can happen when people use different shells.

Testing procedure

Run dist/tools/ci/print_toolchain_versions.sh. Report your results.

Result on my system

Operating System Environment
-----------------------------
       Operating System: "Arch Linux" 
                 Kernel: Linux 4.20.6-arch1-1-ARCH x86_64 unknown
           System shell: GNU bash, version 5.0.0(1)-release (x86_64-pc-linux-gnu)
           make's SHELL: GNU bash, version 5.0.0(1)-release (x86_64-pc-linux-gnu)

Installed compiler toolchains
-----------------------------
             native gcc: gcc (GCC) 8.2.1 20181127
      arm-none-eabi-gcc: arm-none-eabi-gcc (Arch Repository) 8.2.0
                avr-gcc: missing
       mips-mti-elf-gcc: missing
             msp430-gcc: missing
   riscv-none-embed-gcc: missing
   xtensa-esp32-elf-gcc: missing
   xtensa-lx106-elf-gcc: missing
                  clang: clang version 7.0.1 (tags/RELEASE_701/final)

Installed compiler libs
-----------------------
   arm-none-eabi-newlib: "3.0.0"
    mips-mti-elf-newlib: missing
riscv-none-embed-newlib: missing
xtensa-esp32-elf-newlib: missing
xtensa-lx106-elf-newlib: missing
               avr-libc: missing (missing)

Installed development tools
---------------------------
                  cmake: cmake version 3.13.4
               cppcheck: Cppcheck 1.86
                doxygen: 1.8.15
                 flake8: 3.7.4 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.0) CPython 3.7.2 on Linux
                    git: git version 2.20.1
                   make: GNU Make 4.2.1
                openocd: Open On-Chip Debugger 0.10.0
                 python: Python 3.7.2
                python2: Python 2.7.15
                python3: Python 3.7.2
             coccinelle: missing

Issues/PRs references

Part of #10990 .

@jcarrano jcarrano added the Area: tools Area: Supplementary tools label Feb 11, 2019
@jcarrano jcarrano requested a review from cladmi February 11, 2019 16:00
@jcarrano

Copy link
Copy Markdown
Contributor Author
Results on Windows 10

Operating System Environment
-----------------------------
       Operating System: unknown unknown
                 Kernel: MINGW32_NT-6.2 1.0.19(0.48/3/2) i686 unknown
           System shell: GNU bash, version 3.1.23(1)-release (i686-pc-msys)
           make's SHELL: GNU bash, version 3.1.23(1)-release (i686-pc-msys)

Installed compiler toolchains
-----------------------------
             native gcc: gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
      arm-none-eabi-gcc: arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 8-2018-q4-major) 8.2.1 20181213 (release) [gcc-8-branch revision 267074]
                avr-gcc: missing
       mips-mti-elf-gcc: missing
             msp430-gcc: missing
   riscv-none-embed-gcc: missing
   xtensa-esp32-elf-gcc: missing
   xtensa-lx106-elf-gcc: missing
                  clang: missing

Installed compiler libs
-----------------------
   arm-none-eabi-newlib: "3.0.0"
    mips-mti-elf-newlib: missing
riscv-none-embed-newlib: missing
xtensa-esp32-elf-newlib: missing
xtensa-lx106-elf-newlib: missing
               avr-libc: missing (missing)

Installed development tools
---------------------------
                  cmake: missing
               cppcheck: missing
                doxygen: missing
                 flake8: missing
                    git: git version 2.20.1.windows.1
                   make: GNU Make 3.81
                openocd: missing
                 python: Python 3.7.2
                python2: missing
                python3: Python 3.7.2
             coccinelle: missing

@jcarrano jcarrano force-pushed the print-shell-info branch from f60a658 to c031d50 Compare May 28, 2019 13:58
@jcarrano

Copy link
Copy Markdown
Contributor Author

Squashed and rebased on master.

Some systems use dash as system shell, others use bash. The shell used
by make can also be different, and unrelated to the system shell.
Differences in this variable can cause problems when testing PRs and
reporting bugs.

The default shell is important system information that should be reported.
@stale

stale Bot commented Nov 29, 2019

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale Bot added the State: stale State: The issue / PR has no activity for >185 days label Nov 29, 2019
@smlng

smlng commented Nov 29, 2019

Copy link
Copy Markdown
Member

on (my) macOS:

Operating System Environment
-----------------------------
       Operating System: Mac OS X 10.15.1
                 Kernel: Darwin 19.0.0 x86_64 i386
           System shell: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
           make's SHELL: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)

Installed compiler toolchains
-----------------------------
             native gcc: Apple clang version 11.0.0 (clang-1100.0.33.12)
      arm-none-eabi-gcc: missing
                avr-gcc: avr-gcc (GCC) 9.2.0
       mips-mti-elf-gcc: missing
             msp430-gcc: missing
   riscv-none-embed-gcc: missing
   xtensa-esp32-elf-gcc: missing
   xtensa-lx106-elf-gcc: missing
                  clang: Apple clang version 11.0.0 (clang-1100.0.33.12)

Installed compiler libs
-----------------------
   arm-none-eabi-newlib: missing
    mips-mti-elf-newlib: missing
riscv-none-embed-newlib: missing
xtensa-esp32-elf-newlib: missing
xtensa-lx106-elf-newlib: missing
               avr-libc: "2.0.0" ("20150208")

Installed development tools
---------------------------
                  cmake: cmake version 3.15.5
               cppcheck: Cppcheck 1.89
                doxygen: 1.8.16
                 flake8: 3.7.9 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.7.5 on Darwin
                    git: git version 2.24.0
                   make: GNU Make 4.2.1
                openocd: Open On-Chip Debugger 0.10.0
                 python: Python 2.7.17
                python2: Python 2.7.17
                python3: Python 3.7.5
             coccinelle: spatch version 1.0.6 compiled with OCaml version 4.05.0

@stale stale Bot removed the State: stale State: The issue / PR has no activity for >185 days label Nov 29, 2019
Comment on lines +117 to +118
printf "%23s: %s\n" "System shell" "$(get_sys_shell)"
printf "%23s: %s\n" "make's SHELL" "$(get_make_shell)"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why System shell and make's SHELL (all capitals)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smlng

smlng commented Nov 29, 2019

Copy link
Copy Markdown
Member

apart from the minor typo, this is good to go

@smlng smlng added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Nov 29, 2019
@fjmolinas

Copy link
Copy Markdown
Contributor

@smlng I think we can go with this one, naming makes sense according to make doc.

@smlng

smlng commented Jan 7, 2020

Copy link
Copy Markdown
Member

adopted this into a new PR to fix conflicts, see #13038 - hence closing this one

@smlng smlng closed this Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants