Giter VIP home page Giter VIP logo

spvm-sys's Issues

SPVM::Sys does not compile on cygwin probably mismatch of dirent struct (SPVM is fine)

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

t/Sys_FileTest.t may fail (with -Duselongdouble perls?)

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 

Fixed unlink exception message

[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 File IO methods to Sys class.

  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.

Fix Sockaddr clone warnings

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 bug that fflush closed file descriptors

[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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.