Skip to content

make fails after afc9a17d359b #241

@oyvholm

Description

@oyvholm

Update: Commit 4f98864 ("Include GNUInstallDirs in src/CMakeLists.txt") in pull request #240 fixes the problem.

make fails in Debian GNU/Linux 8.9 after commit afc9a17 ("Don't use CMAKE_INSTALL_LIBDIR to create libcmark.pc.", 2017-10-10):

$ make mkdir -p build; \ cd build; \ cmake .. \	-G "Unix Makefiles" \	-DCMAKE_BUILD_TYPE= \	-DCMAKE_INSTALL_PREFIX=/usr/local \	-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -- The C compiler identification is GNU 4.9.2 -- The CXX compiler identification is GNU 4.9.2 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Performing Test HAVE_FLAG_ADDRESS_SANITIZER -- Performing Test HAVE_FLAG_ADDRESS_SANITIZER - Failed -- Performing Test HAVE_FLAG_SANITIZE_ADDRESS -- Performing Test HAVE_FLAG_SANITIZE_ADDRESS - Success -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success -- Looking for stdbool.h -- Looking for stdbool.h - found -- Performing Test HAVE___BUILTIN_EXPECT -- Performing Test HAVE___BUILTIN_EXPECT - Success -- Performing Test HAVE___ATTRIBUTE__ -- Performing Test HAVE___ATTRIBUTE__ - Success -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.4.2", minimum required is "3") -- Configuring done CMake Error: install(EXPORT "cmark") given absolute DESTINATION "/cmake" but the export references an installation of target "cmark" which has relative DESTINATION "bin". CMake Error: install(EXPORT "cmark") given absolute DESTINATION "/cmake" but the export references an installation of target "libcmark" which has relative DESTINATION "lib". CMake Error: install(EXPORT "cmark") given absolute DESTINATION "/cmake" but the export references an installation of target "libcmark_static" which has relative DESTINATION "lib". -- Generating done -- Build files have been written to: /home/sunny/src/git/src-other/textproc/cmark/cmark/build Makefile:37: recipe for target 'build' failed make: *** [build] Error 1 $ 

After running a second make, it compiles and all tests pass.

$ lsb_release -d Description: Debian GNU/Linux 8.9 (jessie) $ make --version GNU Make 4.0 Built for x86_64-pc-linux-gnu $ cmake --version cmake version 3.0.2 $ gcc --version gcc (Debian 4.9.2-10) 4.9.2 

This is the contents of build/CMakeFiles/CMakeError.log:

Performing C SOURCE FILE Test HAVE_FLAG_ADDRESS_SANITIZER failed with the following output: Change Dir: /home/sunny/src/git/src-other/textproc/cmark/cmark/build/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTryCompileExec1410115269/fast" make[1]: Entering directory '/home/sunny/src/git/src-other/textproc/cmark/cmark/build/CMakeFiles/CMakeTmp' /usr/bin/make -f CMakeFiles/cmTryCompileExec1410115269.dir/build.make CMakeFiles/cmTryCompileExec1410115269.dir/build make[2]: Entering directory '/home/sunny/src/git/src-other/textproc/cmark/cmark/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /home/sunny/src/git/src-other/textproc/cmark/cmark/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec1410115269.dir/src.c.o /usr/bin/cc -DHAVE_FLAG_ADDRESS_SANITIZER -Werror -faddress-sanitizer -faddress-sanitizer -o CMakeFiles/cmTryCompileExec1410115269.dir/src.c.o -c /home/sunny/src/git/src-other/textproc/cmark/cmark/build/CMakeFiles/CMakeTmp/src.c cc: error: unrecognized command line option '-faddress-sanitizer' cc: error: unrecognized command line option '-faddress-sanitizer' CMakeFiles/cmTryCompileExec1410115269.dir/build.make:57: recipe for target 'CMakeFiles/cmTryCompileExec1410115269.dir/src.c.o' failed make[2]: *** [CMakeFiles/cmTryCompileExec1410115269.dir/src.c.o] Error 1 make[2]: Leaving directory '/home/sunny/src/git/src-other/textproc/cmark/cmark/build/CMakeFiles/CMakeTmp' Makefile:118: recipe for target 'cmTryCompileExec1410115269/fast' failed make[1]: *** [cmTryCompileExec1410115269/fast] Error 2 make[1]: Leaving directory '/home/sunny/src/git/src-other/textproc/cmark/cmark/build/CMakeFiles/CMakeTmp' Source file was: int main(void) { return 0; } 

The errors in build/CMakeFiles/CMakeError.log also appear in v0.28.0, so they're probably not the reason for this make problem.

Everything is golden on Linux Mint 18, make works and all tests pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions