Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » CMake not finding "MinGW Makefiles"

This thread is locked; no one can reply to it. rss feed Print
CMake not finding "MinGW Makefiles"
Ben Delacob
Member #6,141
August 2005
avatar

I'm not getting cmake to work with:

allegro: 4.9.8

(edit: hummm, I see now 4.9.8 is getting pretty out of date. I also see the Allegro 4.9.10.1 binaries are available now. I think I'll try those and set up svn again. But if anyone knows about this problem please say so.)

OS: XP
gcc version 3.4.5 (mingw-vista special r3) from MinGW-5.1.4 bundle release- I don't think it's Vista specific despite the name and I'm not trying to make the static library.
cmake version 2.6-patch 4
DirectX 9.0c
I have installed the Direct X SDK (dxsdk_sum2004.exe)
I have not yet done anything with Trent Gamblin's (I believe it was him) dx9mgw package.

C:\allegro498\Build>sh
'sh' is not recognized as an internal or external command, operable program or batch file.

C:\allegro498\Build>cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  
CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  
CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:C:/allegro498/Build/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:C:/allegro498/Build/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Any advice would be greatly appreciated.

__________________________________
Allegro html mockup code thread -website-
"two to the fighting eighth power"

LennyLen
Member #5,313
December 2004
avatar

Did you run fixdll first, to create the defnition file? I don't know if this is the cause of the problem, but I don't see any evidence that you've done this step.

[edit: Whether you did or not, that wouldn't be the cause of the problem]

edit:

I don't think it's Vista specific despite the name and I'm not trying to make the static library.

No, it isn't Vista specific. They just renamed it that because it's the build where they fixed the bug that caused the previous 3.4.5 build to not work properly on Vista.

Christopher Bludau
Member #5,401
January 2005

Is .../Mingw/bin in your path?

LennyLen
Member #5,313
December 2004
avatar

Is .../Mingw/bin in your path?

It doesn't need to be. All cmake does is produce a makefile for whatever compiler you specify; it never actually uses the compiler itself.

Ben: If you run cmake without any parameters, it will list the different generator names that it accepts for the -G parameters. Is "MinGW Makefiles" listed?

Christopher Bludau
Member #5,401
January 2005

That confuses me, because when mingw is NOT in my path I get this error:

svnM/Build/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

Which is one of his error messages.
So it has to be in the path to work for me.

Set your path to include mingw/bin and try again.

But I'm not sure what the other errors are about. :-/

Milan Mimica
Member #3,877
September 2003
avatar

I'm not getting cmake to work with:

You're not getting cmake to work at all.

LennyLen
Member #5,313
December 2004
avatar

That confuses me, because when mingw is NOT in my path I get this error:

What version of cmake are you using? (I'm running 2.6 patch 1). Before i wrote my previous post, I removed both the MINGDIR variable, and the PATH entry for MinGW, and it generates the files for me:

C:\Users\LennyLen\Downloads\allegro\4.9\build>gcc
'gcc' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\LennyLen\Downloads\allegro\4.9\build>cmake .. -G "MinGW Makefil
es"
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using MINGDIR: C:/MinGW
-- Performing Test HAVE_DM_POSITION
-- Performing Test HAVE_DM_POSITION - Success
-- Allowing GCC to use SSE instructions
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for include files ALLEGRO_HAVE_DIRENT_H
-- Looking for include files ALLEGRO_HAVE_DIRENT_H - found
-- Looking for include files ALLEGRO_HAVE_INTTYPES_H
-- Looking for include files ALLEGRO_HAVE_INTTYPES_H - found
-- Looking for include files ALLEGRO_HAVE_LINUX_JOYSTICK_H
-- Looking for include files ALLEGRO_HAVE_LINUX_JOYSTICK_H - not found.
-- Looking for include files ALLEGRO_HAVE_STDBOOL_H
-- Looking for include files ALLEGRO_HAVE_STDBOOL_H - found
-- Looking for include files ALLEGRO_HAVE_STDINT_H
-- Looking for include files ALLEGRO_HAVE_STDINT_H - found
-- Looking for include files ALLEGRO_HAVE_SYS_IO_H
-- Looking for include files ALLEGRO_HAVE_SYS_IO_H - not found.
-- Looking for include files ALLEGRO_HAVE_SYS_STAT_H
-- Looking for include files ALLEGRO_HAVE_SYS_STAT_H - found
-- Looking for include files ALLEGRO_HAVE_SYS_TIME_H
-- Looking for include files ALLEGRO_HAVE_SYS_TIME_H - found
-- Looking for include files ALLEGRO_HAVE_TIME_H
-- Looking for include files ALLEGRO_HAVE_TIME_H - found
-- Looking for include files ALLEGRO_HAVE_SYS_UTSNAME_H
-- Looking for include files ALLEGRO_HAVE_SYS_UTSNAME_H - not found.
-- Looking for include files ALLEGRO_HAVE_SYS_TYPES_H
-- Looking for include files ALLEGRO_HAVE_SYS_TYPES_H - found
-- Looking for include files ALLEGRO_HAVE_SOUNDCARD_H
-- Looking for include files ALLEGRO_HAVE_SOUNDCARD_H - not found.
-- Looking for include files ALLEGRO_HAVE_SYS_SOUNDCARD_H
-- Looking for include files ALLEGRO_HAVE_SYS_SOUNDCARD_H - not found.
-- Looking for include files ALLEGRO_HAVE_MACHINE_SOUNDCARD_H
-- Looking for include files ALLEGRO_HAVE_MACHINE_SOUNDCARD_H - not found.
-- Looking for include files ALLEGRO_HAVE_LINUX_SOUNDCARD_H
-- Looking for include files ALLEGRO_HAVE_LINUX_SOUNDCARD_H - not found.
-- Looking for include files ALLEGRO_HAVE_OSATOMIC_H
-- Looking for include files ALLEGRO_HAVE_OSATOMIC_H - not found.
-- Looking for getexecname
-- Looking for getexecname - not found
-- Looking for mkstemp
-- Looking for mkstemp - not found
-- Looking for mmap
-- Looking for mmap - not found
-- Looking for mprotect
-- Looking for mprotect - found
-- Looking for sched_yield
-- Looking for sched_yield - not found
-- Looking for stricmp
-- Looking for stricmp - found
-- Looking for strlwr
-- Looking for strlwr - found
-- Looking for strupr
-- Looking for strupr - found
-- Looking for sysconf
-- Looking for sysconf - not found
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for ftello
-- Looking for ftello - not found
-- Check size of _Bool
-- Check size of _Bool - done
-- Performing Test ALLEGRO_HAVE_PROCFS_ARGCV
-- Performing Test ALLEGRO_HAVE_PROCFS_ARGCV - Failed
-- Performing Test ALLEGRO_HAVE_SV_PROCFS_H
-- Performing Test ALLEGRO_HAVE_SV_PROCFS_H - Failed
-- Performing Test ALLEGRO_HAVE_VA_COPY
-- Performing Test ALLEGRO_HAVE_VA_COPY - Success
-- Check if constructors are supported - yes
-- Found DINPUT: C:/MinGW/include
-- Found D3D9: C:/MinGW/include
-- Found DSOUND: C:/MinGW/include
-- Found ZLIB: C:/MinGW/lib/libz.dll.a
-- Found PNG: C:/MinGW/lib/libpng.dll.a
-- Found JPEG: C:/MinGW/lib/libjpeg.a
-- Found FLAC: C:/MinGW/include
-- Performing Test FLAC_COMPILES
-- Performing Test FLAC_COMPILES - Success
-- Found VORBIS: C:/MinGW/include
-- Performing Test VORBIS_COMPILES
-- Performing Test VORBIS_COMPILES - Success
-- Found SNDFILE: C:/MinGW/include
-- Could NOT find Freetype  (missing:  FREETYPE_INCLUDE_DIRS)
WARNING: FreeType not found, disabling support.
-- Could NOT find CURL  (missing:  CURL_LIBRARY CURL_INCLUDE_DIR)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/LennyLen/Downloads/allegro/4.9/build

I don't know how it knew where to find the compiler, unless it checks c:\mingw\bin by default, but it found mine without it being specified anywhere.

Christopher Bludau
Member #5,401
January 2005

Same version here.
That it checks the default path seems the only thing that explains this behavior. ???

EDIT:
no, i'm stupid.
cmake version 2.6-patch 2 here

Thomas Fjellstrom
Member #476
June 2000
avatar

patch 2 is broken for some reason.

Try using cmake-gui instead of cmake. It should have MinGW Makefiles and MSYS Makefiles. Its also a lot easier to configure the options with the gui ;)

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Christopher Bludau
Member #5,401
January 2005

It's broken?
I had no problems yet. Besides I have to put mingw in my path which I didn't interpret as cmake beeing broken.

Thomas Fjellstrom
Member #476
June 2000
avatar

I couldn't get patch2 cmake to see my mingw install at all. nothing I tried worked. Instead I just use cmake-gui and things just worked.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Ben Delacob
Member #6,141
August 2005
avatar

Thanks for the replies.

LennyLen said:

Did you run fixdll first, to create the defnition file?

No, I didn't. fixdll.bat gives me:

C:\allegro498\misc>fixdll.bat
*** Warning !!!
 Using this script to generate the DLL export definition files may break
 binary compatibility with the latest release. Use misc/fixdll.sh instead.
***
Scanning for API symbols...
'gcc' is not recognized as an internal or external command,
operable program or batch file.
'sed' is not recognized as an internal or external command,
operable program or batch file.
'sed' is not recognized as an internal or external command,
operable program or batch file.
Scanning for WinAPI symbols...
'gcc' is not recognized as an internal or external command,
operable program or batch file.
'sed' is not recognized as an internal or external command,
operable program or batch file.
'sed' is not recognized as an internal or external command,
operable program or batch file.
Scanning for internal symbols...
'gcc' is not recognized as an internal or external command,
operable program or batch file.
'sed' is not recognized as an internal or external command,
operable program or batch file.
'sed' is not recognized as an internal or external command,
operable program or batch file.
'sed' is not recognized as an internal or external command,
operable program or batch file.
'sed' is not recognized as an internal or external command,
operable program or batch file.
Generating...
 lib\msvc\allegro.def
The system cannot find the path specified.
 lib\mingw32\allegro.def
The system cannot find the path specified.
 lib\dmc\allegro.def
The system cannot find the path specified.
 lib\bcc32\allegro.def
The system cannot find the path specified.
Done!

and fixdll.sh is not recognized. Do I need to set up cygwin do do this?

User Environment Variables:

PATH:    c:\MinGW; c:\MinGW\bin;C:\Program Files\CMake 2.6\bin
MINGDIR: c:\MinGW

(No relevant system variables.)

http://support.microsoft.com/kb/310519 said:

Changes to the system environment are written to the registry, and usually require a restart to become effective.

Oh, I'd forgotten if reset was necessary on XP and figured it wasn't based on the time taken to accept changes when I clicked "OK" on the dialog. I'm not sure if my last reset was relevantly recent or not so I'll be trying that now....

The gui gives me the same problems as the console.

__________________________________
Allegro html mockup code thread -website-
"two to the fighting eighth power"

Thomas Fjellstrom
Member #476
June 2000
avatar

Oh, I'd forgotten if reset was necessary on XP and figured it wasn't based on the time taken to accept changes when I clicked "OK" on the dialog. I'm not sure if my last reset was relevantly recent or not so I'll be trying that now....

At the very least you need to open a new cmd console.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

LennyLen
Member #5,313
December 2004
avatar

and fixdll.sh is not recognized. Do I need to set up cygwin do do this?

You don't need to worry about the .sh file. You will need a copy of sed though. There's a Win32 version avaliable here.

Quote:

Oh, I'd forgotten if reset was necessary on XP and figured it wasn't based on the time taken to accept changes when I clicked "OK" on the dialog. I'm not sure if my last reset was relevantly recent or not so I'll be trying that now....

No, XP doesn't need to be restarted. As Thomas stated, all you need to do with XP is start a new console. If you want to check that it is indeed recognising the enviornment variables, just try entering echo %MINGDIR%. If it doesn't respond with C:\MinGW then something is wrong.

Ben Delacob
Member #6,141
August 2005
avatar

Do'h! Sorry guys, I thought my MinGW was clean but I'd changed one thing. I came across this note in my mingw bin folder:

"Ben- you renamed mingw32-make to just make.exe"

That'll do it. Well, I can't have been the only one to have done that when they made the switch to the new naming convention but why didn't I just make a copied version? Anyway that looks like my main problem. There's an awful lot of not founds down there but they might be okay or I'll figure it out. Thanks again.

C:\allegro498\Build>cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using MINGDIR: c:/MinGW
-- Performing Test HAVE_DM_POSITION
-- Performing Test HAVE_DM_POSITION - Success
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for include files ALLEGRO_HAVE_DIRENT_H
-- Looking for include files ALLEGRO_HAVE_DIRENT_H - found
-- Looking for include files ALLEGRO_HAVE_INTTYPES_H
-- Looking for include files ALLEGRO_HAVE_INTTYPES_H - found
-- Looking for include files ALLEGRO_HAVE_LINUX_JOYSTICK_H
-- Looking for include files ALLEGRO_HAVE_LINUX_JOYSTICK_H - not found.
-- Looking for include files ALLEGRO_HAVE_STDBOOL_H
-- Looking for include files ALLEGRO_HAVE_STDBOOL_H - found
-- Looking for include files ALLEGRO_HAVE_STDINT_H
-- Looking for include files ALLEGRO_HAVE_STDINT_H - found
-- Looking for include files ALLEGRO_HAVE_SYS_IO_H
-- Looking for include files ALLEGRO_HAVE_SYS_IO_H - not found.
-- Looking for include files ALLEGRO_HAVE_SYS_STAT_H
-- Looking for include files ALLEGRO_HAVE_SYS_STAT_H - found
-- Looking for include files ALLEGRO_HAVE_SYS_TIME_H
-- Looking for include files ALLEGRO_HAVE_SYS_TIME_H - found
-- Looking for include files ALLEGRO_HAVE_TIME_H
-- Looking for include files ALLEGRO_HAVE_TIME_H - found
-- Looking for include files ALLEGRO_HAVE_SYS_UTSNAME_H
-- Looking for include files ALLEGRO_HAVE_SYS_UTSNAME_H - not found.
-- Looking for include files ALLEGRO_HAVE_SYS_TYPES_H
-- Looking for include files ALLEGRO_HAVE_SYS_TYPES_H - found
-- Looking for include files ALLEGRO_HAVE_SOUNDCARD_H
-- Looking for include files ALLEGRO_HAVE_SOUNDCARD_H - not found.
-- Looking for include files ALLEGRO_HAVE_SYS_SOUNDCARD_H
-- Looking for include files ALLEGRO_HAVE_SYS_SOUNDCARD_H - not found.
-- Looking for include files ALLEGRO_HAVE_MACHINE_SOUNDCARD_H
-- Looking for include files ALLEGRO_HAVE_MACHINE_SOUNDCARD_H - not found.
-- Looking for include files ALLEGRO_HAVE_LINUX_SOUNDCARD_H
-- Looking for include files ALLEGRO_HAVE_LINUX_SOUNDCARD_H - not found.
-- Looking for include files ALLEGRO_HAVE_OSATOMIC_H
-- Looking for include files ALLEGRO_HAVE_OSATOMIC_H - not found.
-- Looking for getexecname
-- Looking for getexecname - not found
-- Looking for mkstemp
-- Looking for mkstemp - not found
-- Looking for mmap
-- Looking for mmap - not found
-- Looking for mprotect
-- Looking for mprotect - found
-- Looking for sched_yield
-- Looking for sched_yield - not found
-- Looking for stricmp
-- Looking for stricmp - found
-- Looking for strlwr
-- Looking for strlwr - found
-- Looking for strupr
-- Looking for strupr - found
-- Looking for sysconf
-- Looking for sysconf - not found
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for ftello
-- Looking for ftello - not found
-- Check size of _Bool
-- Check size of _Bool - done
-- Performing Test ALLEGRO_HAVE_PROCFS_ARGCV
-- Performing Test ALLEGRO_HAVE_PROCFS_ARGCV - Failed
-- Performing Test ALLEGRO_HAVE_SV_PROCFS_H
-- Performing Test ALLEGRO_HAVE_SV_PROCFS_H - Failed
-- Check if constructors are supported - yes
-- Found DINPUT: C:/MinGW/include
-- Found D3D9: C:/MinGW/include
-- Found DSOUND: C:/MinGW/include
-- Could NOT find ZLIB  (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find PNG  (missing:  PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
WARNING: libpng not found, disabling support
-- Could NOT find JPEG  (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR)
WARNING: libjpeg not found, disabling support
-- Could NOT find FLAC  (missing:  FLAC_INCLUDE_DIR FLAC_LIBRARY)
WARNING: libFLAC not found, disabling support.
-- Could NOT find VORBIS  (missing:  VORBIS_INCLUDE_DIR OGG_LIBRARY VORBIS_LIBRARY VORBIS_LIBRARY)
WARNING: libvorbis not found, disabling support.
-- Could NOT find SNDFILE  (missing:  SNDFILE_INCLUDE_DIR SNDFILE_LIBRARY)
WARNING: libsndfile not found, disabling support.
-- Could NOT find Freetype  (missing:  FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
WARNING: FreeType not found, disabling support.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/allegro498/Build

__________________________________
Allegro html mockup code thread -website-
"two to the fighting eighth power"

Thomas Fjellstrom
Member #476
June 2000
avatar

There's an awful lot of not founds down there but they might be okay or I'll figure it out.

The only ones you should worry about are the ones that start with WARNING:. the header checks and stuff above aren't particularly important.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Arthur Kalliokoski
Second in Command
February 2005
avatar

"Ben- you renamed mingw32-make to just make.exe"

I copy mingw32-make.exe to make.exe.

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

― Robert A. Heinlein

Go to: