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
make fails in latest release if git is not installed #4054
Comments
i hope its not trying to DL stuff from the webs behind the users back (supposedly the tarball is meant to be usable offline) |
this happens if you download the tarball from github, because github is retarded and doesnt knows how to handle git submodules, so the tarball you should use is the one in the homepage. also, if you dont want to use custom capstone just build with —with-syscapstone and this git step shouldnt happen
|
if i use —with-syscapstone , is the latest capstone release 3.0.4 sufficient ? |
What about using radare2 from git http://bin.rada.re/radare2-w32-0.10.0-git.zip |
or if you build git clone... |
i'm trying to package radare2 for my linux distro, whose package system is based on release tarballs. |
|
the problem are the quotes around "--with-syscapstone" in configure
|
????? which shell are you using? quotes in there are totally legit, and works fine in all my machines
|
busybox ash, which is posix conformant |
with a patched configure, and git installed, the build breaks now here
or actually no, because it continues.... till here
supposedly that's due to radare excepting a newer version of capstone than the latest release. |
this error is fixed in git, i will release 0.10.1 soon because you are using an old version of capstone installed in your system. and in fact, there are more abi changes that will break the next release of capstone.. but i was not planning to wait more for it. can you run are those quotes the only problem for your ash to run configure?
|
i upgraded capstone to 4.0-alpha2, and now i get
|
optimally you could coordinate releases with capstone, but if not the solution would be to integrate the source code (however without relying on git). |
using latest capstone from "next" branch, i got through the build, however now linking fails:
apparently there's a -Wl,-rpath-link=somewhere-in-tree missing in LDFLAGS |
running make dist in a git checkout i get:
|
i have already delayed the r2 release for 3 months, and ive been waiting a lot for capstone to get the new version released. but, even if capstone is updated, distros will not be updated, mainly because the new capstone release will break compat with all the previous releases, so this makes the thing even worst. the r2 tarball comes with the capstone code embedded, meinly because we use a properly tested version of it. capstone doesnt have testsuite, we do, and there are some bugs that are only fixed in our branch, because capstone doesnt wants to accept those patches. and im tired of fighting to get things done of software that is not mine. the problem is that distros dislike to use embedded versions of code, which makes sense, but its a pain for software like r2 that aims to be reliable… for example. i also ship a version of libmagic, and distros link against the system libmagic,, which is vulnerable in many distros. mine comes from openbsd, the code has been reviewed, cleaned up and fuzzed a lot to verfy this. i would say libmagic is not safe in many distros. the only solution here is to make r2 able to compile against previous versions of the libraries.
|
you have to run configure before make dist
|
if i understood correctly, radare2 works only right with a patched capstone. what prevents you from embedding the patched source code in the tarball release (as opposed to checking it out from git)? re make dist: |
pardon, i saw now:
so apparently the problem is only that it tries to do something with git if --with-syscapstone is not given ? |
i got radare2 now built (natively). |
i'm unsure why it was required to add r_lang to bindeps of some things, though. |
Nope. R2 (from git) works fine with capstone3, capstone4(next). The patches we have are basically fixing issues from the disaasembly, those patches are already submitted to the capstone project for more than half a year in pullreqs. Patched Capstone src is already distributed in the tarball. The tarball is already generated. Look closer :p
|
Theres a capstone.mk instead of doing -lcapstone
|
Rlang shouldnt be required to build those binaries. Which was the error message?
|
|
Well, thats quite explicit. And asm/Makefile refers to rlang. So yep. Your patch is ok
|
Can you confirm the configure script fails because of the quotes and that this is the only issue in there? it will be good to patch ACR with this change in order to get it fixed when running |
i've added the r_lang changes in |
try again. the [ is an alias for test. kinda posix thing |
make dist finally succeeded, trying to use the tarball i now get
build succeeds tho.
|
_CHKLIB_LIBS=$(echo "-l${_CHKLIB_NAME}" | sed 's,+, -l,g’) this is the offending line
|
what's the sed cmd supposed to achieve ? |
does it works if you use sed -e instead of sed in this line of the configure script?
|
nope, -e does not fix it |
btw are lua, openssl, and zlib hard deps (i.e. if not found an in-tree copy gets used)? |
if you can explain what the regex is supposed to achieve i'll ask the implementor of musl's BRE code how it can be written in a portable way. |
there are no hard deps in r2, everything can be compiled with just gcc (and git, make..) lua is only required if you want to run lua scripts from the r2 prompt, so it zlib is embedded in r2, the system dependency is just if you are a distro and dont like projects to embed their own forks of code from other libraries. openssl is not used at all, it was used for big number computations with gmp in the past, but now is only planned to be used for https and such.
|
It’s strange that this expression is not supported by your musl+busybox distro. can i download that distro from somewhere to try it? the regexp is quite obvious, just replacing the “+” char for “ -l"
|
you could dl a 40 MB rootfs from http://ftp.barfooze.de/pub/sabotage/ (the 1.1.12 ones are the newest) and then use them with chroot (
|
according to one of the musl devs:
so it's fine to just leave the slash away |
I will install busybox:musl docker later for testing but if u confirm that removing the backslash works for you i'll update and release a new version of acr and bump that thing. Thanks!
|
yeah i can confirm that. thanks for fixing it. |
i have installed the busybox:musl docker image and the sed works fine with that + thing.. but i can confirm that it also works fine without the backslash on gnu, bsd and musl machines i have. so i have done the change in acr and pushed it. pls try again
|
where is this check done? |
pls try again ,lemme know if i fixed the git errmsg thing
|
yeah, musl 1.1.14 which came out 5 days ago, added the |
when doing
|
the @^^^ issue happens because you are using a pretty old version of |
just changed that, pls verify, anyway, you shouldnt be running make dist if you are packaging the tarball. |
|
ok testing now |
This is 3 years old version of git.
|
and ? it works well and i never felt the urge to rebuild it. |
i have changed the @ for HEAD, so it should work for you now. it’s ok not to update if you don’t care about remote code execution and path traversal vulnerabilities.
|
i thought those were in libcurl, openssl etc, which are up to date |
thanks, it appears everything works smoothly now. |
i have created a new issue for those warnings, which are already tracked somewhere else, but i always forgot O:P |
The text was updated successfully, but these errors were encountered: