Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 705702 - net-irc/weechat-2.6-r1 USE=php : weechat: in buffer 1: =!= | Error: unable to load plugin "/usr/lib64/weechat/plugins/php.so": libphp7.so: cannot open shared object file: No such file or directory
Summary: net-irc/weechat-2.6-r1 USE=php : weechat: in buffer 1: =!= | Error: unable t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-17 23:49 UTC by Marco Sirabella
Modified: 2022-07-24 02:06 UTC (History)
2 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 Marco Sirabella 2020-01-17 23:49:47 UTC
Hi,

I haven't noticed this because I'm not really inconvenienced, but every time I boot up weechat it complains that `libphp7.so`is not found. For reference, php 7 is installed: 

```
$ equery f php | grep libphp7.so
/usr/lib64/php7.3/lib64/libphp7.so
```

Reproducible: Always

Steps to Reproduce:
$ equery u weechat | grep php
+php
$ weechat

Actual Results:  
... some output later
in buffer 1:  =!= | Error: unable to load plugin "/usr/lib64/weechat/plugins/php.so": libphp7.so: cannot open shared object file: No such file or directory
...

Expected Results:  
Don't see the error message & presumably load libphp7

Portage 2.3.79 (python 3.6.9-final-0, default/linux/amd64/17.0/desktop, gcc-9.2.0, glibc-2.29-r7, 4.19.82-gentoo x86_64)
=================================================================
System uname: Linux-4.19.82-gentoo-x86_64-Intel-R-_Core-TM-_i7-7600U_CPU_@_2.80GHz-with-gentoo-2.6
KiB Mem:    16140212 total,   1995004 free
KiB Swap:   16777212 total,  14963212 free
Timestamp of repository gentoo: Fri, 17 Jan 2020 23:30:01 +0000
Head commit of repository gentoo: c9c581059b4ac89a9805d68779a63e84b7fd7de9
Timestamp of repository brother-overlay: Sat, 14 Dec 2019 21:28:51 +0000
Head commit of repository brother-overlay: e351032037fe1bb0f47c0961a517cc9be1705ad1

