Bookstore

Recent

Author Topic: Building 1.1  (Read 16548 times)

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8090
Re: Building 1.1
« Reply #30 on: May 25, 2013, 10:56:37 pm »
My bet there is a stale sh.exe somewhere.     FPC makefile's unix detection is based on finding a "sh" iirc.

I will try to delete FPC path from the path, and execute sh to see if there another sh somewhere.
.
No need, FPC doesn't package a sh on windows, it uses cmd.exe.

That's why a sh.exe in some other toolchain can be harmful, and switch FPC's makefiles to "unix" mode.

Giu

  • Full Member
  • ***
  • Posts: 131
Re: Building 1.1
« Reply #31 on: May 26, 2013, 11:37:46 am »
My bet there is a stale sh.exe somewhere.     FPC makefile's unix detection is based on finding a "sh" iirc.

And the Oscar goes to...Marcov

Code: [Select]
C:\Program Files\ConEmu>sh
sh-3.1$ exit
exit

C:\Program Files\ConEmu>where sh.exe
C:\Program Files (x86)\Git\bin\sh.exe

Woot? Who the hell put this there?

I deleted git/bin reference in path, and now, 'make' works like a charm and I can build Laz again.

Thanks a lot, all of you have a paid beer at south-east of Spain ;)

Regards.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8090
Re: Building 1.1
« Reply #32 on: May 26, 2013, 01:17:47 pm »
My bet there is a stale sh.exe somewhere.     FPC makefile's unix detection is based on finding a "sh" iirc.

And the Oscar goes to...Marcov

It's documented:

http://www.stack.nl/~marcov/buildfaq/#toc-Subsection-2.6.4

It is a good habit to make a batchfile that sets a minimal PATH, and when problems occur execute it in a shell (won't change the global default).  Having all kinds of programs add to the shell and many never removing them makes the PATH an accident waiting to happen.

just see what paths to the windows directory are in the global PATH (classically c:\windows and c:\windows\system32, but newer window versions add powershell and wbem), and add the fpc dir to it:
 
path c:\windows\system32;c:\windows;d:\fpc\2.6.2\bin\i386-win32

stuff this line into a batchfile (e.g. dofpc.bat), and when in doubt call it.  It also saves you from accidentally calling MAKE's from other toolchains.

A good tool is also http://www.robvanderwoude.com/files/which_nt.txt   an NT (cmd.exe) batchfile version of the unix which command.

which sh.exe would have printed the git directory.

« Last Edit: May 26, 2013, 01:21:12 pm by marcov »