yuki-kimoto / spvm-sys Goto Github PK
View Code? Open in Web Editor NEWSPVM::Sys
Home Page: https://metacpan.org/pod/SPVM::Sys
License: MIT License
SPVM::Sys
Home Page: https://metacpan.org/pod/SPVM::Sys
License: MIT License
Implement reuseing stat information
Hi Yuki,
SPVM::Sys does not compile on cygwin for a problem of dirent mismatch it seems
here is the log of the error:
/usr/bin/perl -Mblib -MSPVM::Builder::API -e "SPVM::Builder::API->new(build_dir => '.spvm_build')->build_dynamic_lib_dist_native('Sys::IO::Dirent')"
gcc -c -o .spvm_build/work/object/SPVM/Sys/IO/Dirent.o -std=gnu99 -O3 -pthread -fPIC -I/tmp/cpanm_t.d/p5lib/lib/perl5/x86_64-cygwin-threads-multi/SPVM/Builder/include -I/tmp/cpanm_t.d/work/1701108151.2337/SPVM-Sys-0.502/blib/lib/SPVM/Sys/IO/Dirent.native/include lib/SPVM/Sys/IO/Dirent.c
lib/SPVM/Sys/IO/Dirent.c: In function ‘SPVM__Sys__IO__Dirent__d_reclen’:
lib/SPVM/Sys/IO/Dirent.c:27:28: error: ‘struct dirent’ has no member named ‘d_reclen’
27 | stack[0].ival = st_dirent->d_reclen;
| ^~
lib/SPVM/Sys/IO/Dirent.c file cannnot be compiled by the following command:
gcc -c -o .spvm_build/work/object/SPVM/Sys/IO/Dirent.o -std=gnu99 -O3 -pthread -fPIC -I/tmp/cpanm_t.d/p5lib/lib/perl5/x86_64-cygwin-threads-multi/SPVM/Builder/include -I/tmp/cpanm_t.d/work/1701108151.2337/SPVM-Sys-0.502/blib/lib/SPVM/Sys/IO/Dirent.native/include lib/SPVM/Sys/IO/Dirent.c
at /tmp/cpanm_t.d/p5lib/lib/perl5/x86_64-cygwin-threads-multi/SPVM/Builder/CC.pm line 225.
SPVM::Builder::CC::compile_source_file(SPVM::Builder::CC=HASH(0x801047bd0), SPVM::Builder::CompileInfo=HASH(0x801108b60)) called at /tmp/cpanm_t.d/p5lib/lib/perl5/x86_64-cygwin-threads-multi/SPVM/Builder/CC.pm line 374
SPVM::Builder::CC::compile_source_files(SPVM::Builder::CC=HASH(0x801047bd0), "Sys::IO::Dirent", HASH(0x801047c30)) called at /tmp/cpanm_t.d/p5lib/lib/perl5/x86_64-cygwin-threads-multi/SPVM/Builder.pm line 260
SPVM::Builder::build(SPVM::Builder=HASH(0x8000bb1c0), "Sys::IO::Dirent", HASH(0x801047b40)) called at /tmp/cpanm_t.d/p5lib/lib/perl5/x86_64-cygwin-threads-multi/SPVM/Builder.pm line 117
SPVM::Builder::build_dist(SPVM::Builder=HASH(0x8000bb1c0), "Sys::IO::Dirent", HASH(0x8010479d8)) called at /tmp/cpanm_t.d/p5lib/lib/perl5/x86_64-cygwin-threads-multi/SPVM/Builder.pm line 74
SPVM::Builder::build_dynamic_lib_dist(SPVM::Builder=HASH(0x8000bb1c0), "Sys::IO::Dirent", "native") called at /tmp/cpanm_t.d/p5lib/lib/perl5/x86_64-cygwin-threads-multi/SPVM/Builder.pm line 139
SPVM::Builder::build_dynamic_lib_dist_native(SPVM::Builder=HASH(0x8000bb1c0), "Sys::IO::Dirent") called at /tmp/cpanm_t.d/p5lib/lib/perl5/x86_64-cygwin-threads-multi/SPVM/Builder/API.pm line 37
SPVM::Builder::API::build_dynamic_lib_dist_native(SPVM::Builder::API=HASH(0x800003be8), "Sys::IO::Dirent") called at -e line 1
make: *** [Makefile:1374: blib/lib/SPVM/Sys/IO/Dirent.dll] Error 2
FAIL
! Installing SPVM::Sys failed. See /tmp/cpanm_t.d/work/1701108151.2337/build.log for details. Retry with --force to force install it.
I also noticed many dlls inside SPVM dir NOT inside the arch-dependent dir structure
problably should be in it
hth
Most CPAN packages include a link to their GitHub repository to make it easy to find the official source code. It would be nice if you could also include those links. I've written a blog post explaining how: https://perlmaven.com/how-to-add-link-to-version-control-system-of-a-cpan-distributions
Add utimes
t/Sys_FileTest.t fails on systems where perl is compiled with increased floating point accuracy (-Duselongdouble
):
# Failed test at t/Sys_FileTest.t line 30.
# got: '0.00233796296296296313'
# expected: '0.00233796296296296296'
# Failed test at t/Sys_FileTest.t line 34.
# got: '0.00233796296296296313'
# expected: '0.00233796296296296296'
# Failed test at t/Sys_FileTest.t line 38.
# got: '107.298032407407405'
# expected: '107.298032407407407'
# Looks like you failed 3 tests of 85.
t/Sys_FileTest.t .......
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/85 subtests
Add offset option to the send/recv method in the Sys::Socket class.
[System Error]unlink failed:Permission denied. The "C:\Users\RUNNER~1\AppData\Local\Temp\0m8Va1ds9a/a.txt" directory can't be removed
To
[System Error]unlink failed:Permission denied. The "C:\Users\RUNNER~1\AppData\Local\Temp\0m8Va1ds9a/a.txt" file can't be removed
Add STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO to Sys::IO::Constant.
Add fsync to Sys::IO.
Add fstat to Sys::IO.
static method gettimeofday ($tv : Sys::Time::Timeval, $tz : Sys::Time::Timezone)
Use stat in FileTest->e
The 1th argument of the "stat" method in the "Sys" basic type must be a SPVM::BlessedObject object or undef
(The length of the $ptr - $ptr_offset) / the $size must be less than or equal to the $nmemb
Add STDOUT, STDIN, STDERR
Add opendir test
Add the connect_raw method to the Sys::Socket class
Add stdio, stderr, stdin to Sys::IO.
Add readlinkp
portable setenv for Window and Linx.
Add readline to Sys::IO
Sys::Socket sockaddr_un, sockaddr_in, sockaddr_in6
Add ungetc to Sys::IO.
Add Sys::IO::Dirent methods.
Add Sys::Socket::Errno
The 1th argument of the "stat" method in the "Sys" basic type must be a SPVM::BlessedObject object or undef
Add offset optional argument to read/write methods
_putenv_s
_getenv_s
Improve exception messages. Add file name .
etc.
Add the sockatmark method to Sys::Socket.
method getline : string () { # Implemented.
method getlines : string () { # No needed
method close : int () {# No needed
method eof : int () { # Implemented.
method fileno : int () { # Implemented.
method getc : int () {
method print : int ($string : string) { No needed
method clearerr : void () { # None
method error : int () { # None
method flush : int () { # None
method ungetc : int ($c : int) { # None
method write : int ($string : string, $length : int = -1, $offset : int = 0) { # No needed
method read : int ($string : mutable string, $length : int = -1, $offset : int = 0) { # No needed
fcntl # Not yet
fstat # Implemented.
Sys::Poll::PollfdArray->new(0) error
Add module links Sys::IO::Stat and etc.
Add Sys::Socket::Util->EAGAIN
portable one.
OOO at /home/kimoto/perl5/perlbrew/perls/perl-5.32.1/lib/site_perl/5.32.1/SPVM/Sys/Socket/Sockaddr.spvm line 20
PPP at /home/kimoto/perl5/perlbrew/perls/perl-5.32.1/lib/site_perl/5.32.1/SPVM/Sys/Socket/Sockaddr.spvm line 24
[The following exception is coverted to a warning because it is thrown in the DESTROY method]
[System Error]fflush failed:Bad file descriptor
SPVM__Sys__IO__fflush at Sys/IO.c line 605
IO::File->flush at /home/kimoto/perl5/perlbrew/perls/perl-5.32.1/lib/site_perl/5.32.1/SPVM/IO/File.spvm line 203
IO::File->DESTROY at /home/kimoto/perl5/perlbrew/perls/perl-5.32.1/lib/site_perl/5.32.1/SPVM/IO/File.spvm line 122
syswrite and sysread method in Sys class
Add utime test
Add freopen to Sys::IO
Add SO_BROADCAST to Sys::Socket::Constant
glob is too difficult to implement. SPVM::File::Glob porting is needed.
Add ftruncate to Sys::IO
Add the sendto method to Sys::Socket.
readline method in Sys::IO class is moved to Sys class.
Add setvbuf to Sys::IO.
Sys#l errno in Windows
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.