checkblock.cpp invalid name for included datafile #10797

issue ko3ak opened this issue on July 11, 2017
  1. ko3ak commented at 9:55 PM on July 11, 2017: none

    <!--- Remove sections that do not apply -->

    This issue tracker is only for technical issues related to bitcoin-core.

    General bitcoin questions and/or support requests and are best directed to the Bitcoin StackExchange.

    For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.

    Describe the issue

    Can you reliably reproduce the issue? Yes

    If so, please list the steps to reproduce below:

    1. checkblock.cpp line 13 points to incorrect file name "bench/data/block413567.raw.h" data directory contains file "bench/data/block413567.raw" Line 13 should be changed from: 12: namespace block_bench { 13: #include "bench/data/block413567.raw.h" 14: } // namespace block_bench to: 12: namespace block_bench { 13: #include "bench/data/block413567.raw" 14: } // namespace block_bench

    Expected behaviour

    raw block should be included

    Actual behaviour

    unresolved inclusion error

    Screenshots.

    If the issue is related to the GUI, screenshots can be added to this issue via drag & drop.

    What version of bitcoin-core are you using? git clone master 20170711

    List the version number/commit ID, and if it is an official binary, self compiled or a distribution package such as PPA.

    Machine specs:

    • OS: Linux
    • CPU: Intel
    • RAM: 8G
    • Disk size: 1TB
    • Disk Type (HD/SDD): SSD

    Any extra information that might be useful in the debugging process.

    This is normally the contents of a debug.log or config.log file. Raw text or a link to a pastebin type site are preferred.

  2. MarcoFalke commented at 10:25 PM on July 11, 2017: member

    According to https://github.com/bitcoin/bitcoin/blob/b2e178a2d2e387b147f0d87e64fc773d5ec799d0/src/Makefile.bench.include#L68 those files are autogenerated.

    On Tue, Jul 11, 2017 at 11:55 PM, ko3ak notifications@github.com wrote:

    This issue tracker is only for technical issues related to bitcoin-core.

    General bitcoin questions and/or support requests and are best directed to the Bitcoin StackExchange https://bitcoin.stackexchange.com.

    For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. Describe the issue Can you reliably reproduce the issue? Yes If so, please list the steps to reproduce below:

    1. checkblock.cpp line 13 points to incorrect file name "bench/data/block413567.raw.h" data directory contains file "bench/data/block413567.raw" Line 13 should be changed from: 12: namespace block_bench { 13: #include "bench/data/block413567.raw.h" 14: } // namespace block_bench to: 12: namespace block_bench { 13: #include "bench/data/block413567.raw" 14: } // namespace block_bench

    Expected behaviour

    raw block should be included Actual behaviour

    unresolved inclusion error Screenshots.

    If the issue is related to the GUI, screenshots can be added to this issue via drag & drop. What version of bitcoin-core are you using? git clone master 20170711

    List the version number/commit ID, and if it is an official binary, self compiled or a distribution package such as PPA. Machine specs:

    • OS: Linux
    • CPU: Intel
    • RAM: 8G
    • Disk size: 1TB
    • Disk Type (HD/SDD): SSD

    Any extra information that might be useful in the debugging process.

    This is normally the contents of a debug.log or config.log file. Raw text or a link to a pastebin type site are preferred.

    — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bitcoin/bitcoin/issues/10797, or mute the thread https://github.com/notifications/unsubscribe-auth/AGGmv_-rWcyJuFR2LI2yCeP2cZ0ZcIYKks5sM-9MgaJpZM4OU3Zy .

  3. ko3ak commented at 3:28 AM on July 12, 2017: none

    It was not very obvious '*.raw.h" is dynamically generated... When I was browsing bitcoin source code in eclipse I was seeing number of unresolved symbols. It would be better to have both files: block413567.raw block413567.raw.h and regenerate as needed, rather than having unresolved symbols....

  4. ko3ak renamed this:
    checkblock.cpp invalide name for incuded datafile
    checkblock.cpp invalid name for included datafile
    on Jul 12, 2017
  5. laanwj commented at 12:36 PM on July 13, 2017: member

    I've never seen this error before.

    How to reproduce this problem? (e.g. build steps that you enter from the shell, starting from a clean tree)

  6. laanwj added the label Build system on Jul 13, 2017
  7. ko3ak commented at 3:14 PM on July 13, 2017: none
    1. git clone https://github.com/bitcoin/bitcoin.git
    2. cd /home/bitcoin/src/bench [@fedora bench]$ grep raw .[ch] checkblock.cpp:#include "bench/data/block413567.raw.h" // file does not exists Note: browsing the source tree at this stage will produce errors as indexer cannot resolve include file, also, include file should be relative to location of .cpp when "..." is used i.e #include "data/block413567.raw.h" will this strategy of rebuilding include file from raw block work for Big Endian-Systems?
    3. cd /home/bitcoin ./autogen.sh ./configure make note: only after make source code can be browsed without errors related to missing include file
  8. sipa commented at 6:29 PM on July 13, 2017: member

    In general, the git repository does not contain files that get generated during the build process anyway. Doing so means extra overhead in maintaining source and output to remain synchronized, and is confusing to people who want to modify the source.

    Yes, if you want to browse auto-generated files, you'll need to build them.

  9. laanwj commented at 7:26 PM on July 13, 2017: member

    So there is no actual build system bug? Going to close this.

    Yes, if you want to browse auto-generated files, you'll need to build them.

    It's the same for other generated files, for example configure Makefile etc. Checking in auto-generated files is usually a bad idea, as it can result in accidental diff noise if the generation isn't entirely deterministic (e.g. the file includes a date or such). It also makes git's scanning slower as the date metadata of the file will change on every build.

  10. laanwj closed this on Jul 13, 2017

  11. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-01 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me