Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 910426 - mail-client/claws-mail-4.1.1-r2[litehtml] - [...].libs/liblitehtml_la-background.o [...] In file included from /usr/include/c++/v1/cstddef:42: ../../../../version:1:1: error: unknown type name 'echo'
Summary: mail-client/claws-mail-4.1.1-r2[litehtml] - [...].libs/liblitehtml_la-backgro...
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-clang musl-porting
  Show dependency tree
 
Reported: 2023-07-16 12:01 UTC by ernsteiswuerfel
Modified: 2024-11-23 11:26 UTC (History)
2 users (show)

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


Attachments
build.log.xz (claws-mail-4.1.1-r2:20230716-102047.log.xz,41.46 KB, application/x-xz)
2023-07-16 12:01 UTC, ernsteiswuerfel
Details
emerge --info (file_910426.txt,7.50 KB, text/plain)
2023-07-16 12:02 UTC, ernsteiswuerfel
Details
build.log.xz (w. GCC 12) (claws-mail-4.1.1-r2:20230716-120249.log.xz,59.15 KB, application/x-xz)
2023-07-16 12:13 UTC, ernsteiswuerfel
Details
build.log.xz (amd64, 4.2.0) (claws-mail-4.2.0:20231220-142859.log.xz,42.66 KB, application/x-xz)
2023-12-20 15:04 UTC, ernsteiswuerfel
Details
claws-mail-3.21.0-clang-libc++.patch (claws-mail-3.21.0-clang-libc++.patch,750 bytes, patch)
2024-11-21 18:57 UTC, Andrey Volkov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2023-07-16 12:01:29 UTC
Created attachment 865595 [details]
build.log.xz

Fails to build with clang-15 but builds ok with gcc-12.

[...]
/bin/sh ../../../../libtool  --tag=CXX   --mode=compile clang++ -DHAVE_CONFIG_H -I. -I../../../..     -s
td=c++11 -Os -march=bdver2 -mtune=bdver2 -pipe -c -o liblitehtml_la-background.lo `test -f 'background.c
pp' || echo './'`background.cpp
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I../../../.. -std=c++11 -Os -march=bdver2 -mtune=bdver2 
-pipe -c background.cpp  -fPIC -DPIC -o .libs/liblitehtml_la-background.o
In file included from background.cpp:1:
In file included from ./html.h:5:
In file included from /usr/include/c++/v1/string:519:
In file included from /usr/include/c++/v1/__algorithm/max.h:13:
In file included from /usr/include/c++/v1/__algorithm/comp_ref_type.h:13:
In file included from /usr/include/c++/v1/__debug:15:
In file included from /usr/include/c++/v1/cstddef:42:
../../../../version:1:1: error: unknown type name 'echo'
echo 4.1.1
^
../../../../version:1:6: error: expected unqualified-id
echo 4.1.1
     ^
Comment 1 ernsteiswuerfel archtester 2023-07-16 12:02:27 UTC
Created attachment 865596 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2023-07-16 12:13:56 UTC
Created attachment 865597 [details]
build.log.xz (w. GCC 12)
Comment 3 Bernard Cafarelli gentoo-dev 2023-07-18 12:26:54 UTC
Sigh, this plugin is problematic (previous fix was for gcc 13)
Comment 4 Bernard Cafarelli gentoo-dev 2023-11-23 20:24:29 UTC
I wonder if I had managed to reproduce it? With llvm-17, this command passes:
AR="llvm-ar" AS="clang -c" LD="ld.lld" CXX="clang++" CC=clang LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed " USE=litehtml ebuild claws-mail-4.1.1-r2.ebuild compile
Comment 5 ernsteiswuerfel archtester 2023-12-20 15:03:24 UTC
(In reply to Bernard Cafarelli from comment #4)
> I wonder if I had managed to reproduce it? With llvm-17, this command passes:
> AR="llvm-ar" AS="clang -c" LD="ld.lld" CXX="clang++" CC=clang
> LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt
> -unwindlib=libunwind -Wl,--as-needed " USE=litehtml ebuild
> claws-mail-4.1.1-r2.ebuild compile
This workaround unfortunately does not work for me. Tried on a musl-system though (with -unwindlib=llvm-libunwind) not on glibc.

Same for claws-mail-4.2.0.
Comment 6 ernsteiswuerfel archtester 2023-12-20 15:04:02 UTC
Created attachment 880092 [details]
build.log.xz (amd64, 4.2.0)
Comment 7 ernsteiswuerfel archtester 2023-12-20 15:36:34 UTC
Ok, checked on a glibc system. There it builds ok with clang.

My findings so far:

+litehtml glibc-gcc-system:
gcc build     ...   works ok
clang build   ...   works ok

+litehtml musl-clang-system:
gcc build     ...   works ok
clang build   ...   FAILS

So the issue seems a bit more musl-related than clang-related.
Comment 8 Andrey Volkov 2024-11-21 18:57:00 UTC
Created attachment 911018 [details, diff]
claws-mail-3.21.0-clang-libc++.patch

libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I../../../.. -std=c++11 -O2 -pipe -march=tigerlake -flto=thin -c el_anchor.cpp  -fPIC -DPIC -o .libs/liblitehtml_la-el_anchor.o
In file included from codepoint.cpp:30:
In file included from ./codepoint.h:33:
In file included from /usr/include/c++/v1/string:589:
In file included from /usr/include/c++/v1/__algorithm/max.h:14:
In file included from /usr/include/c++/v1/__algorithm/max_element.h:15:
In file included from /usr/include/c++/v1/__iterator/iterator_traits.h:14:
In file included from /usr/include/c++/v1/__concepts/constructible.h:13:
In file included from /usr/include/c++/v1/__concepts/destructible.h:13:
In file included from /usr/include/c++/v1/__type_traits/is_nothrow_destructible.h:14:
In file included from /usr/include/c++/v1/__type_traits/is_destructible.h:16:
In file included from /usr/include/c++/v1/__type_traits/remove_all_extents.h:13:
In file included from /usr/include/c++/v1/cstddef:40:
../../../../version:1:1: error: unknown type name 'echo'
    1 | echo 3.21.0
      | ^


Build fails when claw-mail liblitehtml plugin is built with libc++
File /usr/include/c++/v1/version is overlapped by the "version" file located in the root of the project

Project "version" file is used in configure.ac to setup version variables.
Rename "version" to ".version" at configure stage solved the problem

I've made the patch for mail-client/claws-mail-3.21.0
Comment 9 ernsteiswuerfel archtester 2024-11-23 11:26:59 UTC
(In reply to Andrey Volkov from comment #8)
> Build fails when claw-mail liblitehtml plugin is built with libc++
> File /usr/include/c++/v1/version is overlapped by the "version" file located
> in the root of the project
> 
> Project "version" file is used in configure.ac to setup version variables.
> Rename "version" to ".version" at configure stage solved the problem
> 
> I've made the patch for mail-client/claws-mail-3.21.0
Thanks for your patch! While it does indeed work for 3.21.0 it does not apply/work on any other stable version.

configure.ac has changed meanwhile.