Created attachment 823652 [details, diff] LLVM/Clang 15 patch 1 of 2 Hi, dev-db/postgresql-14.5 does not build with LLVM/Clang-15 but it is able to do so. I found one patch upstream (https://postgrespro.com/list/id/CAMHz58Sf_xncdyqsekoVsNeKcruKootLtVH6cYXVhhUR1oKPCg@mail.gmail.com) and wrote another with slightly updated ebuild file to solve that if someone need it.
Created attachment 823654 [details, diff] LLVM/Clang 15 patch 2 of 2
Created attachment 823656 [details] Customized ebuild for LLVM/Clang 15
Portage 3.0.38.1 (python 3.11.0-candidate-2, default/linux/amd64/17.1/no-multilib/systemd, gcc-12.2.0, glibc-2.36-r4, 6.0.0-gentoo-UEFI-NVIDIA-KVM-DOCKER x86_64) ================================================================= System uname: Linux-6.0.0-gentoo-UEFI-NVIDIA-KVM-DOCKER-x86_64-AMD_Ryzen_7_1700_Eight-Core_Processor-with-glibc2.36 KiB Mem: 32828748 total, 21964572 free KiB Swap: 33554428 total, 33554428 free Timestamp of repository gentoo: Tue, 11 Oct 2022 19:00:01 +0000 Head commit of repository gentoo: 5181e260126fcb8a4ee5a4740da7497ee95bccb7 sh bash 5.1_p16-r1 ld GNU ld (Gentoo 2.38 p4) 2.38 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r1::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.1-r3::gentoo dev-lang/python: 3.10.7::gentoo, 3.11.0_rc2::gentoo dev-lang/rust: 1.64.0-r1::gentoo dev-util/cmake: 3.24.2::gentoo dev-util/meson: 0.62.2::gentoo sys-apps/baselayout: 2.8::gentoo sys-apps/sandbox: 2.29::gentoo sys-apps/systemd: 251.5::gentoo sys-devel/autoconf: 2.13-r2::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.38-r2::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/clang: 15.0.2::gentoo sys-devel/gcc: 12.2.0::gentoo sys-devel/gcc-config: 2.6::gentoo sys-devel/libtool: 2.4.7::gentoo sys-devel/lld: 15.0.2::gentoo sys-devel/llvm: 15.0.2::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 6.0::gentoo (virtual/os-headers) sys-libs/glibc: 2.36-r4::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-verify-jobs: 1 sync-rsync-extra-opts: --new-compress sync-rsync-verify-metamanifest: yes crossdev location: /usr/local/portage masters: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=znver1 -mtune=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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" CXXFLAGS="-march=znver1 -mtune=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live cgroup compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="rsync://rsync1.ru.gentoo.org/gentoo-portage/ rsync://rsync.ru.gentoo.org/gentoo-portage/ rsync://rsync2.ru.gentoo.org/gentoo-portage/ https://mirror.yandex.ru/gentoo-distfiles/ http://mirror.yandex.ru/gentoo-distfiles/ ftp://mirror.yandex.ru/gentoo-distfiles/ https://gentoo-mirror.alexxy.name/ http://gentoo-mirror.alexxy.name/ http://gentoo.bloodhost.ru/ ftp://gentoo.bloodhost.ru/" LANG="ru_RU.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="ru zh-CN zh-TW" MAKEOPTS="-j12" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--new-compress" 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" RUSTFLAGS="-C target-cpu=native" SHELL="/bin/bash" USE="10bit 12bit 3dnow 64bit X a52 aac aacplus aacs abi9-compat acpi activities addons aiff aio alembic alsa alsa-plugin amd64 amr amrenc animation-rtl aptx arping asm asn1 asyncns atmodem avi avs baremetal berkdb binary binutils blake2 bluetooth bluetooth-sound bogofilter branding brightness-control brotli browser-extension btpclient bullet bzip2 c++11 c++14 c++17 c++20 cairo caps capstone cargo cdmamodem cg chm chromecast chromium clang clangcodemodel clangstaticanalyzer classic cleartype-hinting cleartype_hinting client clone3 closure-compile clozurecl64 cmsis-dap collada color-management colord compiler-rt crypt cryptsetup cups curl custom-modes cxx cxx17 cycles daap datafiles dbus dds dht djvu dot dri dri3 driver drm dts duktape e2fsprogs echo-cancel efi egl elbeem embree emoji encode epoll epub equalizer evdev exif faac faad fdt fftw filecaps firmware flac float fontconfig fonts foomatic freetype ftdi ftp gallium game-engine gbm gd gentoo-dev gentoo-vm geo geolocation gif gimp git gles2 glib gmp gnome gnome-keyring gnome-online-accounts gnome-shell gnutls gold google googledrive gphoto2 gpl graphbrowsing graphicsmagick graphite graphviz grub gstreamer gtk gtk3 gtk4 gusb hangouts harfbuzz hdr headless-awt http huawei hunspell hwdb ibus iconv icu idn inmemory inotify introspection ipc iprint iproute2 ipv6 isabelle isimodem iso iwd javascript jbig jit jlink jpeg jpeg2k jpegxl jumbo-build kmod kms lcms ldac ldap libav libcxx libdrm libev libffi libfuzzer libglvnd libkms libmpv libnotify libproxy libvirtd linguas_ru lldb llvm lm_sensors lmdb lto lz4 lzma lzo mad man manpager matroska mbim mesh mime mng modemmanager mp3 mp4 mpeg mtp multiarch native-extensions nautilus ncurses network networkmanager nls nptl nvidia obex objc objc++ objc-gc ogg okular openexr opengl openimageio openmp opensubdiv opus orc pam pango pci pciutils pclm pcre pcre16 pdf pdfimport phonesim phonon pic pie pipewire pipewire-alsa pkinit playlist plotutils plugins png policykit postgres postscript potrace ppds previewer progress-meter proprietary-codecs provision pthread pugixml pulseaudio putsurface qemu qmanifest qmi qmimodem qml qtegrity raspi raymask rdp readline realtime redistributable regex rsync-verify rust rust-analyzer sanitize schroedinger sdk seavgabios seccomp secure-path semantic-desktop sendto server sha512 smartcard sound sound-server speex spice split-usr sqlite ssh-agent ssl ssp startup-notification static-analyzer suid svg svg2 swiftshader system-av1 system-boost system-ffmpeg system-harfbuzz system-heimdal system-icu system-jpeg system-jsoncpp system-libcxx system-libvpx system-llvm system-mesa system-numpy system-png system-qemu system-sqlite system-zlib systemd sysv-utils taglib tbb tcmalloc telepathy text themes theora thin thread-safety threaded threads threadsafe tiff tls-heartbeat tools tracker transfer tremor truetype trust udev udisks unicode upnp upnp-av usb usbredir user-session utils uuid vaapi vainfo vala vbr verify-sig vhost-net vhost-user-fs video virgl visio vorbis vpx vte vtv vulkan wayland weather webrtc webrtc-aec wext widgets wifi winbind wxwidgets x264 x265 xattr xcb xkb xml xmp xorg xray xscreensaver xv xvid xz youtube zeroconf zlib zstd" ABI_X86="64" ALSA_CARDS="hda-intel usb-audio" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2 sse4a aes avx avx2 fma3 popcnt" ELIBC="glibc" GRUB_PLATFORMS="efi-64* pc*" INPUT_DEVICES="keyboard* libinput* mouse*" KERNEL="linux" L10N="ru zh-CN zh-TW" LLVM_TARGETS="BPF NVPTX X86 ARM AArch64 RISCV Mips VE" LUA_SINGLE_TARGET="lua5-4" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10 python3_11" QEMU_SOFTMMU_TARGETS="aarch64 arm i386 moxie ppc ppc64 riscv32 riscv64 xtensa xtensaeb" QEMU_USER_TARGETS="aarch64 aarch64_be arm armeb i386 ppc ppc64 ppc64abi32 ppc64le riscv32 riscv64 x86_64 xtensa xtensaeb mips mips64 mips64el mipsel mipsn32 mipsn32el" RUBY_TARGETS="ruby30" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Immediate solution is: 1. Create empty /etc/portage/patches/dev-db/postgresql folder 2. Download and put attached patches into /etc/portage/patches/dev-db/postgresql 3. Download ebuild and put it into /usr/portage/dev-db/postgresql/ 4. Build manifest for it using next command ebuild /usr/portage/dev-db/postgresql/postgresql-14.5-r1.ebuild manifest 5. Update the postgres using emerge like that: emerge -1u dev-db/postgresql
Created attachment 823715 [details] Updated version of ebuild This ebuild requires patches inside ${PORTAGE_DIR}/dev-db/postgresql/files/. Build and run ok on AMD64 with Clang 15.0.2
Yes. It is the backport for CLang 15family. Last 2 weeks works fine. Tested with production databases and devtools like DBeaver.
dev-db/postgresql-14.6 can build with LLVM 15. No backport needed anymore.