-
cryptogrampy[m]
FYI, I created a room for non-core related dev discussions. Newbs welcome: #monero-community-dev:monero.social
-
MeowingCat
i have a very important question
-
MeowingCat
how do you build Monero?
-
MeowingCat
i built it with MSYS2/Mingw64
-
moneromooo
Refer the steps in the README.
-
MeowingCat
nooooo i mean
-
MeowingCat
how do you build it for different targets
-
MeowingCat
do you do cross-compiling
-
MeowingCat
or do you build it on target platforms individually
-
moneromooo
Refer the steps in contrib/gitian/README.md
-
MeowingCat
loooooking
-
MeowingCat
i wanna ask:
-
MeowingCat
is it possible to cross-compile Monero?
-
MeowingCat
and did you ever do that?
-
moneromooo
Refer the steps in contrib/gitian/README.md first.
-
moneromooo
to the steps
-
MeowingCat
you mean it is pretty possible?
-
moneromooo
This is what the file above is about. That's what I said refer to it.
-
MeowingCat
niceeeeeee
-
MeowingCat
which static object can/should i use from Monero build?
-
ofrnxmr[m]
<moneromooo> "Refer the steps in contrib/..." <- ^
-
MeowingCat
i already built for Windows
-
MeowingCat
i need to use Monero functions
-
ofrnxmr[m]
<moneromooo> "Refer the steps in contrib/..." <- ^
-
ofrnxmr[m]
MeowingCat: Such as
-
MeowingCat
i should statically link the required objects to my GDNative library
-
MeowingCat
or if it is possible to get some dynamic libraries
-
MeowingCat
i can use that too
-
ofrnxmr[m]
ofrnxmr[m]: Did you ^
-
ofrnxmr[m]
<moneromooo> "Refer the steps in contrib/..." <- Did you ^ **
-
MeowingCat
:((((((((( i willlll look but i already have Windows build
-
MeowingCat
i have libwallet.a, libwallet_merged.a, libmonero-wallet-rpc.dll.a
-
MeowingCat
what are libwallt.a and libwallet_merged.a??
-
ofrnxmr[m]
<moneromooo> "Refer the steps in contrib/..." <- So thats a no? Come back after you ^ please
-
MeowingCat
are you joking????????????
-
MeowingCat
i tried to link libwalet.a before
-
MeowingCat
butttt headers and non-relative include paths are crazy
-
MeowingCat
and must be tons of compiler parameters that are requried to compile Monero successfully
-
MeowingCat
normally i had to be able to statically link libwallet.a and include Monero headers
-
MeowingCat
and use it easily
-
ofrnxmr[m]
Of course not.
-
ofrnxmr[m]
What is your goal? What are you trying to do? Cross compile ? Thats all?
-
ofrnxmr[m]
If you havent read the documentation youve been pointed to.. no, im nit joking
-
MeowingCat
i will cross-compile tooo because i need Windows, Android, iOS builds
-
MeowingCat
but first i will use Monero functions i already built Monero for Windows
-
ofrnxmr[m]
Monerod builds/works for ios?
-
MeowingCat
the only thing that i need libwallet.a and headers i have libwallet.a and i have headers tooo
-
MeowingCat
but headers are crazy
-
MeowingCat
"monerod" sounds like a daemon
-
MeowingCat
i don't need a daemon
-
MeowingCat
i just need to build and sign transactions
-
MeowingCat
you all said it is impossibly difficult
-
MeowingCat
and the only way is using Monero's itself
-
MeowingCat
i don't even need address derivation functions from Monero
-
MeowingCat
i made it in C#
-
MeowingCat
do you have dynamic libraries that contain transaction building/signing functionalities for Windows, Android, iOS
-
ofrnxmr[m]
moneromooo: looks like I fixed their keyboard
-
MeowingCat
i mean built dynamic libraries
-
MeowingCat
if someone has that please send me :((
-
ofrnxmr[m]
Ive never attempted to build for ios. I use gitian for androin, Linux, mac etc
-
MeowingCat
okii but now i need to link libwallet.a to my thing
-
MeowingCat
what is the difference between libwallet.a and libwallet_merged.a???
-
MeowingCat
does "merged" mean something like portable version????
-
MeowingCat
and includes everything required?
-
moneromooo
"merged" means all the libs at once, the wallet and it dependencies.
-
moneromooo
wallet2 is what has the tx building/signing code.
-
moneromooo
If you can call that from C#.
-
MeowingCat
moneromooo, do i need libwallet.a or libwallet_merged.a for only transaction building and signing?
-
chirp042
alo
-
chirp042
anyone to help me with monero OTC? :)
-
ofrnxmr[m]
<chirp042> "anyone to help me with monero..." <- #monero:monero.social
-
moneromooo
Either would do.
-
MeowingCat
Mooooooooooooneroooo
-
chirp042
#monero:monero.social is quiet af too
-
chirp042
lmaooo
-
Stnby[m]
<chirp042> "#monero:monero.social is quiet..." <- People too busy reverse engineering wallet2.cpp spaghetti code no time for chatting.
-
chirp042
based
-
MeowingCat
Stnby[m], wallet2.cppppp
-
MeowingCat
the besttttttttt
-
MeowingCat
we need a wallet3.cpp
-
Stnby[m]
<MeowingCat> "the besttttttttt" <- Just beautiful
-
MeowingCat
damnnnn i should ask this
-
MeowingCat
Stnby[m], are you using Discord???
-
Stnby[m]
Hell no
-
Stnby[m]
No Pedochat
-
MeowingCat
is this place bridged to Discord?
-
Stnby[m]
I have no idea, if it was why would you use Monero
-
Stnby[m]
If thats how much you value your privacy
-
MeowingCat
i don't use Moneroooooo
-
MeowingCat
just adding Monero support to our wallet apppp
-
Stnby[m]
Also this is dev we should talk this elsewhere
-
MeowingCat
why i can't write here on Discord?
-
Stnby[m]
* this elsewhere #monero
-
bridgerton[m]
<CrimsonKing> Just a quick test, can you guys read this ?
-
moneromooo
Yes.
-
bridgerton[m]
<CrimsonKing> thanks, moo.
-
MeowingCat
im trying to use Monero::WalletManager
-
MeowingCat
im including wallet2_api.h and linking libwallet_merged.a
-
MeowingCat
buttt linker is saying undefined reference to `Monero::WalletManagerFactory::getWalletManager()'
-
MeowingCat
isn't this thing placed in libwallet_merged.a???
-
MeowingCat
g++ -o monero_api.exe libwallet_merged.a monero_api.cpp
-
MeowingCat
im doing thiss
-
moneromooo
Place libwallet_merged.a after monero_api.cpp.
-
MeowingCat
ohh tried already
-
MeowingCat
damnnnn it works i tried it with Linux build and i figured out that im trying to link wrong build
-
MeowingCat
it is linking
-
MeowingCat
moneromooo, tyyyyyy
-
MeowingCat
linking is taking huuuuuuuuuuuge time
-
MeowingCat
is there a solution for that???
-
moneromooo
A faster CPU.
-
moneromooo
BTW, what you are using here (Monero::WalletManagerFactory::getWalletManager) is part of an API layer above wallet2. Using it is fine, but it's a bit of a useless layer.
-
moneromooo
It's here for historical reasons, and likely won't go since other people use it now, but just so you know. You have a choice between this and wallet2 itself.
-
MeowingCat
you mean there is another interface for same purpose?
-
moneromooo
Actually, maybe not useless, I think it might have some async stuff, which could be useful...
-
MeowingCat
my CPU is i7 10750h
-
MeowingCat
i can't do anything to make linking faster?
-
moneromooo
Well, check top to see what's the bottleneck, but I doubt it'll be I/O here.
-
MeowingCat
ummmm my SSD is very fast :(
-
MeowingCat
maybe about MSYS2?
-
MeowingCat
still linking
-
moneromooo
You mean... the same linking process ? For 40 minutes ?
-
MeowingCat
yesssss
-
moneromooo
WTF. OK, something *is* wrong.
-
MeowingCat
just libwallet_merged.a
-
MeowingCat
:((((((((
-
moneromooo
Check top, is ld taking 100% CPU ?
-
MeowingCat
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libwallet_merged.a(wallet2.cpp.obj):wallet2.cpp:(.text$_ZN5boost13serialization9singletonINS_7archive6detail11iserializerINS2_24portable_binary_iarchiveESt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_St4hashISC_ESt8equal_toISC_ESaISt4pairIKSC_SC_EEEEEE18get_const_instanceEv[_ZN5boost13serialization9singletonINS_7archive6
-
MeowingCat
detail11iserializerINS2_24portable_binary_iarchiveESt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_St4hashISC_ESt8equal_toISC_ESaISt4pairIKSC_SC_EEEEEE18get_const_instanceEv]+0xc0): undefined reference to `boost::serialization::typeid_system::extended_type_info_typeid_0::extended_type_info_typeid_0(char const*)'
-
MeowingCat
i used --verbose and i see these
-
moneromooo
Ah, use g++, not gcc, to compile/link.
-
MeowingCat
ld.exe using %16 CPU
-
moneromooo
Does top have a large value in the wa% column, near the top of the screen ?
-
MeowingCat
i used g++ already :((
-
moneromooo
Ah you did, sorry. Misremembered.
-
moneromooo
You need to link agianst all the boost libs then. I guess they're not merged in libwallet_merged.a...
-
moneromooo
See the list in one of the CMakeLists.txt files.
-
MeowingCat
i built monero repo
-
moneromooo
program_optoins, thread, chrono, etc. All the lot of them. In the same order.
-
MeowingCat
and got libwallet_merged.a
-
MeowingCat
what should i look for in CMakeLists.txt??
-
MeowingCat
you mean ld is linking boost things because they are not in libwallet_merged.a?
-
moneromooo
program_optoins, thread, chrono, etc. All the lot of them. In the same order.
-
MeowingCat
okii loooking
-
moneromooo
You could do a lot worse than running the monero-wallet-rpc link with VERBOSE=1, then copying as much as possible which libs are in.
-
MeowingCat
i feel like it may be because of tooo much different files
-
MeowingCat
SSDs are working slow for too much files
-
MeowingCat
find_package(Boost 1.58 QUIET REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options locale)
-
MeowingCat
this line in CMakeLists.txt
-
MeowingCat
ohhh linker is saying "undefined reference to ..."s
-
MeowingCat
where are damn boost static libraries
-
MeowingCat
i should find them
-
MeowingCat
-
MeowingCat
there is something wrong
-
MeowingCat
x86_64-w64-mingw32/bin/ld.exe: ../../monero/build/MINGW64_NT-10.0-22000/_dal_yok_/release/lib/libwallet_merged.a(wallet_manager.cpp.obj):wallet_manager:(.text+0x12691): undefined reference to `el::base::Storage::getELPP()',
-
MeowingCat
errors like this
-
MeowingCat
is libwallet_merged.a supposed to contain everything??
-
selsta
MeowingCat: no
-
selsta
libwallet_api.a does contain everything
-
MeowingCat
i built Monero
-
selsta
that's why we switched to _api for the gui as it makes things easier
-
MeowingCat
and im passing libwallet_merged.a to link to GCC
-
MeowingCat
what should i pass else?
-
MeowingCat
to link
-
MeowingCat
ld can't find tons of things
-
selsta
-
MeowingCat
i just found there is a wallet2_api.h and it is independent
-
MeowingCat
selsta, tyyy loooking
-
MeowingCat
what is "wallet_api"??
-
MeowingCat
what does that mean in CMakeLists.txt?
-
selsta
-
MeowingCat
:((((((
-
MeowingCat
oh these static libraries i should link?
-
MeowingCat
where are these static objects?
-
selsta
does a libwallet_api file exist?
-
MeowingCat
loooking at find . -regex ".+\.a"
-
MeowingCat
noooo there is no anything like "libwallet_api"
-
selsta
-
selsta
remove line 85 and 86
-
selsta
but i'm just guessing here, if you use CMake you could just copy the CMake code from the GUI
-
MeowingCat
i made g++ -o monero_api.exe monero_api.cpp ../../monero/build/MINGW64_NT-10.0-22000/_dal_yok_/release/lib/libwallet_merged.a $(find ../../monero -regex ".+\.a" -printf "%p ") --verbose
-
MeowingCat
but still saying "undefined reference to"s
-
MeowingCat
loookingg
-
MeowingCat
set_property(TARGET wallet_api PROPERTY EXCLUDE_FROM_ALL TRUE)
-
MeowingCat
oh this thing is removing that thing????
-
MeowingCat
whyyyyyyy
-
MeowingCat
encapsulation concept should not exist in universe
-
MeowingCat
:((((
-
moneromooo
Because it's rebuilt every time wallet2.h changes, very slowly, and it's unused by monero itself, just by the GUI and so you have no idea if any changes there work or not anyway.
-
moneromooo
It really doesn't belong in this repo.
-
moneromooo
So I took if out by default, it was wasting my time so much.
-
MeowingCat
im crying
-
MeowingCat
gonna rebuild now
-
MeowingCat
without that lines
-
moneromooo
I think libwallet_merged.a does include it fwiw.
-
MeowingCat
oh noooooooooooo
-
MeowingCat
then it doesn't mean anything
-
MeowingCat
buttt why there are undefined reference errors :(((((
-
MeowingCat
this thing made me crazy really
-
user85
hi
-
user85
it seems google have merged libgtest-dev into google test?
-
user85
ok found it
-
MeowingCat
i have libwallet_api.a nowwwww
-
selsta
MeowingCat: did removing 85 86 work?
-
MeowingCat
yesss
-
MeowingCat
buttt still undefined reference errors when i link libwallet_api.a
-
selsta
what undefined references?
-
MeowingCat
ld.exe: ../../monero/build/MINGW64_NT-10.0-22000/_dal_yok_/release/lib/libwallet_api.a(wallet_manager.cpp.obj):wallet_manager:(.text+0x12769): undefined reference to `el::base::Writer::construct(char const*)'
-
MeowingCat
like this
-
moneromooo
That's easylogging++. Use git grep.
-
selsta
you have to link against easylogging
-
selsta
yes
-
MeowingCat
there are too many errors for different things
-
MeowingCat
ld.exe: ../../monero/build/MINGW64_NT-10.0-22000/_dal_yok_/release/lib/libwallet_api.a(wallet_manager.cpp.obj):wallet_manager:(.text+0x17fcc): undefined reference to `__stack_chk_fail
-
MeowingCat
im linking all *.a in monero/
-
MeowingCat
g++ -o monero_api.exe monero_api.cpp ../../monero/build/MINGW64_NT-10.0-22000/_dal_yok_/release/lib/libwallet_api.a $(find ../../monero -regex ".+\.a" -printf "%p ") --verbose
-
MeowingCat
i think i need a GCC command that is created by CMake for Monero
-
MeowingCat
to link everything
-
selsta
That's why it would be easier to use CMake. You can do the same as monero-gui repo and everything should work.
-
moneromooo
ld is a single pass linker, you want the order right.
-
MeowingCat
then im gonna use CMake
-
moneromooo
__stack_chk_fail suggests you compiled some of the source with different code gen options than others. Not 100% sure.
-
moneromooo
I'm sure you've been looking up those symbols in a search engine anyway.
-
user85
there is a mistake in official monero cli tutorial
-
user85
sudo should never be used when compling libraries Xd
-
user85
[1] On Debian/Ubuntu libgtest-dev only includes sources and headers. You must build the library binary manually. This can be done with the following command sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make then:
-
user85
wrong
-
moneromooo
Violent. Please PR a patch.
-
moneromooo
I found it. I can do it if you like, or you can have a patch in monero :)
-
MeowingCat
moneromooo, just did "make release-static-win64" for Monero source
-
user85
dudes who here complied google test lib from scratch?
-
user85
I did it got libs, however do I need stuff in /include?
-
ooo123ooo1234567
jeffro256: can you stop writing those subjective comments and focus on checking whether problems from tests are solved and no others introduced ?
-
ooo123ooo1234567
* no others were introduced ?
-
ooo123ooo1234567
this is sufficient requirement to merge patch ^
-
MeowingCat
add_subdirectory(../monero)
-
MeowingCat
is this enough?
-
MeowingCat
for my CMakeLists.txt??
-
ooo123ooo1234567
MeowingCat: easier to test than to ask
-
sech1
jeffro256 for once I agree with ooo123, deprecated methods are not relevant for this PR review. As selsta commented there somewhere, boost 1.59 is still supported in Monero code, so we can use these methods.
-
ooo123ooo1234567
"
monero-project/monero #7760#discussion_r889421565", "potentially infinite while loop" potentially shallow comment
-
ooo123ooo1234567
sech1, hello
-
ooo123ooo1234567
jeffro256: also my next approximation was supposed to touch connection + boost server + node_server + cryptonote_protocol, but I stopped since no one even able to check small connection patch
-
sech1
ooo123ooo1234567 I will do a proper review (correctness of code logic) soon, right now I'm fighting with adding curl to p2pool, so I don't have time for review
-
ooo123ooo1234567
<sech1> "ooo123ooo1234567 I will do a..." <- why do you need curl in p2pool ?
-
sech1
-
sech1
It's basically working on Windows and Ubuntu already, I just need to figure out how to link libcurl statically for all the various p2pool builds (not an easy task)
-
moneromooo
Ugh. This stuff in the README is building stuff in /usr/src :S
-
moneromooo
That's why it needs sudo. It'd need to create a build dir somewhere in /tmp or so, and build there.
-
moneromooo
I'm not even sure why that'd work, unless building also installs stuff, or something includes from /usr/src. This is very icky/
-
» moneromooo not touching that now
-
ooo123ooo1234567
<sech1> "It's basically working on..." <- "
everything.curl.dev/build/autotools#static-linking", "... you need to prepare yourself for an uphill battle." indeed, not an easy task
-
ooo123ooo1234567
that's why it doesn't make sense to support pseudo static build in cmake since it doesn't make sense without knowledge of particular environment which will be used for compilation
-
sech1
I don't need ssl and many other features of curl, so I can just turn them off when compiling libcurl.a
-
sech1
Already built fully static binary on Alpine Linux
-
ooo123ooo1234567
* that's why it doesn't make sense to support pseudo static build in cmake since fully static build requires knowledge of particular environment which will be used for compilation; and without such knowledge it isn't complete
-
sech1
and "static" binary on Windows (dependent only on system DLLs)
-
sech1
and "kind of static" on Ubuntu (libcurl, libuv, libzmq linked statically, only system .so dependencies)
-
sech1
mingw64 is pita though
-
sech1
can't build there at all so far
-
ooo123ooo1234567
sech1: In theory, someone could wrap such fully static builds in docker to make life easier for others
-
ooo123ooo1234567
sech1: you have to learn all dependencies of this lib in each environment in order to include all of them statically; pure pain without any benefits except env knowledge
-
sech1
libcurl has ./configure script which can turn off everything
-
sech1
only basic http requests will be left which is what I actually need
-
sech1
so I can build libcurl.a which doesn't need other dependencies
-
sech1
I hope http digest authetication will not require some obscure dependency :D
-
ooo123ooo1234567
sech1: so you're training in finding all dependencies before proper PR review, kind of warm up
-
ooo123ooo1234567
<sech1> "I hope http digest authetication..." <- the same task in cryptography would be: checking that all security dependencies are covered with some known hard problems
-
ooo123ooo1234567
in all cases you're learning graph of dependencies and then checking something, but cryptography is at least useful work
-
ooo123ooo1234567
though some auditors are doing shallow checks even in cryptography, while others are doing deep check in build dependencies; facepalm
-
ooo123ooo1234567
hmm, auditors are limiting scope of work since it directly affects amount work, isn't it a proof that shallow comments have 0 value ?
-
selsta
sech1: should the rng patch be closed?
-
ooo123ooo1234567
jeffro256: "
monero-project/monero #7760/files#r889445157", deep pain introduced by boost developers with the best readability and code style
-
sech1
selsta I'm more in favor of removing the rng completely from there, so yeah it's better to close it
-
ooo123ooo1234567
sech1, did you see this
github.com/ithewei/libhv, another async i/o lib ?
-
sech1
No
-
sech1
Switching away from libuv means rewriting everything, not an option. Plus libuv is much more widely used and battle tested
-
ooo123ooo1234567
that's solo project
-
ooo123ooo1234567
sech1: yes, async i/o is everywhere the same, no matter what lib you're using
-
sech1
details are different, apis have different names, parameters etc. Every libuv call needs to be translated
-
ooo123ooo1234567
sech1: pain with curl dependencies vs pain of deep reintegration, 1st one less hurts probably
-
ooo123ooo1234567
sech1: In theory, It could be possible just to borrow http protocol part, but probably not this case, due to big difference
-
ooo123ooo1234567
s/,//
-
sech1
libhv even doesn't have what I need (http authentication)
-
ooo123ooo1234567
<sech1> "details are different, apis have..." <- Did you try to write the same network app with different frameworks ?