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

Adding librsvg #23966

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Adding librsvg #23966

wants to merge 10 commits into from

Conversation

Julianiolo
Copy link
Contributor

Specify library name and version: librsvg/2.58.91

I'm trying to add this package because I want to use it with libvips.
However I'm experiencing some problems:

The lib building works, but when compiling the test_package, cmake can't find the library:

-- Conan: Target declared 'librsvg::librsvg'
CMake Error at build/msvc-193-x86_64-14-release/generators/cmakedeps_macros.cmake:67 (message):
  Library 'librsvg' not found in package.  If 'librsvg' is a system library,
  declare it with 'cpp_info.system_libs' property
Call Stack (most recent call first):
  build/msvc-193-x86_64-14-release/generators/librsvg-Target-release.cmake:23 (conan_package_library_targets)
  build/msvc-193-x86_64-14-release/generators/librsvgTargets.cmake:24 (include)
  build/msvc-193-x86_64-14-release/generators/librsvg-config.cmake:16 (include)
  CMakeLists.txt:5 (find_package)

I'm guessing the problem may be incorrect names for the package? I'm unsure how I am supposed to choose them or how to know what the package name of a given recipe is. I've tried a lot of stuff, but it always gives the same error. Maybe it also has to do with pkg-config files? But those seem to be similar to other recipies using mason. (librsvg uses mason for building)


@CLAassistant
Copy link

CLAassistant commented May 12, 2024

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@Julianiolo
Copy link
Contributor Author

I guess another question is: Can you have recipes that require extra tools? Since this one requires rustc along with cargo-c to compile.

@Julianiolo
Copy link
Contributor Author

Julianiolo commented May 12, 2024

Huh, did not see that, although that is for an older version which used autotools instead of meson. Should both versions be eventually merged together then? Although I'm not sure how relevant these old versions are... The PR also does not seem very active

@Julianiolo Julianiolo changed the title Adding Adding librsvg May 12, 2024
@conan-center-bot

This comment has been minimized.

@Julianiolo
Copy link
Contributor Author

Julianiolo commented May 12, 2024

I now fixed the cmake error by altering the self.cpp_info.libs = ["librsvg"] to self.cpp_info.libs = ["rsvg-2"] since it generated a rsvg-2.lib in the packaged folder (p folder) under lib.

However the test now fails because the headers are nested in an extra librsvg-2.0/ directory.

@conan-center-bot

This comment has been minimized.

@Julianiolo
Copy link
Contributor Author

Include issue is also now fixed, but It seems like including other library's does not work. Cmake mentions declaring all of them though...

-- Conan: Target declared 'librsvg::librsvg'
-- Conan: Target declared 'dav1d::dav1d'
-- Conan: Target declared 'LibXml2::LibXml2'
-- Conan: Target declared 'ZLIB::ZLIB'
-- Conan: Target declared 'Iconv::Iconv'
-- Conan: Including build module from 'C:/Users/Julian/.conan2/p/libxmba1a4652a347e/p/lib/cmake/conan-official-libxml2-variables.cmake'
-- Conan: Component target declared 'pango::pango_'
-- Conan: Component target declared 'pango::pangowin32'
-- Conan: Component target declared 'pango::pangocairo'
-- Conan: Component target declared 'pango::pangoft2'
-- Conan: Component target declared 'pango::pangofc'
-- Conan: Component target declared 'pango::pangoroot'
-- Conan: Component target declared 'pango::pangoxft'
-- Conan: Target declared 'pango::pango'
-- Conan: Component target declared 'cairo::cairo_'
-- Conan: Component target declared 'cairo::cairo-png'
-- Conan: Component target declared 'cairo::cairo-svg'
-- Conan: Component target declared 'cairo::cairo-fc'
-- Conan: Component target declared 'cairo::cairo-ft'
-- Conan: Component target declared 'cairo::cairo-win32'
-- Conan: Component target declared 'cairo::cairo-win32-font'
-- Conan: Component target declared 'cairo::cairo-script'
-- Conan: Component target declared 'cairo::cairo-ps'
-- Conan: Component target declared 'cairo::cairo-pdf'
-- Conan: Component target declared 'cairo::cairo-script-interpreter'
-- Conan: Component target declared 'cairo::cairo-xml'
-- Conan: Component target declared 'cairo::cairo-util_'
-- Conan: Component target declared 'cairo::cairo-gobject'
-- Conan: Target declared 'cairo::cairo'
-- Conan: Target declared 'pixman::pixman'
-- Conan: Target declared 'lzo::lzo'
-- Conan: Target declared 'Fontconfig::Fontconfig'
-- Conan: Target declared 'expat::expat'
-- Conan: Target declared 'Freetype::Freetype'
-- Conan: Target declared 'PNG::PNG'
-- Conan: Component target declared 'brotli::brotlicommon'
-- Conan: Component target declared 'brotli::brotlidec'
-- Conan: Component target declared 'brotli::brotlienc'
-- Conan: Target declared 'brotli::brotli'
-- Conan: Target declared 'BZip2::BZip2'
-- Conan: Including build module from 'C:/Users/Julian/.conan2/p/bzip2e06444d88ab4f/p/lib/cmake/conan-official-bzip2-variables.cmake'
-- Conan: Including build module from 'C:/Users/Julian/.conan2/p/freet32e1b30696343/p/lib/cmake/conan-official-freetype-variables.cmake'
-- Conan: Component target declared 'glib::glib-2.0'
-- Conan: Component target declared 'glib::gmodule-no-export-2.0'
-- Conan: Component target declared 'glib::gmodule-export-2.0'
-- Conan: Component target declared 'glib::gmodule-2.0'
-- Conan: Component target declared 'glib::gobject-2.0'
-- Conan: Component target declared 'glib::gthread-2.0'
-- Conan: Component target declared 'glib::gio-2.0'
-- Conan: Component target declared 'glib::gresource'
-- Conan: Component target declared 'glib::gio-windows-2.0'
-- Conan: Target declared 'glib::glib'
-- Conan: Target declared 'libffi::libffi'
-- Conan: Component target declared 'PCRE2::8BIT'
-- Conan: Component target declared 'PCRE2::POSIX'
-- Conan: Component target declared 'PCRE2::16BIT'
-- Conan: Component target declared 'PCRE2::32BIT'
-- Conan: Target declared 'pcre2::pcre2'
-- Conan: Target declared 'Intl::Intl'
-- Conan: Target declared 'fribidi::fribidi'
-- Conan: Target declared 'harfbuzz::harfbuzz'

