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