Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
Nicholas good UGT, #moarvm 09:12
nine good time for greeting 09:17
timo greetste gemeinsame timer 10:14
MasterDuke collect2: error: ld returned 1 exit status 10:22
 /usr/bin/ld: inst-rakudo.o: undefined reference to symbol 'mi_free'
 /usr/bin/ld: /usr/lib/libmimalloc.so.2.0: error adding symbols: DSO missing from command line
could swear i got the same error when switching to gmp 10:23
but don't remember what i did wrong/what the fix was...
oh, and related to all this. looks like we might need to make cmake a moarvm build dependency. anyone have any objections to that? 10:25
timo it's possible the order of stuff is wrong in the linker list of libraries 10:26
or, i dare not say, missing? 10:38
Nicholas cmake is a right bloody pain to build from source 10:44
MasterDuke cmake is what's used to build mimalloc. i assume most of the systems we support have pre-built packages for cmake 10:47
Nicholas several of the gcc compiler farm machines don't, and on some I've given up trying to build cmake from source 10:48
it's that bad.
it's not worth it as a *hard* dependency for mimalloc
timo wow 11:01
we use the gcc compiler farm machines for platforms we dont have any of ourselves? 11:02
Nicholas for some value of "we" 11:05
timo no u 11:07
Nicholas but to be clear, by "hard" I meant - if Configure.pl detects cmake then using mimalloc instead of regular malloc sounds like a win. But yes, that's more complex. 11:17
MasterDuke why do i pick these project that require knowledge i don't have? i don't know anything about linking, compiling c programs, etc. now moarvm builds and seems to be linking against the the 3rdparty mimalloc, but rakudo running compilation dies with `/usr/bin/ld: inst-rakudo.o: in function `MVM_malloc': 21:11
*rakudo runner
`/home/dan/Source/perl6/install/include/moar/core/alloc.h:2: undefined reference to `mi_malloc'` 21:12
nine MasterDuke: because you can hardly learn anything from doing things you already know everything about 21:48
MasterDuke: rakudo's build system also needs to link mimalloc
MasterDuke yeah, i thought it picked up the stuff from moarvm's configuration 21:49
e.g., rakudo's Makefile does have $PREFIX/include/mimalloc.h already listed in its includes 21:51
nine But what about -lmimalloc or something like that? 21:53
Could be you just missed a spot in MoarVM's configuration system that'd be supposed to forward this information. 21:54
Gotta go, but FWIW build systems are just the worst
MasterDuke what's throwing me off is that i'm looking at the gmp pr and mirroring the changed i made there (where i think i saw that same error before and then ended up with a fix)
japhb MasterDuke: See #raku-dev -- I think the ?? !! warning you added might be over-conservative; can you take a look? 21:55
MasterDuke i added -lmimalloc originally, but that just links to the "system" mimalloc, we want to link to the bundled libmimalloc.a
japhb Actually, should say this here: 22:27
Lots of pointer size and signedness warnings building MoarVM on RPi4 + Raspbian (32-bit)
moon-child signedness is probably because char is unsigned 22:28
japhb moon-child: Nah, comparisons between 'int' and 'MVMuint32' 22:29
moon-child ah, huh
japhb e.g. callstack.c: if (region->alloc_limit - region->alloc < diff) 22:30