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

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.

Related

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.

How to use lua web sockets on windows?

This answer suggests this library to use web sockets for lua.
The installation guide of the library contains three strings:
$ git clone git://github.com/lipp/lua-websockets.git
$ cd lua-websockets
$ luarocks make rockspecs/lua-websockets-scm-1.rockspec
I don't know what results of the last command should be and how to proceed from executing it to compiling examples. But on my PC it only produces error message
'"C:\Program Files (x86)\LuaRocks\\lua5.1.exe"' is not recognized as
internal or external command, operable program or batch file
in visual studio 2015 developer console.
In regular console it just complains that cl is not recognized
I want to know not only ways of fixing the error, but all actions needed to start communicating with websockets from a lua script on windows with this library or another one.
The script will be run in vm provided by a third party app. I can require external modules from it. I installed luarocks from developer console. There are no other installed lua frameworks/compilers. The system is windows 8.
If you need to run this as the client, then you only need three pieces: lua interpreter, luasocket library, and the lua-websockets module you referenced. The module has other dependencies (luabitop and copas), but those are optional if you just want to try simple sync calls using luasocket. You can compile luasocket libraries yourself (that's what luarocks probably attempted for you to do, but you can also do it from the command line) or find already compiled libraries; for example, see this discussion for details.

Trying to build ruby on visual studio with zlib

I'm trying to build ruby on visual studio with zlib and I'm having problems with it.
I have prepared everything to build it but I don't know how to specify where the zlib library and headers are.
I have the source code in $(ProjectDir)/..
I am buildin in $(ProjectDir)/$(Platform)/$(Configuration)
I build with command line, and I have it like this
mkdir $(Platform)\$(Configuration)
cd $(Platform)\$(Configuration)\
..\..\..\win32\configure.bat --target=i386-mswin32 --prefix=$(ProjectDir)$(Platform)\$(Configuration)\bin
If I go to ext/zlib, I can execute
extconf.rb --with-zlib-lib=$(ProjectDir)..\..\zlib-1.2.8\zlib-1.2.8\$(Platform)\$(Configuration)\lib --with-zlib-include=$(ProjectDir)..\..\zlib-1.2.8
and creates the makefile correcly, but I don't know how to pass zlib lib
and include paths to the configuration script.
I have tried with
..\..\..\win32\configure.bat --target=i386-mswin32 --prefix=$(ProjectDir)$(Platform)\$(Configuration)\bin --with-zlib-lib=$(ProjectDir)..\..\zlib-1.2.8\zlib-1.2.8\$(Platform)\$(Configuration)\lib --with-zlib-include=$(ProjectDir)..\..\zlib-1.2.8
but that doesn't works
I suppose it has something to do with the '--with-ext="a,b,..."' option or with the "--path" that is specified in the help command, but I don't know how to specify it and the documentation is really bad.
I would be very gratefull if you could help me.
The instructions below are for Ruby 2.2.5 – if you want to build some other version or use different folder paths, change accordingly. I used these to successfully build Ruby 2.2.5 and 2.3.1 from source with zlib using VS2013 Community Update 5 on Windows 8.1 Pro x64.
Create folders:
C:\ruby-2.2.5\build
C:\ruby-2.2.5\src
Untar ruby-2.2.5.tar.gz and put the sources in C:\ruby-2.2.5\src
Unzip the zlib distribution archive (zlib128-dll.zip) into C:\zlib128-dll
Run Developer Command Prompt for VS2013, then run:
SET INCLUDE=%INCLUDE%;C:\zlib128-dll\include
SET LIB=%LIB%;C:\zlib128-dll\lib
SET PATH=%PATH%;C:\zlib128-dll
cd C:\ruby-2.2.5\build
..\src\win32\configure.bat
nmake
nmake DESTDIR=C:/ruby-2.2.5 install
Done. You should now have a fully working, zlib-enabled, Ruby build in C:\ruby-2.2.5\usr.

Unable to install Time:Piece module with cpan

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.

qt configuration on windows

I'm having some trouble installing and configuring qt on my vista laptop.
I'm trying to setup a development environment on my laptop where I compile from the command line, because that's how the environment is setup on my university's linux machines, so I don't want to tie myself to some IDE .. (plus, real programmers use the command line!)
I haven't used the command line before for C++ development, it was all MSVC, so now I'm having a bit of trouble.
I'm still using MSVC, but from the command line. I practically have no idea what's going on, I just know that I have to run:
qmake
nmake
to compile my code!
I downloaded the opensource version of qt, and did the configuration, and tried a simple qt application (from a tutorial) and it worked, it compiled and executed pretty much as expected.
Now, when I decided to run another project that uses opengl, I got the following error:
fatal error C1083: Cannot open include file: 'qgl.h': No such file
or directory
I'm not sure where does the compiler look for header files, and I didn't copy any header files anywhere, I assume that configure.exe worked its magic somehow and added the include directory to one or more enviroment variables or to some registery location or whatever other peculier places that the MSVC compiler searches for to find include directories.
However, what I did was search my C:\qt\include\ folder to make sure that qgl.h exists, and sure enough there it was. so why can't nmake find it?
I think the actual solution to this is in your pro file:
QT += opengl
If you want to stay with the command line anyway (plus use it on a linux box later / parallel) I'd suggest at least trying out the MinGW version of Qt. I'm using it regularly, and besides of the non-existance of a GUI it works pretty well. Using MinGW also has the advantage that you can simply download and install the MinGW edition of Qt and don't need to reconfigure or recompile anything.
Also, trying out QtCreator might be interesting. It's still beta and requires the beta Qt 4.5 but it's a nice small IDE that integrates nicely with gcc.
Two potential solutions (they solved issues at my workplace)
Do you have qt include and bin folders in the PATH variable? I think the doc says only one of these is needed, but one of the students had Vista and putting the other in the PATH variable solved a "Cannot open include file" problem.
If you're using MSVC did you run configure and nmake from the Visual Studio command prompt? We had problems when using the bare windows Command Prompt because the VS one adds a lot of temporary environment variables to the configure process.
Good luck
Install the complete Qt SDK for Windows which includes Qt 4.6 SDK, Qt Creator 1.3, and MinGW.
It will also install "Qt Command Prompt" launcher that you can use to build Qt apps from the command line.
I'm sure you're more familiar with MSVC than MinGW, as I do too (I've been using MSVC 6.0 to MSVC# 2008 for developing .NET apps).
But try MinGW with Qt and I think it's better for long term. I do some C++ development on Linux too so getting familiar with MinGW will be beneficial for you in cross-platform C++/Qt development.
For more info, see Installation of Qt 4.6 SDK for Windows.
Qmake generates Makefile from *.pro file located in current directory. It has qt path compiled in. Type "qmake -v" to see it. You can't move qt's dir after compiling it. If You haven't moved it, first maybe try to install Qt following instruction from INSTALL file. Good luck.
The opensource version of Qt does not provide profiles (mkspecs in qt terms) so qmake can generate nmake (msvc) compatible makefiles.
You have to use mingw/gcc.

Resources