Summary: | 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 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | M Sirabella <marco> |
Component: | Current packages | Assignee: | Georgy Yakovlev <gyakovlev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mjo, php-bugs |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
M Sirabella
2020-01-17 23:49:47 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. 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) 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. ``` 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' ``` (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. 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(+) |