Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3519 - Build Error: unable to build since CMAKE 3.19.1 push #8555

Closed
openwrt-bot opened this issue Dec 17, 2020 · 3 comments
Closed

FS#3519 - Build Error: unable to build since CMAKE 3.19.1 push #8555

openwrt-bot opened this issue Dec 17, 2020 · 3 comments
Labels

Comments

@openwrt-bot
Copy link

anomeome:

Starting from a //make dirclean// on ubuntu 20.04

make[3]: Entering directory '/home//dev/wrtpac/source/tools/zlib'
(cd /home//dev/wrtpac/source/build_dir/host/zlib-1.2.11; CFLAGS="-O2 -I/home//dev/wrtpac/source/staging_dir/host/include -fPIC" CXXFLAGS="-O2 -I/home//dev/wrtpac/source/staging_dir/host/include -fPIC" LDFLAGS="-L/home//dev/wrtpac/source/staging_dir/host/lib " cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="/home//dev/wrtpac/source/staging_dir/host/bin/ccache" -DCMAKE_C_COMPILER_ARG1="gcc" -DCMAKE_CXX_COMPILER="/home//dev/wrtpac/source/staging_dir/host/bin/ccache" -DCMAKE_CXX_COMPILER_ARG1="g++" -DCMAKE_ASM_COMPILER="/home//dev/wrtpac/source/staging_dir/host/bin/ccache" -DCMAKE_ASM_COMPILER_ARG1="gcc" -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_EXE_LINKER_FLAGS:STRING="-L/home//dev/wrtpac/source/staging_dir/host/lib " -DCMAKE_MODULE_LINKER_FLAGS:STRING="-L/home//dev/wrtpac/source/staging_dir/host/lib " -DCMAKE_SHARED_LINKER_FLAGS:STRING="-L/home//dev/wrtpac/source/staging_dir/host/lib " -DCMAKE_FIND_ROOT_PATH="/home//dev/wrtpac/source/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/host;/home//dev/wrtpac/source/staging_dir/hostpkg;/home//dev/wrtpac/source/staging_dir/host" -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_STRIP=: -DCMAKE_INSTALL_PREFIX=/home//dev/wrtpac/source/staging_dir/host -DCMAKE_PREFIX_PATH=/home//dev/wrtpac/source/staging_dir/host -DCMAKE_SKIP_RPATH=TRUE -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_EXPORT_PACKAGE_REGISTRY=FALSE -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE -DCMAKE_FIND_USE_PACKAGE_REGISTRY=FALSE -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=TRUE -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=FALSE -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=TRUE /home//dev/wrtpac/source/build_dir/host/zlib-1.2.11 )
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- The C compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /home//dev/wrtpac/source/staging_dir/host/bin/ccache
-- Check for working C compiler: /home//dev/wrtpac/source/staging_dir/host/bin/ccache - broken
CMake Error at /home//dev/wrtpac/source/staging_dir/host/share/cmake-3.19/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler

"/home//dev/wrtpac/source/staging_dir/host/bin/ccache"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home//dev/wrtpac/source/build_dir/host/zlib-1.2.11/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_2f8b6/fast && make[4]: Entering directory '/home//dev/wrtpac/source/build_dir/host/zlib-1.2.11/CMakeFiles/CMakeTmp'
/usr/bin/make  -f CMakeFiles/cmTC_2f8b6.dir/build.make CMakeFiles/cmTC_2f8b6.dir/build
make[5]: Entering directory '/home//dev/wrtpac/source/build_dir/host/zlib-1.2.11/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_2f8b6.dir/testCCompiler.c.o
/home//dev/wrtpac/source/staging_dir/host/bin/ccache   -O2 -I/home//dev/wrtpac/source/staging_dir/host/include  -fPIC  -o CMakeFiles/cmTC_2f8b6.dir/testCCompiler.c.o -c /home//dev/wrtpac/source/build_dir/host/zlib-1.2.11/CMakeFiles/CMakeTmp/testCCompiler.c
/home//dev/wrtpac/source/staging_dir/host/bin/ccache: invalid option -- 'O'
Usage:
    ccache [options]
    ccache compiler [compiler options]
    compiler [compiler options]          (via symbolic link)

Common options:
    -c, --cleanup             delete old files and recalculate size counters
                              (normally not needed as this is done
                              automatically)
    -C, --clear               clear the cache completely (except configuration)
    -F, --max-files=N         set maximum number of files in cache to N (use 0
                              for no limit)
    -M, --max-size=SIZE       set maximum size of cache to SIZE (use 0 for no
                              limit); available suffixes: k, M, G, T (decimal)
                              and Ki, Mi, Gi, Ti (binary); default suffix: G
    -p, --show-config         show current configuration options in
                              human-readable format
    -s, --show-stats          show summary of configuration and statistics
                              counters in human-readable format
    -z, --zero-stats          zero statistics counters

    -h, --help                print this help text
    -V, --version             print version and copyright information

Options for scripting or debugging:
        --dump-manifest=PATH  dump manifest file at PATH in text format
    -k, --get-config=K        print the value of configuration key K
        --hash-file=PATH      print the hash (<MD4>-<size>) of the file at PATH
        --print-stats         print statistics counter IDs and corresponding
                              values in machine-parsable format
    -o, --set-config=K=V      set configuration item K to value V

See also <https://ccache.dev>.
make[5]: *** [CMakeFiles/cmTC_2f8b6.dir/build.make:85: CMakeFiles/cmTC_2f8b6.dir/testCCompiler.c.o] Error 1
make[5]: Leaving directory '/home//dev/wrtpac/source/build_dir/host/zlib-1.2.11/CMakeFiles/CMakeTmp'
make[4]: *** [Makefile:140: cmTC_2f8b6/fast] Error 2
make[4]: Leaving directory '/home//dev/wrtpac/source/build_dir/host/zlib-1.2.11/CMakeFiles/CMakeTmp'

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:4 (project)

-- Configuring incomplete, errors occurred!
See also "/home//dev/wrtpac/source/build_dir/host/zlib-1.2.11/CMakeFiles/CMakeOutput.log".
See also "/home//dev/wrtpac/source/build_dir/host/zlib-1.2.11/CMakeFiles/CMakeError.log".
make[3]: *** [Makefile:42: /home//dev/wrtpac/source/build_dir/host/zlib-1.2.11/.configured] Error 1
make[3]: Leaving directory '/home//dev/wrtpac/source/tools/zlib'
time: tools/zlib/compile#0.22#0.25#0.47
ERROR: tools/zlib failed to build.
make[2]: *** [tools/Makefile:158: tools/zlib/compile] Error 1
make[2]: Leaving directory '/home//dev/wrtpac/source'
make[1]: *** [tools/Makefile:154: /home//dev/wrtpac/source/staging_dir/host/stamp/.tools_compile_yyynyynnyyyynyyyyyynyynnyyyynyyyyyyyyyyyyyyynynynnyyyyyyy] Error 2
make[1]: Leaving directory '/home//dev/wrtpac/source'
make: *** [/home//dev/wrtpac/source/include/toplevel.mk:242: world] Error 2

@openwrt-bot
Copy link
Author

ynezz:

As a workaround, try to disable ccache.

@openwrt-bot
Copy link
Author

anomeome:

Until resolution

  • disable ccache
    * make tools/zlib/complie
  • enable ccache

or maybe not so much, thanks.

@openwrt-bot
Copy link
Author

hnyman:

Possibly an old version of ccache may be a partial reason.

ccache has last been updated to version 3.7.11 in August 2020 by me.

There is now already version 4.1 of ccache available.
That might possibly help with zlib.

Release notes of ccache 4.0 an 4.1 contain some cmake references.
https://ccache.dev/releasenotes.html#_ccache_4_1

hauke pushed a commit to kixorz/openwrt that referenced this issue Dec 6, 2022
Updating CMake to latest patched version 3.19.8 which is fixing issue with ccache.

Related issue: openwrt#8555

Compile-tested: arm64

Signed-off-by: Adam Konrad <git@adamkonrad.com>
ohabu pushed a commit to ohabu/openwrt that referenced this issue May 12, 2023
Updating CMake to latest patched version 3.19.8 which is fixing issue with ccache.

Related issue: openwrt/openwrt#8555

Compile-tested: arm64

Signed-off-by: Adam Konrad <git@adamkonrad.com>
sergoops pushed a commit to sergoops/openwrt_tl_wr840n_v6.x that referenced this issue Nov 18, 2023
Updating CMake to latest patched version 3.19.8 which is fixing issue with ccache.

Related issue: openwrt/openwrt#8555

Compile-tested: arm64

Signed-off-by: Adam Konrad <git@adamkonrad.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant