Comments (7)
Wow thanks for the extremely detailed bug report! Also rr is the coolest!
I don't have my Linux computer handy at the moment so I can't reproduce, but from the panic and trace: I think this is crashing when generating an error message, and the error message is saying that a given output file is already being built by something else. Looking at your Ninja log there's similarly a warning about possibly the same issue. Maybe there's something in the build files you could diagnose here? (I will endeavor to fix the panic as well, of course)
from n2.
Possibly: one of these files like preload_interface.h
is listed as an output of a single build rule multiple times.
from n2.
I tried commenting enough out of CMakeLists.txt to get it to generate something on this Mac, but I could not reproduce this problem. Could you paste your build.ninja file somewhere?
from n2.
This was closed by that PR but I am still interested in the answers to the above questions!
from n2.
Thanks a lot for reviewing so swiftly. I installed the most recent version of n2 and it now gives a similar warning to ninja, however it still fails to build (with a new error this time).
I can create a new issue with the new error, if you want
install most recent n2 (sadly n2 doesn't have a version cli flag to print this easily)
~/Coding/rr $ n2 --version
n2: error: Unrecognized option: 'version'
in the rr directory (checked out at the same commit), clean the build dir and tell cmake to generate build.ninja again.
rm -rf build && mkdir build && cd build && cmake -G Ninja ../ && cd ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- 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
-- Detecting C compile features
-- Detecting C compile features - 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
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test SUPPORTS_CXX14
-- Performing Test SUPPORTS_CXX14 - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'capnp'
-- Found capnp, version 0.6.1
-- Checking for module 'zlib'
-- Found zlib, version 1.2.11
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.12", minimum required is "3")
You have called ADD_LIBRARY for library rrpage without any source files. This typically indicates a problem with your CMakeLists.txt file
You have called ADD_LIBRARY for library rrpreload without any source files. This typically indicates a problem with your CMakeLists.txt file
You have called ADD_LIBRARY for library rraudit without any source files. This typically indicates a problem with your CMakeLists.txt file
You have called ADD_LIBRARY for library rrpage_32 without any source files. This typically indicates a problem with your CMakeLists.txt file
You have called ADD_LIBRARY for library rrpreload_32 without any source files. This typically indicates a problem with your CMakeLists.txt file
You have called ADD_LIBRARY for library rraudit_32 without any source files. This typically indicates a problem with your CMakeLists.txt file
-- Configuring done
-- Generating done
-- Build files have been written to: /home/petr_tik/Coding/rr/build
Fail to build with n2 but this time with warnings and a new error
~/Coding/rr $ RUST_BACKTRACE=full n2 -v -C build/
n2: warn: build.ninja:44074: "../src/preload/preload_interface.h" is repeated in output list
n2: warn: build.ninja:44074: "../src/preload/raw_syscall.S" is repeated in output list
n2: warn: build.ninja:44074: "../src/preload/rrcalls.h" is repeated in output list
thread 'main' panicked at 'expected no file state for ../src/preload/preload_interface.h', src/work.rs:575:17
stack backtrace:
0: 0x561288ee083a - std::backtrace_rs::backtrace::libunwind::trace::h91c465e73bf6c785
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x561288ee083a - std::backtrace_rs::backtrace::trace_unsynchronized::hae9da36f5d58b5f3
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x561288ee083a - std::sys_common::backtrace::_print_fmt::h7f499fa126a7effb
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:67:5
3: 0x561288ee083a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3e2b509ce2ce6007
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:46:22
4: 0x561288e8101c - core::fmt::write::h753c7571fa063ecb
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/fmt/mod.rs:1168:17
5: 0x561288eb6eef - std::io::Write::write_fmt::h2815c0519c99ba09
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/io/mod.rs:1660:15
6: 0x561288ee18d2 - std::sys_common::backtrace::_print::h64941a6fc8b0ed9b
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:49:5
7: 0x561288ee18d2 - std::sys_common::backtrace::print::hcf25e43e1a9b0766
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:36:9
8: 0x561288ee18d2 - std::panicking::default_hook::{{closure}}::h78d3e6cf97fc623d
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:211:50
9: 0x561288ee26be - std::panicking::default_hook::hda898f8d3ad1a5ae
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:228:9
10: 0x561288ee26be - std::panicking::rust_panic_with_hook::h1a5ea2d6c23051aa
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:606:17
11: 0x561288ee21a8 - std::panicking::begin_panic_handler::{{closure}}::h07f549390938b73f
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:502:13
12: 0x561288ee2126 - std::sys_common::backtrace::__rust_end_short_backtrace::h5ec3758a92cfb00d
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:139:18
13: 0x561288ee20e2 - rust_begin_unwind
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5
14: 0x561288e79380 - core::panicking::panic_fmt::h3a79a6a99affe1d5
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14
15: 0x561288e9b606 - n2::work::Work::check_build_files_missing::hf6446c2d294e5e8f
16: 0x561288e9b606 - n2::work::Work::check_build_dirty::he52af68592e746be
at /home/petr_tik/.cargo/git/checkouts/n2-e6f499fa596a8a82/df0a27b/src/work.rs:590:28
17: 0x561288e9b606 - n2::work::Work::run_without_cleanup::h19d1906faad45644
at /home/petr_tik/.cargo/git/checkouts/n2-e6f499fa596a8a82/df0a27b/src/work.rs:671:21
18: 0x561288e953d5 - n2::work::Work::run::h249428d76b2080e1
at /home/petr_tik/.cargo/git/checkouts/n2-e6f499fa596a8a82/df0a27b/src/work.rs:741:22
19: 0x561288e953d5 - n2::run::build::{{closure}}::h2daab0ddc1bd4e0c
at /home/petr_tik/.cargo/git/checkouts/n2-e6f499fa596a8a82/df0a27b/src/run.rs:49:47
20: 0x561288e953d5 - n2::trace::scope::h2bf8a771a111bd3b
at /home/petr_tik/.cargo/git/checkouts/n2-e6f499fa596a8a82/df0a27b/src/trace.rs:116:21
21: 0x561288e953d5 - n2::run::build::h6dc9ded841a12ecc
at /home/petr_tik/.cargo/git/checkouts/n2-e6f499fa596a8a82/df0a27b/src/run.rs:49:19
22: 0x561288e91d71 - n2::run::run_impl::h0bb597f9f5680885
at /home/petr_tik/.cargo/git/checkouts/n2-e6f499fa596a8a82/df0a27b/src/run.rs:209:22
23: 0x561288e7e3d0 - n2::run::run::hd21211266b0e6a0b
at /home/petr_tik/.cargo/git/checkouts/n2-e6f499fa596a8a82/df0a27b/src/run.rs:234:15
24: 0x561288e7e3d0 - n2::main::h4c022cd59e4f0615
at /home/petr_tik/.cargo/git/checkouts/n2-e6f499fa596a8a82/df0a27b/src/main.rs:4:27
25: 0x561288e7e6f3 - core::ops::function::FnOnce::call_once::h25e67c454c9b4a24
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/ops/function.rs:227:5
26: 0x561288e7e6f3 - std::sys_common::backtrace::__rust_begin_short_backtrace::he1b68df33ad7ec41
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:123:18
27: 0x561288e7ead9 - main
28: 0x7f30d8b8cc87 - __libc_start_main
at /build/glibc-uZu3wS/glibc-2.27/csu/../csu/libc-start.c:310
29: 0x561288e7e2da - _start
30: 0x0 - <unknown>
Start the build with ninja with same warnings!
~/Coding/rr $ ninja -C build/
ninja: Entering directory `build/'
ninja: warning: multiple rules generate ../src/preload/preload_interface.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate ../src/preload/raw_syscall.S. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate ../src/preload/rrcalls.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
[1/2405] Linking C executable bin/shared_map_32
[2/2405] Linking C executable bin/strict_priorities_32
[3/2405] Linking C executable bin/segfault_32
ninja: build stopped: interrupted by user.
from n2.
I tried commenting enough out of CMakeLists.txt to get it to generate something on this Mac, but I could not reproduce this problem. Could you paste your build.ninja file somewhere?
Is there anything I can do to minimise this and then open a PR with the failing minimal test case?
from n2.
I think my test case reproduced the problem. I was more curious why CMake generated files like this.
from n2.
Related Issues (20)
- proper `console` pool support
- better control over subcommand output HOT 2
- `e2e::validations::build_starts_before_validation_finishes` fails every so often HOT 2
- Tag a release (candidate)? HOT 1
- Difficulties with git-lfs HOT 4
- Give priority to slow actions HOT 2
- 10% of parse time is tracking line numbers HOT 4
- Add multithreaded parsing HOT 5
- mmap input files rather than reading HOT 5
- dry-run mode
- mutable reference to mutable static detected bu rustc HOT 1
- Segmentfault when building fastfetch HOT 5
- Shell-escape $in, $in_newline, $out, and $out_newline
- Native support for remote-execution / caching HOT 3
- Variable expansion missing global reference
- Difference in behavior with ninja when not specifying a target
- Inconsistent handling of newline escapes HOT 2
- Variable references in build inputs don't take into account the build's bindings HOT 5
- Oversized WriteBuf panic HOT 3
- Validation mode HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from n2.