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

libdeflate: conan v2 support #13759

Merged
merged 9 commits into from
Nov 4, 2022

Conversation

paulharris
Copy link
Contributor

Finishing the v2 upgrade

@conan-center-bot

This comment has been minimized.

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

Please, remove .CMakeLists.txt.swp

recipes/libdeflate/all/test_v1_package/conanfile.py Outdated Show resolved Hide resolved
paulharris and others added 2 commits October 27, 2022 20:40
@conan-center-bot

This comment has been minimized.

1 similar comment
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

uilianries
uilianries previously approved these changes Oct 28, 2022
Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

LGTM

env.generate()

if is_msvc(self) or self._is_clangcl:
vc = VCVars(self)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does VirtualBuildEnv automatically handle VCVars?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think so.

https://docs.conan.io/en/latest/reference/conanfile/tools/microsoft.html?highlight=vcvars#msbuild

It only handles msbuild stuff. VirtualBuildEnv is more related to environment variables.

Copy link
Contributor

Choose a reason for hiding this comment

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

How does building most packages work then, when I'm not in a Visual Studio Developer Command Prompt? I figured they would fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

The msbuild helper does that step 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jwillikers one of the reasons I want to upgrade these recipes is so I can build everything in my git-bash-SDK-msys terminal on windows. And so far, the new recipes seem to be doing it well.

recipes/libdeflate/all/test_v1_package/CMakeLists.txt Outdated Show resolved Hide resolved
recipes/libdeflate/all/conanfile.py Outdated Show resolved Hide resolved
@uilianries uilianries self-requested a review October 28, 2022 15:35
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.

theres some good comments above

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

This comment has been minimized.

with chdir(self, self.source_folder):
# TODO: replace by autotools.install() once https://github.com/conan-io/conan/issues/12153 fixed
# Note that PREFIX=/ also appears to be required on Linux.
autotools.install(args=["PREFIX=/", f"DESTDIR={unix_path(self, self.package_folder)}"])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jwillikers @uilianries continuing from other comment,

I get messages like:

install -m755 libdeflate.so.0 /build/conandata/conan-data/libdeflate/1.14/ccitest/test1/package/0582ee0920dad9fef631620d3ef80b963208d3a1/usr/local/lib;

Note it installs to /usr/local/lib

and then, [HOOK - conan-center.py] post_package(): ERROR: [DEFAULT PACKAGE LAYOUT (KB-H013)] Unknown folder 'usr' in the package (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H013)

and CMake Error at build/generators/cmakedeps_macros.cmake:39 (message): Library 'deflate' not found in package. If 'deflate' is a system library, declare it with 'cpp_info.system_libs' property Call Stack (most recent call first):

I know autotools adds PREFIX=/ to configure calls, but it didn't seem to be done this time.
Weirdly, it works on Windows without PREFIX=/

Copy link
Contributor

@jwillikers jwillikers Nov 2, 2022

Choose a reason for hiding this comment

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

Oh wait, this is a Makefile project and not actually Autotools, right? AutotoolsToolchain passes --prefix to the Autotools configure script. You wouldn't have that here so you'd have to use PREFIX or whatever the Makefile might expect. You can probably drop the DESTDIR then. I'm sorry for the confusion. We might need a dedicated generator for Makefile projects that doesn't require using things with Autotools in the name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, dropped and just use PREFIX

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline

All green in build 8 (b270cebdb684372d0b380ef0f22cff8a72b4c43d):

  • libdeflate/1.12@:
    All packages built successfully! (All logs)

  • libdeflate/1.14@:
    All packages built successfully! (All logs)

  • libdeflate/1.10@:
    All packages built successfully! (All logs)

  • libdeflate/1.7@:
    All packages built successfully! (All logs)

  • libdeflate/1.8@:
    All packages built successfully! (All logs)

  • libdeflate/1.9@:
    All packages built successfully! (All logs)

@conan-center-bot conan-center-bot merged commit e4acad0 into conan-io:master Nov 4, 2022
@SpaceIm
Copy link
Contributor

SpaceIm commented Nov 4, 2022

  Checking Build System
  Building Custom Rule C:/J/w/prod/BuildSingleReference/conan-center-index/recipes/libdeflate/all/test_package/CMakeLists.txt
  test_package.c
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library [C:\J\w\prod\BuildSingleReference\conan-center-index\recipes\libdeflate\all\test_package\build\test_package.vcxproj]
  test_package.vcxproj -> C:\J\w\prod\BuildSingleReference\conan-center-index\recipes\libdeflate\all\test_package\build\Release\test_package.exe
  Building Custom Rule C:/J/w/prod/BuildSingleReference/conan-center-index/recipes/libdeflate/all/test_package/CMakeLists.txt
libdeflate/1.14 (test package): Running test()

bad bad bad

Again, migration of recipes relying on VisualStudioBuildEnvironment should be double checked. Need the same fix done in #13851

@SpaceIm
Copy link
Contributor

SpaceIm commented Nov 4, 2022

fix here: #14028

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.

6 participants