Issue 979 in include-what-you-use: "make: make: Permission denied" with iwyu 0.17 release

109 views
Skip to first unread message

notifi...@include-what-you-use.org

unread,
Dec 6, 2021, 10:29:34 AM12/6/21
to include-wh...@googlegroups.com
New issue 979 by jetm: "make: make: Permission denied" with iwyu 0.17 release
https://github.com/include-what-you-use/include-what-you-use/issues/979

Unable to build 0.17 release, getting this error:
```
make: make: Permission denied
make: *** [Makefile:146: all] Error 127
```

Steps to reproduce:
```
$ wget https://github.com/include-what-you-use/include-what-you-use/archive/refs/tags/0.17.tar.gz
$ cd include-what-you-use-0.17/
$ mkdir build
$ cd build
$ cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=/usr/lib ../
-- IWYU: out-of-tree configuration
-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.11")
-- Found LibXml2: /usr/lib/libxml2.so (found version "2.9.12")
-- Linker detection: GNU ld
-- Performing Test C_SUPPORTS_FPIC
-- Performing Test C_SUPPORTS_FPIC - Success
-- Performing Test CXX_SUPPORTS_FPIC
-- Performing Test CXX_SUPPORTS_FPIC - Success
-- Building with -fPIC
-- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
-- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Success
-- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
-- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Success
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Failed
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Failed
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Success
-- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
-- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
-- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
-- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed
-- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG
-- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG - Success
-- Performing Test CXX_SUPPORTS_REDUNDANT_MOVE_FLAG
-- Performing Test CXX_SUPPORTS_REDUNDANT_MOVE_FLAG - Success
-- Performing Test CXX_SUPPORTS_PESSIMIZING_MOVE_FLAG
-- Performing Test CXX_SUPPORTS_PESSIMIZING_MOVE_FLAG - Success
-- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG
-- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG - Success
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Failed
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG
-- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG - Success
-- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL
-- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL - Success
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Failed
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Failed
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Failed
-- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG
-- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
-- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG
-- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
-- Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS
-- Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS - Success
-- Performing Test C_SUPPORTS_FFUNCTION_SECTIONS
-- Performing Test C_SUPPORTS_FFUNCTION_SECTIONS - Success
-- Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS
-- Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS - Success
-- Performing Test C_SUPPORTS_FDATA_SECTIONS
-- Performing Test C_SUPPORTS_FDATA_SECTIONS - Success
-- Performing Test CXX_SUPPORTS_FDATA_SECTIONS
-- Performing Test CXX_SUPPORTS_FDATA_SECTIONS - Success
-- Looking for os_signpost_interval_begin
-- Looking for os_signpost_interval_begin - not found
-- IWYU: configuring for LLVM 13.0.0...
-- Found Git: /usr/bin/git (found version "2.34.0")
-- Warning: IWYU Git version info not found, DO NOT release from this build tree!
-- Found PythonInterp: /usr/bin/python (found version "3.9.7")
-- Configuring done
-- Generating done

$ make
make: make: Permission denied
make: *** [Makefile:146: all] Error 127
```

OS: Arch Linux


notifi...@include-what-you-use.org

unread,
Dec 6, 2021, 12:53:55 PM12/6/21
to include-wh...@googlegroups.com
Comment #1 on issue 979 by kimgr: "make: make: Permission denied" with iwyu 0.17 release
https://github.com/include-what-you-use/include-what-you-use/issues/979

I'm missing a `tar -xf` after the `wget`, but with that in place, it builds on my Ubuntu system.

Does Arch have its own packaging of LLVM? Which packages do you have installed?

The first thing the build does on my system is to copy the clang headers from `${LLVM_LIBRARY_DIR}/clang/${llvm_ver}/include`, so it could be that the headers are missing on your system.


notifi...@include-what-you-use.org

unread,
Dec 6, 2021, 12:55:35 PM12/6/21
to include-wh...@googlegroups.com
Comment #2 on issue 979 by kimgr: "make: make: Permission denied" with iwyu 0.17 release
https://github.com/include-what-you-use/include-what-you-use/issues/979

