Comments (27)
Well, maybe my box is somehow broken, but here I had to create a symlink to use pev:
$ cat /etc/issue
Debian GNU/Linux 8 \n \l
$ sudo make install
cd lib/libpe && make install
make[1]: Entering directory '/home/user/pev/lib/libpe'
install -m 644 libpe.so /usr/local/lib/libpe.so.1.0
cd /usr/local/lib; ln -sf libpe.so.1.0 libpe.so
cd /usr/local/lib; ln -sf libpe.so.1.0 libpe.so.1
make[1]: Leaving directory '/home/user/pev/lib/libpe'
cd src && make install
make[1]: Entering directory '/home/user/pev/src'
for prog in readpe rva2ofs ofs2rva pehash pesec pescan pepack pestr pedis peres; do \
install ./build/$prog /usr/local/bin; \
test -f ./../doc/manpages/$prog.1 && \
gzip -c -9 ./../doc/manpages/$prog.1 > /usr/local/share/man/man1/$prog.1.gz || \
echo -n; \
done
install -m 644 ./userdb.txt /usr/local/share/pev
cd ./plugins && make install
make[2]: Entering directory '/home/user/pev/src/plugins'
install -m 755 .././build/plugins/csv_plugin.* /usr/local/lib/pev/plugins
install -m 755 .././build/plugins/html_plugin.* /usr/local/lib/pev/plugins
install -m 755 .././build/plugins/text_plugin.* /usr/local/lib/pev/plugins
install -m 755 .././build/plugins/xml_plugin.* /usr/local/lib/pev/plugins
install -m 755 .././build/plugins/json_plugin.* /usr/local/lib/pev/plugins
make[2]: Leaving directory '/home/user/pev/src/plugins'
make[1]: Leaving directory '/home/user/pev/src'
$ readpe
readpe: error while loading shared libraries: libpe.so.1: cannot open shared object file: No such file or directory
$ ldd $(which readpe)
linux-vdso.so.1 (0x00007ffe779d1000)
libpe.so.1 => not found
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0048dd5000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0048a2a000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0048fd9000)
$ ls /usr/local/lib/libpe*
/usr/local/lib/libpe.so /usr/local/lib/libpe.so.1 /usr/local/lib/libpe.so.1.0
$ sudo ln -s /usr/local/lib/libpe.so.1.0 /usr/lib/libpe.so.1
$ readpe
Usage: readpe OPTIONS FILE
Show PE file headers
Example: readpe --header optional winzip.exe
Options:
-A, --all full output (default)
-H, --all-headers print all PE headers
-S, --all-sections print all PE sections headers
-f, --format <json|csv|xml|html|text> change output format (default: text)
-d, --dirs show data directories
-h, --header <dos|coff|optional> show specific header
-i, --imports show imported functions
-e, --exports show exported functions
-V, --version show version and exit
--help show this help and exit
from readpe.
@skitt: Thank you for reporting this issue! It was a slip-up from my part. Would you mind checking whether it's ok now?
@merces: Are you ok with the changes proposed in the PR above?
from readpe.
Thanks, that seems good to me!
from readpe.
Cool. Merged. Thanks again!
from readpe.
Thank you both @skitt and @jweyrich. Really thanks for keeping the project alive. 👍
from readpe.
Hi. Do you plan to make a new release with this change in place? If so, you might want to include the patch used in the Debian package too, available from https://anonscm.debian.org/cgit/collab-maint/pev.git/tree/debian/patches/ .
from readpe.
@petterreinholdtsen it was not really fast from our part, but @merces is working on a new release right now. Yay!
I suspect the issue related to DESTDIR was fixed sometime ago. Thank you for the patch anyway!
from readpe.
from readpe.
Hi @petterreinholdtsen, we'll release anytime soon. :-)
So are you a Debian package maintainer? I always wanted to have pev in Debian but packaging it became too complex for me. I saw the link you mentioned and apparently you updated the package from version 0.40 to 0.50 in Debian repositories, is that right? Anyway, thank you very much!
Could you please have a look at the current repository and see if there is anything else we have to change in order to have it in Debian?
Thanks in advance!
from readpe.
One thing I've noticed just now is that https://github.com/merces/pev/blob/master/src/plugins/Makefile doesn't use DESTDIR in its install target, that would be nice to have (especially since the DESTDIR fixes from https://anonscm.debian.org/cgit/collab-maint/pev.git/tree/debian/patches/install-target.patch have been applied).
from readpe.
Hi @skitt do you mind sending a PR? I am working on another bug right now. :-)
from readpe.
Actually since src/Makefile defines pluginsdir with DESTDIR, it's all good, no need to change anything.
from readpe.
Thanks, @skitt! If you want to start the packaging, I guess it is a good time. The release will be really soon and only small changes, if so, will occur. ;-)
from readpe.
from readpe.
Nice. I know Paulo (@kretcheu) in person and he has been trying to finish this package for a while. To be honest, I am the bottleneck here but will catch up with him asap!
from readpe.
I'm not sure who is working (or will work) on the package, if anyone, so I'm mentioning everyone already mentioned in this issue.
@petterreinholdtsen @skitt @kretcheu: We'd be glad to accept a PR containing your work related to packaging. We could create a directory structure like dist/deb/. What do you think?
We don't know why some distros don't include /usr/local/lib
in LD_LIBRARY_PATH
. Today, if DESTDIR is not specified during compilation/installation, libpe.so ends up in /usr/local/lib, and pev binaries in /usr/local/bin. However, in distros that don't include /usr/local/lib
in LD_LIBRARY_PATH, the installed pev binaries can't find/load the libpe library. We thought of enforcing the absolute path $DESTDIR/$(libdir)
when building the pev binaries, but it definitely doesn't seem a good option if a package wants to install the libpe somewhere else. Another option would be to add $DESTDIR/$(libdir)
to /etc/ld.so.conf
or /etc/ld.so.conf.d/something.conf
, which also doesn't seem good for some reason - not sure why. Do you have an opinion or suggestion?
from readpe.
Regarding the first point, we prefer to keep packaging separate from upstream sources (see https://wiki.debian.org/UpstreamGuide and in particular https://wiki.debian.org/UpstreamGuide#Pristine_Upstream_Source for a more detailed explanation). So packaging would go in a Debian git repository, not on GitHub; in fact it's already hosted on https://anonscm.debian.org/cgit/collab-maint/pev.git
Regarding the second point, distribution packages only ship files in /usr
, never /usr/local
. The package build always specifies DESTDIR
, and pev's build system is already set up correctly for distributions (so please don't change anything there!). I'm surprised that some distributions ignore /usr/local/lib; do you have examples? I'd expect distributions to configure ld.so
to check /usr/local/lib
, otherwise local installations wouldn't work... In Debian, this is set up by /etc/ld.so.conf.d/libc.conf
.
from readpe.
Also, it's important to understand that DESTDIR
is for installation purposes only, it must never be referenced at runtime. It would cause huge problems in distribution packaging if you forced $(DESTDIR)/$(libdir)
to be the library path — $DESTDIR
points to a temporary folder used during the build, it's not the real location of the libraries after package installation.
from readpe.
Arch Linux is one example - https://bugs.archlinux.org/task/20059?project=1&opened=2263
from readpe.
That Arch bug was fixed in November 2010...
from readpe.
Oops! I should have read the close-reason. My bad!
According to @merces, Debian 8 does not include it by default.
from readpe.
That's weird, my Debian 8 systems include it (using the default setup).
from readpe.
@merces do you have a /etc/ld.so.conf.d/libc.conf
file? It should exist and contain /usr/local/lib
.
from readpe.
Yes I do.
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
$ cat /etc/ld.so.conf.d/libc.conf
# libc default configuration
/usr/local/lib
But I'll be glad if only my box is broken. It's just a test VM. What I didn't want is to have is our users unable to launch pev programs right after installing it manually. ;-)
from readpe.
Ah, you need to run ldconfig
after installing the library.
from readpe.
Yes, that worked! Thanks.
By the way, we just released v0.80. Thank you all!
from readpe.
Awesome! @skitt thank you very much for all the support & lessons!
from readpe.
Related Issues (20)
- Crud in sourceforge tarball HOT 12
- Peres -v shows a lot of useless (debug) info. Is this intentional? HOT 4
- readpe crashed when I use -e HOT 6
- build failed in windows HOT 2
- Compiling with flat namespace causes build for Homebrew to fail HOT 6
- It occurred ERROR when I make pev in Linux. HOT 4
- AVX / AVX2 / AVX512 support HOT 1
- Project name change? HOT 6
- readpe: garbage in Date/time stamp output HOT 1
- Update list of known machine types HOT 3
- Truncated section names HOT 3
- lib/libpe/hashes.c: `pe_err_e get_headers_optional_hash()` calls `exit()` instead of returning a proper return value.
- pesec: fails to properly read PE file on s390x HOT 3
- readpe: symbol lookup error: /usr/lib/libpe.so.1: undefined symbol: _ZGVdN4v_log2 HOT 12
- Support for NE files HOT 3
- _FORTIFY_SOURCE level downgrading HOT 1
- Broken tests HOT 1
- Version bump HOT 1
- Windows binary included in readpe with no source HOT 4
- v0.83 re-release? HOT 6
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 readpe.