Cmake path too long

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

30 Replies - 2887 Views - Last Post: 12 November 2012 - 09:38 AM Rate Topic: -----

#1 Ticon  Icon User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 320
  • Joined: 20-August 09

Cmake path too long

Posted 23 September 2012 - 07:19 PM

So I've been installing allegro with this guide

http://www.allegro.c...s/thread/606041

And I ran into a bump because when I tell cmake that I want it to add the path it tells me

"Warning! PATH too long installer unable to modify PATH!"

Any help? Tried googling it but no solid information was found

Thanks for reading

Is This A Good Question/Topic? 0
  • +

Replies To: Cmake path too long

#2 snoopy11  Icon User is online

  • Engineering ● Software
  • member icon

Reputation: 765
  • View blog
  • Posts: 2,225
  • Joined: 20-March 10

Re: Cmake path too long

Posted 23 September 2012 - 07:25 PM

CMake has a 250 character limit for PATH,

are you over that limit ?
Was This Post Helpful? 0
  • +
  • -

#3 Ticon  Icon User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 320
  • Joined: 20-August 09

Re: Cmake path too long

Posted 23 September 2012 - 09:51 PM

I'm installing it in C:\ if thats what you mean by path , if not I don't understand :/

EDIT--

Just a little more information,

I'm on step 12, and when I cmake .. -G "MinGW Makefiles I get

'cmake' is not recognized as an internal or external command,
operable program or batch file.


I think its because of the messed up path but I might be wrong

This post has been edited by Ticon: 23 September 2012 - 09:53 PM

Was This Post Helpful? 0
  • +
  • -

#4 #define  Icon User is offline

  • Duke of Err
  • member icon

Reputation: 1311
  • View blog
  • Posts: 4,503
  • Joined: 19-February 09

Re: Cmake path too long

Posted 23 September 2012 - 10:21 PM

Type cd on its own should tell you the current directory you are in.

you can step through the directories with

cd \
cd codeblocks
cd mingw
etc.
Was This Post Helpful? 0
  • +
  • -

#5 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3470
  • View blog
  • Posts: 10,703
  • Joined: 05-May 12

Re: Cmake path too long

Posted 23 September 2012 - 10:26 PM

View PostTicon, on 23 September 2012 - 09:51 PM, said:

I'm on step 12, and when I cmake .. -G "MinGW Makefiles I get

'cmake' is not recognized as an internal or external command,
operable program or batch file.


I think its because of the messed up path but I might be wrong


Did you follow step 10?

Quote

10. Install "cmake-2.8.3-win32-x86.exe" to "C:\cmake" and be sure to select the option to "Add CMAKE to the system path for the current user". This is not the default.

This post has been edited by Skydiver: 23 September 2012 - 10:26 PM

Was This Post Helpful? 0
  • +
  • -

#6 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3470
  • View blog
  • Posts: 10,703
  • Joined: 05-May 12

Re: Cmake path too long

Posted 23 September 2012 - 10:31 PM

On re-reading this thread... I now understand. The title of the thread is incorrect. The problem is not that the CMake path is too long. It's that the installer for Cmake is finding his current PATH environment variable is too long.

View PostTicon, on 23 September 2012 - 07:19 PM, said:

So I've been installing allegro with this guide

http://www.allegro.c...s/thread/606041

And I ran into a bump because when I tell cmake that I want it to add the path it tells me

"Warning! PATH too long installer unable to modify PATH!"

Any help? Tried googling it but no solid information was found

Thanks for reading


So to help you, can you type and run [il]set PATH[/p] in CMD window and paste in the value? I wonder if it is truly so long that it is reading the Windows limit, or if it simply a bug in the installer.

If it is a bug in the installer, you may have to simply hand edit your PATH environment variable.
Was This Post Helpful? 0
  • +
  • -

#7 Ticon  Icon User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 320
  • Joined: 20-August 09

Re: Cmake path too long

Posted 23 September 2012 - 10:41 PM

I've followed all of the steps and completed up until 10, I attempted to set path to the correct destination but i'm not sure I've done it right

C:\Program Files (x86)\CodeBlocks\MinGW\mingw32\build>set path ;C:\codeblocks\mi
ngw\bin;
Path=C:\Windows\System32
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

Was This Post Helpful? 0
  • +
  • -

#8 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3470
  • View blog
  • Posts: 10,703
  • Joined: 05-May 12

