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

conanized zlib-ng 2.0.0 #5200

Closed
wants to merge 12 commits into from
Closed

Conversation

tomas-krupa
Copy link
Contributor

@tomas-krupa tomas-krupa commented Apr 12, 2021

Specify library name and version: zlib-ng/2.0.0

zlib data compression library for the next generation systems

Author: Hans Kristian Rosbach aka Dead2
Homepage: https://github.com/zlib-ng/zlib-ng


  • 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.

Signed-off-by: Tomas Krupa <tomas.krupa@innovatrics.com>
@CLAassistant
Copy link

CLAassistant commented Apr 12, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ tomas-krupa
❌ tkrupa
You have signed the CLA already but the status is still pending? Let us recheck it.

@conan-center-bot

This comment has been minimized.

Copy link
Contributor

@madebr madebr 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 the pr.
I've got some small remarks.

Please ask for EAP approval in #4 so we can advance.

recipes/zlib-ng/all/conanfile.py Outdated Show resolved Hide resolved
recipes/zlib-ng/all/conanfile.py Outdated Show resolved Hide resolved
recipes/zlib-ng/all/conanfile.py Outdated Show resolved Hide resolved
self.copy(pattern="*.a", dst="lib", src=self._build_subfolder, keep_path=False)
self.copy(pattern="*.lib", dst="lib", src=self._build_subfolder, keep_path=False)

self._rename_libraries()
Copy link
Contributor

Choose a reason for hiding this comment

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

please insert final newline

Suggested change
self._rename_libraries()
self._rename_libraries()

recipes/zlib-ng/all/test_package/CMakeLists.txt Outdated Show resolved Hide resolved
Comment on lines 15 to 21
bin_path = os.path.join("bin", "test_package")
buffer = StringIO()
try:
self.run(bin_path, run_environment=True, output=buffer)
self.output.success("enough.c test passed")
except:
self.output.error(buffer.getvalue())
Copy link
Contributor

Choose a reason for hiding this comment

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

There's no need to parse the output. Just check the return code.

Suggested change
bin_path = os.path.join("bin", "test_package")
buffer = StringIO()
try:
self.run(bin_path, run_environment=True, output=buffer)
self.output.success("enough.c test passed")
except:
self.output.error(buffer.getvalue())
if not tools.cross_building(self.settings):
bin_path = os.path.join("bin", "test_package")
self.run(bin_path, run_environment=True)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not parsing, just hiding excessive output of the test

recipes/zlib-ng/all/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/zlib-ng/all/conanfile.py Outdated Show resolved Hide resolved
recipes/zlib-ng/all/conanfile.py Outdated Show resolved Hide resolved
recipes/zlib-ng/all/conanfile.py Outdated Show resolved Hide resolved
Comment on lines 74 to 92
def _rename_libraries(self):
if self.settings.os == "Windows":
lib_path = os.path.join(self.package_folder, "lib")
suffix = "d" if self.settings.build_type == "Debug" else ""

if self.options.shared:
if self.settings.compiler == "Visual Studio":
current_lib = os.path.join(lib_path, "zlib%s.lib" % suffix)
os.rename(current_lib, os.path.join(lib_path, "zlib.lib"))
else:
if self.settings.compiler == "Visual Studio":
current_lib = os.path.join(lib_path, "zlibstatic%s.lib" % suffix)
os.rename(current_lib, os.path.join(lib_path, "zlib.lib"))
elif self.settings.compiler == "gcc":
current_lib = os.path.join(lib_path, "libzlibstatic.a")
os.rename(current_lib, os.path.join(lib_path, "libzlib.a"))
elif self.settings.compiler == "clang":
current_lib = os.path.join(lib_path, "zlibstatic.lib")
os.rename(current_lib, os.path.join(lib_path, "zlib.lib"))
Copy link
Contributor

Choose a reason for hiding this comment

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

libraries are renamed here, but in the meantime you define lib names in package_info() like if they were not renamed.

@conan-center-bot

This comment has been minimized.

tomas-krupa and others added 4 commits April 13, 2021 12:17
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

tomas-krupa and others added 5 commits April 13, 2021 12:21
Signed-off-by: Tomas Krupa <tomas.krupa@innovatrics.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
@conan-center-bot

This comment has been minimized.