Also, it might be a good idea to use `-DCMAKE_PREFIX_PATH=/usr/lib/llvm-13` to be more specific with LLVM version, but I don't know what the library layout looks like on Arch, so maybe that's not workable there.


notifi...@include-what-you-use.org

unread,
Dec 6, 2021, 1:41:18 PM12/6/21
to include-wh...@googlegroups.com
Comment #3 on issue 979 by jetm: "make: make: Permission denied" with iwyu 0.17 release
https://github.com/include-what-you-use/include-what-you-use/issues/979

I put some `MESSAGE` in the CMake for debugging purposes:
```
-- LLVM_LIBRARY_DIR /usr/lib
-- CLANG_INCLUDE_DIRS /usr/include
-- clang_headers_src /usr/lib/clang/13.0.0/include
```
In `/usr/lib/` are all the `/usr/lib/libLLVM*` and `/usr/lib/clang/13.0.0/include` are all the Clang include files.



notifi...@include-what-you-use.org

unread,
Dec 6, 2021, 1:55:46 PM12/6/21
to include-wh...@googlegroups.com
Comment #4 on issue 979 by kimgr: "make: make: Permission denied" with iwyu 0.17 release
https://github.com/include-what-you-use/include-what-you-use/issues/979

I wonder if `make -d` gives any additional information?


notifi...@include-what-you-use.org

unread,
Dec 6, 2021, 2:43:11 PM12/6/21
to include-wh...@googlegroups.com
Comment #5 on issue 979 by jetm: "make: make: Permission denied" with iwyu 0.17 release
https://github.com/include-what-you-use/include-what-you-use/issues/979

`make -d` not much:
```
❯ make -d
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile 'Makefile'...
Updating makefiles....
Considering target file 'Makefile'.
Looking for an implicit rule for 'Makefile'.
No implicit rule found for 'Makefile'.
Finished prerequisites of target file 'Makefile'.
No need to remake target 'Makefile'.
Updating goal targets....
Considering target file 'default_target'.
File 'default_target' does not exist.
Considering target file 'all'.
File 'all' does not exist.
Finished prerequisites of target file 'all'.
Must remake target 'all'.
Putting child 0x55cee1c56230 (all) PID 307388 on the chain.
Live child 0x55cee1c56230 (all) PID 307388
Reaping winning child 0x55cee1c56230 PID 307388

notifi...@include-what-you-use.org

unread,
Dec 6, 2021, 2:45:30 PM12/6/21
to include-wh...@googlegroups.com
Comment #5 on issue 979 by jetm: "make: make: Permission denied" with iwyu 0.17 release
https://github.com/include-what-you-use/include-what-you-use/issues/979

Found a workaround. If I change the CMake generator to Ninja with `cmake -G Ninja`, it builds without issue. Maybe, it's a CMake bug.
```
$ cmake --version
cmake version 3.21.4
```


notifi...@include-what-you-use.org

unread,
Dec 6, 2021, 2:48:44 PM12/6/21
to include-wh...@googlegroups.com
Comment #7 on issue 979 by jetm: "make: make: Permission denied" with iwyu 0.17 release
https://github.com/include-what-you-use/include-what-you-use/issues/979

Closing this issue, as there is no clear indication it's an IWYU issue. Thanks!


notifi...@include-what-you-use.org

unread,
Dec 6, 2021, 7:03:45 PM12/6/21
to include-wh...@googlegroups.com
Comment #7 on issue 979 by Bu11etmagnet: "make: make: Permission denied" with iwyu 0.17 release
https://github.com/include-what-you-use/include-what-you-use/issues/979

> Unable to build 0.17 release, getting this error:
>
> ```
> make: make: Permission denied
> make: *** [Makefile:146: all] Error 127
> ```

It would be interesting to run `make` under `strace -f`, to try to figure out what operation got "Access denied".




Reply all
Reply to author
Forward
0 new messages