Re: error trying to load C/XS Perl module

2017-11-16 Thread Stuart Henderson
On 2017-11-15, Alceu Rodrigues de Freitas Junior  
wrote:
> Em 15/11/2017 15:06, Stuart Henderson escreveu:
>> On 2017-11-15, Stuart Henderson  wrote:
>>>
>>> If I make a port using the normal ports framework and try it on -current,
>>> I get this, which is a bit further but not all the way :
>>>
>>> 1..23
>>> ok 1 - use PerlIO::eol;
>>> ok 2
>>> ok 3
>>> ok 4
>>> ok 5
>>> ok 6 - open for read
>>> Failed 17/23 subtests
>>>
>>> Test Summary Report
>>> ---
>>> t/1-basic.t (Wstat: 134 Tests: 6 Failed: 0)
>>>Non-zero wait status: 134
>>>Parse errors: Bad plan.  You planned 23 tests but ran 6.
>>> Files=1, Tests=6,  0 wallclock secs ( 0.01 usr  0.04 sys +  0.03 cusr  0.03 
>>> csys =  0.11 CPU)
>>> Result: FAIL
>>>
>>>
>>>
>> 
>> Ha. I didn't notice before I wrote a local port, but there's already
>> a port in the tree. So actually you should just be able to use
>> "pkg_add p5-PerlIO-eol".
>> 
>> In general: use the OS packages, don't try and mix with cpan.
>> In most cases it's easier to write a port than deal with the mess
>> that you'll end up in by using two different/conflicting package
>> systems (i.e. OpenBSD's usual one and CPAN).
>> 
>
> Thanks Stuart!
>
> Actually, using CPAN is the main objective here because I'm testing 
> OpenBSD 6.1 as a CPAN Smoker 
> (https://github.com/glasswalk3r/cpan-openbsd-smoker).
>
> So, basically it really didn't occurred to me to search for a ports, but 
> I see that it is updated to the latest version of this module.
>
> I'm not acquainted with creating ports, but I guess I should start from 
> https://www.openbsd.org/faq/ports/ and then checkout 
> http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/devel/p5-PerlIO-eol/Makefile?rev=1.17=text/plain.
>
> So far, I wasn't able to figure out anything outstanding with the 
> building process that is common to Perl modules, but I didn't find 
> anything regarding executing tests as well. To me, the Makefile over 
> there has a bit of magic to make it work, so I would appreciate any 
> inputs on that.
>
>

The individual port Makefile includes bsd.port.mk (from
/usr/ports/infrastructure/mk), and that pulls in additional parts via
the MODULES mechanism (especially relevant here are cpan.port.mk and
perl.port.mk).

If you want to see the actual command line used to run tests for this
port, "make fake; make -n _internal-test".

You'll need a checkout of the whole ports tree rather than just the
one directory.




Re: error trying to load C/XS Perl module

2017-11-15 Thread Alceu Rodrigues de Freitas Junior

Em 15/11/2017 13:38, Silamael escreveu:


Hi,

You could try to set LD_DEBUG=yes before running the test.
With this you should see, what's really missing.

-- Matthias



Thanks Matthias!

I tried that with a perl compiled with debugging symbols (-DDEBUGGING):

dlopen: 
/home/vagrant/.cpan/build/PerlIO-eol-0.16-6/blib/arch/auto/PerlIO/eol/eol.so: 
done (success).
dlsym: boot_PerlIO__eol in 
/home/vagrant/.cpan/build/PerlIO-eol-0.16-6/blib/arch/auto/PerlIO/eol/eol.so: 
0x174e88dd9670

ok 1 - use PerlIO::eol;
ok 2
ok 3
ok 4
ok 5
ok 6 - open for read
Failed 17/23 subtests

Test Summary Report
---
t/1-basic.t (Wstat: 134 Tests: 6 Failed: 0)
  Non-zero wait status: 134
  Parse errors: Bad plan.  You planned 23 tests but ran 6.
Files=1, Tests=6,  0 wallclock secs ( 0.04 usr  0.03 sys +  0.07 cusr 
0.10 csys =  0.24 CPU)

Result: FAIL
doing dtors obj 0x8d5475cc800 @0x8d5ecb88340: 
[/home/vagrant/perl5/perlbrew/perls/5.26.1d/lib/5.26.1/OpenBSD.amd64-openbsd/auto/POSIX/POSIX.so]
doing dtors obj 0x8d5d4886400 @0x8d574e2f9f0: 
[/home/vagrant/perl5/perlbrew/perls/5.26.1d/lib/5.26.1/OpenBSD.amd64-openbsd/auto/Fcntl/Fcntl.so]
doing dtors obj 0x8d5701df000 @0x8d5cb1e5020: 
[/home/vagrant/perl5/perlbrew/perls/5.26.1d/lib/5.26.1/OpenBSD.amd64-openbsd/auto/IO/IO.so]
doing dtors obj 0x8d5701df800 @0x8d61d3e14b0: 
[/home/vagrant/perl5/perlbrew/perls/5.26.1d/lib/5.26.1/OpenBSD.amd64-openbsd/auto/File/Glob/Glob.so]
doing dtors obj 0x8d5a090cc00 @0x8d549b11b30: 
[/home/vagrant/perl5/perlbrew/perls/5.26.1d/lib/5.26.1/OpenBSD.amd64-openbsd/auto/Time/HiRes/HiRes.so]
doing dtors obj 0x8d5a090c800 @0x8d5593df660: 
[/home/vagrant/perl5/perlbrew/perls/5.26.1d/lib/5.26.1/OpenBSD.amd64-openbsd/auto/List/Util/Util.so]
doing dtors obj 0x8d5d4886000 @0x8d5c06651d0: 
[/home/vagrant/perl5/perlbrew/perls/5.26.1d/lib/5.26.1/OpenBSD.amd64-openbsd/auto/Cwd/Cwd.so]

doing dtors

The program dies right after the test number 6 and generates a core 
dump. Unfortunately, gdb doesn't give me anything useful (or I'm doing 
something wrong):


bash-4.4$ gdb -c perl.core
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd6.1".
Core was generated by `perl'.
Program terminated with signal 6, Aborted.
#0  0x174ec0f6dfea in ?? ()
(gdb) bt full
#0  0x174ec0f6dfea in ?? ()
No symbol table info available.
#1  0x174ec0f6e0b9 in ?? ()
No symbol table info available.
#2  0x174e06f4a480 in ?? ()
No symbol table info available.
#3  0x000a in ?? ()
No symbol table info available.
#4  0xffdf000a in ?? ()
No symbol table info available.
#5  0x35cbadd363eaf932 in ?? ()
No symbol table info available.
#6  0x0003 in ?? ()
No symbol table info available.
#7  0x174ec0f8e718 in ?? ()
No symbol table info available.
#8  0x174e in ?? ()
No symbol table info available.
#9  0x174e36b0d020 in ?? ()
No symbol table info available.
#10 0x00ff0008 in ?? ()
No symbol table info available.
#11 0x35cbadd363eaf932 in ?? ()
No symbol table info available.
#12 0x174e55684880 in ?? ()
No symbol table info available.
#13 0x174e88dda0d6 in ?? ()
No symbol table info available.
#14 0x60bbe59c in ?? ()
No symbol table info available.
#15 0x174df018bc98 in ?? ()
No symbol table info available.
#16 0x0004 in ?? ()
No symbol table info available.
#17 0x174ed6c21980 in ?? ()
No symbol table info available.
#18 0x1000 in ?? ()
No symbol table info available.
#19 0x1000 in ?? ()
No symbol table info available.
#20 0x in ?? ()
No symbol table info available.
(gdb)



Re: error trying to load C/XS Perl module

2017-11-15 Thread Alceu Rodrigues de Freitas Junior

Em 15/11/2017 15:06, Stuart Henderson escreveu:

On 2017-11-15, Stuart Henderson  wrote:


If I make a port using the normal ports framework and try it on -current,
I get this, which is a bit further but not all the way :

1..23
ok 1 - use PerlIO::eol;
ok 2
ok 3
ok 4
ok 5
ok 6 - open for read
Failed 17/23 subtests

Test Summary Report
---
t/1-basic.t (Wstat: 134 Tests: 6 Failed: 0)
   Non-zero wait status: 134
   Parse errors: Bad plan.  You planned 23 tests but ran 6.
Files=1, Tests=6,  0 wallclock secs ( 0.01 usr  0.04 sys +  0.03 cusr  0.03 
csys =  0.11 CPU)
Result: FAIL





Ha. I didn't notice before I wrote a local port, but there's already
a port in the tree. So actually you should just be able to use
"pkg_add p5-PerlIO-eol".

In general: use the OS packages, don't try and mix with cpan.
In most cases it's easier to write a port than deal with the mess
that you'll end up in by using two different/conflicting package
systems (i.e. OpenBSD's usual one and CPAN).



Thanks Stuart!

Actually, using CPAN is the main objective here because I'm testing 
OpenBSD 6.1 as a CPAN Smoker 
(https://github.com/glasswalk3r/cpan-openbsd-smoker).


So, basically it really didn't occurred to me to search for a ports, but 
I see that it is updated to the latest version of this module.


I'm not acquainted with creating ports, but I guess I should start from 
https://www.openbsd.org/faq/ports/ and then checkout 
http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/devel/p5-PerlIO-eol/Makefile?rev=1.17=text/plain.


So far, I wasn't able to figure out anything outstanding with the 
building process that is common to Perl modules, but I didn't find 
anything regarding executing tests as well. To me, the Makefile over 
there has a bit of magic to make it work, so I would appreciate any 
inputs on that.




Re: error trying to load C/XS Perl module

2017-11-15 Thread Silamael

On 11/15/2017 02:50 PM, Alceu Rodrigues de Freitas Junior wrote:

Hello folks,

I'm struggling to get installed the module PerlIO::eol by downloding it 
from CPAN and installing it.


I tried with both the standard perl in OpenBSD 6.1 and also one that I 
compiled with perlbrew, but the results are the same (after the classic 
"perl Makefile.PL; make"):


bash-4.4$ prove -l -m -v t/1-basic.t
t/1-basic.t ..
1..23
not ok 1 - use PerlIO::eol;
#   Failed test 'use PerlIO::eol;'
#   at t/1-basic.t line 4.
# Tried to use 'PerlIO::eol'.
# Error:  Can't locate loadable object for module PerlIO::eol in 
@INC (@INC contains: /home/vagrant/.cpan/build/PerlIO-eol-0.16-1/lib 
/home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/OpenBSD.amd64-openbsd 
/home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 
/home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/OpenBSD.amd64-openbsd 
/home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at 
t/1-basic.t line 4.

# Compilation failed in require at t/1-basic.t line 4.
# BEGIN failed--compilation aborted at t/1-basic.t line 4.
Bareword "CR" not allowed while "strict subs" in use at t/1-basic.t line 6.
Bareword "LF" not allowed while "strict subs" in use at t/1-basic.t line 6.
Bareword "CRLF" not allowed while "strict subs" in use at t/1-basic.t 
line 6.

Execution of t/1-basic.t aborted due to compilation errors.
# Looks like your test exited with 255 just after 1.
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 23/23 subtests


Hi,

You could try to set LD_DEBUG=yes before running the test.
With this you should see, what's really missing.

-- Matthias



Re: error trying to load C/XS Perl module

2017-11-15 Thread Stuart Henderson
On 2017-11-15, Stuart Henderson  wrote:
> On 2017-11-15, Alceu Rodrigues de Freitas Junior  
> wrote:
>> Hello folks,
>>
>> I'm struggling to get installed the module PerlIO::eol by downloding it 
>> from CPAN and installing it.
>>
>> I tried with both the standard perl in OpenBSD 6.1 and also one that I 
>> compiled with perlbrew, but the results are the same (after the classic 
>> "perl Makefile.PL; make"):
>>
>> bash-4.4$ prove -l -m -v t/1-basic.t
>> t/1-basic.t ..
>> 1..23
>> not ok 1 - use PerlIO::eol;
>> #   Failed test 'use PerlIO::eol;'
>> #   at t/1-basic.t line 4.
>> # Tried to use 'PerlIO::eol'.
>> # Error:  Can't locate loadable object for module PerlIO::eol in 
>> @INC (@INC contains: /home/vagrant/.cpan/build/PerlIO-eol-0.16-1/lib 
>> /home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/OpenBSD.amd64-openbsd
>>  
>> /home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 
>> /home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/OpenBSD.amd64-openbsd
>>  
>> /home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at 
>> t/1-basic.t line 4.
>> # Compilation failed in require at t/1-basic.t line 4.
>> # BEGIN failed--compilation aborted at t/1-basic.t line 4.
>> Bareword "CR" not allowed while "strict subs" in use at t/1-basic.t line 6.
>> Bareword "LF" not allowed while "strict subs" in use at t/1-basic.t line 6.
>> Bareword "CRLF" not allowed while "strict subs" in use at t/1-basic.t 
>> line 6.
>> Execution of t/1-basic.t aborted due to compilation errors.
>> # Looks like your test exited with 255 just after 1.
>> Dubious, test returned 255 (wstat 65280, 0xff00)
>> Failed 23/23 subtests
>>
>> Test Summary Report
>> ---
>> t/1-basic.t (Wstat: 65280 Tests: 1 Failed: 1)
>>Failed test:  1
>>Non-zero exit status: 255
>>Parse errors: Bad plan.  You planned 23 tests but ran 1.
>> Files=1, Tests=1,  0 wallclock secs ( 0.02 usr  0.04 sys +  0.04 cusr 
>> 0.06 csys =  0.16 CPU)
>> Result: FAIL
>> bash-4.4$
>>
>> I even tried to export LD_LIBRARY_PATH to the current directory, didn't 
>> work either.
>>
>> In the past, I had problems with libs dependencies because installing 
>> them through pkg_add were putting them over /usr/local/lib, and libpth 
>> variable in Perl was not searching over there:
>>
>> -bash-4.4$ perl -v | head -2
>>
>> This is perl 5, version 24, subversion 1 (v5.24.1) built for amd64-openbsd
>> -bash-4.4$ perl -V | grep libpth
>>  libpth=/usr/lib /usr/lib
>>
>> But I don't think that's the case here since the object I'm trying to 
>> load is on my current directory:
>>
>> bash-4.4$ ls
>> Changes   LICENSE~  META.json MYMETA.ymlREADME 
>> dist.ini  eol.c eol.xslib   t
>> Changes~  MANIFEST  META.yml  Makefile  README~ 
>> dist.ini~ eol.h eol.xs~   perl.core write.h
>> LICENSE   MANIFEST.SKIP MYMETA.json   Makefile.PL   blib 
>> eol.bseol.o fill.hpm_to_blibxt
>>
>> The core file over there didn't gave any hints when using "gdb -c" with it.
>>
>> Thanks!
>> Alceu
>>
>>
>
> If I make a port using the normal ports framework and try it on -current,
> I get this, which is a bit further but not all the way :
>
> 1..23
> ok 1 - use PerlIO::eol;
> ok 2
> ok 3
> ok 4
> ok 5
> ok 6 - open for read
> Failed 17/23 subtests 
>
> Test Summary Report
> ---
> t/1-basic.t (Wstat: 134 Tests: 6 Failed: 0)
>   Non-zero wait status: 134
>   Parse errors: Bad plan.  You planned 23 tests but ran 6.
> Files=1, Tests=6,  0 wallclock secs ( 0.01 usr  0.04 sys +  0.03 cusr  0.03 
> csys =  0.11 CPU)
> Result: FAIL
>
>
>

Ha. I didn't notice before I wrote a local port, but there's already
a port in the tree. So actually you should just be able to use
"pkg_add p5-PerlIO-eol".

In general: use the OS packages, don't try and mix with cpan.
In most cases it's easier to write a port than deal with the mess
that you'll end up in by using two different/conflicting package
systems (i.e. OpenBSD's usual one and CPAN).




Re: error trying to load C/XS Perl module

2017-11-15 Thread Stuart Henderson
On 2017-11-15, Alceu Rodrigues de Freitas Junior  
wrote:
> Hello folks,
>
> I'm struggling to get installed the module PerlIO::eol by downloding it 
> from CPAN and installing it.
>
> I tried with both the standard perl in OpenBSD 6.1 and also one that I 
> compiled with perlbrew, but the results are the same (after the classic 
> "perl Makefile.PL; make"):
>
> bash-4.4$ prove -l -m -v t/1-basic.t
> t/1-basic.t ..
> 1..23
> not ok 1 - use PerlIO::eol;
> #   Failed test 'use PerlIO::eol;'
> #   at t/1-basic.t line 4.
> # Tried to use 'PerlIO::eol'.
> # Error:  Can't locate loadable object for module PerlIO::eol in 
> @INC (@INC contains: /home/vagrant/.cpan/build/PerlIO-eol-0.16-1/lib 
> /home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/OpenBSD.amd64-openbsd
>  
> /home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 
> /home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/OpenBSD.amd64-openbsd
>  
> /home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at 
> t/1-basic.t line 4.
> # Compilation failed in require at t/1-basic.t line 4.
> # BEGIN failed--compilation aborted at t/1-basic.t line 4.
> Bareword "CR" not allowed while "strict subs" in use at t/1-basic.t line 6.
> Bareword "LF" not allowed while "strict subs" in use at t/1-basic.t line 6.
> Bareword "CRLF" not allowed while "strict subs" in use at t/1-basic.t 
> line 6.
> Execution of t/1-basic.t aborted due to compilation errors.
> # Looks like your test exited with 255 just after 1.
> Dubious, test returned 255 (wstat 65280, 0xff00)
> Failed 23/23 subtests
>
> Test Summary Report
> ---
> t/1-basic.t (Wstat: 65280 Tests: 1 Failed: 1)
>Failed test:  1
>Non-zero exit status: 255
>Parse errors: Bad plan.  You planned 23 tests but ran 1.
> Files=1, Tests=1,  0 wallclock secs ( 0.02 usr  0.04 sys +  0.04 cusr 
> 0.06 csys =  0.16 CPU)
> Result: FAIL
> bash-4.4$
>
> I even tried to export LD_LIBRARY_PATH to the current directory, didn't 
> work either.
>
> In the past, I had problems with libs dependencies because installing 
> them through pkg_add were putting them over /usr/local/lib, and libpth 
> variable in Perl was not searching over there:
>
> -bash-4.4$ perl -v | head -2
>
> This is perl 5, version 24, subversion 1 (v5.24.1) built for amd64-openbsd
> -bash-4.4$ perl -V | grep libpth
>  libpth=/usr/lib /usr/lib
>
> But I don't think that's the case here since the object I'm trying to 
> load is on my current directory:
>
> bash-4.4$ ls
> Changes   LICENSE~  META.json MYMETA.ymlREADME 
> dist.ini  eol.c eol.xslib   t
> Changes~  MANIFEST  META.yml  Makefile  README~ 
> dist.ini~ eol.h eol.xs~   perl.core write.h
> LICENSE   MANIFEST.SKIP MYMETA.json   Makefile.PL   blib 
> eol.bseol.o fill.hpm_to_blibxt
>
> The core file over there didn't gave any hints when using "gdb -c" with it.
>
> Thanks!
> Alceu
>
>

If I make a port using the normal ports framework and try it on -current,
I get this, which is a bit further but not all the way :

1..23
ok 1 - use PerlIO::eol;
ok 2
ok 3
ok 4
ok 5
ok 6 - open for read
Failed 17/23 subtests 

Test Summary Report
---
t/1-basic.t (Wstat: 134 Tests: 6 Failed: 0)
  Non-zero wait status: 134
  Parse errors: Bad plan.  You planned 23 tests but ran 6.
Files=1, Tests=6,  0 wallclock secs ( 0.01 usr  0.04 sys +  0.03 cusr  0.03 
csys =  0.11 CPU)
Result: FAIL




error trying to load C/XS Perl module

2017-11-15 Thread Alceu Rodrigues de Freitas Junior

Hello folks,

I'm struggling to get installed the module PerlIO::eol by downloding it 
from CPAN and installing it.


I tried with both the standard perl in OpenBSD 6.1 and also one that I 
compiled with perlbrew, but the results are the same (after the classic 
"perl Makefile.PL; make"):


bash-4.4$ prove -l -m -v t/1-basic.t
t/1-basic.t ..
1..23
not ok 1 - use PerlIO::eol;
#   Failed test 'use PerlIO::eol;'
#   at t/1-basic.t line 4.
# Tried to use 'PerlIO::eol'.
# Error:  Can't locate loadable object for module PerlIO::eol in 
@INC (@INC contains: /home/vagrant/.cpan/build/PerlIO-eol-0.16-1/lib 
/home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/OpenBSD.amd64-openbsd 
/home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 
/home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/OpenBSD.amd64-openbsd 
/home/vagrant/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at 
t/1-basic.t line 4.

# Compilation failed in require at t/1-basic.t line 4.
# BEGIN failed--compilation aborted at t/1-basic.t line 4.
Bareword "CR" not allowed while "strict subs" in use at t/1-basic.t line 6.
Bareword "LF" not allowed while "strict subs" in use at t/1-basic.t line 6.
Bareword "CRLF" not allowed while "strict subs" in use at t/1-basic.t 
line 6.

Execution of t/1-basic.t aborted due to compilation errors.
# Looks like your test exited with 255 just after 1.
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 23/23 subtests

Test Summary Report
---
t/1-basic.t (Wstat: 65280 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 23 tests but ran 1.
Files=1, Tests=1,  0 wallclock secs ( 0.02 usr  0.04 sys +  0.04 cusr 
0.06 csys =  0.16 CPU)

Result: FAIL
bash-4.4$

I even tried to export LD_LIBRARY_PATH to the current directory, didn't 
work either.


In the past, I had problems with libs dependencies because installing 
them through pkg_add were putting them over /usr/local/lib, and libpth 
variable in Perl was not searching over there:


-bash-4.4$ perl -v | head -2

This is perl 5, version 24, subversion 1 (v5.24.1) built for amd64-openbsd
-bash-4.4$ perl -V | grep libpth
libpth=/usr/lib /usr/lib

But I don't think that's the case here since the object I'm trying to 
load is on my current directory:


bash-4.4$ ls
Changes   LICENSE~  META.json MYMETA.ymlREADME 
dist.ini  eol.c eol.xslib   t
Changes~  MANIFEST  META.yml  Makefile  README~ 
dist.ini~ eol.h eol.xs~   perl.core write.h
LICENSE   MANIFEST.SKIP MYMETA.json   Makefile.PL   blib 
eol.bseol.o fill.hpm_to_blibxt


The core file over there didn't gave any hints when using "gdb -c" with it.

Thanks!
Alceu