Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 667548 - dev-libs/botan-1.10.17-r2 couldn't be built with clang-6.0.1
Summary: dev-libs/botan-1.10.17-r2 couldn't be built with clang-6.0.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jack Lloyd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-02 14:49 UTC by Denis Pronin
Modified: 2018-10-05 21:13 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Pronin 2018-10-02 14:49:30 UTC
When compiling with clang++-6.0.1 I saw the error message expose:
```build/include/botan/tls_record.h:23:14: fatal error: 'tr1/functional' file not found
```
I opened the sources and found out that there code was in deal (from include/botan/tls_record.h):

```
#if defined(BOTAN_USE_STD_TR1)

#if defined(BOTAN_BUILD_COMPILER_IS_MSVC)
    #include <functional>
#else
    #include <tr1/functional>
#endif

#elif defined(BOTAN_USE_BOOST_TR1)
  #include <boost/tr1/functional.hpp>
#else
  #error "No TR1 library defined for use"
#endif
```

So, when compiling with clang++, it selects BOTAN_USE_STD_TR1 and _NOT_ BOTAN_BUILD_COMPILER_IS_MSVC so trying to include 'tr1/functional' that doesn't exist when clang++ is on

Could we fix the issue?

Thank you
Comment 1 Denis Pronin 2018-10-03 09:57:41 UTC
Portage 2.3.49 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop/gnome/systemd, gcc-7.3.0, glibc-2.26-r7, 4.18.10-gentoo-dannftk x86_64)
=================================================================
System uname: Linux-4.18.10-gentoo-dannftk-x86_64-Intel-R-_Core-TM-_i3-4005U_CPU_@_1.70GHz-with-gentoo-2.4.1
KiB Mem:    12212916 total,   6610596 free
KiB Swap:    3590140 total,   3590140 free
Timestamp of repository gentoo: Tue, 02 Oct 2018 16:00:01 +0000
Head commit of repository gentoo: 034deef0c32f6faa38232daa1788f540a23c7c12
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p2) 2.30.0
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.4.8::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.12.6-r2::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r2::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

ssnb
    location: /var/lib/layman/ssnb
    masters: gentoo
    priority: 50

stuff
    location: /var/lib/layman/stuff
    masters: gentoo
    priority: 50

sublime-text
    location: /var/lib/layman/sublime-text
    masters: gentoo
    priority: 50

zugaina
    location: /var/lib/layman/zugaina
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-O2 -pipe -march=native -mtune=generic -flto -std=gnu11"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXX="clang++"
CXXFLAGS="-O2 -pipe -march=native -mtune=generic -flto -std=gnu++17 -stdlib=libc++"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-flto -Wl,--as-needed -fuse-ld=gold"
LINGUAS="en ru"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr clang cli colord crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif extensions fam flac fortran gdbm gdm gif glamor gnome gnome-keyring gnome-online-accounts gold gpm gstreamer gtk hal i915 i965 iconv icu infinality intel introspection ipv4 ipv6 ithreads java jce jpeg lcms ldap libnotify libsecret libtirpc lightdm mad mng modules mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl nsplugini ogg opengl openmp pam pango pcre pcre16 pdf png policykit ppds pulseaudio qt5 readline sdl seccomp spell ssh ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upnp-av upower usb vorbis wxwidgets x264 xattr xcb xinerema xml xmp xorg xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="keyboard mouse synaptics evdev libinput" KERNEL="linux" L10N="en ru zh-CN" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6" RUBY_TARGETS="ruby23 ruby25" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Jack Lloyd 2018-10-03 21:13:52 UTC
The problem is not Clang itself but rather libc++, which does not support TR1. Clang with libstdc++ works fine.

The easiest resolution is likely to simply disable the SSL/TLS code in the 1.10 ebuild. This is appropriate anyway as 1.10 only supports SSLv3 and TLS 1.0 both of which are broken at a protocol level. This can be done by adding `--disable-modules=ssl` to the configure.py invocation. I will send a PR for that via github.

FYI Botan 1.10 is completely EOL at the end of this year, and only security issues are being addressed. We stopped patching functionality bugs in this branch 2 years ago. It looks like the only dependency in portage that still requires 1.10 is Qt Creator.
Comment 3 Denis Pronin 2018-10-03 22:25:06 UTC
Thank you Jack
Yes, you have been absolutely right
I put the flag '-stdlib=libstdc++' and with c++03 standard it got compiled and linked

So, also I noticed the application of this version not be built with >= c++11 standard

I am wondering how we can make qt-creator maintainers switch to a newer version of botan, is it possible?

Thank you
Comment 4 Denis Pronin 2018-10-04 08:02:49 UTC
I am closing the issue. I would readdress it to a 'dev-qt' team; will try to make them switch to a newer botan

I am really grateful to you for the support given