0

I am getting a bash|1 warning| Inappropriate ioctl for device when Ale runs lint on cpp files with gcc/g++. Using gcc/g++ to compile manually in the terminal works fine. Otherwise the linting of cpp files works as expected, but this is reported in all files (even when there is not any other errors reported). Other linters I use with Ale works without throwing this error (tsserver, eslint, tslint, stylelint).

Running :checkhealth

...
## Node.js provider (optional)
  - INFO: Node.js: bash: cannot set terminal process group (-1): Inappropriate ioctl for devicebash: no job control in this shellv14.15.0
  - WARNING: Neovim node.js host does not support bash: cannot set terminal process group (-1): Inappropriate ioctl for devicebash: no job control in this shellv14.15.0

points to this being an issue with my nvim/gcc/g++ not being able to call ioctl in my shell or something.

This answer hints at this being an issue of reading from a redirected STDIN.

I am using Ubuntu 19.04, GNOME Shell 3.32.2, and nvim v0.3.4. (Also tried nvim v0.4.4 and vim 8.1.320 but with the same result)

I do not know where to continue my search for a solution to this. There are multiple questions and answers related to 'inappropriate ioctl for device' for a wide range of different tools but it is so general that it is hard to understand what a solution for my case would be.

Edit: Here is the result of my :ALEInfo in an example file which throws one error in an include

ALEInfo
 Current Filetype: cpp
Available Linters: ['cc', 'ccls', 'clangcheck', 'clangd', 'clangtidy', 'clazy', 'cppcheck', 'cpplint', 'cquery', 'flawfinder']
   Linter Aliases:
'cc' -> ['gcc', 'clang', 'g++', 'clang++']
  Enabled Linters: ['cc']
  Ignored Linters: []
 Suggested Fixers:
  'astyle' - Fix C/C++ with astyle.
  'clang-format' - Fix C/C++ and cuda files with clang-format.
  'clangtidy' - Fix C/C++ and ObjectiveC files with clang-tidy.
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
  'uncrustify' - Fix C, C++, C#, ObjectiveC, ObjectiveC++, D, Java, Pawn, and VALA files with uncrustify.
 Linter Variables:

let g:ale_cpp_cc_executable = '<auto>'
let g:ale_cpp_cc_options = '-std=c++14 -Wall'
 Global Variables:

let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = 100
let g:ale_completion_enabled = 1
let g:ale_completion_max_suggestions = 50
let g:ale_disable_lsp = 0
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 1
let g:ale_fixers = {'typescript': [], 'scss': ['stylelint'], 'javascript': ['eslint']}
let g:ale_history_enabled = 1
let g:ale_fixers = {'typescript': [], 'scss': ['stylelint'], 'javascript': ['eslint']}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 50
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_linter_aliases = {}
let g:ale_linters = {'typescript': ['tsserver'], 'scss': ['stylelint'], 'javascript': ['tsserver', 'eslint'], 'cpp': ['g++']}
let g:ale_linters_explicit = 0
let g:ale_linters_ignore = {}
let g:ale_list_vertical = 0
let g:ale_list_window_size = 5
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = v:null
let g:ale_open_list = 1
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_root = {}
let g:ale_set_balloons = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_info = '--'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '>>'
let g:ale_sign_style_warning = '--'
let g:ale_sign_warning = '--'
let g:ale_sign_highlight_linenrs = 0
let g:ale_statusline_format = v:null
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 0
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
  Command History:
(executable check - failure) clang++
(executable check - success) gcc
(finished - exit code 1) ['/bin/bash', '-ic', '''gcc'' -S -x c++ -o /dev/null -iquote ''/home/tiseno/Downloads/OpenGL_Start/OpenGL_Start/source'' -std=c++14 -Wall - < ''/tmp/nvimWuowuM/2/Main.cpp''']
<<<OUTPUT STARTS>>>
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
<stdin>:2:10: fatal error: GLFW/glfw3.h: No such file or directory
compilation terminated.
<<<OUTPUT ENDS>>>

Edit2: When trying out vim-eslint I got the same error again:

:!make  2>&1| tee /tmp/nvimTiLvv7/1                                                                                                                                                                      
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
make: *** No targets specified and no makefile found.  Stop.

(1 of 1): make: *** No targets specified and no makefile found.  Stop.

Other plugins that work with the shell work as expected, Neomake for example.

2
  • Welcome to Vi and Vim! This might be worth reporting to the devs, along with your bash version? (The no job control in this shell sounds like an issue with job-control disabled, not sure how that happened.)
    – D. Ben Knoble
    Mar 28 '21 at 19:05
  • I found an answer to that error that suggested set -m to enable job control, however, job control already seems to be enabled for my shell (tested with fg and bg) but apparently not for my vim/linter.
    – Tiseno
    Mar 29 '21 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.