--- Log opened Fri Feb 16 00:00:00 2024 00:46 -!- DarrylTheFiish [~DarrylThe@user/DarrylTheFish] has joined #bitcoin-core-builds 00:48 -!- DarrylTheFiish [~DarrylThe@user/DarrylTheFish] has quit [Max SendQ exceeded] 00:48 -!- DarrylTheFish [~DarrylThe@user/DarrylTheFish] has quit [Ping timeout: 272 seconds] 00:49 -!- DarrylTheFiish [~DarrylThe@user/DarrylTheFish] has joined #bitcoin-core-builds 00:56 -!- DarrylTheFiish [~DarrylThe@user/DarrylTheFish] has quit [Ping timeout: 256 seconds] 04:21 -!- jon_atack [~jonatack@user/jonatack] has joined #bitcoin-core-builds 04:22 < vasild> So far with cmake I have had to explicitly specify -DCMAKE_CXX_FLAGS:STRING="-I/usr/local/llvm-devel/lib/clang/19/include" because otherwise it fails to compile with src/compat/cpuid.h:11:10: error: 'cpuid.h' file not found with include; use "quotes" instead 04:22 < vasild> the file is located in /usr/local/llvm-devel/lib/clang/19/include/cpuid.h 04:23 < vasild> no idea how this works with autotools (I did not have to explicitly provide -I/usr/local/llvm-devel/lib/clang/19/include to autotools 04:23 < vasild> anyway, now with https://github.com/hebasto/bitcoin/pull/84 there is this check: if(cxx_flags STREQUAL cxx_flags_init) 04:23 -!- jonatack [~jonatack@user/jonatack] has quit [Ping timeout: 256 seconds] 04:24 < vasild> meaning to "if the user has overriden CMAKE_CXX_FLAGS then dont touch it, aka don't add -Wall -Wextra -Wwhatever to it 04:25 < vasild> So, it seems I can't get the manual -I... plus all the -W... stuff together? 04:27 < vasild> Just found out that export CXXFLAGS="-I/usr/local/llvm-devel/lib/clang/19/include" does the job. 04:27 -!- vasild [~vd@user/vasild] has quit [Remote host closed the connection] 04:28 -!- vasild [~vd@user/vasild] has joined #bitcoin-core-builds 04:31 < hebasto> vasild: yes, `CXXFLAGS` has semantics "to append flags" to defaults. OTOH, `CMAKE_CXX_FLAGS` overrides defaults 04:32 < vasild> and tried that cmake -DCXXFLAGS=... does not do. export CXXFLAGS in the environment is needed. 04:32 < vasild> hebasto: so this is the right thing to do? export CXXFLAGS=... 04:33 < hebasto> yes, `CXX_FLAGS` is a normal standard environment variable 04:33 < vasild> I was wondering if if(cxx_flags STREQUAL cxx_flags_init) is not too rigid and if it would be more flexible to add a boolean option "append warning flags to cxxflags" ON/OFF 04:33 < hebasto> `CMAKE_CXX_FLAGS` is a CMake's variable 04:37 < hebasto> this comparison is mimicking the current behaviour in the master branch; it might be changed after #25972 04:37 < gribble> https://github.com/bitcoin/bitcoin/issues/25972 | build: no-longer disable WARN_CXXFLAGS when CXXFLAGS is set by fanquake · Pull Request #25972 · bitcoin/bitcoin · GitHub 04:37 < vasild> I mean - right now that check does "if the user set the flags, dont append to them", but I as a user want instead "append even if the user specified some flags on his own" 04:39 < hebasto> then use `CMAKE_CXX_FLAGS__INIT` 04:40 * vasild trying... 04:41 < hebasto> but for your particular case I would recommend `-DCMAKE_CXX_COMPILER=path_to_compiler_binary;-I/usr/local/llvm-devel/lib/clang/19/include" 04:41 < fanquake> Does CMAKE_CXX_FLAGS_INIT also work if the build type is None, or something other than release/debug? I assume it needs to match whatever config is being used? 04:42 < hebasto> fanquake: yes, it have to match 04:42 < fanquake> I'd like us not to have to recommend people hijack there compiler name with additional flags if possible. i.e it's a bit confusing to not put -I in CPPFLAGS 04:43 < vasild> -DCMAKE_CXX_FLAGS_DEBUG_INIT:STRING="-I/usr/local/llvm-devel/lib/clang/19/include" or -DCMAKE_CXX_FLAGS_Debug_INIT:STRING="-I/usr/local/llvm-devel/lib/clang/19/include" does not "work" 04:43 < vasild> first I tried export CPPFLAGS=-I... but it was not picked, it has to be export CXXFLAGS=... 04:44 < hebasto> fanquake: it is not hijacking at all, but an accepted CMake's practise 04:44 < hebasto> CMake ignores `CPPFLAGS` 04:45 < fanquake> Accepted practise to put things that aren’t a compiler, in the variables that is specifically for setting the compiler? 04:46 < fanquake> vasild: unfortunately CMake just ignores a lot of “standard” build type stuff 04:47 < hebasto> from CMAKE_CXX_COMPILER docs -- "Options that are required to make the compiler work correctly can be included as items in a list" 04:48 < vasild> I set the compiler by setting CXX in the environment and now tried -DCMAKE_CXX_COMPILER:STRING="${CXX};-I/usr/local/llvm-devel/lib/clang/19/include" -- it works but I agree it looks like a hack. I would rather export CXXFLAGS=... 04:49 < vasild> ok, yes, "to make the compiler work correctly", but there must be a better way to adding custom include directories on the command line 04:55 < vasild> So, in autotools, if the user did override CXXFLAGS in the environment, then we disable -Wstuff. If this is to be mimicked 1:1 in cmake then if(cxx_flags STREQUAL cxx_flags_init) is not achieving that. 04:56 < vasild> because I just overrided/set CXXFLAGS in the env and got both my -I and -Wstuff :-) 04:57 < vasild> it would be 1:0.9 mimicking if that is tweaked to: if the user did override CMAKE_CXX_FLAGS, then we disable -Wstuff 05:06 < vasild> noted in https://github.com/hebasto/bitcoin/pull/84#discussion_r1492428734 05:36 -!- ryanofsky [russ@jumpy.yanofsky.org] has quit [Remote host closed the connection] 05:37 -!- ryanofsky [~russ@jumpy.yanofsky.org] has joined #bitcoin-core-builds 07:09 -!- ghost43 [~ghost43@gateway/tor-sasl/ghost43] has quit [Ping timeout: 255 seconds] 07:10 -!- ghost43_ [~ghost43@gateway/tor-sasl/ghost43] has joined #bitcoin-core-builds 07:15 -!- jon_atack [~jonatack@user/jonatack] has quit [Ping timeout: 272 seconds] 07:17 -!- ghost43_ [~ghost43@gateway/tor-sasl/ghost43] has quit [Remote host closed the connection] 07:17 -!- ghost43 [~ghost43@gateway/tor-sasl/ghost43] has joined #bitcoin-core-builds 09:04 -!- jonatack [~jonatack@user/jonatack] has joined #bitcoin-core-builds 09:44 -!- gribble [~gribble@bitcoin/bot/gribble] has quit [Remote host closed the connection] 09:51 -!- gribble [~gribble@bitcoin/bot/gribble] has joined #bitcoin-core-builds 11:18 -!- achow101 [~achow101@user/achow101] has quit [Remote host closed the connection] 11:19 -!- achow101 [~achow101@user/achow101] has joined #bitcoin-core-builds 11:46 -!- pablomartin [~pablomart@193.160.247.107] has joined #bitcoin-core-builds 11:49 -!- jonatack [~jonatack@user/jonatack] has quit [Ping timeout: 252 seconds] 12:27 -!- pablomartin [~pablomart@193.160.247.107] has quit [Quit: Leaving] 14:40 -!- jonatack [~jonatack@user/jonatack] has joined #bitcoin-core-builds 19:27 -!- jonatack [~jonatack@user/jonatack] has quit [Ping timeout: 264 seconds] 19:29 -!- jonatack [~jonatack@user/jonatack] has joined #bitcoin-core-builds 21:28 -!- Yuvraj [~Yuvraj@117.250.64.129] has joined #bitcoin-core-builds 21:29 -!- Yuvraj [~Yuvraj@117.250.64.129] has quit [Quit: Client closed] 21:29 -!- Yuvraj [~Yuvraj@117.250.64.129] has joined #bitcoin-core-builds 21:37 -!- Yuvraj [~Yuvraj@117.250.64.129] has quit [Ping timeout: 250 seconds] 22:35 -!- Yuvraj [~Yuvraj@117.250.64.129] has joined #bitcoin-core-builds --- Log closed Sat Feb 17 00:00:02 2024