< dhruvm> I have been trying to set up a C++ scratchpad to try things while being able to interface with the bitcoin code. I put my code in `src/scratch.cpp` and I try to compile it with `g++ -std=c++11 -O1 -fsanitize=undefined src/scratch.cpp -o scratch` (in this case I am trying to reproduce a sanitizer bug). I'm met with a wall of errors that look like
< dhruvm> this:
< dhruvm> ---
< dhruvm> In file included from scratch.cpp:3:
< dhruvm> ./netaddress.h:12:10: error: 'attributes.h' file not found with <angled> include; use "quotes" instead
< dhruvm> #include <attributes.h>
< dhruvm> ^~~~~~~~~~~~~~
< dhruvm> "attributes.h"
< dhruvm> ---
< dhruvm> Sample `src/scratch.cpp`:
< dhruvm> ```
< dhruvm> #include <iostream>
< dhruvm> #include "prevector.h"
< dhruvm> #include "netaddress.h"
< dhruvm> #include <arpa/inet.h>
< dhruvm> int main() {
< dhruvm> in_addr_t a = inet_addr("127.0.0.1");
< dhruvm> CNetAddr addr{in_addr{a}};
< gwillen> drbrule: all the bitcoin code is compiled with various compiler flags that are set in the Makefile, so it will be tricky to compile a single scratch file on its own like that
< gwillen> one thing you could do is to run `make` with V=1 (I think that's the magic?) and see what command it runs to compile some other file under 'src', and copy the flags
< gwillen> another option since you're just playing around would be to just toss stuff at the bottom of some other file
< gwillen> (the best option if you actually wanted to add a file for real would be to go add it to the build stuff, but that can get kind of hairy)
< gwillen> if you want to experiment with code you can actually run (rather than merely compile), you'll need linking too, and I would suggest you just find one of the files that implement RPCs (e.g. rpc/rawtransaction.cpp) and add a new RPC there that you can call
< dhruvm> when i try `make -n` i do see the g++ commands with all the flags but those don't seem to address the errors.
< dhruvm> i see -- so try and use the existing tooling rather than add a scratch pad. i'll try that. thank you gwillen.
< sipa> in particular you need -Isrc here
< dhruvm> As in `g++ -std=c++11 -O1 -lsrc -fsanitize=undefined src/scratch.cpp -o scratch`?
< sipa> not l, I
< sipa> capital i
< sipa> but i'd be surprised if that's all you need
< dhruvm> It moved me forward :)
< dhruvm> The quotes problem went away - i'll try further with the remaining flags from `make -n`
< dhruvm> If i am reading it correctly, i need to figure out linking next because I'm getting back: "Undefined symbols for architecture x86_64:"
< dhruvm> Also: `clang: error: linker command failed with exit code 1 (use -v to see invocation)`
< dhruvm> Anyway, thanks sipa! I'll be back with more after trying a bit.
< instagibbs> #14687 seems ready for merge
< gribble> https://github.com/bitcoin/bitcoin/issues/14687 | zmq: enable tcp keepalive by mruddy · Pull Request #14687 · bitcoin/bitcoin · GitHub
< instagibbs> 3 tACKs, people running it as custom patch apparently, nothing controversial
< kallewoof> Apple responded to my bug report regarding ftruncate on macos: https://openradar.appspot.com/radar?id=4930713610616832
< kallewoof> "Works as currently designed"
< kallewoof> Apparently they intend to implement posix_fallocate() at some point tho, apparently.
< luke-jr> kallewoof: interesting
< bitcoin-git> [bitcoin] jonasschnelli pushed 2 commits to master: https://github.com/bitcoin/bitcoin/compare/48c108363268...3a3e21dafb72
< bitcoin-git> bitcoin/master c276df7 mruddy: zmq: enable tcp keepalive
< bitcoin-git> bitcoin/master 3a3e21d Jonas Schnelli: Merge #14687: zmq: enable tcp keepalive
< bitcoin-git> [bitcoin] jonasschnelli merged pull request #14687: zmq: enable tcp keepalive (master...zmq-keep-alive) https://github.com/bitcoin/bitcoin/pull/14687
< jnewbery> wumpus: #19610 might be ready for merge
< gribble> https://github.com/bitcoin/bitcoin/issues/19610 | p2p: refactor AlreadyHave(), CInv::type, INV/TX processing by jonatack · Pull Request #19610 · bitcoin/bitcoin · GitHub
< wumpus> jnewbery: looks like it!
< bitcoin-git> [bitcoin] laanwj pushed 11 commits to master: https://github.com/bitcoin/bitcoin/compare/3a3e21dafb72...505b39e72b48
< bitcoin-git> bitcoin/master 471714e Jon Atack: p2p: add CInv block message helper methods
< bitcoin-git> bitcoin/master 39f1dc9 Jon Atack: p2p: remove nFetchFlags from NetMsgType TX and INV processing
< bitcoin-git> bitcoin/master 42ca561 John Newbery: [net processing] Split AlreadyHave() into separate block and tx functions
< bitcoin-git> [bitcoin] laanwj merged pull request #19610: p2p: refactor AlreadyHave(), CInv::type, INV/TX processing (master...CInv-block-message-helpers) https://github.com/bitcoin/bitcoin/pull/19610
< bitcoin-git> [bitcoin] n-thumann opened pull request #19859: qa: Fixes failing functional test by changing version (master...qa-fix-wrong-version) https://github.com/bitcoin/bitcoin/pull/19859
< bitcoin-git> [bitcoin] fanquake pushed 2 commits to master: https://github.com/bitcoin/bitcoin/compare/505b39e72b48...c17a00375808
< bitcoin-git> bitcoin/master d780293 Jon Atack: net: improve nLastBlockTime and nLastTXTime documentation
< bitcoin-git> bitcoin/master c17a003 fanquake: Merge #19857: net: improve nLastBlockTime and nLastTXTime documentation
< bitcoin-git> [bitcoin] fanquake merged pull request #19857: net: improve nLastBlockTime and nLastTXTime documentation (master...nLast-documentation) https://github.com/bitcoin/bitcoin/pull/19857
< ryanofsky> If I restart a failing travis or appveyor build, github changes from red to yellow. If I restart failing cirrus build, it github stays red
< ryanofsky> Is there some lag, or is it just not even worth restarting cirrus builds because they will always stay red?
< hebasto> cirrus will turn green after success build
< ryanofsky> oh that's good, thanks
< bitcoin-git> [bitcoin] fanquake pushed 6 commits to master: https://github.com/bitcoin/bitcoin/compare/c17a00375808...8845b38b599e
< bitcoin-git> bitcoin/master 3ecf0ec Carl Dong: depends: Use $($(package)_cmake) instead of cmake
< bitcoin-git> bitcoin/master 8c7cd0c Carl Dong: depends: More robust cmake invocation
< bitcoin-git> bitcoin/master 8e121e5 Carl Dong: depends: Cleanup CMake invocation
< bitcoin-git> [bitcoin] fanquake merged pull request #19685: depends: CMake invocation cleanup (master...2020-08-depends-misc) https://github.com/bitcoin/bitcoin/pull/19685
< bitcoin-git> [bitcoin] laanwj pushed 2 commits to master: https://github.com/bitcoin/bitcoin/compare/8845b38b599e...c157a5069454
< bitcoin-git> bitcoin/master 413e0d1 João Barbosa: Avoid callback when -blocknotify is empty
< bitcoin-git> bitcoin/master c157a50 Wladimir J. van der Laan: Merge #19840: Avoid callback when -blocknotify is empty
< bitcoin-git> [bitcoin] laanwj merged pull request #19840: Avoid callback when -blocknotify is empty (master...2020-08-blocknotify) https://github.com/bitcoin/bitcoin/pull/19840
< elichai2> luke-jr: it seems that it might be possible to use mrustc on non-x86 computers :) https://github.com/thepowersgang/mrustc/issues/39#issuecomment-685738622
< luke-jr> elichai2: I did try
< elichai2> oh, that's cool :)
< bitcoin-git> [bitcoin] naumenkogs opened pull request #19860: Improve diversification of new connections: privacy and stability (master...2020-09-diverse-new-conn-fixes) https://github.com/bitcoin/bitcoin/pull/19860
< dhruvm> May I please request a CI job restart? https://travis-ci.org/github/bitcoin/bitcoin/jobs/723342800 Also, Cirrus CI did not run on the latest force push for https://github.com/bitcoin/bitcoin/pull/19825
< bitcoin-git> [bitcoin] ryanofsky closed pull request #17556: test: Change feature_config_args.py not to rely on strange regtest=0 behavior (master...pr/wdpy) https://github.com/bitcoin/bitcoin/pull/17556
< bitcoin-git> [bitcoin] ryanofsky reopened pull request #17556: test: Change feature_config_args.py not to rely on strange regtest=0 behavior (master...pr/wdpy) https://github.com/bitcoin/bitcoin/pull/17556
< ryanofsky> dhruvm, restarted the travis ci. don't know why the cirrus ci is missing (seems lucky though)
< dhruvm> thanks ryanofsky
< dhruvm> do you know if there's a way to force cirrus CI to run? that's the job that failed last time and I think I've fixed it.
< ryanofsky> dhruvm, I don't know why it doesn't appear, but you could push a commit with a different hash to restart all the ci's
< dhruvm> Hmm, It seems cirrus CI has not run on the last couple new PRs opened as well. I'll wait it out.
< wumpus> right, looks like it is simply not running, i hope it's an intermittent issue
< bitcoin-git> [bitcoin] Crypt-iQ opened pull request #19861: build: add /usr/local/ to LCOV_PATTERN for macOS builds (master...macos_lcov_0902) https://github.com/bitcoin/bitcoin/pull/19861