Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » make (e=2): The system cannot find the file specified.

Credits go to Matthew Leverton for helping out!
This thread is locked; no one can reply to it. rss feed Print
make (e=2): The system cannot find the file specified.
Andy Walker
Member #9,137
October 2007

Well, after my somewhat interesting attempts to build Allegro in a mingw32 environment using code::blocks, I have taken the very good advice given to me and am attempting to build using the makefile. ::)

So, I unpacked a fresh directory, ran "set.bat mingw", and, for good measure, I copied mingw32-make.exe to make.exe (in the proper path). Running "make all" gives me this output:

------------------------
make msg lib
make[1]: Entering directory `C:/CODE/libraries/allegro'
process_begin: CreateProcess(NULL, echo Compiling Allegro for MinGW32, optimised
. Please wait..., ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: *** [msg] Error 2
make[1]: Leaving directory `C:/CODE/libraries/allegro'
make: *** [all] Error 2
------------------------

Environment variables:

MINGDIR is set to c:\mingw
PATH includes c:\mingw\bin

gcc-v returns:

------------------------
Reading specs from c:/mingw/bin/../lib/gcc/mingw32/3.4.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable -languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.2 (mingw-special)
------------------------

I have installed the directx headers as well.

Another interesting thing to note is that "make clean" attempts to use 'rm' instead of 'del' even though no UNIX_TOOLS variable is set.

So, can anyone help me build this thing? I've read through the instructions, and I don't think I'm missing anything...

Milan Mimica
Member #3,877
September 2003
avatar

Quote:

PATH includes c:\mingw\bin

I'm not sure about this, but shouldn't PATH include other dirs it contains by default?

Andy Walker
Member #9,137
October 2007

Quote:

I'm not sure about this, but shouldn't PATH include other dirs it contains by default?

Oh, it does, I just didn't want to paste it all here, so I only made sure to note that it INCLUDES c:\mingw\bin

gnolam
Member #2,030
March 2002
avatar

And if one of those has another version of make, you're in for trouble. Since your make is apparently called "make" and not "mingw32-make", this might well be the case.

Quote:

So, I unpacked a fresh directory, ran "set.bat mingw"

Don't you mean "fix"?

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

Andy Walker
Member #9,137
October 2007

Quote:

And if one of those has another version of make, you're in for trouble. Since your make is apparently called "make" and not "mingw32-make", this might well be the case.

Actually, it generates the exact same error if I type mingw32-make.

And, yes, I meant "fix.bat". Sorry :-/

Ron Novy
Member #6,982
March 2006
avatar

[edit]

[edit] What version of allegro are you using?

----
Oh... Bieber! I thought everyone was chanting Beaver... Now it doesn't make any sense at all. :-/

Andy Walker
Member #9,137
October 2007

Quote:

What version of allegro are you using?

Allegro 4.2.2

[edit]
deleted the make.exe, leaving only minggw32-make.exe

C:\CODE\libraries\allegro>mingw32-make
process_begin: CreateProcess(NULL, echo Compiling Allegro for MinGW32, optimised
. Please wait..., ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [msg] Error 2

[edit]
Okay, so something is seriously weird here. It's the msg target that's failing... and since the msg target simply echos "Compiling Allegro blah blah", that means that make is trying to spawn a process using a program called "echo" and is failing. I bet this has something to do with why "mingw32-make clean" tries to use "rm" instead of "del"

C:\CODE\libraries\allegro>mingw32-make clean
rm -fv obj/*/*.o obj/*/*/*.o obj/*/*/*/*.o obj/*/*.obj obj/*/*/*.obj
mingw32-make: [clean] Error -1073741790 (ignored)
rm -fv obj/*/*.h obj/*/*.s obj/*/*.exe obj/*/*/*.lst obj/*/*/*.asm obj/*/*.res o
bj/*/asmdef obj/*/*.inc lib/*/*.a lib/unix/*.so* lib/unix/sta* lib/*/*.lib lib/*
/*.exp lib/*/*.dll lib/*/*.pdb lib/*/*.ilk lib/*/*.map *.pdb */*.pdb */*.ilk */*
.map */*.sym gmon.out */gmon.out */*.prf allegro.log */allegro.log */*/allegro.l
og log */log */*/log core */core */*/core
mingw32-make: [clean] Error -1073741790 (ignored)

Ron Novy
Member #6,982
March 2006
avatar

Do you have DJGPP as well as Mingw32? I think there were some extra tools and stuff that were included in a separate package... Might be the problem but try downloading the latest allegro and mingw32 again... Re-install mingw32 and allegro might help... Run a scan of the hard-drive first though... It could be that there is a problem with the drive or that a virus is trying to infect your executables....

----
Oh... Bieber! I thought everyone was chanting Beaver... Now it doesn't make any sense at all. :-/

Andy Walker
Member #9,137
October 2007

Quote:

Do you have DJGPP as well as Mingw32?

Nope. Just mingw32.

Quote:

It could be that there is a problem with the drive or that a virus is trying to infect your executables

I don't think that's the problem. It looks to me like mingw32-make just isn't doing its job properly. Besides, I have Cisco Security Agent installed, and it complains any time something attempts to do anything sneaky (or potentially so) like inject code into a process or write to an executable behind the scenes.

The problem definitely seems to lie with the way make is attempting to build target msg. If I type mingw32-make lib, it putters away for awhile just fine before failing at another echo line.

Matthew Leverton
Supreme Loser
January 1999
avatar

I would disable any anti-virus type of tools and try again.

Quote:

I bet this has something to do with why "mingw32-make clean" tries to use "rm" instead of "del"

Oh, and make sure you don't have any things like bash.exe or sh.exe in your path. Allegro has this annoying habit of trying to detect whether or not you are in a "Unix Environment."

Andy Walker
Member #9,137
October 2007

Quote:

Oh, and make sure you don't have any things like bash.exe or sh.exe in your path.

Ah HAH. It was an sh.exe in my windows directory. Pernicious little booger. I renamed it, and it cleans and begins to build... until:

gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -mtune=i586 -O2 -funroll
-loops -ffast-math  -fomit-frame-pointer -I. -I./include -o obj/mingw32/alleg/po
ly3d.o -c src/poly3d.c
src/poly3d.c:32:35: obj/mingw32/asmcapa.h: No such file or directory
mingw32-make: *** [obj/mingw32/alleg/poly3d.o] Error 1

Matthew Leverton
Supreme Loser
January 1999
avatar

mingw32-make obj/mingw32/asmcapa.h

Andy Walker
Member #9,137
October 2007

Yeah. Spoke too soon. Just found this: http://www.allegro.cc/forums/thread/589188

Same error came up for asmdef.inc, so I made that, too.

Built and failed on linking because allegro.def was missing. That's because I'm stupid and had run "make veryclean" I think. Replaced it with a copy from the zip.

Then it failed on plugins.h, which I also had to re-make (because of veryclean?).

And now we're done. Successful build :)

Okay, time for a learning experience for me: what did I do wrong to prevent these files from being built initially? How is the .DEF file originally generated, and is there a make target to regenerate it (i.e. undo "make veryclean")?

[edit]
Found fixdll.bat, but am still unsure why asmdef and plugins.h weren't built. Also, it built it as "alleg42.dll". Is that correct?

Go to: