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

Add imagl/0.2.1 #4630

Merged
merged 29 commits into from
May 18, 2021
Merged

Add imagl/0.2.1 #4630

merged 29 commits into from
May 18, 2021

Conversation

Woazim
Copy link
Contributor

@Woazim Woazim commented Feb 20, 2021

Specify library name and version: imagl/0.2.0

  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

@conan-center-bot

This comment has been minimized.

recipes/imagl/all/conanfile.py Outdated Show resolved Hide resolved
recipes/imagl/all/conanfile.py Outdated Show resolved Hide resolved
@Woazim
Copy link
Contributor Author

Woazim commented Feb 21, 2021

Thanks @prince-chrismc. I will make some changes to take your advices into account. But there are compiling issues since last month, jenkins bot used Visual Studio 16.8 (according to logs). Now, it uses Visual Studio 16.4... I was surprised to find that my code was not compatible with this version, since Microsoft has moved a feature between two header files.

So I need to be more specific in the recipe to check the MSVC compiler version.

@prince-chrismc
Copy link
Contributor

I was surprised to find that my code was not compatible with this version, since Microsoft has moved a feature between two header files.

🙃

We have this

def lazy_lt_semver(v1, v2):
pattern if you need above a miniumum minor version

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@Woazim Woazim changed the title Add imagl/0.2.0 Add imagl/0.2.1 Feb 26, 2021
prince-chrismc
prince-chrismc previously approved these changes Mar 29, 2021
recipes/imagl/all/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/imagl/all/conanfile.py Outdated Show resolved Hide resolved
recipes/imagl/all/conanfile.py Outdated Show resolved Hide resolved
recipes/imagl/all/conanfile.py Outdated Show resolved Hide resolved
prince-chrismc referenced this pull request in prince-chrismc/conan-center-index-pending-review Apr 14, 2021
prince-chrismc referenced this pull request in prince-chrismc/conan-center-index-pending-review Apr 15, 2021
@conan-center-bot

This comment has been minimized.

Copy link
Contributor

@prince-chrismc prince-chrismc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding comments, I just want to clarity one thing you wrote

@@ -117,10 +133,31 @@ def requirements(self):
def _configure_cmake(self):
if self._cmake:
return self._cmake

# CMake generator must be set to Ninja when using Visual Studio to let choose the right
# MSVC compiler version when multiple versions are installed on build machine. The problem
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lingo I am most familiar with is "MSVC toolsets" and yes CMake which takes "VS2019" as an arg always chooses the highest one installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, "MSVC toolset" is more often understood as the main version of toolset (140 for VS2013, 141 for VS2017 and 142 for VS2019). This is why I wanted to be explicit about the version of the compiler (the "142" toolset includes the 14.2x versions of the toolset, each version of which contains the MSVC compiler in version 19.2x ...).

Comment on lines 146 to 147
# Building with specific MSVC version could be needed since imaGL requires some minimal
# version to be compiled according to its own version. Following table links imaGL version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this required for the build to pass on CCI?

In the Conan universe if you want to build an exact toolset you could use the new msvc compiler. (this is consistent with CMake)

Just as a sanity check,

Is this required ? Or is it an improvement?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's not required to pass on CCI. By the way, CCI is not able to build imaGL since tools.vswhere does not work on CCI (see #4954) and I don't know how to test for minor version of MSVC without vswhere. It's done from line 89 to 95. Some imaGL versions could be built in CCI (CCI has Visual Studio 16.4, so imaGL 0.1.2 and 0.2.1 could be built), but I don't know how to be sure that the recipe is cooked on the CCI CI/CD machine.

I do this in the recipe to allow imaGL to be built locally in a Visual Studio command line environment with a specific version of the toolset (using VCVARS and company environment variables). So the recipe is compatible with "Visual Studio" compiler from the Conan universe.

Still in this universe, using the new msvc compiler is allowed thanks to lines 47 and 53. But CCI still uses "Visual Studio".

Copy link
Contributor

@jgsogo jgsogo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to understand a couple of things that are being implemented in this recipe. It deserves some attention if we want it to be merged.

I have questions related to:

  • option allow_clang_11: I think it is not needed.
  • MSVC minor versions: if needed, we can upgrade the version, now we are using 19.28.29333. But the recipe cannot use vswhere in the validate() method because that method is running first in a Linux container... it could be used in the build() if it is really needed.

"clang": "10",
"apple-clang": "11"
}
if tools.Version(self.version) <= "0.1.1" or tools.Version(self.version) == "0.2.0":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version 0.2.0 is not listed in config.yml... is this a typo?

}
if tools.Version(self.version) <= "0.1.1" or tools.Version(self.version) == "0.2.0":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version 0.2.0 is not listed in config.yml... is this a typo?


@property
def _supports_jpeg(self):
return tools.Version(self.version) >= "0.2.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version 0.2.0 is not listed in config.yml... is this a typo?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's fine for me, I guess that jpeg support was added in 0.2.0, so it doesn't matter that exact 0.2.0 version was not in CCI, it makes the recipe more robust if for any reason 0.2.0 is added later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We started by adding 0.2.0 but there was a new point release since then

version="[{}.0,{}.0)".format(str(self.settings.compiler.version), int(str(self.settings.compiler.version))+1), latest=True, property_="installationVersion")[0]["installationVersion"]
toolset_version = tools.vcvars_dict(self).get("VCToolsVersion", os.environ.get("VCToolsVersion",""))
except ConanException:
raise ConanInvalidConfiguration("Your Visual Studio compiler seems not to be installed in a common way. It is not supported. This unfortunately happens in conan center index. To build imaGL, append '--build missing' to your 'conan install' command line.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose here? Probably we need a different approach. These lines are evaluated in the machine where Conan is running, in CCI we will run them in a Linux container which will not work as expected, and probably discard the intended configuration.

In the validate() we can use only the settings/options from the profile and dependencies. This method should be agnostic to everything else.

if self.options.shared:
del self.options.fPIC
if not self.settings.compiler.cppstd:
self.settings.compiler.cppstd = "20"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not assign a value here, it is not going to work... and future versions of Conan will fail here.

@Woazim
Copy link
Contributor Author

Woazim commented May 11, 2021

To answer to @jgsogo

option allow_clang_11: I think it is not needed.

This has already been discussed here. For short, it's because of a misinstallation in CCI for clang 11. See conan-io/conan-docker-tools#251 and conan-io/conan-docker-tools#252.

MSVC minor versions: if needed, we can upgrade the version, now we are using 19.28.29333. But the recipe cannot use vswhere in the validate() method because that method is running first in a Linux container... it could be used in the build() if it is really needed.

Ok, I understand now why it does not 'work'. So, since you are saying that you are using 19.28, I will totally remove this check which does not make sense anymore. Minimal version to build imaGL is 19.25 and CCI documentation prints that MSVC is 19.24 (Visual Studio 16.4)

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

All green in build 19 (0aab73292abef94d877b22b06baf31281322fc50):

  • imagl/0.1.0@:
    All packages built successfully! (All logs)

  • imagl/0.1.1@:
    All packages built successfully! (All logs)

  • imagl/0.1.2@:
    All packages built successfully! (All logs)

  • imagl/0.2.1@:
    All packages built successfully! (All logs)

@conan-center-bot conan-center-bot merged commit 496fd2b into conan-io:master May 18, 2021
@OleksandrKvl OleksandrKvl mentioned this pull request May 10, 2023
3 tasks
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 this pull request may close these issues.

9 participants