Avatar of MetraTechIT
MetraTechIT
 asked on

Error during nmake - U1077 cl in not recognized as an internal or external command

I am installing swatch (module for use by Snort) and it requires several specific modules, like date, time formatting, etc.  Using ActiveState Perl, I tried to prepare the code but the above error plagues the install.  The bit-vector module is available at CPAN.  Thanks!
Perl

Avatar of undefined
Last Comment
KETStaff

8/22/2022 - Mon
Suhas .

for date you can use

@date = localtime(time)  for today's date
$date[3] ->date
$date[4] + 1 -> month
$date[5] + 1900 -> year
$date[0] -> seconds
$date[1] -> minutes
$date[2] -> hours

then you can append in which ever format you want....

localtime(time - n*24*60*60) -> to extract n previous days

easily you will get the date and time :)
MetraTechIT

ASKER
I am not much of a Perl programmer (yet) and was hoping to use the modules as outlined by Snort/Swatch/CPAN.  any idea why the bit-vector make failed?
Suhas .

basically you will get that error if the commands are not supported by your system,

if you have those commands and want to run same,
you have to mention the path of those in environment variables.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
MetraTechIT

ASKER
To be more descript:

        cl -c  -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAV
E_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -
O1 -MD -Zi -DNDEBUG    -DVERSION=\"6.4\"  -DXS_VERSION=\"6.4\"  -IC:\Perl\lib\CO
RE  BitVector.c
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE :  U1077:
Stop.

It appears to be attempting a *nix commend... ??
MetraTechIT

ASKER
Apparently, cl is the "linker" in Visual Studio.  Since the Perl library uses C code it must link.  I am looking for a free version of such a tool.
Tintin

You didn't say exactly which bit vector module it requires, but ActivePerl has access to a number of them that you can use, ie:

ppm> search vector
Searching in Active Repositories
  1. Bit-Vector                [6.4] Bit-Vector
  2. Bit-Vector-Minimal        [1.3] Bit-Vector-Minimal
  3. Bit-Vector-Named        [0.023] Bit-Vector-Named
  4. Math-Vector-SortIndexes  [0.02] Math-Vector-SortIndexes
  5. Math-VectorReal          [1.02] Math-VectorReal
  6. Search-VectorSpace       [0.02] Search-VectorSpace


Assuming, it is the first one, you type in:

install Bit-Vector

at the ppm prompt.

If you haven't discovered the Perl Package Manager yet, either type in 'ppm' from the Windows command line, or

Start->Programs->ActivePerl->Perl Package Manager

The ActivePerl packages are all precompiled (if they have C components) for windows, so you don't need a compiler to install them.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
Tintin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
KETStaff

There are lots of problems/solutions on E-E about this problem, but none solve the fundamental problem.  Trying to install a CPAN (not ActiveState/ppm) module requires running make (nmake).  

nmake consistently returns this ['cl' is not recognized as an internal or external command] error.  

I've picked up that this is the C linker from MS Visual C++, and that it needs to be there.

But I'm not a C++ programer, don't have it, don't need it, don't want it, ain't payin' for it.  I'm just trying to install a Perl module.  

Does anyone know how to install a CPAN module on Windows, given this dependency of nmake on C++?