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

Unable to compile from sources - Gentoo #27695

Closed
Cerberios opened this issue Apr 2, 2024 · 7 comments
Closed

Unable to compile from sources - Gentoo #27695

Cerberios opened this issue Apr 2, 2024 · 7 comments
Labels

Comments

@Cerberios
Copy link

Steps to reproduce

Unable to compile
gcc version 13.2.1 20240330 (Gentoo Hardened 13.2.1_p20240330 p14)
sys-libs/glibc 2.38-r11

Expected behaviour

Unable to compile

Actual behaviour

Unable to compile

Operating system

Gentoo

Version of Telegram Desktop

4.16.1

Installation source

Other (unofficial) source

Crash ID

No response

Logs

/var/tmp/portage/net-im/telegram-desktop-4.16.1/work/tdesktop-4.16.1-full/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp: In member function ‘void Platform::Notifications::{anonymous}::NotificationData::setImage(QImage)’:
/var/tmp/portage/net-im/telegram-desktop-4.16.1/work/tdesktop-4.16.1-full/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp:504:46: error: ‘new_with_free_func’ is not a member of ‘gi::repository::GLib::Bytes’
  504 |                                 GLib::Bytes::new_with_free_func(
      |                                              ^~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-im/telegram-desktop-4.16.1/work/tdesktop-4.16.1-full/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp:529:32: error: ‘new_from_data’ is not a member of ‘gi::repository::GLib::Variant’
  529 |                 GLib::Variant::new_from_data(
      |                                ^~~~~~~~~~~~~
/var/tmp/portage/net-im/telegram-desktop-4.16.1/work/tdesktop-4.16.1-full/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp:522:64: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘gi::CollectionParameter<gi::detail::Span<-1>, _GVariant*, gi::transfer_none_t>’ {aka ‘gi::detail::CollectionHolder<gi::detail::Span<-1>, _GVariant*, gi::transfer_none_t>’}
  522 |         _hints.insert_value(_imageKey, GLib::Variant::new_tuple({
      |                                        ~~~~~~~~~~~~~~~~~~~~~~~~^~
  523 |                 GLib::Variant::new_int32(image.width()),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  524 |                 GLib::Variant::new_int32(image.height()),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  525 |                 GLib::Variant::new_int32(image.bytesPerLine()),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  526 |                 GLib::Variant::new_boolean(image.hasAlphaChannel()),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  527 |                 GLib::Variant::new_int32(8),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  528 |                 GLib::Variant::new_int32(image.hasAlphaChannel() ? 4 : 3),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  529 |                 GLib::Variant::new_from_data(
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  530 |                         GLib::VariantType::new_("ay"),
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  531 |                         reinterpret_cast<const uchar*>(image.constBits()),
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  532 |                         image.sizeInBytes(),
      |                         ~~~~~~~~~~~~~~~~~~~~
  533 |                         true,
      |                         ~~~~~
  534 |                         [image] {}),
      |                         ~~~~~~~~~~~~
  535 |         }));
      |         ~~
In file included from /var/tmp/portage/net-im/telegram-desktop-4.16.1/work/tdesktop-4.16.1-full_build/gen/glib/glib_impl.hpp:59,
                 from /var/tmp/portage/net-im/telegram-desktop-4.16.1/work/tdesktop-4.16.1-full_build/gen/glib/glib.hpp:122,
                 from /var/tmp/portage/net-im/telegram-desktop-4.16.1/work/tdesktop-4.16.1-full_build/gen/gobject/gobject.hpp:11,
                 from /var/tmp/portage/net-im/telegram-desktop-4.16.1/work/tdesktop-4.16.1-full_build/gen/gio/gio.hpp:11,
                 from /var/tmp/portage/net-im/telegram-desktop-4.16.1/work/tdesktop-4.16.1-full_build/gen/xdgnotifications/xdgnotifications.hpp:11,
                 from /var/tmp/portage/net-im/telegram-desktop-4.16.1/work/tdesktop-4.16.1-full/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp:31:
/var/tmp/portage/net-im/telegram-desktop-4.16.1/work/tdesktop-4.16.1-full_build/gen/glib/variant_impl.hpp:288:114: note:   initializing argument 1 of ‘static gi::repository::GLib::Variant gi::repository::GLib::base::VariantBase::new_tuple(gi::CollectionParameter<gi::detail::Span<-1>, _GVariant*, gi::transfer_none_t>)’
  288 | GLib::Variant base::VariantBase::new_tuple (gi::CollectionParameter<gi::DSpan, ::GVariant*, gi::transfer_none_t> children) noexcept
      |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
ninja: build stopped: subcommand failed.
 * ERROR: net-im/telegram-desktop-4.16.1::leorepo failed (compile phase):
@Cerberios Cerberios added the bug label Apr 2, 2024
@ilya-fedin
Copy link
Contributor

Perhaps your unofficial source does some patching that breaks the build? Build with official method and I'm sure it will build just find.

@Cerberios
Copy link
Author

Ilya, I am getting sources here:
https://github.com/telegramdesktop/tdesktop/releases/tag/v4.16.1
But use Gentoo portage as base OS without Docker - because I do not need it
Please, inform me what additional information needed?
Thanks!

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Apr 3, 2024

@Cerberios as far as I know the sources from distros are usually not the same as projects provide, they patch it. Thus, I can't really help you if you won't try the official build way.

@Aokromes Aokromes closed this as completed Apr 3, 2024
@Cerberios
Copy link
Author

Open your eyes and look into code please! there error and your must fix it asap!

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Apr 3, 2024

@Cerberios i don't see any error in the code, maybe you can be more concrete if you know what the issue is? If you don't know, what makes you think the error is not a result of a distro's patch?

@Jamim
Copy link

Jamim commented Apr 7, 2024

Hello @Cerberios,

Open your eyes and look into code please! there error and your must fix it asap!

Don't be so sure.

Hello @ilya-fedin,

@Cerberios as far as I know the sources from distros are usually not the same as projects provide, they patch it.

You are right. This particular issue is caused by cppgir version mismatch.

I've addressed it in this PR:

@Cerberios, you can install Telegram Desktop 4.16.4 from my overlay, if you want to.

eselect repository add mim git https://github.com/Jamim/gentoo-overlay.git
emaint sync -r mim

See also:

Best regards!

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Apr 8, 2024

* [Look for system-wide cppgir before fallback to the bundled copy desktop-app/cmake_helpers#305](https://github.com/desktop-app/cmake_helpers/pull/305)

Note: this PR has things that have to be changed (it breaks the usage of bundled cppgir, for instance) but the person has blocked the possibility to review:

If you see a PR from this person and want it to be merged, the best course of action is to take it over by creating own PR as PRs from that person couldn't be merged due to review impossibility.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants