Comments (8)
Your r2 installation is missing some support files. The sdb files determine info like noreturn functions, signatures, types and structs and other stuff. So copying the files is not enough. Do a proper installation inside the docker and it should work.
alternatively you can build r2 with gperf which statically links the sdb files inside the binary so it doesnt depend on external files to work
from radare2.
The sys/install.sh uses symlinks for installation. Uou should better use a destdir for that purpose like this:
./configure —prefix=/use
export CFLAGS=“-Os -flto”
make -j4
make install DESTDIR=/tmp/r2
then in the COPY step you just take the files under /tmp/r2/* and place the in the root directory of the target image.
the -Os will reduce the build size and the link time optimization will also help on this
after this you should be able to remove the builddir and only keep the target files.
if you are using debian there’s also a .deb in the release page, no need to build from source
from radare2.
I mention that IDA Pro 6
's output of GenFuncGdl for that entry node matches the local r2 output version - so, ending with call ExitProcess
.
from radare2.
Uhm seems like you are copying the share directory too.. which should be enough. You can try with the tn command and see if its listed as a noreturn type
from radare2.
@trufae you were right! Thanks, I somehow overlooked the tiny detail that I have a multistage docker build and am copying the files :D so, I did as you suggested, commented the second build stage and now all is good. But still, what could have been the problem? Does radare store files somewhere outside these paths?
# # =================
# FROM python:3.8-slim as main
# # =================
#
# WORKDIR /usr/callgraph
#
# COPY --from=base /usr/local/bin/python3.8 /usr/local/bin/python3.8
# COPY --from=base /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
# COPY --from=base /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu
# COPY --from=base /usr/include/graphviz /usr/include/graphviz
# COPY --from=base /usr/share/graphviz /usr/share/graphviz
# COPY --from=base /usr/local/lib/radare2 /usr/local/lib/radare2
# COPY --from=base /usr/local/bin/radare2 /usr/local/bin/radare2
# COPY --from=base /usr/local/share/radare2 /usr/local/share/radare2
# COPY --from=base /usr/local/bin/r2 /usr/local/bin/r2
# COPY --from=base /usr/local/lib/libr_*.so /usr/local/lib/
Because I would need the multistage build, it reduces significantly my image size. Thanks in advance!
Or, could you provide me some docs regarding the gperf
installation of radare2? 🙏
from radare2.
Update
Found out that the missing folder was the original release directory, resulting from this RUN curl -Ls https://github.com/radareorg/radare2/releases/download/5.8.8/radare2-5.8.8.tar.xz | tar xJv && \
.
If I keep that folder in the docker container, everything works fine.
But it's 413MB
so I would like to keep only those files which are necessary. Can you help me with this please?
Update 2
Adding the following line at the end of the 2. build stage solves the issue. COPY --from=base /usr/callgraph/radare2-5.8.8/libr /usr/callgraph/radare2-5.8.8/libr
. But it means 232MB
plus size for the container.
from radare2.
Hope that helps!
from radare2.
You are amazing, thanks for you help! Yes, this helps a lot :)
from radare2.
Related Issues (20)
- Error on compilation on centos 7 HOT 5
- Add R2PM_SIZE
- Store plugin path and avoid dupes HOT 2
- r_log NULL pointer deref on macOS HOT 1
- [AIX] Compile fail HOT 1
- [AIX] debugging support
- r2 broken on 64-bit big endian ##port HOT 3
- [AIX] Huge symbol table
- [AIX] r2r silently fails when jq not available HOT 1
- Missing building target `patch-capstone` HOT 7
- r2pm -U error on windows 10 : git not found HOT 3
- global-buffer-overflow at /radare2/libr/arch/p/nds32/nds32-dis.h:994:6 in print_insn32_fpu HOT 1
- debug an executable with dive into its libraries HOT 2
- add ltrace like utility on r2
- Cursor mode bug with right/down key HOT 2
- git.5.8.8-946-gffd0573fc8 has heap-buffer-overflow at /radare2/shlr/java/code.c:164:61 in java_print_opcode HOT 1
- help~ : the usage of the dts... HOT 2
- Error when installing HOT 3
- pdb not working on windows with `-e "pdb.autoload=true"`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from radare2.