xs - Testing for LibreSSL in a Perl build script -


i released net::nscang::client while ago , getting lot of test failures on openbsd. reason nscang protocol uses openssl in preshared-key mode (rfc4279), folks @ libressl (default on openbsd now) have ripped out. however, seem have been hell-bent on doing intransparent way: include files have functions defined, shared library missing corresponding symbols, compilation works fine tests fail.

there compatibility package on openbsd called eopenssl, , testing first in makefile.pl (using extutils::pkgconfig) can make work if compatibility library installed. if isn't, things still fail.

i check cpp symbol openssl_no_psk, includes come libressl, fails if linking eopenssl work fine. idea have left try , have test program run part of compilation phase autoconf it. possible extutils::makemaker (or else -- wouldn't mind switching build system if necessary)?

it's easy write feature tests devel::checklib. following can used check presence of function your_func (in makefile.pl):

my $your_func_exists = check_lib(     header   => 'your_header.h',     function => 'return your_func ? 1 : 0;', ); 

if want abort compilation if function missing:

check_lib(     ... ) or warn('your_func missing'), exit; 

exiting 0 should avoid cpan tester's 'fail' report.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -