yuki-kimoto / SPVM-Sys

SPVM::Sys
https://metacpan.org/pod/SPVM::Sys
MIT License
2 stars 1 forks source link

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

Closed stepht closed 11 months ago

stepht commented 11 months ago

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 ‘SPVMSysIODirentd_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

yuki-kimoto commented 11 months ago

Thanks. I will fix this in a few weeks.

yuki-kimoto commented 11 months ago

I create a pull request to support Cygwin Sys::IO::Dirent.

https://github.com/yuki-kimoto/SPVM-Sys/pull/53

Could you try tests? @stepht

Or I can relese it to CPAN.

yuki-kimoto commented 11 months ago

I release the new version that contains this commits to CPAN.

yuki-kimoto commented 11 months ago

Closed.