Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936270 - app-text/calibre-5.44.0-r3 fails to compile against dev-libs/icu-75.1
Summary: app-text/calibre-5.44.0-r3 fails to compile against dev-libs/icu-75.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: icu-75
  Show dependency tree
 
Reported: 2024-07-18 23:16 UTC by Hank Leininger
Modified: 2024-07-21 21:18 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix for icu-75.1 (calibre-5.44.0-Fix-for-icu-75.1.patch,1.12 KB, patch)
2024-07-19 10:03 UTC, torindel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hank Leininger 2024-07-18 23:16:37 UTC
# equery l calibre icu
 * Searching for calibre ...
[IP-] [  ] app-text/calibre-5.44.0-r3:0

 * Searching for icu ...
[IP-] [  ] dev-libs/icu-75.1:0/75

# emerge -v calibre
...
[ebuild   R    ] app-text/calibre-5.44.0-r3::gentoo  USE="udisks verify-sig -ios -speech -test" PYTHON_SINGLE_TARGET="python3_11 -python3_10" 0 KiB
...
x86_64-pc-linux-gnu-g++ -Wall -DNDEBUG -fno-strict-aliasing -pipe -fPIC -march=znver2 -O2 -pipe -msse4.1 -msse4.2 -msse4 -mavx -fvisibility=hidden -pthread -fdiagnostics-color=always -I/usr/include/python3.11 -O3 -std=c++14 -DCALIBRE_MODINIT_FUNC=extern "C" __attribute__ ((visibility ("default"))) PyObject* -c /var/tmp/portage/app-text/calibre-5.44.0-r3/work/calibre-5.44.0/src/calibre/db/sqlite_extension.cpp -o /var/tmp/portage/app-text/calibre-5.44.0-r3/work/calibre-5.44.0/build/objects/sqlite_extension/sqlite_extension.o
In file included from /usr/include/unicode/unistr.h:39,
                 from /var/tmp/portage/app-text/calibre-5.44.0-r3/work/calibre-5.44.0/src/calibre/db/sqlite_extension.cpp:19:
/usr/include/unicode/stringpiece.h:134:23: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
  134 |                 (std::is_same_v<decltype(T().data()), const char*>
      |                       ^~~~~~~~~
      |                       is_same
/usr/include/unicode/stringpiece.h:134:66: error: template argument 1 is invalid
  134 |                 (std::is_same_v<decltype(T().data()), const char*>
      |                                                                  ^
/usr/include/unicode/stringpiece.h:138:17: error: expected ‘>’ before ‘)’ token
  138 |                 ) &&
      |                 ^
/usr/include/unicode/stringpiece.h:138:17: error: expected unqualified-id before ‘)’ token
In file included from /usr/include/unicode/uenum.h:25,
                 from /usr/include/unicode/utrans.h:22,
                 from /usr/include/unicode/translit.h:29,
                 from /var/tmp/portage/app-text/calibre-5.44.0-r3/work/calibre-5.44.0/src/calibre/db/sqlite_extension.cpp:21:
/usr/include/unicode/localpointer.h:561:26: error: ‘auto’ parameter not permitted in this context
  561 | template <typename Type, auto closeFunction>
      |                          ^~~~
/usr/include/unicode/localpointer.h:573:76: error: template argument 2 is invalid
  573 |     explicit LocalOpenPointer(std::unique_ptr<Type, decltype(closeFunction)  &&p)
      |                                                                            
/usr/include/unicode/localpointer.h:583:78: error: template argument 2 is invalid
  583 |     LocalOpenPointer &operator=(std::unique_ptr<Type, decltype(closeFunction)> &&p) {
      |                                                                              ^
/usr/include/unicode/localpointer.h:599:59: error: template argument 2 is invalid
  599 |     operator std::unique_ptr<Type, decltype(closeFunction)> () && {
      |                                                           ^
/usr/include/unicode/uenum.h:69:1: note: invalid template non-type parameter
   69 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUEnumerationPointer, UEnumeration, uenum_close);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/unicode/uset.h:358:1: note: invalid template non-type parameter
  358 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUSetPointer, USet, uset_close);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/unicode/utrans.h:258:1: note: invalid template non-type parameter
  258 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUTransliteratorPointer, UTransliterator, utrans_close);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/unicode/utext.h:1596:1: note: invalid template non-type parameter
 1596 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUTextPointer, UText, utext_close);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/unicode/ubrk.h:372:1: note: invalid template non-type parameter
  372 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUBreakIteratorPointer, UBreakIterator, ubrk_close);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~

 * ERROR: app-text/calibre-5.44.0-r3::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
...


My existing install of app-text/calibre-5.44.0-r3 was done against dev-libs/icu-74.2.

I can't test calibre-7.x because I'm not ready to move to qt6 yet.
Comment 1 torindel 2024-07-19 10:03:42 UTC
Created attachment 897990 [details, diff]
Fix for icu-75.1

Forces -std=c++17 for calibre sqlite extension (originally it was forcing -std=c++14 for calibre/db/sqlite_extension.cpp)

Might be worthwhile to note somewhere that new icu might not like -std=c++14
Comment 2 Eli Schwartz gentoo-dev 2024-07-21 17:51:37 UTC
This is essentially https://github.com/kovidgoyal/calibre/commit/a3d3d8d33e314ccabb5099e78e4056a79b7c9aa2

I can't test updating ICU myself because it's not yet stable and that would therefore require recompiling qtwebengine.


(In reply to Hank Leininger from comment #0)
> I can't test calibre-7.x because I'm not ready to move to qt6 yet.

I suspected that would be the case with some people, which is why I've been avoiding removing 5.x thus far... good to know it's actually being of help, I guess.
Comment 3 Larry the Git Cow gentoo-dev 2024-07-21 21:18:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64fad029fd9e98ba427fe61628b12b79f448e8ac

commit 64fad029fd9e98ba427fe61628b12b79f448e8ac
Author:     Eli Schwartz <eschwartz@gentoo.org>
AuthorDate: 2024-07-21 21:09:43 +0000
Commit:     Eli Schwartz <eschwartz@gentoo.org>
CommitDate: 2024-07-21 21:17:56 +0000

    app-text/calibre: in 5.x, fix building against icu 75
    
    And backport a test-only fix so that tests pass. Haven't actually tested
    icu 75 though since it requires rebuilding webengine... but a user did.
    Besides, it's the same change upstream made in newer versions.
    
    Closes: https://bugs.gentoo.org/936270
    Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>

 app-text/calibre/calibre-5.44.0-r3.ebuild          |  4 +++
 app-text/calibre/files/calibre-5.44.0-icu75.patch  | 28 +++++++++++++++++
 .../e9cc00560a28f56a303cca97630ab58e519dd9c8.patch | 35 ++++++++++++++++++++++
 3 files changed, 67 insertions(+)