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

MSYS2 / Build faild on libs not found when using "eine/setup-msys2@v1" action #25

Closed
BrightRan opened this issue Jun 11, 2020 · 9 comments
Labels
needinfo question Further information is requested

Comments

@BrightRan
Copy link

The link below is the workflow we tested with "eine/setup-msys2@v1" action.
https://github.com/ForksForTest/haven-offshore/actions/runs/131995709/workflow

After using the "eine/setup-msys2@v1" action to install some specified packages, in the "build Haven for windows x64" step, we always get the errors like as below from the logs:

-- Building internal libraries as static
-- MSYS location: D:/a
-- Could not find DATABASE in env (not required unless you want to change database type from default: lmdb)
-- Using LMDB as default DB type
-- looking for liblzma
-- Could not find libunwind (missing: LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES) 
-- Stack trace on exception disabled
CMake Error at D:/a/_temp/msys/msys64/mingw64/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
  OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
-- Configuring incomplete, errors occurred!
See also "D:/a/haven-offshore/haven-offshore/monero/build/release/CMakeFiles/CMakeOutput.log".
  D:/a/_temp/msys/msys64/mingw64/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  D:/a/_temp/msys/msys64/mingw64/share/cmake-3.17/Modules/FindOpenSSL.cmake:459 (find_package_handle_standard_args)
  CMakeLists.txt:465 (find_package)


make: *** [Makefile:151: release-static-win64] Error 1

But, when we switch to use "eine/setup-msys2@v0" action, everything is OK, see the link below.
https://github.com/ForksForTest/haven-offshore/actions/runs/131996395/workflow

You can see we did not changes anything except the version ref of the setup-msys2 action.
and I found that, when executing "eine/setup-msys2@v1", it only took less than 3 minutes, but "eine/setup-msys2@v0" took about 10 minutes with the settings.

I think there may be some issue on "eine/setup-msys2@v1" that cause some packages were not installed. This also can explain why it took a shot time to execute.

@eine
Copy link
Collaborator

eine commented Jun 11, 2020

Possible short answer: add base-devel to the 'install' field.

Longer answer. In v0 with update: true, this action used the default installation available in the virtual environment. That includes several extra packages which are not installed in the official distribution: #23 (comment). In v1, the official distribution is used instead, and no extra packages are installed by default. That's why you need to add base-devel and probably some other.

This also can explain why it took a shot time to execute.

Strictly, execution time difference is not related to this. With v0, almost all the preinstalled packages need to be removed and reinstalled, because the virtual environment is out of date. That's what takes 10 min. When using v1, even if you need to install the same packages, it takes much shorter (1-3 min).

@eine eine added the question Further information is requested label Jun 11, 2020
@goshiz
Copy link

goshiz commented Jun 11, 2020

Hi @eine I'm the one that having this issue, thanks @BrightRan that report this problem.

I'm gonna try this.

Thanks !

@eine
Copy link
Collaborator

eine commented Jun 11, 2020

Hi @goshiz! For reference, the packages that are installed by default in v0 but not in v1 are the following: https://github.com/actions/virtual-environments/blob/master/images/win/scripts/Installers/Install-Msys2.ps1#L56-L63

@BrightRan
Copy link
Author

BrightRan commented Jun 12, 2020

@eine ,
Thanks for your reply.
I tested as your suggestion that adding base-devel to the install field when using v1, but still get the same errors. See the link below:
https://github.com/ForksForTest/haven-offshore/actions/runs/133155318/workflow#L19

If I missed something, please tell me, thanks.

@eine
Copy link
Collaborator

eine commented Jun 12, 2020

Hi @BrightRan, on the one hand, https://github.com/ForksForTest/haven-offshore/actions/runs/133155318/workflow#L29-L31 feels strange. I'd add those packages to the install field above. What's the motivation to install them in a separate step? On the other hand, https://github.com/ForksForTest/haven-offshore/runs/764897929?check_suite_focus=true#step:5:409 seems to tell that you are missing development sources. I.e., you might need openssl-devel (headers), and not only openssh (pre-built binaries).

@lazka lazka added the needinfo label Jul 10, 2020
@eine
Copy link
Collaborator

eine commented Jul 26, 2020

@BrightRan, did you try v2 of this Action?

@eine eine closed this as completed Nov 8, 2020
@goshiz
Copy link

goshiz commented Mar 30, 2021

Hey @eine yes I updated to v2 a few days ago.

It's working fine but for an unknown reason now all my static build are not static anymore...

@eine
Copy link
Collaborator

eine commented Mar 30, 2021

@goshiz I think I read something about the issue with static builds, which is related to the MSYS2 repos, not to this action. However, I can't find it now. @lazka, any hint?

@lazka
Copy link
Member

lazka commented Mar 30, 2021

no idea, sorry. I never do static builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needinfo question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants