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

(#16749) openldap: conan v2 support #16762

Closed
wants to merge 3 commits into from

Conversation

grabowski-d
Copy link

@grabowski-d grabowski-d commented Mar 29, 2023

Specify library name and version: openldap/2.6.1

It solves the issue #16749


@CLAassistant
Copy link

CLAassistant commented Mar 29, 2023

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.

✅ jcar87
❌ grabowski-d
You have signed the CLA already but the status is still pending? Let us recheck it.

@conan-center-bot

This comment has been minimized.

@grabowski-d grabowski-d mentioned this pull request Mar 29, 2023
@conan-center-bot

This comment has been minimized.

@ghost
Copy link

ghost commented Mar 29, 2023

I detected other pull requests that are modifying openldap/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2023

Hooks produced the following warnings for commit c4ca47a
openldap/2.6.1
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './home/conan/w/prod/BuildSingleReference/.conan/data/openldap/2.6.1/_/_/package/f20155a1034f15bf2a5c5a17a93903433764d61b/res/slapd.service' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.

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.

Your off to a great start, dropped a bunch of hints for you 😉


@property
def _source_subfolder(self):
return "source_subfolder"

def configure(self):
if self.options.shared:
del self.options.fPIC
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
del self.options.fPIC
self.options.rm_safe("fPIC")

}
_autotools = None
_configure_vars = None

@property
def _source_subfolder(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be removed in favor of a basic_layout

from conan.tools.files import get, apply_conandata_patches, rmdir, rm, copy
from conan.tools.gnu import AutotoolsToolchain, Autotools, AutotoolsDeps
from conan.tools.apple import fix_apple_shared_install_name
from conan.errors import ConanInvalidConfiguration
required_conan_version = ">=1.43.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be 1.55

def configure(self):
if self.options.shared:
del self.options.fPIC

def source(self):
tools.get(**self.conan_data["sources"][self.version],
get(self, **self.conan_data["sources"][self.version],
strip_root=True, destination=self._source_subfolder)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can drop destination

@@ -49,55 +49,38 @@ def validate(self):
raise ConanInvalidConfiguration(
f"{self.name} is only supported on Linux")
Copy link
Contributor

Choose a reason for hiding this comment

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

Better to print the same thing as you need for cli or profile for the reference

Suggested change
f"{self.name} is only supported on Linux")
f"{self.ref} is only supported on Linux")

autotools = Autotools(self)
autotools.install()
fix_apple_shared_install_name(self)
copy(self, "LICENSE", dst="licenses", src=self._source_subfolder)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
copy(self, "LICENSE", dst="licenses", src=self._source_subfolder)
copy(self, "LICENSE", dst=os.pathc.join(self.package_folder, "licenses"), src=self.source_folder)

@@ -0,0 +1,83 @@
/* ldapurl -- a tool for generating LDAP URLs */
Copy link
Contributor

Choose a reason for hiding this comment

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

You should check the docs package template this file can be drop if you use the improved CMakeLists.txt 😉

@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

Hooks produced the following warnings for commit 18478c2
openldap/2.6.1
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './home/conan/w/prod/BuildSingleReference/.conan/data/openldap/2.6.1/_/_/package/646073c4d09549d2aecd80f61e34c49c8205bb5b/res/slapd.service' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.

@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

Hooks produced the following warnings for commit 8f5bed8
openldap/2.6.1
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libldap.so' links to system library 'resolv' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/liblber.so' links to system library 'resolv' but it is not in cpp_info.system_libs.

@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

Hooks produced the following warnings for commit 708ed46
openldap/2.6.1
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libldap.so' links to system library 'resolv' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/liblber.so' links to system library 'resolv' but it is not in cpp_info.system_libs.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@stale
Copy link

stale bot commented Jun 18, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 18, 2023
@jcar87 jcar87 self-assigned this Jun 29, 2023
@stale stale bot removed the stale label Jun 29, 2023
@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

