Unable to install Time:Piece module with cpan - windows

I need to install the Time::Piece module in Perl. It's not there for some reason. When I use
cpan install Time::Piece
after some successful steps I get the error below
.....
Checking if your kit is complete...
Looks good
Unable to find a perl 5 (by these names: "My windows path variable contents here...i think"
Writing Makefile for Time::Piece
'nmake' is not recognized as an internal or external command,
operable program or batch file.
RJBS/Time-Piece-1.29.tar.gz
nmake -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
RJBS/Time-Piece-1.29.tar.gz : make NO
cpan[2]>
Why is this happening ? Please help me to fix it.
I'll wait for an answer while I try to fix it myself. First problem -
'nmake' is not recognized as an internal or external command, operable program or batch file.
I used this solution
Windows 7 Control Panel, Programs and Features, Select Microsoft
Visual Studio 2008 Standard or Professional Edition application then
choose Uninstall/Change/Modify. This will bring you into Maintenance
Mode. Select C++ then check X64 Compilers and Tools.
I had Visual Studio Express and Visual Studio Professional 2013 (I don't remember how or why it's there on my system.) I followed the above instructions. The options were different: one had C++ mentioned in it - Microsoft Visual C++ 2013 Microsoft Foundation Class Libraries. So, I chose that one. Its a 600MB download and install.
I went to C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin and found nmake there. If you don't find it there, then you might find in Microsoft Visual Studio 10, 11 etc. Look for nmake there. Add the path for nmake to the PATH environment variable.
Now, I get a new error
NMAKE : fatal error U1073: don't know how to make 'C:/Program'
Stop.
RJBS/Time-Piece-1.29.tar.gz
nmake -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
RJBS/Time-Piece-1.29.tar.gz : make NO
cpan[2]>
I'll try to fix this one too. By the way, #ikegami told me that installing to a path with no spaces (C:\progs\...) will solve my problem. I cannot install to another directory:
This version of Perl comes bundled with other software which must
install to the folder "C:\Program Files (x86)" which has a space in it. The
software needs to be in that path for some other things to work
correctly. Is there a simple way to edit the code which is trying to install the modules? I could make it parse the path by changing some
code. I am new to Perl though. Not sure if I'll be able to change
without causing harm .
EDIT -
I have both Active state perl 5.1.2 and perl 5.8 which are used by tool x and tool y (electric commander). Tool y has its own perl libraries which must be used in my code. So I am stuck with perl 5.8.
I just came to know this is due to issues with tool y. There is a workaround for this, but I am not able to understand it. Can you please help me to understand the workaround for windows ?
https://electriccloud.zendesk.com/hc/en-us/articles/202828073-KBEC-00180-Installing-Perl-modules-into-the-Commander-Perl-distribution

Which version of Perl are you running? what do you get if you run "perl -v" at a command prompt?
If the version number you get is 5.10 or higher, then Time::Piece should already be included with that version of Perl. If it's not, then your installation is broken in interesting ways and you should probably reinstall it from scratch.
If the version number you get is lower than 5.10 then you have a painfully old version of Perl installed and your best approach will be to upgrade to a newer version.

Related

nvim_treesitter installation on windows

bad English (sorry).
I'm trying to get nvim_treesitter to work on my windows machine, on my Linux one it worked great but now when I try on windows the :checkhealth nvim_treesitter gives:
health#nvim_treesitter#check
Installation
ERROR: tree-sitter executable not found
OK: git executable found.
ERROR: cc executable not found.
ADVICE:
Check that either gcc or clang is in your $PATH
Parser/Features H L F I
Legend: H[ighlight], L[ocals], F[olds], I[ndents]
*) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang}
and I'm totally new to this thing, any advice would help:)
The main issue from my perspective is "ERROR: cc executable not found.". It means nvim_treesitter couldn't find any compiler on your machine, and so no parsers could be compiled and installed when you issue ":TSInstall {some_parser_name}" commands.
If you have Visual Studio installed (since nvim gets compiled by VS 2017, it's fine to have 2017 or 2019 studio, I guess), try this:
Run "x64 Native Tools Command Prompt for VS 201x" if you've downloaded nvim-win64 release package or "x86 Native Tools Command Prompt for VS 201x" otherwise (nvim-win32 package)
Run nvim in this command prompt (i.e. nvim-qt GUI)
Install any parsers you want, let's say ":TSInstall c". Output should look like this:
Downloading...
Compiling...
Treesitter parser for c has been installed.
Optionally run :checkhealth nvim_treesitter again to see if everything is fine
Thereafter you can run nvim in any console, not via VS Tools one only (still use it to install or update parsers though).
Please also see https://github.com/nvim-treesitter/nvim-treesitter/wiki/Windows-support for various instructions.
For the Error: tree-sitter: You can checkout creating parsers and follow the description or you download the windows binary of the binary files and put it into a directory on your PATH.
For the Error: cc: You need to install gcc
Try to apply this vsc tutorial from Prerequisites №3
I had the same issue. It helped me.
Ok, here's what I've done and what helped me:
Go to https://www.msys2.org and follow ALL of the installation steps that are described there:
Download and install
Run pacman -Syu comman
Run pacman -S --needed base-devel mingw-w64-x86_64-toolchain and choose mingw-w64-x86_64-gcc there.
After everything is installed, put into your PATH Environment Variable the path to MinGW64\bin folder (if you installed everything to the default folder it will be c:\msys64\mingw64\bin)
And you are good to go! Now open nvim and run
:TSInstall <yourlang>
For example, :TSInstall php
PS: you can get the list of available languages using :TSInstallInfo

Building OpenJDK8 on Windows x64

so I am trying to compile openjdk8 from sources, but I am stuck at missing files problem in the end of compilation process...
Here is the software that I use:
Windows 7 SP1 x64
Windows SDK for Windows 7.1
Microsoft .NET Framework 4
Visual Studio 2010 Express Edition
GNU make 3.82 (compiled by myself)
Freetype 2.3 (compiled by myself)
Oracle JDK 1.7 update 71
Direct X 9.0 (August 2009)
Cygwin
Here are the manuals which I was reading from:
Official README
Royvanrijn's build guide
Some other build guide
Build guide using MSYS
With all these guides I am able to let it compile, however during the Building Images - step , I get an error that some files are missing ( and they are indeed missing ) , which makes me think that something has gone wrong during the build...
There are several points where I afraid I might be doing something wrong...
Cygwin
Right now I use cygwin version 2.8. The openjdk configure script requires cygwin version >1.7 but fails to recognize that 2.8 is greater than 1.7 and throws me an error, so i've tweaked the script (made build work like 2 months ago)...
./configure
My configure command looks as follows:
./configure --disable-ccache --with-freetype=/cygdrive/c/freetype
Maybe I need more arguments here to make it work ( note that i've copied self compiled make executable to cygwin bin folder, so that i dont need to provide its location )
Visual Studio C++ 2010 Express
I would rather try Professional Trial version, but it cannot be found anywhere anymore... (except torrents...) I have a strong feeling that Express version is not suitable for openjdk build. I also get that error with missing ammintrin.h file, but it is easily resolved by creating the empty header file in the include folder of Visual Studio installation.
My basic procedure of building is:
Install all the software above
hg clone http://hg.openjdk.java.net/jdk8/jdk8
./get_source.sh
./configure --disable-ccache --with-freetype=/cygdrive/c/freetype`
make clean images
However, here how it ends :
Does anyone have any clue of how to solve this?
I found the proper fix: using the Cygwin installer, downgrade Grep to 2.27, which properly ignores CRLF line endings.
Run the Cygwin setup (e.g. setup-x86_64.exe)
Advance through the setup wizard until you get to the package selection
Choose "Full" from the View drop-down menu
Type "grep" into the search field
Click the icon in the New column until it shows a 2.x version (2.27 as of this writing)
Click Next and then Finish.
I found myself in the same position as you, except in my case I need OpenJDK build to be repeatable, so "run make repeatedly until it finishes" wasn't an acceptable solution.
Through some experimenting, I found the root cause:
grep was failing because the file being processed had Windows line endings (CRLF)
The Windows line endings were due to the fact that the file is generated by a Java app (fixpaths) which emits platform-native line endings
Identifying fixpaths led me to an old OpenJDK e-mail thread, which reported that some users were having the same problem and fixed it by downgrading.
This gave me the idea to try downgrading grep. I did so, and it worked.
So, after couple of days at this task my only approach was to ignore the errors with the missing files and continue extracting files... This resulted in still working jdk image, which i currently use. My guess is that the errors come frome Oracle boot jdk. Since i am compiling an openjdk, it cannot find oracleJDK files in its headers and thus produces errors.
So, if anyone also gets same errors a me, try to ignore the missing files error and continue the images build.

Building ruby 2.4.1 (windows) - configure 'nmake' is not recognized as an internal or external command

This is my first time to try to build ruby from source on Windows. I try to build ruby 2.4.1 because I dont see it on rubyinstaller.org
I installed devkit then try to do "configure" and get this.
D:\src\ruby-2.4.1\ruby-2.4.1>.\win32\configure
'nmake' is not recognized as an internal or external command,
operable program or batch file.
What is this error and how to fix this? Ruby does not run make by default but using nmake on Windows?
Any step by step guide to build ruby on Windows?
What is this error and how to fix this?
nmake is part of Microsoft Visual C++. It should have been installed together with Visual Studio or however else you installed Visual C++.
Ruby does not run make by default but using nmake on Windows?
The Visual C++ build of YARV (I assume that's what you mean by "Ruby", otherwise your post doesn't make much sense, since "Ruby" is a programming language, i.e. a piece of paper, not a piece of software that you can compile) uses the Visual C++ build tools, including nmake.
Any step by step guide to build ruby on Windows?
I don't know of anything that is better and more up-to-date than the official instructions in win32/README.win32.

omnet++ installation error in windows 7

I am tring to install omnet++ but it gives me error "windows can not find ",is there anyone can help
I have been trying mingmenv.cmd gives me the same error
it gives as shown below error when I try to install:
First of all, did you unpack the OMNeT Windows installation file with the on-board ZIP tools or another program? Try to use programs like WinRAR or 7-Zip to unpack the OMNeT++ installation, the on-board ZIP tool from Windows 7 might have problems with the MinGW files.
Second, does the path to the OMNeT++ installation contain any spaces or special characters? This might also be the source of errors.
Third, does the message immediately show after you start the mingwenv.cmd or after you start it and try to run ./configure or make to configure and build OMNeT?? Check if no antivirus might block the OMNeT sources / helper programs.
General note: under Windows, you always use the mingwenv.cmd shell to compile OMNeT, the normal Windows command environment does not have the necessary paths or settings for OMNMeT.

Installing Primer3

I need to install Primer3 for my research in Windows, and I really have no idea of how to go about it. I was following the instructions mentioned here.
I'm getting to the part where I need to run
mingw32-make TESTOPTS=--windows
and I keep getting an error saying:
'mingw32-make' is not recognized as an internal or external command,
operable program or batch file.
Just for reference, I went into the minGW Installation manager and got the ming32-make packages, including the bin, doc, lang, and lic ones, because I really had no idea which one was the correct one.
If someone could help me, I would be very grateful! Installing these niche programs without an installation wizard is a challenge!
You will need to install mingw32-make. This is a
Windows of port of GNU Make,
a software-build tool that is supported on all operating systems,
indeed the daddy of such tools.
But make alone will not suffice. To build primer3 you will
need a Windows port of the whole GNU toolchain for building software
from source code. Without that, running make by itself will
just expose the absence of the GCC compiler and linker that it
expects to do its bidding.
This is quite a lot of software, but it is easy and quick to install and there
are several open-source offerings. I suggest you go to TDM GCC
and download the TDM64 bundle. This will give you an executable installer.
Just run it and you will end up with the complete GNU toolchain, including,
mingw32-make, in your chosen installation directory.
It will also install in your Windows launch menu the MinGW command prompt.
Launch this and you will be presented with a Windows commandline console
with its environment set up to find and run any of the GNU tools.
In this console change directory to your primer3-X.Y.Z/test directory
and then run mingw32-make TESTOPTS=--windows as per documentation.
Be forwarned that the self-tests of primer3 that are executed to
verify the build may take 1/2 hr. to 1 hr. to run, depending on your
hardware, but they will finish successfully with the steps I've
described, barring problems specific to your machine. It is a foolproof-simple build.
All the built executables are deposited in the primer3-X.Y.Z/src
directory. You may want to move them somewhere more convenient
in in your PATH.
It does seem oddly amateurish that the documentation simply
directs you to run mingw32-make with no preliminary account of
what that is or how to install it, while on the other hand it
advises that you must install perl and strongly recommends a
specific perl distribution; but evidently primer3 is open-source
scientfic software and its documentation is not bad by the standard
of that genre.

Resources