@valgur
Copy link
Contributor

valgur commented May 13, 2024

The other PR is not very active because the support for Rust as a Conan package the librsvg recipe requires was declined and has been blocked indefinitely: #20991. You will not be able to build the package on CCI and get the PR merged without it.

Other than that any differences with this PR are probably insignificant. I think I had issues with the Meson build setup when I opened that PR, but maybe things have improved.

@conan-center-bot

This comment has been minimized.

@Julianiolo
Copy link
Contributor Author

Julianiolo commented May 13, 2024

@valgur yeah, I saw that. Not having rust as a build tool kinda sucks... There are already a number of libs (c/c++) that require rust to build and that number will probably only increase.

As for mason: Building works perfectly well for me. At the moment I just have some problems when including dependencies of librsvg, but thats probably a conanfile issue.

sources:
"2.58.91":
url: "https://download.gnome.org/sources/librsvg/2.58/librsvg-2.58.91.tar.xz"
sha256: "65846ae57c11aba288bf3a6fe517f800f7e38e7fbc79b98c99a8177634ed29f7"
Copy link
Member

Choose a reason for hiding this comment

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

@Julianiolo Thank you for your first contribution!! 👏 Please, don't forget to add final empty line for each file. In past we had incident with git diff and CI as changing the last line, resulting in CI failures.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah have to do that still :)

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@Julianiolo
Copy link
Contributor Author

