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

xerces-c: conan v2 support #13502

Merged
merged 1 commit into from
Oct 17, 2022
Merged

Conversation

SpaceIm
Copy link
Contributor

@SpaceIm SpaceIm commented Oct 15, 2022

Specify library name and version: lib/1.0

This is also a good place to share with all of us why you are submitting this PR (specially if it is a new addition to ConanCenter): is it a dependency of other libraries you want to package? Are you the author of the library? Thanks!


  • 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
Copy link
Collaborator

All green in build 1 (e5428de101b1a846316b8c438f316366a8a0284f):

  • xerces-c/3.2.3@:
    All packages built successfully! (All logs)

  • xerces-c/3.2.2@:
    All packages built successfully! (All logs)

@github-actions
Copy link
Contributor

Hooks produced the following warnings for commit e5428de
xerces-c/3.2.3
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libxerces-c-3.2.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libxerces-c.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libxerces-c-3.2.so' links to system library 'nsl' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libxerces-c.so' links to system library 'nsl' but it is not in cpp_info.system_libs.
xerces-c/3.2.2
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libxerces-c-3.2.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libxerces-c.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libxerces-c-3.2.so' links to system library 'nsl' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libxerces-c.so' links to system library 'nsl' but it is not in cpp_info.system_libs.

Comment on lines 85 to 89
raise ConanInvalidConfiguration(
"Option '{option}={value}' is only supported on {os}".format(
option=option, value=value, os=os
)
)
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
raise ConanInvalidConfiguration(
"Option '{option}={value}' is only supported on {os}".format(
option=option, value=value, os=os
)
)
raise ConanInvalidConfiguration(f"Option '{option}={value}' is only supported on {os}")

@conan-center-bot conan-center-bot merged commit c6b5db7 into conan-io:master Oct 17, 2022
@SpaceIm SpaceIm deleted the xerces-c-conan-v2 branch October 17, 2022 15:04
@goodtune
Copy link
Contributor

An observation, would like some assistance in confirming our theory...

Since this new revision has been added we're finding that despite shared=False being a default option, the package that is produced contains .so files and not a .a file.

My colleague has suggested it is related to the use of CMakePresent.json which is a cmake feature introduced in version 3.19 -- https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html

However, the official build containers (at least the one's that we're using) provide earlier versions.

In terms of evidence, here is what I observe from rrev 815aaa3f1604a5f7659a665a83053620:

[full_settings]
    arch=x86_64
    build_type=Release
    compiler=clang
    compiler.libcxx=libstdc++
    compiler.version=12
    os=Linux

[full_requires]


[full_options]
    char_type=uint16_t
    fPIC=True
    message_loader=inmemory
    mutex_manager=posix
    network_accessor=socket
    shared=False
    transcoder=gnuiconv

The lib contents of the package:

lib/libxerces-c-3.2.so: 7f6cf0c4ad2ebbd242cb797837b8e4d0
lib/libxerces-c.so: 7f6cf0c4ad2ebbd242cb797837b8e4d0

In rrev 1af5eb075b3a8ee232f43cc8288e17ed

[full_settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++
    compiler.version=11
    os=Linux

[full_requires]


[full_options]
    char_type=uint16_t
    fPIC=True
    message_loader=inmemory
    mutex_manager=posix
    network_accessor=socket
    shared=False
    transcoder=gnuiconv

The lib directory is different, and what I'd expect.

lib/libxerces-c.a: 51256496c5d2100322210c6ed0e1df39

In our experience, building from this recipe has caused our products to fail. They link, but we're getting a dynamic link a shared object which isn't available in our runtimes.

$ ./cmdline -v
./cmdline: error while loading shared libraries: libxerces-c-3.2.so: cannot open shared object file: No such file or directory

@SpaceIm
Copy link
Contributor Author

SpaceIm commented Oct 19, 2022

It doesn't come from presets, but indeed there is an issue and it's because of https://github.com/apache/xerces-c/blob/v3.2.3/cmake/XercesDLL.cmake#L23 (see conan-io/conan#11937 & conan-io/conan#11840).

I've pushed a hotfix #13616

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.

5 participants