Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686602 - dev-lang/php [sodium] needs libsodium [-minimal]
Summary: dev-lang/php [sodium] needs libsodium [-minimal]
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-23 15:34 UTC by Andreas Schürch
Modified: 2019-05-23 16:31 UTC (History)
0 users

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 Andreas Schürch gentoo-dev 2019-05-23 15:34:50 UTC
Hi
I just encountered that php-7.2.16 fails to start up (through apache2 and cli) when the sodium USEflag was used for it, but dev-libs/libsodium-1.0.16-r2 was built with the minimal USEflag.

# php7.2 
php7.2: symbol lookup error: php7.2: undefined symbol: crypto_pwhash_scryptsalsa208sha256_memlimit_interactive
Comment 1 Brian Evans Gentoo Infrastructure gentoo-dev 2019-05-23 16:05:45 UTC
(In reply to Andreas Schürch from comment #0)
> Hi
> I just encountered that php-7.2.16 fails to start up (through apache2 and
> cli) when the sodium USEflag was used for it, but
> dev-libs/libsodium-1.0.16-r2 was built with the minimal USEflag.
> 
> # php7.2 
> php7.2: symbol lookup error: php7.2: undefined symbol:
> crypto_pwhash_scryptsalsa208sha256_memlimit_interactive

Reading through the php sources, it requires that the minimal USE flag be consistent when libsodium is built and php is built after.

PHP will build both ways, but the runtime will choke if that USE is flipped and libsodium rebuilt without php being rebuilt.

It still may make sense to force that flag off to get a positive result.
Comment 2 Brian Evans Gentoo Infrastructure gentoo-dev 2019-05-23 16:11:11 UTC
Specifically once PHP is built:

libsodium[minimal] -> libsodium[-minimal] == PHP continues without new functions

libsodium[-minimal] -> libsodium[minimal] == PHP fails at runtime without a rebuild
Comment 3 Andreas Schürch gentoo-dev 2019-05-23 16:31:58 UTC
Ah, You are right!
I got into that situation as I built php in a ROOT= environment with [minimal] set, while the system libsodium was built without it!
I don't know if such a case could be caught!?