|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
Another Perl question...
I'm busy installing a bunch of modules to satisfy the dependencies for my platform.
I've initially setup cpan for my user, confirmed there is plenty of space in /home, and installed cpanminus. Most modules don't seem to have a problem. That being said, the logging seems pretty unhelpful (like a circular reference) with my current error for Net::SSLeay: Code:
cpanm (App::cpanminus) 1.7027 on perl 5.018002 built for i386-openbsd Work directory is /home/mtech/.cpanm/work/1429050542.3857 You have make /usr/bin/make You have LWP 5.837 You have /bin/tar: Searching Net::SSLeay on cpanmetadb ... --> Working on Net::SSLeay Fetching http://www.cpan.org/authors/id/M/MI/MIKEM/Net-SSLeay-1.68.tar.gz -> OK Unpacking Net-SSLeay-1.68.tar.gz Entering Net-SSLeay-1.68 Checking configure dependencies from META.yml Checking if you have ExtUtils::MakeMaker 6.36 ... Yes (6.66) Configuring Net-SSLeay-1.68 Running Makefile.PL *** Found LibreSSL-2.0. installed in /usr *** That's newer than what this module was tested with You should consider checking if there is a newer release of this module available. Everything will probably work OK, though. *** Be sure to use the same compiler and options to compile your OpenSSL, perl, and Net::SSLeay. Mixing and matching compilers is not supported. Do you want to run external tests? These tests *will* *fail* if you do not have network connectivity. [n] n Checking if your kit is complete... Looks good Writing Makefile for Net::SSLeay Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have Test::More 0.60_01 ... Yes (1.001014) Checking if you have MIME::Base64 0 ... Yes (3.13) Checking if you have ExtUtils::MakeMaker 6.36 ... Yes (6.66) Building and testing Net-SSLeay-1.68 cp lib/Net/SSLeay.pm blib/lib/Net/SSLeay.pm AutoSplitting blib/lib/Net/SSLeay.pm (blib/lib/auto/Net/SSLeay) blib/lib/Net/SSLeay.pm: some names are not unique when truncated to 8 characters: directory blib/lib/auto/Net/SSLeay: do_https3.al, do_https2.al, do_https4.al, do_https.al truncate to do_https do_httpx3.al, do_httpx2.al, do_httpx4.al truncate to do_httpx get_https.al, get_https3.al, get_https4.al, get_http.al, get_http3.al, get_http4.al, get_httpx.al, get_httpx3.al, get_httpx4.al truncate $ head_https.al, head_https3.al, head_https4.al, head_http.al, head_http3.al, head_http4.al, head_httpx.al, head_httpx3.al, head_httpx4.al $ post_https.al, post_https3.al, post_https4.al, post_http.al, post_http3.al, post_http4.al, post_httpx.al, post_httpx3.al, post_httpx4.al $ put_https.al, put_https3.al, put_https4.al, put_http.al, put_http3.al, put_http4.al, put_httpx.al, put_httpx3.al, put_httpx4.al truncate $ ssl_read_all.al, ssl_read_until.al, ssl_read_CRLF.al truncate to ssl_read ssl_write_all.al, ssl_write_CRLF.al truncate to ssl_writ tcp_read_all.al, tcp_read_until.al, tcp_read_CRLF.al truncate to tcp_read tcp_write_all.al, tcp_write_CRLF.al truncate to tcp_writ cp lib/Net/SSLeay.pod blib/lib/Net/SSLeay.pod cp lib/Net/SSLeay/Handle.pm blib/lib/Net/SSLeay/Handle.pm /usr/bin/perl "-Iinc" /usr/libdata/perl5/ExtUtils/xsubpp -typemap /usr/libdata/perl5/ExtUtils/typemap -typemap typemap SSLeay.xs > SSLeay$ cc -c -I/usr/include -DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -fstack-protector$ Running Mkbootstrap for Net::SSLeay () chmod 644 SSLeay.bs rm -f blib/arch/auto/Net/SSLeay/SSLeay.so LD_RUN_PATH="/usr/lib" cc -shared -fPIC -fstack-protector SSLeay.o -o blib/arch/auto/Net/SSLeay/SSLeay.so -L/usr -L/usr/lib -lssl -$ chmod 755 blib/arch/auto/Net/SSLeay/SSLeay.so cp SSLeay.bs blib/arch/auto/Net/SSLeay/SSLeay.bs chmod 644 blib/arch/auto/Net/SSLeay/SSLeay.bs Manifying blib/man3/Net::SSLeay.3p Manifying blib/man3/Net::SSLeay::Handle.3p PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/local/*.t t/handle/local$ t/handle/local/05_use.t ................ ok t/local/01_pod.t ....................... ok t/local/02_pod_coverage.t .............. skipped: these tests are for only for release candidate testing. Enable with RELEASE_TESTING=1 t/local/03_use.t ....................... ok t/local/04_basic.t ..................... ok t/local/05_passwd_cb.t ................. ok t/local/06_tcpecho.t ................... ok t/local/07_sslecho.t ................... ok t/local/08_pipe.t ...................... ok t/local/15_bio.t ....................... ok t/local/20_autoload.t .................. skipped: Some tests need Test::Exception t/local/21_constants.t ................. skipped: Some tests need Test::Exception t/local/30_error.t ..................... skipped: Requires Test::Exception, Test::Warn and Test::NoWarnings t/local/31_rsa_generate_key.t .......... skipped: Test::Exception required t/local/32_x509_get_cert_info.t ........ ok t/local/33_x509_create_cert.t .......... ok t/local/34_x509_crl.t .................. ok t/local/35_ephemeral.t ................. ok t/local/36_verify.t .................... ok t/local/37_asn1_time.t ................. ok t/local/38_priv-key.t .................. ok t/local/39_pkcs12.t .................... ok t/local/40_npn_support.t ............... ok Can't locate auto/Net/SSLeay/CTX_set_alp.al in @INC (@INC contains: /home/mtech/.cpanm/work/1429004231.31806/Net-SSLeay-1.68/inc /home/mtech/.cpanm/work/1429004231.31806/Net-SS Leay-1.68/blib/lib /home/mtech/.cpanm/work/1429004231.31806/Net-SSLeay-1.68/blib/arch /usr/local/libdata/perl5/site_perl/i386-openbsd /usr/libdata/perl5/site_perl/i386-openbsd /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/site_perl /usr/libdata/perl5/i386-openbsd/5.18.2 /usr/local/libdata/perl5/i386-openbsd/5.18.2 /usr/libdata/perl5 /usr/loca l/libdata/perl5 .) at t/local/41_alpn_support.t line 84. # Looks like you planned 6 tests but ran 3. # Looks like your test exited with 2 just after 3. Can't locate auto/Net/SSLeay/CTX_set_alp.al in @INC (@INC contains: /home/mtech/.cpanm/work/1429004231.31806/Net-SSLeay-1.68/inc /home/mtech/.cpanm/work/1429004231.31806/Net-SS Leay-1.68/blib/lib /home/mtech/.cpanm/work/1429004231.31806/Net-SSLeay-1.68/blib/arch /usr/local/libdata/perl5/site_perl/i386-openbsd /usr/libdata/perl5/site_perl/i386-openbsd /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/site_perl /usr/libdata/perl5/i386-openbsd/5.18.2 /usr/local/libdata/perl5/i386-openbsd/5.18.2 /usr/libdata/perl5 /usr/loca l/libdata/perl5 .) at t/local/41_alpn_support.t line 52. t/local/41_alpn_support.t .............. Dubious, test returned 2 (wstat 512, 0x200) Failed 6/6 subtests t/local/42_info_callback.t ............. ok t/local/50_digest.t .................... ok t/local/61_threads-cb-crash.t .......... skipped: your perl is not compiled with ithreads or is pre-5.8 t/local/62_threads-ctx_new-deadlock.t .. skipped: your perl is not compiled with ithreads or is pre-5.8 t/local/kwalitee.t ..................... skipped: these tests are for only for release candidate testing. Enable with RELEASE_TESTING=1 Test Summary Report ----------------— t/local/41_alpn_support.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 6 tests but ran 0. Files=29, Tests=1834, 32 wallclock secs ( 2.04 usr 0.46 sys + 30.57 cusr 1.68 csys = 34.75 CPU) Result: FAIL Failed 1/29 test programs. 0/1834 subtests failed. *** Error 255 in /home/mtech/.cpanm/work/1429004231.31806/Net-SSLeay-1.68 (Makefile:961 'test_dynamic') -> FAIL Installing Net::SSLeay failed. See /home/mtech/.cpanm/work/1429004231.31806/build.log for details. Retry with –force to force install it. -> FAIL Installing the dependencies failed: Module 'Net::SSLeay' is not installed -> FAIL Bailing out the installation for IO-Socket-SSL-2.012. Already tried Net::SSLeay. Skipping. I don't want to force the installation with something possible broken, as this is the SSLeay module. Most of my platform will depend on secure requests. Any insight is appreciated. I've no idea why that file would be missing, or what package I might install to fix it. P.S - I know I'm somewhat akin to double parked with an existing question, but I can't attempt to solve that one till this module is installed |
|
||||
I've never used cpan. When I need a 3rd party Perl module on OpenBSD, I install one with pkg_add(1).
For example: # pkg_add p5-Net-SSLeay
Last edited by jggimi; 14th April 2015 at 10:55 PM. Reason: typo |
|
|||
Unless you and/or your user(s) are very astute, don't start with installing modules through CPAN.
The reason is that OpenBSD uses a different filesystem layout in comparison to other Unix-like operating systems such as Linux. Some modules will install as available on CPAN; others will require patching. Knowing the difference requires a deeper knowledge of both the Perl code & the OS.
More information can be found in our local OpenBSD FAQ thread, & Section 15 of the project's official FAQ document. Last edited by ocicat; 15th April 2015 at 01:01 AM. Reason: clarity |
|
|||
I think there may be some confusion. I'm using cpanimus, after installing that with cpan.
Code:
sudo cpanm {module name} |
|
|||
Quote:
Wherever possible, use Perl modules already ported to OpenBSD. Don't attempt to download source from CPAN yourself if OpenBSD packages already exist for the same Perl module. Your original example was a perfect example. Don't blindly use cpanminus. Use packages already ported by the OpenBSD project if they exist. Here, p5-Net-SSLeay has already been vetted for OpenBSD. Last edited by ocicat; 15th April 2015 at 03:26 PM. Reason: corrected spelling |
|
|||
This is the issue. Anything coming from CPAN may need to be patched. cpanminus is not aware of differences in OpenBSD.
Last edited by ocicat; 15th April 2015 at 03:27 PM. Reason: corrected spelling |
|
||||
Highlights mine.
Quote:
|
|
|||
Quote:
So the funny thing here is that there's a line in that test to detect libressl and disable the whole .t file if detected. This test file that's failing shouldn't be running at all. Unfortunately, it was done subtely wrong (fortunately in current that wrongness is gone with ALPN being there): Code:
BEGIN { plan skip_all => "openssl 1.0.2 required" unless Net::SSLeay::SSLeay >= 0x10002000; plan skip_all => "libressl not supported" if defined &Net::SSLeay::LIBRESSL_VERSION_NUMBER; plan skip_all => "fork() not supported on $^O" unless $Config{d_fork}; } Quote:
As far as running cpan vs. ports, I guess the words of caution are probably right. But personally I'd rather use cpan. Of course if you'd used ports in this instance you wouldn't have had to figure out this error. How are you using CPAN? Do you use local::lib or direct sudo installs? Things can get a little hairy here. So I've been playing around on my local system with not using ports for perl modules and not using local::lib either, i.e. just using the sudo install method to put things right into the the various site_perl and other locations under /usr/local/. Once you do that installing from ports gets messy. Get ready for errors like the following: Collision in p5-YAML-Tiny-1.51: the following files already exist I don't mind this on this machine since it's only a "for fun" install. But if your user is not your user in the sense of your login but a human user you support, maybe that's not so much fun. It's interesting to speculate about what might go wrong when you get into upgrading dual life modules (modules in cpan and in Perl core). I've done one or two for the hell of it and gotten away with it, but at this point if I saw any Perl related problems on the machine I'd think twice before asking an OpenBSD person for help about it. But with local::lib I'd think you'd be safe enough. If you have a problem you just remove your local directory from @INC and all is well. I find it sad people aren't using cpan directly. No one will ever write a port for most of what's up there. Plus there's that downside of packages in general that as long as packagers are doing the work it's only them that are learning about and helping test upstream. Maybe that's partly good, I don't know. Yet looking at the size of the patches on a few random p5- ports, there's not a whole lot going on there that warrants a packing system wrapping a package system. I guess it's worth it for the non-hobbyists as a time saver, but there's something lost there IMO. Last edited by thirdm; 21st April 2015 at 02:07 PM. Reason: cpanm has look feature too. remove commentary about cpan vs. cpanm |
|
|||
Btw. there's a really good old thread on perl5-porters discussing the issues distributors of Perl have and the conventions for where to install modules. I link here into the middle of the thread at one of the informationally dense but useful posts:
http://www.nntp.perl.org/group/perl....msg135211.html The Installation Directories section of the INSTALL document for Perl also makes good reading as does the pod for ExtUtils::MakeMaker: http://cvsweb.openbsd.org/cgi-bin/cv...-cvsweb-markup http://search.cpan.org/~bingos/ExtUt...m#make_install As far as I can tell, OpenBSD ports perl packages install to "site". Hence the problems I have wanting to use cpan as is, which also will tend to install to "site". My experiment on that machine is to ignore the porters' efforts entirely. When I get Slackware replaced by OpenBSD on my main machine I think perhaps I'll configure cpan with a different INSTALL_BASE value, sort of the perl equivalent of an /opt directory for manually built programs, and prefer ports over cpan. I hate all this complexity though. For a machine with one user it seems pretty bent to have more than two or three directories in @INC. |
Tags |
openbsd perl cpan ssleay cpanm |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
new perl! | thirdm | OpenBSD General | 0 | 26th March 2013 03:41 PM |
Perl 5.16.0 now available | J65nko | News | 1 | 22nd May 2012 05:37 PM |
external drive partition question + fdisk question | gosha | OpenBSD General | 15 | 15th June 2009 02:00 PM |
Basic Perl arrays question | stukov | Programming | 12 | 18th November 2008 08:44 PM |
perl/tk | bsdnewbie999 | OpenBSD Packages and Ports | 4 | 8th August 2008 12:34 AM |