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 botan/2.12.1 #437

Merged
merged 17 commits into from
Jan 3, 2020
Merged

Add botan/2.12.1 #437

merged 17 commits into from
Jan 3, 2020

Conversation

hrantzsch
Copy link
Contributor

Adds a recipe for Botan based on the bincrafters/conan-botan recipe.

Specify library name and version: botan/2.12.1

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

@claassistantio
Copy link

claassistantio commented Dec 9, 2019

CLA assistant check
All committers have signed the CLA.

@conan-center-bot
Copy link
Collaborator

botan/2.12.1:

  • Error processing recipe: Linux x86_64, Release, gcc 6, libstdc++ . Options: botan:shared-True
    Unexpected error happened:
ERROR: botan/2.12.1: Error in config_options() method, line 75
	self.check_cxx_abi_settings()
while calling 'check_cxx_abi_settings', line 277
	'Using Botan with GCC > 5 on Linux requires '
	ConanException: Using Botan with GCC > 5 on Linux requires "compiler.libcxx=libstdc++11"

@conan-center-bot
Copy link
Collaborator

Recipe syntax error:

WARN: Remotes registry file missing, creating default one in /home/conan/.conan/remotes.json
ERROR: Error loading conanfile at '/home/conan/workspace/conan-center-pull-request_PR-437/recipes/botan/all/conanfile.py': Unable to load conanfile in /home/conan/workspace/conan-center-pull-request_PR-437/recipes/botan/all/conanfile.py
  File "/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/conans/model/ref.py", line 197, in loads
    name, version, user, channel, revision = get_reference_fields(text)
  File "/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/conans/model/ref.py", line 66, in get_reference_fields
    el1, el2 = _split_pair(arg_reference, "/") or (arg_reference, None)
  File "/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/conans/model/ref.py", line 18, in _split_pair
    raise ConanException("The reference has too many '{}'".format(split_char))
conans.errors.ConanException: The reference has too many '/'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/conans/client/loader.py", line 314, in _parse_conanfile
    loaded = imp.load_source(module_id, conan_file_path)
  File "/opt/pyenv/versions/3.7.1/lib/python3.7/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 860, in get_code
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/conan/workspace/conan-center-pull-request_PR-437/recipes/botan/all/conanfile.py", line 325
    return compiler == 'gcc' and version > 5 and compiler.libcxx != 'libstdc++11':
                                                                                 ^
SyntaxError: invalid syntax


@conan-center-bot
Copy link
Collaborator

botan/2.12.1:

  • Error processing recipe: Linux x86_64, Debug, clang 3.9, libstdc++ . Options: botan:shared-True
    Unexpected error happened:
ERROR: botan/2.12.1: Error in configure() method, line 57
	self.check_cxx_abi_settings()
while calling 'check_cxx_abi_settings', line 283
	'Using Botan with Clang on Linux requires either '
	ConanException: Using Botan with Clang on Linux requires either "compiler.libcxx=libstdc++11" or "compiler.libcxx=libc++"

@conan-center-bot
Copy link
Collaborator

Some configurations of 'botan/2.12.1' have failed:

self.cpp_info.libs.extend(["ws2_32", "Crypt32"])

self.cpp_info.libdirs = ['lib']
self.cpp_info.bindirs = ['lib', 'bin']
Copy link
Member

Choose a reason for hiding this comment

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

why lib is bindir?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for Windows. Otherwise botan.dll is not found in PATH.

Copy link
Member

Choose a reason for hiding this comment

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

windows dlls should be placed in the bin directory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to be clear, you're saying it's fine as it is, right?

Copy link
Member

Choose a reason for hiding this comment

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

The problem here is that the lib folder should not be part of cpp_info.bindirs as no binaries should be placed there, only bin folder should contain binaries (executables and dlls)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the clarification, got it now. I'm still trying to figure out how to tell Botan's build system to do so. There's a --libdir=bin as an option, but it will place both botan.dll and botan.lib in the bin folder, which results in the test-package not finding botan.lib anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added a patch for Botan to place the DLL in the binary directory rather
than the library dir. That should work and we'll try to get it upstream in the
next Botan version.