Timestamp of repository dotnet: Wed, 15 Jan 2020 10:50:33 +0000
Head commit of repository dotnet: 33867586d74e5d94a579c68cd5b9a92488bb53e8

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
ccache version 3.7.6 [disabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.6.9::gentoo, 3.7.5-r1::gentoo
dev-util/ccache:          3.7.6::gentoo
dev-util/cmake:           3.14.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r7::gentoo
Repositories:

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

brother-overlay
    location: /var/db/repos/brother-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/brother-overlay.git
    masters: gentoo

dotnet
    location: /var/db/repos/dotnet
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/dotnet.git
    masters: gentoo

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

g-ctan
    location: /var/lib/g-ctan
    masters: gentoo
    priority: 1

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

Installed sets: @arduino, @audio, @core, @desktop, @email, @lang, @machine, @network, @shoobx, @video
ABI="amd64"
ABI_X86="64"
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ADA_TARGET="gnat_2018"
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"
ANT_HOME="/usr/share/ant"
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"
ARCH="amd64"
AUTOCLEAN="yes"
BOOTSTRAP_USE="unicode internal-glib pkg-config split-usr python_targets_python3_6 python_targets_python2_7 multilib"
BROOT=""
BROWSER="/home/msirabella/.bin/browser"
CALLIGRA_FEATURES="karbon sheets words"
CBUILD="x86_64-pc-linux-gnu"
CDPATH=".:..:/home/msirabella:/home/msirabella/Documents:/home/msirabella/Documents/projects"
CFLAGS="-O2 -pipe -march=native -mtune=native"
CFLAGS_amd64="-m64"
CFLAGS_x32="-mx32"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x32="x86_64-pc-linux-gnux32"
CHOST_x86="i686-pc-linux-gnu"
CLEAN_DELAY="5"
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"
COLLISION_IGNORE="/lib/modules/*"
COLORFGBG="15;default"
COLORTERM="rxvt"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
CXXFLAGS="-O2 -pipe -march=native -mtune=native"
DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-rCkciOwLjh,guid=4bdcd25b67bf60c4fed558f85e1dff79"
DEFAULT_ABI="amd64"
DISPLAY=":0.0"
DISTDIR="/usr/portage/distfiles"
DOTNET_TARGETS="net45"
EDITOR="vim"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--verbose --ask"
EMERGE_WARNING_DELAY="10"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
EPREFIX=""
EROOT="/"
ESYSROOT="/"
FCFLAGS="-O2 -pipe -march=native -mtune=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_RSYNC="rsync -LtvP "${URI}" "${DISTDIR}/${FILE}""
FETCHCOMMAND_SFTP="bash -c "x=\${2#sftp://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port= ; eval \"declare -a ssh_opts=(\${3})\" ; exec sftp \${port:+-P \${port}} \"\${ssh_opts[@]}\" \"\${host}:/\${x#*/}\" \"\$1\"" sftp "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port= ; exec rsync --rsh=\"ssh \${port:+-p\${port}} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
FFLAGS="-O2 -pipe -march=native -mtune=native"
GCC_SPECS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
GIT_SKEL="/home/msirabella/Documents/projects/skel"
GOPATH="/home/msirabella/.go"
GPG_TTY="/dev/pts/41"
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx"
GRUB_PLATFORMS="efi-64"
GSETTINGS_BACKEND="dconf"
GTK_MODULES="canberra-gtk-module"
HISTCONTROL="ignoreboth"
HISTFILESIZE=""
HISTSIZE=""
HOME="/home/msirabella"
HUSHLOGIN="FALSE"
INFOPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.32/info:/usr/share/info"
INPUT_DEVICES="libinput keyboard mouse synaptics"
IUSE_IMPLICIT="abi_x86_64 prefix prefix-guest prefix-stack"
JAVAC="/etc/java-config-2/current-system-vm/bin/javac"
JAVA_HOME="/etc/java-config-2/current-system-vm"
JDK_HOME="/etc/java-config-2/current-system-vm"
KERNEL="linux"
LANG="en_US.utf8"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LC_MESSAGES="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LDFLAGS_amd64="-m elf_x86_64"
LDFLAGS_x32="-m elf32_x86_64"
LDFLAGS_x86="-m elf_i386"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe %s"
LIBDIR_amd64="lib64"
LIBDIR_x32="libx32"
LIBDIR_x86="lib32"
LIBREOFFICE_EXTENSIONS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
LOGNAME="msirabella"
MAIL="/home/msirabella/Mail/"
MAILPATH="Gmail:Home:NovaWebDev:School:Sent:Work"
MAKEOPTS="-j5"
MANPAGER="manpager"
MANPATH="/etc/java-config-2/current-system-vm/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.32/man:/usr/lib/llvm/8/share/man:/etc/java-config-2/current-system-vm/man/:/usr/lib64/php7.3/man/:/usr/local/share/man:/usr/share/man:/usr/share/rust-1.37.0/man:/usr/share/erlang/man"
MULTILIB_ABIS="amd64 x86"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage|udev|systemd|clang|python-exec|llvm)"
NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
PAGER="less"
PHP_TARGETS="php7-2"
ROOTPATH="/usr/lib/llvm/8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin"
SYMLINK_LIB="yes"
UNINSTALL_IGNORE="/lib/modules/* /var/run /var/lock"
USE="X a52 aac acl acpi alsa alsa-plugin amd64 bash-completion berkdb bluetooth branding bzip2 calendar cdda cdr cli common-lisp consolekit cracklib crypt cscope cups curl cxx dbus dmenu doc dri dts dvd dvdr emboss encode examples exif faac fbcon ffmpeg finger flac fortran ftp gd gdbm geoip geolocation gif gimp glamor googledrive gopher gpg gstreamer guile hddtemp hscolour iconv icu imagemagic introspection ipv6 jack java javascript jit jpeg json latex lcms ldap libcaca libffi libnotify libtirpc lua luajit mad maildir man matroska mime mng modules mono mozilla mp3 mp4 mpeg mplayer multilib musicbrainz nas ncurses nethack network networkmanager nls nntp nptl nslplugin ocaml ocamlopt offensive ofx ogg opengl openmp openssl opus orc pam pango pch pcntl pcre pda pdf pdfimport perl php png policykit posix ppds pulseaudio python raw readline rss ruby rust sasl sdl seccomp session sockets socks5 sound sox spell split-usr sqlite ssh ssl startup-notification suid svg symlink syslog taglib tcl tcpd threads tidy tiff tk truetype udev udisks unicode upnp upnp-av upower usb v4l vaapi vala vhosts videos vim vim-syntax vorbis wifi wxwidgets x264 xattr xcb xml xmpp xv xvid yaml zlib" ABI_X86="64" ADA_TARGET="gnat_2018" 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" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 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 greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="intel i965" 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"
USER="msirabella"
USERLAND="GNU"
USE_EXPAND="ABI_MIPS ABI_PPC ABI_RISCV ABI_S390 ABI_X86 ADA_TARGET ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86 CURL_SSL ELIBC ENLIGHTENMENT_MODULES FFTOOLS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL L10N LCD_DEVICES LIBREOFFICE_EXTENSIONS LIRC_DEVICES LLVM_TARGETS MONKEYD_PLUGINS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL NGINX_MODULES_STREAM OFED_DRIVERS OFFICE_IMPLEMENTATION OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS POSTGRES_TARGETS PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS ROS_MESSAGES RUBY_TARGETS SANE_BACKENDS USERLAND UWSGI_PLUGINS VIDEO_CARDS VOICEMAIL_STORAGE XFCE_PLUGINS XTABLES_ADDONS"
USE_EXPAND_HIDDEN="ABI_MIPS ABI_PPC ABI_RISCV ABI_S390 CPU_FLAGS_ARM CPU_FLAGS_PPC ELIBC KERNEL USERLAND"
USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm64 hppa ia64 m68k m68k-mint mips ppc ppc64 ppc64-linux ppc-aix ppc-macos riscv s390 sh sparc sparc64-solaris sparc-solaris x64-cygwin x64-macos x64-solaris x86 x86-cygwin x86-fbsd x86-linux x86-macos x86-solaris x86-winnt"
Comment 1 Georgy Yakovlev archtester gentoo-dev 2020-02-21 06:44:38 UTC
can't reproduce with fresh build.
what could happen is that you've built with older PHP and then upgraded it/eselected new one.

can you rebuild and see if it goes away? I'll see if I can force rebuilds if php slots change.
Comment 2 Georgy Yakovlev archtester gentoo-dev 2020-02-21 07:14:24 UTC
actually nvm, was able to reproduce with single PHP version.

weechat properly links to /usr/lib64/php7.2/lib64/libphp7.so for example, but at runtime fails to find it, as PHP does not install LDPATH env.d file (probably by design)
Comment 3 Marco Sirabella 2021-04-20 05:20:54 UTC
CCing the php maintainers, just a snippet from weechat's `configure`:

```
checking for PHP headers and libraries with php-config... checking for php-config7.4... no
checking for php-config74... no
checking for php-config7.3... no
checking for php-config73... no
checking for php-config7.2... no
checking for php-config72... no
checking for php-config7.1... no
checking for php-config71... no
checking for php-config7.0... no
checking for php-config70... no
checking for php-config7... no
checking for php-config... php-config
checking for php-config... (cached) php-config
checking for PHP headers and libraries... 
checking php.h usability... no
checking php.h presence... no
checking for php.h... no
checking for php_execute_script in -lphp7.4... no
checking for php_execute_script in -lphp74... no
checking for php_execute_script in -lphp7.3... no
checking for php_execute_script in -lphp73... no
checking for php_execute_script in -lphp7.2... no
checking for php_execute_script in -lphp72... no
checking for php_execute_script in -lphp7.1... no
checking for php_execute_script in -lphp71... no
checking for php_execute_script in -lphp7.0... no
checking for php_execute_script in -lphp70... no
checking for php_execute_script in -lphp7... no
checking for php_execute_script in -lphp... no
checking for php_execute_script in -lphp... (cached) no
checking for PHP compiling and linking... no
configure: WARNING:
*** PHP (>=7.0) headers and/or libraries couldn't be found on your system.
*** Try to install libphp-embed with your software package manager.
*** WeeChat will be built without PHP support.
```
Comment 4 Marco Sirabella 2021-04-20 05:29:43 UTC
Huh, actually, the above is from the weechat source code ./configure. net-irc/weechat-3.0-r100 seems to straight up fail:

```
$ ebuild /usr/portage/net-irc/weechat/weechat-3.0-r100.ebuild clean configure
...
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (PkgConfig)
  does not match the name of the calling package (Python).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/FindPkgConfig.cmake:41 (find_package_handle_standard_args)
  cmake/FindPython.cmake:31 (include)
  src/plugins/CMakeLists.txt:103 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'python3-embed'
--   Found python3-embed, version 3.8
-- Checking for one of the modules 'ruby-2.7;ruby-2.6;ruby-2.5;ruby-2.4;ruby-2.3;ruby-2.2;ruby-2.1;ruby-2.0;ruby-1.9'
-- Checking for one of the modules 'lua'
-- Found Tclsh: /usr/bin/tclsh (found version "8.6") 
-- Found TCL: /usr/lib64/libtcl.so  
-- Found TCLTK: /usr/lib64/libtcl.so  
-- Found TK: /usr/lib64/libtk.so  
-- Checking for one of the modules 'guile-3.0;guile-2.2;guile-2.0'
-- Looking for scm_install_gmp_memory_functions
-- Looking for scm_install_gmp_memory_functions - found
-- Checking for one of the modules 'php7'
CMake Warning at cmake/FindPHP.cmake:61 (message):
  Could not find libphp7.  Ensure PHP >=7.0.0 development libraries are
  installed and compiled with `--enable-embed`.  Ensure `php-config` is in
  `PATH`.  You may set `-DCMAKE_LIBRARY_PATH=...` to the directory containing
  libphp7.
Call Stack (most recent call first):
  src/plugins/CMakeLists.txt:157 (find_package)


CMake Error at src/plugins/CMakeLists.txt:161 (message):
  Php not found


-- Looking for aspell_version_string
-- Looking for aspell_version_string - found
-- Checking for one of the modules 'ncursesw'
-- Looking for include file ncursesw/ncurses.h
-- Looking for include file ncursesw/ncurses.h - found
-- <<< Gentoo configuration >>>
Build type      Gentoo
Install path    /usr
Compiler flags:
C               -O2 -pipe -march=native -mtune=native -fsigned-char -Wall -Wextra -Werror-implicit-function-declaration
C++              -fsigned-char -Wall -Wextra
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed
Module          -Wl,-O1 -Wl,--as-needed
Shared          -Wl,-O1 -Wl,--as-needed

-- Configuring incomplete, errors occurred!
See also "/var/tmp/portage/net-irc/weechat-3.0-r100/work/weechat-3.0_build/CMakeFiles/CMakeOutput.log".
See also "/var/tmp/portage/net-irc/weechat-3.0-r100/work/weechat-3.0_build/CMakeFiles/CMakeError.log".
 * ERROR: net-irc/weechat-3.0-r100::gentoo failed (configure phase):
 *   cmake failed
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_configure
 *   environment, line 3452:  Called cmake_src_configure
 *   environment, line 1620:  Called die
 * The specific snippet of code:
 *       "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
 * 
 * If you need support, post the output of `emerge --info '=net-irc/weechat-3.0-r100::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-irc/weechat-3.0-r100::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-irc/weechat-3.0-r100/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-irc/weechat-3.0-r100/temp/environment'.
 * Working directory: '/var/tmp/portage/net-irc/weechat-3.0-r100/work/weechat-3.0_build'
 * S: '/var/tmp/portage/net-irc/weechat-3.0-r100/work/weechat-3.0'
```
Comment 5 Michael Orlitzky gentoo-dev 2021-04-20 12:34:20 UTC
(In reply to Georgy Yakovlev from comment #2)
> actually nvm, was able to reproduce with single PHP version.
> 
> weechat properly links to /usr/lib64/php7.2/lib64/libphp7.so for example,
> but at runtime fails to find it, as PHP does not install LDPATH env.d file
> (probably by design)

I don't think any thought was given to this when PHP was slotted. We probably didn't even have USE=embed back then.

The user experience with the library is going to be pretty crappy. First, since the eclasses don't support building against specific versions of PHP, you're getting whatever version is eselected at the time (via the /usr/bin/php-config symlink). If you later eselect a different version of PHP, things will break.

Second, since the library is unstable, we don't even make a consistent name available under $libdir via eselect. We had a bug about this, bug #659592, but you really don't want to be linking against a symlink that can randomly switch (incompatible) libraries on you.

Finally, as you've noticed, we don't add the special slot-specific directories to the runtime linker's path. So there's no way for the linker to find the library even after the program has been compiled/linked with the appropriate -L flag. There's also no good solution here, since installing a new version of PHP (in addition to an existing one) could change the preferred "libphp7.so" loaded at runtime.

In short, the PHP slotting/eclasses would need some major changes to make this work predictably.
Comment 6 Larry the Git Cow gentoo-dev 2022-07-24 02:06:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2939e0ccfdfd3698a7c32276e4bcef9dab5075e4

commit 2939e0ccfdfd3698a7c32276e4bcef9dab5075e4
Author:     Zoltan Puskas <zoltan@sinustrom.info>
AuthorDate: 2022-07-21 02:17:57 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-07-24 02:04:57 +0000

    net-irc/weechat: remove PHP support
    
    PHP support is not really working in Gentoo without python-like eclasses
    and tooling since PHP was slotted.
    
    Closes: https://bugs.gentoo.org/705702
    Signed-off-by: Zoltan Puskas <zoltan@sinustrom.info>
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 net-irc/weechat/weechat-3.5-r1.ebuild | 184 ++++++++++++++++++++++++++++++++++
 1 file changed, 184 insertions(+)