Hooks produced the following warnings for commit 4338a2d
openldap/2.6.1
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libldap.so' links to system library 'resolv' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/liblber.so' links to system library 'resolv' but it is not in cpp_info.system_libs.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 3 (4338a2df3e617a1a992467c69f1ff66abfc90030):

  • openldap/2.6.1@:
    CI failed to create some packages (All logs)

    Logs for packageID 435c67b1bf8b94754e1246b0c446e0d2b8c7865e:
    [settings]
    arch=x86_64
    build_type=Debug
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=9
    os=Linux
    [options]
    openldap:shared=True
    
    [...]
    openldap/2.6.1 (test package): Calling build()
    openldap/2.6.1 (test package): CMake command: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/conan/w/prod-v1/BuildSingleReference/cci-2d5f6f7d/recipes/openldap/all/test_package/build-debug/conan/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Debug" "/home/conan/w/prod-v1/BuildSingleReference/cci-2d5f6f7d/recipes/openldap/all/test_package/."
    
    ----Running------
    > cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/conan/w/prod-v1/BuildSingleReference/cci-2d5f6f7d/recipes/openldap/all/test_package/build-debug/conan/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Debug" "/home/conan/w/prod-v1/BuildSingleReference/cci-2d5f6f7d/recipes/openldap/all/test_package/."
    -----------------
    -- Using Conan toolchain: /home/conan/w/prod-v1/BuildSingleReference/cci-2d5f6f7d/recipes/openldap/all/test_package/build-debug/conan/conan_toolchain.cmake
    -- The CXX compiler identification is GNU 9.2.1
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/g++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Conan: Target declared 'openldap::openldap'
    -- Conan: Component target declared 'OpenSSL::Crypto'
    -- Conan: Component target declared 'OpenSSL::SSL'
    -- Conan: Target declared 'openssl::openssl'
    -- Conan: Target declared 'ZLIB::ZLIB'
    -- Conan: Including build module from '/home/conan/w/prod-v1/BuildSingleReference/.conan/data/openssl/3.1.1/_/_/package/0a969fabc5bb3a3c9bdf93aca6ce2de02eb34d3a/lib/cmake/conan-official-openssl-variables.cmake'
    -- Conan: Target declared 'cyrus-sasl::cyrus-sasl'
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/conan/w/prod-v1/BuildSingleReference/cci-2d5f6f7d/recipes/openldap/all/test_package/build-debug
    openldap/2.6.1 (test package): CMake command: cmake --build "/home/conan/w/prod-v1/BuildSingleReference/cci-2d5f6f7d/recipes/openldap/all/test_package/build-debug" '--' '-j3'
    
    ----Running------
    > cmake --build "/home/conan/w/prod-v1/BuildSingleReference/cci-2d5f6f7d/recipes/openldap/all/test_package/build-debug" '--' '-j3'
    -----------------
    Scanning dependencies of target test_package
    [ 50%] Building CXX object CMakeFiles/test_package.dir/test_package.cpp.o
    [100%] Linking CXX executable test_package
    [100%] Built target test_package
    openldap/2.6.1 (test package): Running test()
    
    ----Running------
    > ./test_package
    -----------------
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        CMAKE_POLICY_DEFAULT_CMP0091
    
    
    ./test_package: error while loading shared libraries: liblber.so.2: cannot open shared object file: No such file or directory
    WARN: cyrus-sasl/2.1.27: requirement openssl/[>=1.1 <4] overridden by openldap/2.6.1 to openssl/3.1.1 
    openldap/2.6.1 (test package): WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    openldap/2.6.1 (test package): WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    ERROR: openldap/2.6.1 (test package): Error in test() method, line 27
    	self.run(cmd, env="conanrun")
    	ConanException: Error 127 while executing ./test_package
    

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.


Conan v2 pipeline ❌

Note: Conan v2 builds may be required once they are on the v2 ready list

The v2 pipeline failed. Please, review the errors and note this will be required for pull requests to be merged in the near future.

See details:

