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

[bug] paths for environment files are not formatted for subsystem when run in win_bash on Windows #11980

Open
jellespijker opened this issue Aug 30, 2022 · 1 comment

Comments

@jellespijker
Copy link
Contributor

The wrapped_user_cmd in the subsystems.py doesn't take the subsystem into account, for the environment .sh files after the bash statement

Environment Details (include every applicable attribute)

  • Operating System+version: Windows 11
  • Compiler+version: N/A
  • Conan version: 1.50.1 (and dev)
  • Python version: 3.10.4

Steps to reproduce (Include if Applicable)

Run the create command on a recipe which uses msys2 on Windows.
I'm currently working on my attempt to modernize the autoconf recipe https://github.com/Ultimaker/conan-center-index/blob/modernize_autoconf/recipes/autoconf/all/conanfile.py

Logs (Executed commands with output) (Include/Attach if Applicable)

----Running------
> "C:\.conan\376fd79\1\build-release\conan\conanbuild.bat" && "C:\.conan\376fd79\1\build-release\conan\msys2_mode.bat" && C:\.conan\7c3916\1\bin\msys64\usr\bin\bash.exe -c ^". \^"C:\.conan\376fd79\1\build-release\conan\conanbuild.sh\^" ^&^& \^"/c/.conan/376fd79/1/source/configure\^" --prefix=/ --bindir=${prefix}/bin --sbindir=${prefix}/bin --libdir=${prefix}/lib --includedir=${prefix}/include --oldincludedir=${prefix}/include ^"

notice the formatting of the conanbuild.sh path: C:\.conan\376fd79\1\build-release\conan\conanbuild.sh

@jellespijker
Copy link
Contributor Author

Should be a simple enough fix, will open up a PR for this

jellespijker pushed a commit to Ultimaker/conan that referenced this issue Aug 30, 2022
The shell script for the environments should be formated based on
the subsystem now.

Fixes conan-io#11980
jellespijker added a commit to Ultimaker/conan-center-index that referenced this issue Sep 8, 2022
Using some duck typing and inheritance to work around
GH issue conan-io/conan#11980

Contributes to CURA-9595
jellespijker added a commit to Ultimaker/conan-center-index that referenced this issue Sep 8, 2022
Using some duck typing and inheritance to work around
GH issue conan-io/conan#11980

Contributes to CURA-9595
jellespijker added a commit to Ultimaker/conan-center-index that referenced this issue Sep 8, 2022
Using some duck typing and inheritance to work around
GH issue conan-io/conan#11980

Contributes to CURA-9575
jellespijker pushed a commit to Ultimaker/conan-center-index that referenced this issue Sep 15, 2022
Should be reverted once conan-io/conan#11980 is fixed

Contributes to CURA-9575
conan-center-bot pushed a commit to conan-io/conan-center-index that referenced this issue Nov 8, 2022
* autoconf v2 ready

Note: test_package can't use the new Autools generator
due to conan-io/conan#11975

* Revert removal of PATH from env_info

From review comment

* use unix_path instead of private import functions

According review comment

* use unix_path instead of private import functions

According review comment

* pass self to unix_path

* applied review comments

KB-H013 states that everything needs to be installed under bin for tools.
This also means that the `PATH` for the actual bin location `bin/bin` needs
to be added to the `build_env`

* Add licenses to package

* Explicitly use an empty includedirs

Should fix KB-H071

* Fix setting unix_path for package_info

subsystem isn't known at this time

* simplified test_package

No need to actually compile something with this tool
we simply need to know if it runs.

The win_bash for the run needs to be set explicitly
due to the conf not working properly in the test_package
see conan-io/conan#11975

* Revert "simplified test_package"

This reverts commit d9ee4de.

* use modern tools in test_package

* add conan test_v1_package

* m4 is a build requirement

* Ducktype Autotools `configure` and `make`

This allows us to use the msys2 bash without using the conf_info
in the test_package. Which is currently problematic due to:
conan-io/conan#11975

Contributes to CURA-9574

* Fix paths on windows in test method

Contributes to CURA-8831

* Don't ducktype but inherit

The ducktyping seems to affect the usage
of the Autotools in the main recipe as well

Contributes to CURA-8831

* use unix_path for env_info

Contributes to CURA-8831

* remove extra lin

Contributes to CURA-8831

* don't use unix_path

The subsystem isn't known when consuming projects request the info

Contributes to CURA-8831

* fix subsystems on Windows

Using some duck typing and inheritance to work around
GH issue conan-io/conan#11980

Contributes to CURA-9595

* updated autoconf for conan v2 ready support

Contribute to CURA-8831

* autoconf bin contains shell scripts not executable

Contribute to CURA-8831

* Removed Autotools workaround from test_package

Still an issue: conan-io/conan#11975

Contribute to CURA-8831

* m4 is a run requirement not a tool_req

Contribute to CURA-8831

* use mingw32 for gnu tuple

version 2.69 doesn't known mingw64,
it should hold no difference for the
end result.

Contribute to CURA-8831

* Run the configure command in the build_folder

Contributes to CURA-8831

* Use conanbuild env as scope for testing

Contribute to CURA-8831

* Ensure that M4 binary from dependency is used

Contributes to CURA-8831

* Set win_bash in configure stage

Contributes to CURA-8831

* Move conf keys to user space

Applies code-review comments

* Use *_folder in favor of undocumented *_path

Applies code-review comments

* Reuse source files from test_package

Applies code-review comments

* Apply suggestions from code review

Co-authored-by: Jordan Williams <jordan@jwillikers.com>

* Use export_conandata_patches

Bump up the minimum conan version to 1.52

Applies code-review comments

* Removed unused conf_info values

As descibed in #13490

Applies code-review comments

* Check against empty string for conf value bash path

Apply code review comment

* Update recipes/autoconf/all/conanfile.py

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>

* Apply suggestions from code review

Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>

Co-authored-by: j.spijker@ultimaker.com <jelle spijker>
Co-authored-by: Jordan Williams <jordan@jwillikers.com>
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
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

Successfully merging a pull request may close this issue.

1 participant