Bug 12546

Summary: Ninja 1.10 build Error
Product: buildroot Reporter: damian.tometzki
Component: OtherAssignee: yegorslists
Status: RESOLVED FIXED    
Severity: major CC: buildroot
Priority: P5    
Version: unspecified   
Target Milestone: 2020.02   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description damian.tometzki 2020-02-05 19:09:09 UTC
Hello,

i got with the actual buildroot git master the following error in step  building ninja 1.10:

Make Error at CMakeLists.txt:124 (target_link_libraries):
  Target "libninja-re2c" of type OBJECT_LIBRARY may not be linked into
  another target.  One may link only to INTERFACE, STATIC or SHARED
  libraries, or to executables with the ENABLE_EXPORTS property set.


CMake Error at CMakeLists.txt:124 (target_link_libraries):
  Target "libninja" of type OBJECT_LIBRARY may not be linked into another
  target.  One may link only to INTERFACE, STATIC or SHARED libraries, or to
  executables with the ENABLE_EXPORTS property set.


CMake Error at CMakeLists.txt:124 (target_link_libraries):
  Target "libninja-re2c" of type OBJECT_LIBRARY may not be linked into
  another target.  One may link only to INTERFACE, STATIC or SHARED
  libraries, or to executables with the ENABLE_EXPORTS property set.

Best regards
Damian
Comment 1 yegorslists 2020-02-05 21:36:03 UTC
There is already a patch in the mailing list [1]. Could you please test it and report your results to the mailing list? Thanks.

[1] http://lists.busybox.net/pipermail/buildroot/2020-February/273355.html 

Yegor
Comment 2 damian.tometzki 2020-02-06 08:46:24 UTC
Hello,

it works now but with some warnings:

-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:36 (message):
  re2c was not found; changes to src/*.in.cc will not affect your build.


-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_DOC
    BUILD_DOCS
    BUILD_EXAMPLE
    BUILD_EXAMPLES
    BUILD_TEST
    BUILD_TESTING
    BUILD_TESTS
    CMAKE_ASM_COMPILER
    CMAKE_FIND_ROOT_PATH_MODE_LIBRARY


-- Build files have been written to: /data/kernel/buildroot/output/build/host-ninja-1.10.0
>>> host-ninja 1.10.0 Building
PATH="/data/kernel/buildroot/output/host/bin:/data/kernel/buildroot/output/host/sbin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/damian/.local/bin:/home/damian/bin" PKG_CONFIG="/data/kernel/buildroot/output/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/data/kernel/buildroot/output/host/lib/pkgconfig:/data/kernel/buildroot/output/host/share/pkgconfig"  /usr/bin/make -j3  -C /data/kernel/buildroot/output/build/host-ninja-1.10.0/
Scanning dependencies of target libninja-re2c
Scanning dependencies of target libninja
[  3%] Built target libninja-re2c
[ 42%] Built target libninja
Scanning dependencies of target hash_collision_bench
Scanning dependencies of target depfile_parser_perftest
Scanning dependencies of target clparser_perftest
[ 45%] Built target hash_collision_bench
[ 49%] Built target clparser_perftest
[ 52%] Built target depfile_parser_perftest
Scanning dependencies of target ninja
Scanning dependencies of target manifest_parser_perftest
Scanning dependencies of target build_log_perftest
[ 59%] Built target manifest_parser_perftest
[ 59%] Built target ninja
[ 63%] Built target build_log_perftest
Scanning dependencies of target ninja_test
Scanning dependencies of target canon_perftest
[ 66%] Built target canon_perftest
[100%] Built target ninja_test
Comment 3 yegorslists 2020-02-06 09:02:51 UTC
Hallo Damian,

thanks for testing. Could you add your Tested-By tag to my patch e-mail? See [1] for more information.

The warning are OK. re2c is an optional dependency and "Manually-specified variables" are common BR settings. If they cannot be applied, they are just ignored.

[1] http://nightly.buildroot.org/manual.html#_reviewing_and_testing_patches
Comment 4 damian.tometzki 2020-02-06 10:31:15 UTC
(In reply to yegorslists from comment #1)
Tested-by: Damian Tometzki <dti@familie-tometzki.de>