Failure in build 3 (4338a2df3e617a1a992467c69f1ff66abfc90030):

  • openldap/2.6.1@:
    CI failed to create some packages (All logs)

    Logs for packageID 0957d559808830755204230e756d5aa007765da2:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=True
    
    [...]
    cyrus-sasl/2.1.27: Retrieving package 2bd06dda301f01453ec48e52cfeb25c9be7c3da8 from remote 'conan-center' 
    cyrus-sasl/2.1.27: Package installed 2bd06dda301f01453ec48e52cfeb25c9be7c3da8
    cyrus-sasl/2.1.27: Downloaded package revision 7f59e8115742f27c279c0e519ba80ff1
    openldap/2.6.1: Calling source() in /home/conan/w/prod-v2/BuildSingleReference/p/openl0758234878568/s/src
    openldap/2.6.1: Apply patch (file): patches/configure-2.6.1.patch
    
    -------- Installing package openldap/2.6.1 (4 of 4) --------
    openldap/2.6.1: Building from source
    openldap/2.6.1: Package openldap/2.6.1:0957d559808830755204230e756d5aa007765da2
    openldap/2.6.1: Copying sources to build folder
    openldap/2.6.1: Building your package in /home/conan/w/prod-v2/BuildSingleReference/p/b/openl11c8f5bcdedc8/b
    openldap/2.6.1: Calling generate()
    openldap/2.6.1: Generators folder: /home/conan/w/prod-v2/BuildSingleReference/p/b/openl11c8f5bcdedc8/b/build-release/conan
    openldap/2.6.1: Generating aggregated env files
    openldap/2.6.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
    openldap/2.6.1: Calling build()
    openldap/2.6.1: Calling:
     > "/home/conan/w/prod-v2/BuildSingleReference/p/b/openl11c8f5bcdedc8/b/src/configure" --enable-shared --disable-static --prefix=/ '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' --with-cyrus_sasl=yes --with-pic=yes --without-fetch --with-tls=openssl --enable-auditlog '--libexecdir=${prefix}/bin' 
    openldap/2.6.1: RUN: "/home/conan/w/prod-v2/BuildSingleReference/p/b/openl11c8f5bcdedc8/b/src/configure" --enable-shared --disable-static --prefix=/ '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' --with-cyrus_sasl=yes --with-pic=yes --without-fetch --with-tls=openssl --enable-auditlog '--libexecdir=${prefix}/bin' 
    Configuring OpenLDAP 2.6.1-Release ...
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... x86_64-pc-linux-gnu
    checking target system type... x86_64-pc-linux-gnu
    checking configure arguments... done
    checking for cc... cc
    checking for ar... ar
    checking for strip... strip
    checking whether make sets $(MAKE)... yes
    checking how to print strings... printf
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... configure: error: in `/home/conan/w/prod-v2/BuildSingleReference/p/b/openl11c8f5bcdedc8/b/build-release':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details
    
    openldap/2.6.1: ERROR: 
    Package '0957d559808830755204230e756d5aa007765da2' build failed
    openldap/2.6.1: WARN: Build folder /home/conan/w/prod-v2/BuildSingleReference/p/b/openl11c8f5bcdedc8/b/build-release
    *********************************************************
    Recipe 'openldap/2.6.1' cannot build its binary
    It is possible that this recipe is not Conan 2.0 ready
    If the recipe comes from ConanCenter check: https://conan.io/cci-v2.html
    If it is your recipe, check if it is updated to 2.0
    *********************************************************
    
    ERROR: openldap/2.6.1: Error in build() method, line 75
    	autotools.configure()
    	ConanException: Error 1 while executing
    

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.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

Hooks produced the following warnings for commit 4338a2d
openldap/2.6.1
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libldap.so' links to system library 'resolv' but it is not in cpp_info.system_libs.

@stale
Copy link

stale bot commented Oct 15, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Copy link
Contributor

This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.

@github-actions github-actions bot closed this Feb 16, 2024
@uilianries
Copy link
Member

The openldap is now working with Conan 2.x. Please, update your local copy and feel free to open an issue in case finding something wrong.

conan install -r conancenter --update --requires=openldap/2.6.7

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

Successfully merging this pull request may close these issues.

6 participants