Well this recipe is pretty much done, just waiting on rust as a package...
Maybe the test could also be improved, the one from the other librsvg recipe version did not look bad.
This works for msvc btw.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 9 (b80d7505c24bff483d74ff314821ef545849c812):

  • librsvg/2.58.91:
    CI failed to create some packages (All logs)

    Logs for packageID 31a3eaef7057a52211162daa6272cd8d807df354:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=7
    os=Linux
    [options]
    librsvg:shared=False
    
    [...]
    dpkg-query: no packages found matching libxkbfile-dev
    dpkg-query: no packages found matching libxmu-dev
    dpkg-query: no packages found matching libxmuu-dev
    dpkg-query: no packages found matching libxpm-dev
    dpkg-query: no packages found matching libxrandr-dev
    dpkg-query: no packages found matching libxrender-dev
    dpkg-query: no packages found matching libxres-dev
    dpkg-query: no packages found matching libxss-dev
    dpkg-query: no packages found matching libxt-dev
    dpkg-query: no packages found matching libxtst-dev
    dpkg-query: no packages found matching libxv-dev
    dpkg-query: no packages found matching libxxf86vm-dev
    dpkg-query: no packages found matching libxcb-glx0-dev
    dpkg-query: no packages found matching libxcb-render0-dev
    dpkg-query: no packages found matching libxcb-render-util0-dev
    dpkg-query: no packages found matching libxcb-xkb-dev
    dpkg-query: no packages found matching libxcb-icccm4-dev
    dpkg-query: no packages found matching libxcb-image0-dev
    dpkg-query: no packages found matching libxcb-keysyms1-dev
    dpkg-query: no packages found matching libxcb-randr0-dev
    dpkg-query: no packages found matching libxcb-shape0-dev
    dpkg-query: no packages found matching libxcb-sync-dev
    dpkg-query: no packages found matching libxcb-xfixes0-dev
    dpkg-query: no packages found matching libxcb-xinerama0-dev
    dpkg-query: no packages found matching libxcb-dri3-dev
    dpkg-query: no packages found matching uuid-dev
    dpkg-query: no packages found matching libxcb-cursor-dev
    dpkg-query: no packages found matching libxcb-dri2-0-dev
    dpkg-query: no packages found matching libxcb-dri3-dev
    dpkg-query: no packages found matching libxcb-present-dev
    dpkg-query: no packages found matching libxcb-composite0-dev
    dpkg-query: no packages found matching libxcb-ewmh-dev
    dpkg-query: no packages found matching libxcb-res0-dev
    debconf: delaying package configuration, since apt-utils is not installed
    dpkg-query: no packages found matching libxcb-util-dev
    debconf: delaying package configuration, since apt-utils is not installed
    WARN: *** Conan 1 is legacy and on a deprecation path ***
    WARN: *** Please upgrade to Conan 2 ***
    WARN: freetype/2.13.2: requirement libpng/[>=1.6 <2] overridden by cairo/1.18.0 to libpng/1.6.43 
    WARN: freetype/2.13.2: requirement zlib/[>=1.2.10 <2] overridden by cairo/1.18.0 to zlib/1.3.1 
    WARN: libpng/1.6.43: requirement zlib/[>=1.2.11 <2] overridden by freetype/2.13.2 to zlib/1.3.1 
    WARN: fontconfig/2.15.0: requirement expat/[>=2.6.2 <3] overridden by cairo/1.18.0 to expat/2.6.2 
    WARN: glib/2.78.3: requirement zlib/[>=1.2.11 <2] overridden by cairo/1.18.0 to zlib/1.3.1 
    WARN: pcre2/10.42: requirement zlib/[>=1.2.11 <2] overridden by glib/2.78.3 to zlib/1.3.1 
    librsvg/2.58.91: 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
    librsvg/2.58.91: ERROR: Package '31a3eaef7057a52211162daa6272cd8d807df354' build failed
    librsvg/2.58.91: WARN: Build folder /home/conan/workspace/prod-v1/bsr/42735/fdaba/.conan/data/librsvg/2.58.91/_/_/build/31a3eaef7057a52211162daa6272cd8d807df354/build-release
    ERROR: librsvg/2.58.91: Error in build() method, line 146
    	meson.configure()
    	ConanException: Error 1 while executing meson setup --native-file "/home/conan/workspace/prod-v1/bsr/42735/fdaba/.conan/data/librsvg/2.58.91/_/_/build/31a3eaef7057a52211162daa6272cd8d807df354/build-release/conan/conan_meson_native.ini" "/home/conan/workspace/prod-v1/bsr/42735/fdaba/.conan/data/librsvg/2.58.91/_/_/build/31a3eaef7057a52211162daa6272cd8d807df354/build-release" "/home/conan/workspace/prod-v1/bsr/42735/fdaba/.conan/data/librsvg/2.58.91/_/_/build/31a3eaef7057a52211162daa6272cd8d807df354/src" --prefix=/
    

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 are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 9 (b80d7505c24bff483d74ff314821ef545849c812):

  • librsvg/2.58.91:
    CI failed to create some packages (All logs)

    Logs for packageID 6d168736070c3f1c7b234780e0c33071730cd6d9:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
    harfbuzz/8.3.0: Package installed 617e10e830d9b625e56dea8fea6e0e25b6ba1746
    harfbuzz/8.3.0: Downloaded package revision 49092e56321499006f64784f17d004fc
    libxft/2.3.8: Retrieving package b90c73106742b439d44bc5b59bdeca11c3943360 from remote 'conan-center' 
    libxft/2.3.8: Package installed b90c73106742b439d44bc5b59bdeca11c3943360
    libxft/2.3.8: Downloaded package revision 483045497f696b52e589b4e6a2d54a99
    pango/1.51.0: Retrieving package ba6b2840a65fc719992bcbdb8936ca813d8d8927 from remote 'conan-center' 
    pango/1.51.0: Package installed ba6b2840a65fc719992bcbdb8936ca813d8d8927
    pango/1.51.0: Downloaded package revision d03dcd8919ce30b08c320d22eb443ef2
    pkgconf/2.0.3: WARN: The use of 'unix_path_legacy_compat' is deprecated in Conan 2.0 and does not perform path conversions. This is retained for compatibility with Conan 1.x and will be removed in a future version.
    pcre2/10.42: Appending PATH environment variable: /home/conan/workspace/prod-v2/bsr/38256/aecea/p/pcre2d184a55a6d726/p/bin
    libxml2/2.12.6: Appending PATH environment variable: /home/conan/workspace/prod-v2/bsr/38256/aecea/p/libxm6ac9ae515615e/p/bin
    librsvg/2.58.91: Calling source() in /home/conan/workspace/prod-v2/bsr/38256/aecea/p/librs6072fb60893fe/s/src
    librsvg/2.58.91: WARN: File https://download.gnome.org/sources/librsvg/2.58/librsvg-2.58.91.tar.xz not found in https://c3i.jfrog.io/artifactory/conan-center-backup-sources/
    
    -------- Installing package librsvg/2.58.91 (29 of 29) --------
    librsvg/2.58.91: Building from source
    librsvg/2.58.91: Package librsvg/2.58.91:6d168736070c3f1c7b234780e0c33071730cd6d9
    librsvg/2.58.91: Copying sources to build folder
    librsvg/2.58.91: Building your package in /home/conan/workspace/prod-v2/bsr/38256/aecea/p/b/librs0f63414cfb0c0/b
    librsvg/2.58.91: Calling generate()
    librsvg/2.58.91: Generators folder: /home/conan/workspace/prod-v2/bsr/38256/aecea/p/b/librs0f63414cfb0c0/b/build-release/conan
    librsvg/2.58.91: Generating aggregated env files
    librsvg/2.58.91: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
    librsvg/2.58.91: Calling build()
    librsvg/2.58.91: apply_conandata_patches(): No patches defined in conandata
    librsvg/2.58.91: Meson configure cmd: meson setup --native-file "/home/conan/workspace/prod-v2/bsr/38256/aecea/p/b/librs0f63414cfb0c0/b/build-release/conan/conan_meson_native.ini" "/home/conan/workspace/prod-v2/bsr/38256/aecea/p/b/librs0f63414cfb0c0/b/build-release" "/home/conan/workspace/prod-v2/bsr/38256/aecea/p/b/librs0f63414cfb0c0/b/src" --prefix=/
    librsvg/2.58.91: RUN: meson setup --native-file "/home/conan/workspace/prod-v2/bsr/38256/aecea/p/b/librs0f63414cfb0c0/b/build-release/conan/conan_meson_native.ini" "/home/conan/workspace/prod-v2/bsr/38256/aecea/p/b/librs0f63414cfb0c0/b/build-release" "/home/conan/workspace/prod-v2/bsr/38256/aecea/p/b/librs0f63414cfb0c0/b/src" --prefix=/
    The Meson build system
    Version: 1.4.0
    Source dir: /home/conan/workspace/prod-v2/bsr/38256/aecea/p/b/librs0f63414cfb0c0/b/src
    Build dir: /home/conan/workspace/prod-v2/bsr/38256/aecea/p/b/librs0f63414cfb0c0/b/build-release
    Build type: native build
    Project name: librsvg
    Project version: 2.58.91
    C compiler for the host machine: gcc (gcc 11.4.0 "gcc (GCC) 11.4.0")
    C linker for the host machine: gcc ld.bfd 2.37
    Host machine cpu family: x86_64
    Host machine cpu: x86_64
    Program cargo found: NO
    
    ../src/meson.build:27:8: ERROR: Program 'cargo' not found or not executable
    
    A full log can be found at /home/conan/workspace/prod-v2/bsr/38256/aecea/p/b/librs0f63414cfb0c0/b/build-release/meson-logs/meson-log.txt
    
    librsvg/2.58.91: ERROR: 
    Package '6d168736070c3f1c7b234780e0c33071730cd6d9' build failed
    librsvg/2.58.91: WARN: Build folder /home/conan/workspace/prod-v2/bsr/38256/aecea/p/b/librs0f63414cfb0c0/b/build-release
    ERROR: librsvg/2.58.91: Error in build() method, line 146
    	meson.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.

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.

5 participants