PerlFFI / Module-Build-FFI

Module::Build::FFI - Build Perl extensions in C with FFI
0 stars 0 forks source link

Uninitialized value $build_dll ...at .../Rust.pm line 131 Windows 7 #1

Open nooninm opened 9 years ago

nooninm commented 9 years ago

Perl v5.22.0 built for MSWin32-x86-multi-thread-64int

Paste some messages: Microsoft Windows [Version 6.1.7601] FFI::Platypus is up to date (0.40)

Paste some more messages:

cpan install FFI::Platypus::Lang::Rust ... CPAN: Module::CoreList loaded ok (v5.20150520) Configuring P/PL/PLICEASE/FFI-Platypus-Lang-Rust-0.04.tar.gz with Build.PL Unable to find rustc. Please make sure it is in the PATH.

Paste relevant part of "echo %PATH%" at command prompt: ...C:\Program Files\Rust stable 1.4\bin;...

Paste of "dir" command in that path

dir "C:\Program Files\Rust stable 1.4\bin" | grep rustc.exe 10/28/2015 02:05 AM 6,656 rustc.exe

Perhaps rustc.exe cannot be found because there are spaces in the path name?

Paste of an error from further down the page - undoubtedly due to the above error. It is reported as a File::Copy error, but File::Copy is a very well used module.

PLICEASE/FFI-Platypus-Lang-Rust-0.04.tar.gz C:\Perl\perl\bin\perl.exe ./Build -- OK Running Build test cargo build --release Compiling platypustest v0.1.0 (file:///C:/Perl/cpan/build/FFI-Platypus-Lang-Rust-0.04-_ClGE/libtest) Use of uninitialized value $from in string eq at C:/Perl/perl/lib/File/Copy.pm line 64. ...

Thanks

nooninm commented 9 years ago

I see some problems in Build.PL itself. Wherever the executable name "rustc" is used, it must be changed to "rustc.exe" if Windows. Also, whenever the variable $try is used, it must be changed to "$try" (with the double quotes) because there are spaces in the Windows path names. For example, if (-e "$try") ... There are still problems after doing that. I suspect the same sort of fixes need done in other files.

plicease commented 9 years ago

That first diagnostic is bogus, feel free to ignore it. I'm fixing that right now.

Are you using Strawberry Perl? If so can you run this:

perl -V:dlext

From memory Strawberry uses .xs.dll as the dlext, and I didn't account for that.

plicease commented 9 years ago

Actually the code is there to use .dll so that should be okay. Can you do a directory listing of libtest/target/release/?

nooninm commented 9 years ago

Hello Graham,

Yes, it is Strawberry Perl.

I can get to this tomorrow. I will be free most of entire week.

I have cygwin on my windows 7 machine, by the way. I have not tried it on cygwin but you may not care about that. Neither do I but if you do care and have plans for this being runnable on cygwin I can test things out on cygwin, too.

I will get to the things mentioned in your other emails, too. Anything else, now that I have some free time?

On 11/23/2015 4:25 PM, Graham Ollis wrote:

plicease commented 9 years ago

No problem, whenever you get a chance. I will be intermittent after Wednesday due to the long weekend in the US.

Cygwin is a low priority for this module since rust does not have a native port for cygwin (correct me if I am wrong). I am happy to support cygwin, if someone wants to use this module there, but it is not a priority for me.

nooninm commented 9 years ago

C:\Perl\cpan\build\FFI-Platypus-Lang-Rust-0.04-Ep6MMo\libtest\target\release>tree /f ... │ platypustest.dll │ platypustest.exp │ platypustest.lib │ ├───.fingerprint │ └───platypustest-cf33d44a250b682d │ dep-lib-platypustest │ lib-platypustest │ ├───build ├───deps ├───examples └───native