Re: Cmake path too long

Posted 23 September 2012 - 10:56 PM

Can you try copying and pasting again the results of set PATH from within the same window that you are trying to run cmake from? That result you pasted in post #7, just doesn't look right.

In particular, line 3, containing only "Path=C:\Windows\System32" does not looks a little terse.

On the other hand, that also goes to show that the PATH is not even coming close to the Windows limit, so the Cmake installer should have succeeded.
Was This Post Helpful? 0
  • +
  • -

#9 Ticon  Icon User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 320
  • Joined: 20-August 09

Re: Cmake path too long

Posted 23 September 2012 - 11:19 PM

Thank you for the quick replies, I really appreciate it. That was the exact cmd prompt that I was using for the tutorial, I just have my codeblocks installed at C:\program files instead of just C:\
Was This Post Helpful? 0
  • +
  • -

#10 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3470
  • View blog
  • Posts: 10,703
  • Joined: 05-May 12

Re: Cmake path too long

Posted 24 September 2012 - 12:07 AM

Are line 1 and 2 correct?
Was This Post Helpful? 0
  • +
  • -

#11 Ticon  Icon User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 320
  • Joined: 20-August 09

Re: Cmake path too long

Posted 24 September 2012 - 04:16 PM

The lines are correct, but now that I've slept and I'm not half delusional I realize it should look something more like C:\CMake 2.8

However I'm still unsure how to do that
Was This Post Helpful? 0
  • +
  • -

#12 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3470
  • View blog
  • Posts: 10,703
  • Joined: 05-May 12

Re: Cmake path too long

Posted 24 September 2012 - 04:35 PM

On Win7/Vista:

Click on Start Button.
Right Click on "Computer".
On the left panel, click on "Advanced Computer Settings"
Click on "Environment Variable" button.

From there you can edit your PATH environment variable either just for you as the user, or for the entire system.

A minor tip on editing the path. Windows has not changed the UI since Window 3 and so it has the small textbox that used to be limited to 255 characters. Although the limit has gone up as the Windows versions have progressed, the window size has not. So the trick is to copy the entire contents of the path, and then paste it into notepad. Do all your editting in notepad. And then put the reassembled string back into the tiny textbox.

I have no idea on how to go about the same operations on Win8.

An alternate solution is to change the path using PowerShell.

Any which way, most PATH changes don't take effect immediately. A reboot is required if you want all your running programs to pick up the change. If all you need is for a new CMD window to pick up the change, just open a new CMD window.
Was This Post Helpful? 0
  • +
  • -

#13 Ticon  Icon User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 320
  • Joined: 20-August 09

Re: Cmake path too long

Posted 24 September 2012 - 05:04 PM

Thanks again for the swift replies! I created a variable named path since there wasn't one, and set its value to
C:\CMake 2.8\bin\cmake.exe
Which is where cmake is, when I try to bring up cmake in cmd however It still gives the not recognized message again :/
Was This Post Helpful? 0
  • +
  • -

#14 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3470
  • View blog
  • Posts: 10,703
  • Joined: 05-May 12

Re: Cmake path too long

Posted 24 September 2012 - 05:09 PM

The PATH should only list directories. Don't include "cmake.exe".

Open your CMD window, and type in 'set PATH'. What does it now say?

This post has been edited by Skydiver: 24 September 2012 - 05:10 PM

Was This Post Helpful? 0
  • +
  • -

#15 Ticon  Icon User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 320
  • Joined: 20-August 09

Re: Cmake path too long

Posted 24 September 2012 - 05:14 PM

C:\Users\Ticon>set path
Path=C:\CMake 2.8\bin\cmake.exe
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC


I will change it to the bin folder and retry it while I wait

--Edit--

cmake works now, thanks alot!

Now I have another problem however, I run the command it tells in step 12
cmake .. -G "MinGW Makefiles
And I get a heaping load of fun errors

C:\CodeBlocks\MinGW\allegro\build>cmake .. -G "MinGW Makefiles
CMake Error: CMake was unable to find a build program corresponding to "MinGW Ma
kefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a differe
nt build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Ma
kefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a differe
nt 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:/CodeBlocks/MinGW/allegro/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:/CodeBlocks/MinGW/allegro/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!


-sigh- Why can't things just go smoothly, and help is appreciated

This post has been edited by Ticon: 24 September 2012 - 06:34 PM

Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3