-
MeowingCat
im debugging Godot's DLL loading
-
MeowingCat
looooks like when i link wallet2 my DLL's GDNative init functions don't exist
-
MeowingCat
it is really interesting because if i link wallet2 things statically to my DLL Godot can't find the symbol "godot_gdnative_init"
-
MeowingCat
how linking something to my DLL could cause an issue like thiss??
-
MeowingCat
p_symbol_handle = (void *)GetProcAddress((HMODULE)p_library_handle, p_name.utf8().get_data());
-
MeowingCat
GetProcAddress() is a Windows thing
-
MeowingCat
returns function address by name
-
MeowingCat
"objdump -p build/libgdmeowletxmr.dll |grep godot_gdnative_init" returning nothing
-
MeowingCat
when i link wallet2 to DLL
-
MeowingCat
[11039] _ZN5godot5Godot13gdnative_initEP27godot_gdnative_init_options
-
MeowingCat
[19637] godot_gdnative_init
-
MeowingCat
i seee them when i don't link wallet2 to my DLL
-
MeowingCat
i really don't have an idea how could linking wallet2 cause this issue
-
r4v3r23[m]
-
r4v3r23[m]
is this still relevant?
-
selsta
r4v3r23[m]: relevant in what way? there is still a 10 block lock yes
-
-
willshu[m]
Hello, I request `export_outputs` with `all: true`. Why is the payload a little different each time?
-
willshu[m]
To a view-only wallet
-
r4v3r23[m]
<selsta> "r4v3r23: relevant in what way..." <- relevant as a way to reduce/remove the lock?
-
ofrnxmr[m]1
-
MeowingCat
i solved damn issueeeeee
-
MeowingCat
Godot's GDN_EXPORT macro definition is expanding to __declspec(dllexport) on Windows buttttt somehowwwwww it was not expanding to __declspec(dllexport) when i link wallet2 thingsssssssssssssssssssssss
-
MeowingCat
how could damn linked libraries cause changing damn GDN_EXPORT macro??
-
ooo123ooo1234567
<MeowingCat> "how could damn linked libraries..." <- order of includes ?
-
ooo123ooo1234567
> <@MeowingCat:libera.chat> how could damn linked libraries cause changing damn GDN_EXPORT macro??
-
ooo123ooo1234567
* order of `#include <...>` ?
-
ooo123ooo1234567
* order of `#include <...>` or gcc/g++ compilation flags ?
-
MeowingCat
ummmmm i don't think so
-
MeowingCat
im always passing all static libraries to GCC
-
MeowingCat
when i use something from wallet2 it links
-
MeowingCat
it is just touching GDN_EXPORT macro somehow
-
MeowingCat
"#include"s are same
-
MeowingCat
just when i use something from wallet2 it links and GDN_MACRO is changing or removing or being something strange
-
ooo123ooo1234567
macros and linking are separate stages of compilation
-
MeowingCat
extern "C" void GDN_EXPORT godot_gdnative_init(godot_gdnative_init_options *o)
-
MeowingCat
i just replaced this to
-
ooo123ooo1234567
* macros expansion and linking, * of compilation, there is some error in your conclusion
-
MeowingCat
extern "C" void __declspec(dllexport) godot_gdnative_init(godot_gdnative_init_options *o)
-
MeowingCat
and working nowww
-
ooo123ooo1234567
* macros expansion and linking, * of compilation, there is some error in your statements
-
MeowingCat
when i use GDN_EXPORT and don't use wallet2 things in my code (my GCC command and passed static libraries are always same)
-
MeowingCat
GDN_EXPORT is correct "__declspec(dllexport)"
-
MeowingCat
but when i use wallet2 things (wallet2 things are being linked) GDN_EXPORT is just affecting somehow
-
MeowingCat
because i replaced it to "__declspec(dllexport)" and it is working
-
MeowingCat
i mean now my DLL contains export functions
-
MeowingCat
even wallet2 and its dependencies are linked
-
MeowingCat
something was breaking/doing something to damn macro
-
ooo123ooo1234567
MeowingCat: How to reproduce ?
-
MeowingCat
ohhh
-
MeowingCat
i think it must be simple
-
MeowingCat
just define a GDN_EXPORT macro
-
MeowingCat
when you link wallet2 things it will just got broken
-
ooo123ooo1234567
MeowingCat: it will just hide some problem which will appear later again
-
MeowingCat
how could this be possible?
-
MeowingCat
or what could be the reason?
-
ooo123ooo1234567
share your code if you need answer
-
ooo123ooo1234567
or at least minimum reproduction
-
MeowingCat
the app will be open source
-
ooo123ooo1234567
MeowingCat: do you need answer now or later ?
-
MeowingCat
im really curious
-
MeowingCat
what is touching to damn macro
-
MeowingCat
and how could that be possible
-
MeowingCat
i will try something
-
MeowingCat
is there a compile-time logger in GCC?
-
MeowingCat
that i could seeeeee macros
-
MeowingCat
Godot headers must be checking the platform to define GDN_EXPORT
-
MeowingCat
i think wallet2 or one of its dependencies is changing damn platform macro definition
-
MeowingCat
or something like that
-
MeowingCat
this is really interesting
-
MeowingCat
#ifdef __GNUC__
-
MeowingCat
#define GDN_EXPORT __attribute__((visibility("default")))
-
MeowingCat
#elif defined(_WIN32)
-
MeowingCat
#define GDN_EXPORT __declspec(dllexport)
-
MeowingCat
#else
-
MeowingCat
#define GDN_EXPORT
-
MeowingCat
#endif
-
MeowingCat
this is the definition of GDN_EXPORT
-
MeowingCat
something might be changing _WIN32????
-
ooo123ooo1234567
<MeowingCat> "is there a compile-time logger..." <- `g++ -E -dI ...`
-
MeowingCat
ohhh it is goooooooood
-
MeowingCat
trying
-
ooo123ooo1234567
> <@MeowingCat:libera.chat> is there a compile-time logger in GCC?
-
ooo123ooo1234567
* `g++ -E -dM ...`
-
ooo123ooo1234567
search for -dM in `man g++`
-
ooo123ooo1234567
it's likely a problem in your code / godot code / wallet2 code, not clear which one to blaim
-
ooo123ooo1234567
<MeowingCat> "i think wallet2 or one of its..." <- it could be also a problem in msys
-
MeowingCat
ummmm yessssss maybeeee
-
MeowingCat
this options don't log anything
-
MeowingCat
im gonna try something
-
ooo123ooo1234567
paste exact cmd you're using (via paste.debian.net)
-
ooo123ooo1234567
`g++ -std=c++11 -E -dD /tmp/test.cpp | vim -` it works as expected here
-
moneromooo
Can you stop spamming please. This is not your debugging step by step log dump.
-
MeowingCat
#define MEOWW() std::cout << "Value: " #GDN_EXPORT << std::endl;
-
MeowingCat
interesting because GCC says there is no GDN_EXPORT
-
MeowingCat
i think # operator must be working for string macros
-
MeowingCat
im using that for macros like #define meow "..."
-
ooo123ooo1234567
`#define MEOWW() std::cout << "Value: " << GDN_EXPORT << std::endl;`
-
MeowingCat
i should insert damn macro into "" in compile-time
-
MeowingCat
ohhh noooo
-
MeowingCat
it doesn't work
-
MeowingCat
because GDN_EXPORT is not a " ... "
-
moneromooo
Well, to the /ignore list then.
-
MeowingCat
i should insert GDN_EXPORT into "" i can't just do "GDN_EXPORT" because lexer will understand it as a string
-
MeowingCat
GCC lexer got crazy lol
-
ooo123ooo1234567
`g++ -std=c++11 -E -dD /tmp/test.cpp | vim -` just start it with the file which is supposed to have that macro and check log
-
ooo123ooo1234567
-
ooo123ooo1234567
it's likely not wallet2 problem
-
MeowingCat
ooo123ooo1234567, i found something
-
ooo123ooo1234567
is it a solution or a new problem ?
-
MeowingCat
i can confirm that it is always #define GDN_EXPORT __attribute__((visibility("default")))
-
MeowingCat
this means when i export my functions with "__attribute__((visibility("default")))" DLL includes them if i don't link wallet2, but doesn't include them if i link walet2
-
MeowingCat
if i use "__declspec(dllexport)" it works always
-
MeowingCat
ooo123ooo1234567, what do you think about this??
-
ooo123ooo1234567
rip windows
-
ooo123ooo1234567
together with it's users
-
ooo123ooo1234567
default visibility depends on library during linking stage (wallet2 triggers it somehow)
-
ooo123ooo1234567
* it means default visibility
-
AmAguestHello
o/
-
AmAguestHello
this is prob a question for Trezor, but does anyone know if there is support for XMR on the Trezor model 1 coming?