-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
meson build system does not install any files for distro packaging #93
Comments
Fixed in b827e93 |
the sleigh files are shipped in a separate zip in the release page. you can build them, but only with make for now |
@trufae great thanks. Do you have any pointer how one could build/distribute sleigh files themselves? Its important for us to be able to build them ourselves. I think right now I figured it like this:
|
yep. thats how you build it if you think it's worth to have the instructions in the readme they can be added. it will be good to be able to build it with meson too, but i dont see it as a prioriy right now |
@trufae Sounds good enough for now, thank you! Compared the results to the provided zip and they seem to match. Good enough for now. If its ever moved over to meson please make us somehow aware :D |
Yeah the sleigh files are portable. You can generate them once and use them on different systems. The zip in the release page is generated by the ci. i'll open a ticket to make that part meson friendly when i get bored :) btw i have a patch installing the sleighc compiler, not sure if you want to package this bonary too. Or maybe in a separate package because that may allow users to build their own custom processors |
@trufae nice, good to hear. I've done some first meson adjustments for iaito but wanted to check in on some translations related topics. Can i reach you somewhere or should we discuss that on a bug ticket at |
Sure, use mail, telegram or discord |
workaround for meson in NixOS/nixpkgs#213388 {
# workround for https://github.com/radareorg/r2ghidra/issues/93
# https://github.com/radareorg/r2ghidra/blob/master/ghidra/Makefile
postBuild = ''
GHIDRA_SLEIGH_HOME=../ghidra/src/Processors
cp -v ../ghidra-processors.txt.default ../ghidra-processors.txt
echo "Compiling processor files"
./sleighc -a $GHIDRA_SLEIGH_HOME/DATA
cat ../ghidra-processors.txt | sed "s|^|$GHIDRA_SLEIGH_HOME/|" | xargs -n1 -P$NIX_BUILD_CORES ./sleighc -a 2>/dev/null
'';
# TODO use radare2.abiVersion https://github.com/radareorg/radare2/pull/20545
postInstall = ''
echo "Installing processor files to $out/lib/radare2/${radare2.version}/r2ghidra_sleigh"
mkdir $out/lib/radare2/${radare2.version}/r2ghidra_sleigh
for a in DATA $(cat ../ghidra-processors.txt); do
for b in $GHIDRA_SLEIGH_HOME/$a/*/*/*.{cspec,ldefs,pspec,sla}; do
cp $b $out/lib/radare2/${radare2.version}/r2ghidra_sleigh
done
done
''; for reference ... https://mesonbuild.com/Custom-build-targets.html Lines 1 to 14 in 0799403
Lines 111 to 131 in a1495c5
Lines 22 to 23 in 0799403
|
It seems that the meson build system is lacking some instructions. Its not installing a single file:
Expected files:
/usr/lib/radare2/$version/r2ghidra_sleigh
sleigh as well as the.so
its called like this:
Expected installed files:
The text was updated successfully, but these errors were encountered: