07:24:18 Hello, everyone! 07:24:41 Has anyone built monero-project release-static on Ubuntu 22.04 successfully? 07:24:52 We're getting libnorm errors. 07:48:54 libzmq3 errors as well 07:51:31 libzmq3? It's been at version 4.x.x for a long time 07:52:10 sech1: Ubuntu 20.04 had 4.3.2, Ubuntu 22.04 has 4.3.4; There seems to be a regression. 07:52:24 https://stackoverflow.com/questions/72736081/zmq-make-seems-to-be-failing-on-ubuntu-22-04-lts 08:41:12 So did anyone build `release-static` on Ubuntu 22.04 LTS? 08:59:13 Here's the build error log: https://paste.debian.net/hidden/86db39c2/ 09:00:28 Alex|LocalMonero: This is on ubuntu 22.04, dependencies installed as per the README.md on monero-project, `make release-static` 09:03:15 I would start with "undefined reference to `strlcpy'" 09:03:31 google says you need to link with libbsd to fix it 09:03:33 Find what lib(s) supply these symbols, and add a half dozen lines similar to what's already done for NORM in CMakeLists.txt. 09:30:12 "Find what lib(s) supply these..." <- Which lines are you talking about, specifically? 09:33:54 hey there. What happened to 0.18.1.1? 09:39:29 "Find what lib(s) supply these..." <- Nevermind found it. 09:49:45 "google says you need to link..." <- After adding it to the CMakeLists.txt as moneromooo described, there's now a `/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libbsd.a(getentropy.o): in function `getentropy_phdr': 09:49:45 (.text+0x14): undefined reference to `SHA512Update'` error 09:50:06 Looks like this is going to be a fun time fixing... 10:36:26 Managed to fix the strlcpy and SHA related undefined references by adding:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/e9465195b5fc137c70a62ac78e76b90b4321619a) 10:38:00 Stuck on the Proto* undefined references. Tried installing libprotobuf-dev and adding the find_library stuff, but it didn't help 10:53:45 Found this: https://github.com/monero-ecosystem/monero-cpp/issues/21 10:53:45 Didn't help in our case. We are doing `make release-static`, though. Not simply `make`. 10:55:51 layter: still might be able to help since afaik he prefers building static 11:06:56 Builds have become really wonky since monero-project stopped vendoring libunbound 11:07:44 Hopefully this decision is reversed. 11:32:09 moneromooo: sech1 we're spending a lot of time on making this work but we're stuck on the Proto* errors. Your expertise would be helpful. This isn't a obscure edge case, this is a `make release-static` build on `Ubuntu 22.04`, the current LTS. 11:37:35 You could... grep ProtoDispatcher /usr/lib{,64}/lib* 11:38:19 Then use nm -a to see which of the hits, if any, define it (T) rather than use it (U). 11:38:37 You almost certainly have that lib on your system. 11:38:54 You can also ask your OS for the libzmq dependencies. 11:39:17 It's either one of those, a a dep of dep (recursively). 11:39:23 A web search turns up nothing. 11:40:09 You can also look at the pkg-config file for libzmq (probably something like libzmq.pc or the like). and see what libs it adds when linking statically. 11:40:47 `grep ProtoDispatcher /usr/lib{,64}/lib*` returns nothing 11:41:08 Try elsewhere you have libs. Like /usr/lib/x86etc-gnu-foo 11:41:18 moneromooo: Same. 11:41:46 Then download libnorm, look at its README. 11:42:35 Or biuld without libnorm, it's optional (I don't even know what it does). 11:42:48 The normal `make` build succeeds, by the way. It's only `make release-static` that fails. 11:43:20 moneromooo: Could you let me know the proper build flags to feed to ./configure when building libzmq? 11:43:40 Dynamic link works that way, the .so already link with their deps (at least some of the time). 11:44:02 Well, I can look if I have the ones I use for TF, should be close enough. 11:44:33 ./configure --prefix=/home/user --enable-static --disable-shared --disable-libunwind --disable-perf --with-pic --without-docs --with-libsodium 11:45:01 It might autodetect other libs on my machine, mind. 11:49:35 OK, building and installing libzmq3 with your flags (sans prefix) as well as adding the aforementioned lines to CMakeLists.txt made the build work! 11:53:00 Does this warrant a pull request for CMakeLists.txt? 11:53:37 For libbsd ? Sure, can't hurt. 11:55:27 moneromooo: libbsd and libmd 12:16:59 https://github.com/monero-project/monero/pull/8563 12:56:45 Quick question, what is the purpose of not vendoring all the mandatory dependencies, apart from saving disk space? 13:02:42 there's no need for vendoring really unless we have to do modifications to the source code 13:03:13 with the depends build system it already builds all dependencies correctly for static builds, but it requires some modifications for ubuntu 22.04 13:04:33 Wouldn't it be the case that if all dependencies were vendored there would be no build wonkyness between OS's and their different versions? 13:04:53 We had to spend a lot of hours getting the build to work. 13:05:56 11:33 hey there. What happened to 0.18.1.1? <-- it's in progress 13:06:03 At least you weren't pwned by some exploit already fixed upstream. 13:06:51 the whole reason we removed vendored unbound was that it was massively outdated with security issues and no one maintained it on our side 13:07:11 our fork also diverged from upstream which made it difficult keeping it up to date 13:07:26 anonimal forked unbound and then vanished 13:08:10 OK so why not just update the vendored dependencies as new versions come out? If you want to make the security argument that would be an even stronger case because the libs found in Ubuntu's default repos are almost always not the latest versions. 13:08:47 An even stronger case for vendoring* 13:08:51 we build official binaries with dependencies compiled from source and not ubuntu repo version 13:09:27 Well, if you volunteer to do all the work of updating at once for all embedded source we have... 13:10:15 We'll have to consider it. 13:10:22 Though distros also sometimes (often ?) get a heads up so they can patch before a patch goes public. 13:10:40 In those cases, even watching like a hawk is a loser's game. 13:11:13 a lot of dependencies also don't support cmake 13:11:16 And you have to then consider that once PRed and merged, people who update their OS wouldn't necessarily pull/rebuild monero every time a lib changes. 13:11:23 so you have to write custom code to compile it correctly on all OS 13:11:28 it's a mess 13:12:06 I see. 13:12:39 I did spend time trying to update unbound instead of removing it, but I didn't get it to work. 13:12:55 Now, hte breight side is, the next person to build on your OS will have an easy time because you sent a patch :) 13:12:59 So, thanks. 13:14:05 moneromooo: We should probably add to the patch a modification to README.md explaining that libzmq3 needs to be compiled from source on Ubuntu 22.04 and not installed from the apt repository. 13:14:57 Ah, right, your patch doesn't fix it all. Note is good then. Thanks. 13:15:24 Someone else might figure out which lib(s) to add. 13:15:45 (it's got a fair chance of being in the pc file) 13:16:58 Or not. I looked at the list, doesn't seem to have anything uncommon... 13:17:18 Oh, it's norm, I dn't have that source here. nvm. 13:19:58 moneromooo: There's already a find_library statement for `protolib`, it's just that it doesn't seem to do anything one ubuntu 22.04 13:20:13 on ubuntu* 13:21:02 This should set vars. One still has to use those somewhere, like in a link line. 13:21:23 Like ${protolib_LIBRARY} or ..IES 13:21:41 It does 13:22:05 if(PROTOLIB_LIBRARY) 13:22:06 set(ZMQ_LIB "${ZMQ_LIB};${PROTOLIB_LIBRARY}") 13:22:06 endif() 13:23:40 You said protolib, and now PROTOLIB. I don't think cmake is case insensitive here (not 100% sure though). 13:25:39 find_library(PROTOLIB_LIBRARY protolib)... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/1e3d3e157df6bdbc94787e40bf5bcf99ab999566) 13:30:53 Alright. 13:37:01 Alex|LocalMonero: is protolib installed on your system? 13:42:53 Alex|LocalMonero: try to replace `protolib` with `protokit` 13:43:22 intalling libnorm-dev on ubuntu comes with libprotokit.a 13:47:34 all these different proto* libraries confuse me, but worth a try 14:11:11 > <@alex:agoradesk.com> Found this: https://github.com/monero-ecosystem/monero-cpp/issues/21 14:11:11 > 14:11:11 > Didn't help in our case. We are doing `make release-static`, though. Not simply `make`. 14:11:11 Oh, yeah ... I opened this issue 14:15:34 You have to build libunbound and libexpat from source then use `sudo make install` for both of them. 14:15:34 Make sure you don't already have these libraries installed on your system (I actually removed Ubuntu and reinstalled it). That's how I was able to build monero-cpp. I'm not sure if the same methods will work for you. 14:15:39 Are technical questions welcome here? I'm a dev studying xmr, not yet able to contribute but have some questions 14:16:05 e.g. Whats the difference between an atomic swap (xmr/btc) and trading xmr for btc with another person? 14:17:37 aceitche[m]: in an atomic swap there is a penalty if you dishonor a deal you are engaged in; with p2p trades, the person who sends funds first can get scammed 14:20:19 Or maybe it is... with atomic swaps, you can't receive funds without sending funds. Not sure exactly 14:22:28 atomic = either the trade goes through 100%, or it doesn't and both sides receive their coins back (minus transaction fees) 14:22:51 there's no way for someone to scam 14:23:08 Does one still need another person to make the swap, or is it something that one could do alone? 14:25:18 https://github.com/3s3s/atomicswaps 14:25:27 Can someone check this thing? 14:49:00 aceitche[m] you could swap with yourself, but idk why you’d bother 14:52:20 Finding a peer to swap with is a social problem, so left to others. Someone could build a website to pair swappers, for example. 14:52:44 While the webiste would be centralized, the swappers would still benefit from the safety from the atomicity. 14:55:17 eth swaps find peers themselves 14:56:26 * monerobull[m] uploaded an image: (112KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/QnQVreYsmxPcqEXtCmupfSXb/grafik.png > 15:06:37 "grafik.png" <- Whats that website? 15:06:44 "https://github.com/3s3s/..." <- This? 15:07:00 I mean the platform not the code ofc 15:07:00 no, this is a screenshot from https://github.com/AthanorLabs/atomic-swap/blob/master/docs/stagenet.md 15:07:11 monerobull[m]: Thanks 15:11:10 "https://github.com/3s3s/..." <- this sadly doesnt seem to work at all. 15:27:27 > <@layter:matrix.org> You have to build libunbound and libexpat from source then use `sudo make install` for both of them. 15:27:27 > 15:27:27 > Make sure you don't already have these libraries installed on your system (I actually removed Ubuntu and reinstalled it). That's how I was able to build monero-cpp. I'm not sure if the same methods will work for you. 15:27:27 This isn't enough for `make release-static`. 15:31:01 "Alex | LocalMonero | AgoraDesk..." <- That worked! No need to self-compile libzmq3 with this. 15:31:31 nice 15:36:08 now the question is if we should keep protolib for older ubuntu versions 15:36:37 and simply add protokit as a new find_library call instead of replacing it 15:43:30 selsta: https://github.com/monero-project/monero/pull/8564 15:45:33 Alex|LocalMonero: can you force push to remove the last newline? not super important if not 15:51:35 selsta: 8329 is ready to go 15:52:00 fixes issue 8541 15:53:12 UkoeHB: is it for release branch tooV 15:53:22 ? 15:53:27 "Alex | LocalMonero | AgoraDesk..." <- Not really. 15:53:37 no I can make a copy if you want 15:53:47 maybe wait for more testing actually 15:54:18 ok, maybe better if we include it in the next release 15:54:27 not v0.18.1.1 15:54:49 ok 16:12:13 selsta: fixed the linebreak thing 16:13:18 ty, will approve once CI is green 17:28:15 Hello, sorry to bother. 17:28:15 I am trying to start a private Monero testnet. What I did was deleting all the seed nodes and DNS seed nodes from src/p2p/net-node.inl, removing all checkpoints, then starting 2 monerod with different ports and using --add-priority-node to add the other monerod. Now they are connected to each other, but if i try to start mining blocks, it shows: 17:28:15 **Error: Mining did not start -- BUSY** 17:28:15 Is there any way I can fix this to start mining blocks for my private testnet? 17:35:29 duggavo[m]: check https://moneroexamples.github.io/private-testnet/ 17:38:10 selsta: Small question: Why does he start 3 nodes instead of just 2? 17:38:36 it's an example 17:39:38 I don't understand where's the difference between what I did and what that example does 17:46:41 --offline ? If you don't need to have inter-node comms. 17:47:40 In any case, if you have two nodes, and they connect to each other, and you get the BUSY message, it means they did not like each other. 17:47:52 In that case, start them with --log-level 1, and you'll get a reason in one of them. 17:49:15 tests/functional_tests/functional_tests also starts a number of daemons in a private network. 17:49:23 tests/functional_tests/functional_tests.py also starts a number of daemons in a private network. 17:50:42 Though you say "Now they are connected to each other", that kinda implies they like each other (assuming the connection persists beyond the connect and sniff). 17:51:20 Can you confirm the connection lasts (many connect/disconnect cycles don't acount as "lasting"). 18:07:14 "Though you say "Now they are..." <- yeah, if i do print_cn it shows the other node with "State" "Normal" 18:08:36 --offline allows me to mine, however blocks are obviosly not broadcast between nodes 18:08:36 By the way, is the mining algorithm cryptonight or randomx? Where can I see in the code that the algo changes between hardforks? 18:12:24 * --offline allows me to mine, however blocks are obviosly not broadcast between nodes 18:12:27 * --offline allows me to mine, however blocks are obviosly not broadcast between nodes 18:13:10 It depends on the height. If you're starting from height 1, it's Cryptonight. 18:13:33 * moneromooo goes look for the PoW choice... 18:13:38 moneromooo: i found solution for this btw 18:13:45 duggavo: Your node might think it's not at the network's chaintip, so it doesn't want to mine on top of blocks that would get re-orged. 18:14:11 > <@moneromooo:libera.chat> It depends on the height. If you're starting from height 1, it's Cryptonight. 18:14:11 * I found how to change algorithm to RandomX 18:14:40 Ran into that problem when I was 51%-attacking a testnet 18:14:43 * I found how to change algorithm to RandomX, it's in src/cryptonote_core/blockchain.cpp:1696 18:15:03 get_block_longhash in src/cryptonote_core/cryptonote_tx_utils.cpp 18:18:27 Rucknium[m]: Ok, and there is no way to ignore that? 18:20:28 Oh, maybe I have a suspect 18:20:53 If Monero gets checkpoint from DNS, it might be loading some checkpoints even if i removed the hard-coded ones 18:22:26 in fact, i forgot to remove DNS checkpoints 18:24:27 Those are only advisory. 18:24:52 To avoid massive pony trolling. 18:25:45 could it be that both the nodes are using the same blockchain folder or it's unrelated? 18:27:04 it's weird that the daemon thinks it is not up to date with the chain height but it's actually synced 18:31:16 Actually I remember odd things along those lines... hazy memory though... 18:34:11 moneromooo: Yeah, it's really behaving oddly 18:34:21 Try https://git.townforge.net/townforge/townforge/commit/9172b9396ee81477ea08b93382ec5d997a91af30 maybe 18:34:26 in fact, i added --stagenet flag to both the daemons, and NOW IT WORKS 18:34:35 but why does it work with stagenet and not with mainnet? 18:35:10 moneromooo: Ok thanks 19:32:55 "Try https://git.townforge.net/..." <- Sorry, that doesn't work neither 20:23:41 It's VERY weird that it says "core is busy". If I print the "target blockchain height" ( cryptonote_core.get_target_blockchain_height ) it always shows zero. Why is it busy then?