Signed-off-by: Tomas Krupa <tomas.krupa@innovatrics.com>
@conan-center-bot

This comment has been minimized.

Signed-off-by: Tomas Krupa <tomas.krupa@innovatrics.com>
@uilianries
Copy link
Member

uilianries commented Apr 13, 2021

@tomas-krupa I think you used a second email for these commits. CLA is asking for tkrupa user too.

#5200 (comment)

@conan-center-bot
Copy link
Collaborator

Failure in build 12 (6f9bfffed0a8fdda19ede9c39235701c78e31824):

  • zlib-ng/2.0.0@:
    CI failed to create some packages (All logs)

    Logs for packageID 7bd6f2c3d5c4e48a75805376b58cde753392f711:
    [settings]
    arch=x86_64
    arch_build=x86_64
    build_type=Release
    compiler=Visual Studio
    compiler.runtime=MT
    compiler.version=15
    os=Windows
    os_build=Windows
    [options]
    zlib-ng:shared=False
    
    -----------------
    -- The C compiler identification is MSVC 19.16.27035.0
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Conan: called by CMake conan helper
    -- Conan: Adjusting output directories
    -- Conan: Using cmake global configuration
    -- Conan: Adjusting default RPATHs Conan policies
    -- Conan: Adjusting language standard
    -- This project seems to be plain C, using 'MSVC' compiler
    -- Conan: Using autogenerated FindZLIB.cmake
    -- Found ZLIB: 2.0.0 (found version "2.0.0") 
    -- Library zlib-ngstatic not found in package, might be system one
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/J/w/BuildSingleReference@6/conan-center-index/recipes/zlib-ng/all/test_package/build/2672872e00275db2c54afe06ee1b9fe950e75798
    
    ----Running------
    > cmake --build C:\J\w\BuildSingleReference@6\conan-center-index\recipes\zlib-ng\all\test_package\build\2672872e00275db2c54afe06ee1b9fe950e75798 --config Release -- /m:16 /verbosity:minimal
    -----------------
    Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
    Copyright (C) Microsoft Corporation. All rights reserved.
    
      Checking Build System
      Building Custom Rule C:/J/w/BuildSingleReference@6/conan-center-index/recipes/zlib-ng/all/test_package/CMakeLists.txt
      enough.c
    C:\J\w\BuildSingleReference@6\conan-center-index\recipes\zlib-ng\all\test_package\enough.c(294): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) [C:\J\w\BuildSingleReference@6\conan-center-index\recipes\zlib-ng\all\test_package\build\2672872e00275db2c54afe06ee1b9fe950e75798\test_package.vcxproj]
    LINK : fatal error LNK1181: cannot open input file 'zlib-ngstatic.lib' [C:\J\w\BuildSingleReference@6\conan-center-index\recipes\zlib-ng\all\test_package\build\2672872e00275db2c54afe06ee1b9fe950e75798\test_package.vcxproj]
    [HOOK - conan-center.py] post_package_info(): WARN: [LIBRARY DOES NOT EXIST (KB-H054)] Component zlib-ng::zlib-ng libdir "lib" does not contain any declared library
    [HOOK - conan-center.py] post_package_info(): ERROR: [LIBRARY DOES NOT EXIST (KB-H054)] Component zlib-ng::zlib-ng library "zlib-ngstatic" not found in libdirs (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H054)
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        CMAKE_EXPORT_NO_PACKAGE_REGISTRY
        CMAKE_INSTALL_BINDIR
        CMAKE_INSTALL_DATAROOTDIR
        CMAKE_INSTALL_INCLUDEDIR
        CMAKE_INSTALL_LIBDIR
        CMAKE_INSTALL_LIBEXECDIR
        CMAKE_INSTALL_OLDINCLUDEDIR
        CMAKE_INSTALL_SBINDIR
    
    
    ERROR: zlib-ng/2.0.0 (test package): Error in build() method, line 12
    	cmake.build()
    	ConanException: Error 1 while executing cmake --build C:\J\w\BuildSingleReference@6\conan-center-index\recipes\zlib-ng\all\test_package\build\2672872e00275db2c54afe06ee1b9fe950e75798 --config Release -- /m:16 /verbosity:minimal
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@tomas-krupa
Copy link
Contributor Author

sorry for my CLA issues, please proceed to PR #5264

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

Successfully merging this pull request may close these issues.

6 participants