@conan-center-bot
Copy link
Collaborator

botan/2.12.1:

  • Error processing recipe: Linux x86_64, Release, gcc 5, libstdc++ . Options: botan:shared-True
    Unexpected error happened:
ERROR: botan/2.12.1: Error in configure() method, line 51
	if self._needs_cxx_abi_workaround:
while calling '_needs_cxx_abi_workaround', line 310
	version = Version(compiler.version)
	ConanException: 'settings.compiler.version.strip' doesn't exist for '5'
'settings.compiler.version' possible configurations are none

Co-Authored-By: Uilian Ries <uilianries@gmail.com>
Co-Authored-By: Michael "Croydon" Keck <git@cr0ydon.com>
@conan-center-bot
Copy link
Collaborator

Some configurations of 'botan/2.12.1' have failed:

Raise ConanInvalidConfiguration rather than ConanException if the libcxx
setting is not supported for this compiler
@conan-center-bot
Copy link
Collaborator

Some configurations of 'botan/2.12.1' have failed:

  • Windows x86_64, Debug, Visual Studio 14, MTd. Options: botan:shared-False
    You are depending on 'jom_installer/1.1.2@bincrafters/stable' but it is not in the repository

@conan-center-bot
Copy link
Collaborator

Some configurations of 'botan/2.12.1' have failed:

  • Windows x86_64, Debug, Visual Studio 14, MTd. Options: botan:shared-False
    You are depending on 'jom_installer/1.1.2@bincrafters/stable' but it is not in the repository

@conan-center-bot
Copy link
Collaborator

Some configurations of 'botan/2.12.1' have failed:

@hrantzsch
Copy link
Contributor Author

We have an issue linking the test-package on macOS for static builds. It seems CoreFoundation is not correctly added to the linker call.

It looks like it is related to this issue another recipe had in the past. However, the reason over there was found to be an outdated Conan version.

This is the related fix in Conan I guess: conan-io/conan#6003.

Help is greatly appreciated 😉
Also, can I see what version of Conan the build job used anywhere?

@reneme

This comment has been minimized.

@reneme

This comment has been minimized.

Co-Authored-By: Daniel <danimanzaneque@gmail.com>
@conan-center-bot
Copy link
Collaborator

All green! 😊

Co-Authored-By: René Meusel <github@renemeusel.de>
@conan-center-bot
Copy link
Collaborator

All green! 😊

Copy link
Member

@danimtb danimtb left a comment

Choose a reason for hiding this comment

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

This recipe looks complex as the library seems to have different options and ways to build it. Please review the option of the recipe to reduce them and reduce complexity and try to make it as uniform as possible.

self.cpp_info.libs.extend(["ws2_32", "Crypt32"])

self.cpp_info.libdirs = ['lib']
self.cpp_info.bindirs = ['lib', 'bin']
Copy link
Member

Choose a reason for hiding this comment

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

windows dlls should be placed in the bin directory

@conan-center-bot
Copy link
Collaborator

All green! 😊

@conan-center-bot
Copy link
Collaborator

All green! 😊

Add a patch for Botan's build system to place the DLL in the binary dir
rather than the library dir.
@conan-center-bot
Copy link
Collaborator

All green! 😊

@conan-center-bot
Copy link
Collaborator

All green! 😊

@danimtb danimtb assigned danimtb and unassigned SSE4 Jan 3, 2020
@danimtb danimtb merged commit da7399e into conan-io:master Jan 3, 2020
@reneme
Copy link
Contributor

reneme commented Jan 3, 2020

Thanks a lot everybody for the effort to bring botan in here!
One question, though: Who's responsible to deprecate the bincrafters version of this recipe? Should I do that manually, via a pull request, or is there a different process?

@hrantzsch
Copy link
Contributor Author

Thank you all for your support!

@danimtb
Copy link
Member

danimtb commented Jan 3, 2020

cc/ @SSE4 @Croydon

@Croydon
Copy link
Contributor

Croydon commented Jan 4, 2020

It's mostly me doing this. I'm watching the merges into CCI so you don't need to ping me for this, but since it is a manual process there will be delays 😄

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