spedas / bleeding_edge

IDL-based Space Physics Environment Data Analysis Software (bleeding edge)
http://www.spedas.org
Other
7 stars 0 forks source link

PHP library errors calling thm_thmsoc_dblog on cronus #79

Closed jameswilburlewis closed 1 year ago

jameswilburlewis commented 1 year ago

Example with a trivial PHP command:

IDL> spawn,'php -v'
PHP Warning:  PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/lib64/php/modules/curl (/usr/lib64/php/modules/curl: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/curl.so (/usr/lib64/php/modules/curl.so: undefined symbol: curl_mime_type)) in Unknown on line 0
PHP 8.1.18 (cli) (built: Apr 11 2023 16:47:45) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.18, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.18, Copyright (c), by Zend Technologies
IDL>

This is happening only on cronus, with IDL versions 8.5.1 through 8.7.*.

jameswilburlewis commented 1 year ago

The issue turned out to be in the IDL startup scripts. After running idl_setup8.5.1 or similar, the 'idl' command is aliased to a shell script that adds a bunch of libraries to LD_LIBRARY_PATH. Apparently one of those libraries is incompatible with the PHP installation on cronus (or RHEL in general).

I fixed it by prefixing 'unsetenv LD_LIBRARY_PATH;' to the command being called via 'spawn' in thm_thmsoc_dblog.pro.