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

C:\Strawberry\c\bin\cmake.exe could not find libexpat-1.dll #219

Open
code4lala opened this issue Oct 11, 2024 · 12 comments
Open

C:\Strawberry\c\bin\cmake.exe could not find libexpat-1.dll #219

code4lala opened this issue Oct 11, 2024 · 12 comments
Labels

Comments

@code4lala
Copy link

code4lala commented Oct 11, 2024

image

if I copy C:\Strawberry\c\bin\libexpat-1__.dll to C:\Strawberry\c\bin\libexpat-1.dll, copy the dll file and remove two underlines, cmake.exe would work.

strawberry perl version strawberry-perl-5.40.0.1-64bit.msi

@shawnlaffan
Copy link
Contributor

I am not sure this is a Strawberry Perl issue.

cmake is not distributed with Strawberry Perl 5.40 due to clashes with other packaging systems.

If you are deriving it from elsewhere then you need to ensure it has access to the relevant DLLs it depends on.

@code4lala
Copy link
Author

The cmake is from the strawberry perl package, I downloaded the strawberry perl msi from the official site:

https://strawberryperl.com/

https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54001_64bit_UCRT/strawberry-perl-5.40.0.1-64bit.msi

@mohawk2
Copy link

mohawk2 commented Oct 11, 2024

I think cmake being included is a great idea. It just sounds like it needs this double-underscore business including in Strawberry's cmake-visible packaging info.

@shawnlaffan
Copy link
Contributor

I stand corrected. It comes from winlibs and should have been removed before we cut the release.

We could look at building our own cmake but there is an Alien::cmake that works well. That also avoids issues such as SP 5.36 which had an old version of cmake that got in the way of another toolchain (I don't remember all the details at the moment).

See also #154

@mohawk2
Copy link

mohawk2 commented Oct 11, 2024

Auditing things sounds like a good idea! But this doesn't seem like a problem with building cmake, only with the info it finds within the distro.

@code4lala can you take us through the steps you took to find this problem? Did you make a local cmake distro, and if so, can you share all the parts of it so we could try that out?

@code4lala
Copy link
Author

@mohawk2 sure, it's easy! just download https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54001_64bit_UCRT/strawberry-perl-5.40.0.1-64bit.msi and install it! then go to explorer and navigvate to C:\Strawberry\c\bin, double click cmake.exe

@mohawk2
Copy link

mohawk2 commented Oct 11, 2024

@code4lala I don't think that is supposed to do very much. It's not a GUI application. When you say it "worked" after the DLL copying, what do you mean?

@code4lala
Copy link
Author

@mohawk2 after copying, cmake would not pop up an error window, and it works, I can use it to build my project.

@mohawk2
Copy link

mohawk2 commented Oct 11, 2024

@code4lala Can you try undoing the copy/rename, and then using it to build your project? I want to test whether SP5.40 can use its supplied cmake to build projects, and double-clicking it in Explorer isn't part of that.

@shawnlaffan
Copy link
Contributor

I don't have the MSI version installed at the moment but it should be the same as the portable version.

This has libexpat-1.dll and cmake runs without error.

@code4lala - I wonder if your installation has gone wrong somewhere.

\perls\5.40.0.1_PDL\c\bin\cmake
Usage

  cmake [options] <path-to-source>
  cmake [options] <path-to-existing-build>
  cmake [options] -S <path-to-source> -B <path-to-build>

Specify a source directory to (re-)generate a build system for it in the
current working directory.  Specify an existing build directory to
re-generate its build system.

Run 'cmake --help' for more information.

Also, that cmake depends on several more DLLs than libexpat-1.dll. See below.

objdump -x \perls\5.40.0.1_PDL\c\bin\cmake.exe | findstr DLL
 vma:            Hint    Time      Forward  DLL       First
        DLL Name: libarchive-13.dll
        DLL Name: libcurl-4.dll
        DLL Name: libexpat-1.dll
        DLL Name: librhash.dll
        DLL Name: libuv-1.dll
        DLL Name: zlib1.dll
        DLL Name: ADVAPI32.dll
        DLL Name: CRYPT32.dll
        DLL Name: KERNEL32.dll
        DLL Name: api-ms-win-crt-convert-l1-1-0.dll
        DLL Name: api-ms-win-crt-environment-l1-1-0.dll
        DLL Name: api-ms-win-crt-filesystem-l1-1-0.dll
        DLL Name: api-ms-win-crt-heap-l1-1-0.dll
        DLL Name: api-ms-win-crt-locale-l1-1-0.dll
        DLL Name: api-ms-win-crt-math-l1-1-0.dll
        DLL Name: api-ms-win-crt-private-l1-1-0.dll
        DLL Name: api-ms-win-crt-runtime-l1-1-0.dll
        DLL Name: api-ms-win-crt-stdio-l1-1-0.dll
        DLL Name: api-ms-win-crt-string-l1-1-0.dll
        DLL Name: api-ms-win-crt-time-l1-1-0.dll
        DLL Name: api-ms-win-crt-utility-l1-1-0.dll
        DLL Name: ole32.dll
        DLL Name: OLEAUT32.dll
        DLL Name: PSAPI.DLL
        DLL Name: libwinpthread-1.dll
        DLL Name: SHELL32.dll
        DLL Name: USER32.dll
        DLL Name: WS2_32.dll
        DLL Name: libgcc_s_seh-1.dll
        DLL Name: libstdc++-6.dll

@code4lala
Copy link
Author

@mohawk2 undoing the copy/rename, and then using it to build your project -> cmake just exit without printing anything.
@shawnlaffan the msi installation didn't report any error.

@shawnlaffan
Copy link
Contributor

There have been no updates to this issue for a while now.

My suspicion is that it is an issue with the user system, possibly mixed paths. Such a situation will not provide an error on installation.

I'll close this in a few days or when I next do a sweep of issues.

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

No branches or pull requests

3 participants