Skip to content
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

I miss the command ldd of Cygwin/MSYS2 #168

Open
chatchoi opened this issue Sep 7, 2024 · 14 comments
Open

I miss the command ldd of Cygwin/MSYS2 #168

chatchoi opened this issue Sep 7, 2024 · 14 comments

Comments

@chatchoi
Copy link

chatchoi commented Sep 7, 2024

I used this command in Linux/FreeBSD. I was very surprise that it's available on Cygwin/MSYS2 and it's working very well indeed. I expected it's just a stub and will not do anything useful on Windows. It turned out that I was wrong. I use it as the replacement for the deprecated Dependency Walker and the new bloated Dependencies tool written in .NET.

@chatchoi
Copy link
Author

chatchoi commented Sep 7, 2024

@brechtsanders' pedeps utility looks cool. But I still think ldd is easier to use.

@brechtsanders
Copy link

@brechtsanders' pedeps utility looks cool. But I still think ldd is easier to use.

That's fine. The primary goal of pedeps was to have a library for looking into .exe and .dll files.

@skeeto
Copy link
Owner

skeeto commented Sep 7, 2024 via email

@brechtsanders
Copy link

What about the one at https://github.com/Sharp0802/lddw ?

@skeeto
Copy link
Owner

skeeto commented Sep 7, 2024 via email

@mh466lfa
Copy link

mh466lfa commented Sep 8, 2024

@brechtsanders' pedeps utility looks cool. But I still think ldd is easier to use.

That's fine. The primary goal of pedeps was to have a library for looking into .exe and .dll files.

@skeeto pedeps is not only a library, it also has an utility named listpedeps that doing pretty much what ldd does. You can skip the libavl dependency if you don't build the copypedeps utility.

@chatchoi
Copy link
Author

chatchoi commented Sep 8, 2024

It seems listpedeps can't handle dependencies of a dependency properly. ldd can list every dynamic libraries required for the program to run. I don't care about if it actually tries to execute the program to get the list of dependencies or not. This is what the ldd utility on Unix does and I don't think it's a problem.

@brechtsanders
Copy link

If a specific added feature would be nice to have in listpedeps don't hesitate to describe the wanted feature in a ticket at https://github.com/brechtsanders/pedeps/issues

@mh466lfa
Copy link

mh466lfa commented Sep 8, 2024

If a specific added feature would be nice to have in listpedeps don't hesitate to describe the wanted feature in a ticket at https://github.com/brechtsanders/pedeps/issues

Is it possible to tell listpedeps to not include IMPORTS (or EXPORTS) in its output?

@brechtsanders
Copy link

Do you mean you want command options to only get output like this?

architecture: x86_64
machine name: AMD AMD64 (x64)
subsystem:    Windows console
DLL:          no
stripped:     yes
file version: 0.0
minimum Windows version: 5.2

@mh466lfa
Copy link

mh466lfa commented Sep 9, 2024

Do you mean you want command options to only get output like this?

architecture: x86_64
machine name: AMD AMD64 (x64)
subsystem:    Windows console
DLL:          no
stripped:     yes
file version: 0.0
minimum Windows version: 5.2

I consider this to be the standard information about the binary. But I don't want to view both IMPORTS and EXPORTS at the same time. There should be option switches to display only IMPORTS (e.g: -i?) or EXPORTS (e.g: -e?).

@chatchoi
Copy link
Author

chatchoi commented Sep 9, 2024

listpedeps doesn't accept the -h switch? I want to view help.

@brechtsanders
Copy link

Fixed in https://github.com/brechtsanders/pedeps/releases/tag/0.1.14

@MagicalDrizzle
Copy link

I never found a native ldd implementation for Windows, just Cygwin/MSYS2. Otherwise, if it was of suitable quality I would have included it already. The last couple w64dk releases have a new command, peports, for listing import and export tables. In its roadmap (see the src/peports.c header) I listed a possible recursive mode that searches PATH for imported modules and keeps going, which if implemented would be like ldd.

I found this a while back, and it seems to work fine.
https://github.com/marcoesposito1988/dependency_runner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants