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

runtime dll copy #22

Open
Trass3r opened this issue Aug 14, 2019 · 3 comments
Open

runtime dll copy #22

Trass3r opened this issue Aug 14, 2019 · 3 comments

Comments

@Trass3r
Copy link

Trass3r commented Aug 14, 2019

I'm not sure what this is supposed to do:

dlls="$(find ${installFolder}/ -name '*.exe' -exec ${triplet}-objdump -p {} \; | sed -ne "s/^.*DLL Name: \(.*\)$/\1/p" | sort | uniq)"

  • The sed part should use single quotes. Not sure how this ever worked.
  • On Linux it's trying to copy dlls from /usr/x86_64-w64-mingw32/bin/ which don't exist of course.
  • Will there ever be any runtime dlls required? Shouldn't it produce "static" executables?
  • Otoh it does not copy sources/python-2.7.16.amd64/python27.dll which it probably should (?) to produce a self-contained package.
@FreddieChopin
Copy link
Owner

I'm not sure what this is supposed to do:

It tries to copy as many *.dll files required by executables as possible (;

The quotes are incorrect.

You need to be more specific, as in here it works perfectly fine (;

On Linux it's trying to copy dlls from /usr/x86_64-w64-mingw32/bin/ which don't exist of course.

Some of them exist - these are toolchain-specific and will be copied. Some of them don't exist - these are Windows-specific and won't be copied. This is fine.

Will there ever be any runtime dlls required? Shouldn't it produce "static" executables?

This may depend on your toolchain configuration. On ArchLinux (which I'm using) almost everything is dynamic. The command above copies just libwinpthread-1.dll now, but I'm almost sure some time ago it copied a little bit more. Maybe its because I now don't have mingw-w64-termcap installed?

Otoh it does not copy sources/python-2.7.16.amd64/python27.dll which it probably should (?) to produce a self-contained package.

To use python-enabled GDB you will need a full python installation anyway. At least that's my understanding, I never managed to use this python-enabled GDB variant on Windows, so I may be completely wrong. But I don't have any specific opinion here so I'm open to change that.

@Trass3r
Copy link
Author

Trass3r commented Aug 14, 2019

The quotes are incorrect.

You need to be more specific, as in here it works perfectly fine (;

Referring to the sed part. Updated it.

Will there ever be any runtime dlls required? Shouldn't it produce "static" executables?

This may depend on your toolchain configuration. On ArchLinux (which I'm using) almost everything is dynamic. The command above copies just libwinpthread-1.dll now, but I'm almost sure some time ago it copied a little bit more. Maybe its because I now don't have mingw-w64-termcap installed?

I see. Are there toolchains without a static winpthread? If not maybe one should pass something like -static -static-libgcc -static-libstdc++.

Otoh it does not copy sources/python-2.7.16.amd64/python27.dll which it probably should (?) to produce a self-contained package.

To use python-enabled GDB you will need a full python installation anyway. At least that's my understanding, I never managed to use this python-enabled GDB variant on Windows, so I may be completely wrong. But I don't have any specific opinion here so I'm open to change that.

Not sure about that either.

@FreddieChopin
Copy link
Owner

Are there toolchains without a static winpthread?

Well, there is /usr/i686-w64-mingw32/lib/libwinpthread.a in my toolchain, so maybe the options you propose would indeed help. Will try.

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

2 participants