Re: [scite] Unable to build scite under Windows 7, MinGW 4.6.2

461 views
Skip to first unread message

KHMan

unread,
Mar 22, 2013, 11:39:40 AM3/22/13
to scite-i...@googlegroups.com
On 3/22/2013 11:13 PM, Keith Smith wrote:
> [snip snip]
> If I type 'ver' at the Windows 7 'cmd' prompt, I get the cmd
> version 6.1.7601. If I type ver at the 'msys.bat' prompt, I get
> 'command not found'.

Try deleting that section in the Makefile while retaining the
expected outcome which is:
UXLIB:=-luxtheme

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

Keith Smith

unread,
Mar 22, 2013, 1:19:53 PM3/22/13
to scite-i...@googlegroups.com

On Friday, March 22, 2013 11:13:00 AM UTC-4, Keith Smith wrote:
I have just started to look at Scintilla and Scite.
 
I have downloaded the source for both Scintilla and Scite. I have successfully built Scintilla. I have the Scintilla.dll and SciLexer.dll in /scintilla/bin.
 
However I am having difficulty building Scite.
 
I have two errors. These errors occur whether I am running `mingw32-make` under Windows 7 `cmd`, or `make` under `msys.bat`.
 
process_begin: CreateProcess(NULL, ver, ...) failed      or      make: ver: Command not found
 
and
 
process_being: CreateProcess(NULL, copy ..\..\scintilla\bin\Scintilla.dll ..\bin\Scintiall.dll, ...) failed       or    make: *** no rule to make target '..\..\scintilla\bin\Scintilla.dll, needed by ..\bin\Scintilla.dll. Stop
 
If I type 'ver' at the Windows 7 'cmd' prompt, I get the cmd version 6.1.7601. If I type ver at the 'msys.bat' prompt, I get 'command not found'.
 
These directories are on my path: C:\MinGW\bin;C:\MinGW\msys\1.0\bin
 
I'm running Windows 7 on a ThinkPad. My version of MinGW is 4.6.2-1. My PROCESSOR_ARCHITECTURE=AMD64.
 
Any suggestions on how to resolve these issues would be most helpful.
 
 
 

Keith Smith

unread,
Mar 22, 2013, 4:17:56 PM3/22/13
to scite-interest
Yes, the 'ver: command not found' error results in the WINVER
'default' case,
as WINVER is not defined. The value set to UXLIB doesn't change the
second error
'..\..\scintilla\bin\Scintilla.dll' not found

Keith Smith

Neil Hodgson

unread,
Mar 22, 2013, 5:03:06 PM3/22/13
to scite-i...@googlegroups.com
Keith Smith:

process_being: CreateProcess(NULL, copy ..\..\scintilla\bin\Scintilla.dll ..\bin\Scintiall.dll, ...) failed       or    make: *** no rule to make target '..\..\scintilla\bin\Scintilla.dll, needed by ..\bin\Scintilla.dll. Stop

   The misspelt "Scintiall.dll" looks like there has been an unintended edit.

   Neil

Keith Smith

unread,
Mar 22, 2013, 5:27:49 PM3/22/13
to scite-interest
The typo is my fault.

I've looked carefule in /scite/win32/makefile. There is no typo.

Would it have been that easy. :)

Sorry.

Keith Smith

Neil Hodgson

unread,
Mar 22, 2013, 5:47:54 PM3/22/13
to scite-i...@googlegroups.com
Keith Smith:

> I have two errors. These errors occur whether I am running `mingw32-make` under Windows 7 `cmd`, or `make` under `msys.bat`.
>
> process_begin: CreateProcess(NULL, ver, ...) failed or make: ver: Command not found

mingw32-make/cmd should be able to run ver. Its possible msys is being prioritised, perhaps by using an msys version of mingw32-make or mingw32-make attaching to cygwin's runtime. Some variants of MinGW use the name 'make' instead of 'mingw32-make'. I don't run cygwin myself so support may have decayed - I run mingw32-make under cmd.

I use MinGW 4.7.2. It may be an idea to upgrade.

Neil

KHMan

unread,
Mar 22, 2013, 8:52:36 PM3/22/13
to scite-i...@googlegroups.com
On 3/23/2013 5:27 AM, Keith Smith wrote:
> The typo is my fault.
>
> I've looked carefule in /scite/win32/makefile. There is no typo.
>
> Would it have been that easy. :)

Further to Neil's comments on MinGW and MSYS make...

I use the Makefiles unedited on MSYS (WinXP), and the copying of
the DLLs will fail on MSYS, but otherwise you can still get the
executables built. So I leave the Makefiles unchanged, though I
have a shell script to get the DLLs copied.

I am surprised the MinGW make failed in your case, though...

> Sorry.
>
> Keith Smith
>
> On Mar 22, 5:03 pm, Neil Hodgson<nyamaton...@me.com> wrote:
>> Keith Smith:
>>
>>> process_being: CreateProcess(NULL, copy ..\..\scintilla\bin\Scintilla.dll ..\bin\Scintiall.dll, ...) failed or make: *** no rule to make target '..\..\scintilla\bin\Scintilla.dll, needed by ..\bin\Scintilla.dll. Stop
>>
>> The misspelt "Scintiall.dll" looks like there has been an unintended edit.
>>
>> Neil

Neil Hodgson

unread,
Apr 9, 2013, 7:05:39 PM4/9/13
to scite-i...@googlegroups.com
George:

> 2) remove references to DEL and COPY (always use rm and cp)

    The modified makefile fails for me as I don't have rm or cp installed:

>mingw32-make clean
rm *.exe *.o *.obj *.dll *.res *.map
makefile:123: recipe for target 'clean' failed
process_begin: CreateProcess(NULL, rm *.exe *.o *.obj *.dll *.res *.map, ...) failed.
make (e=2): The system cannot find the file specified.

mingw32-make: *** [clean] Error 2

>mingw32-make
...
cp ../../scintilla/bin/Scintilla.dll ../bin/Scintilla.dll
makefile:131: recipe for target '../bin/Scintilla.dll' failed
process_begin: CreateProcess(NULL, cp ../../scintilla/bin/Scintilla.dll ../bin/Scintilla.dll, ...) failed.
make (e=2): The system cannot find the file specified.

mingw32-make: *** [../bin/Scintilla.dll] Error 2

   Neil

George Brink

unread,
Apr 10, 2013, 12:18:12 PM4/10/13
to scite-i...@googlegroups.com
rm.exe and cp.exe are located inside MSYS part of MinGW tool-chain. Please check the C:\MinGW\msys\1.0\bin\ folder and if it exists add it to the PATH.
If you installed MinGW in some other folder (not C:\MinGW\) then correct the path to the msys's binaries accordingly.

On the other hand, if you do not want to modify your PATH, please try the following modification to the makefile:
DEL = $(dir $(SHELL))rm.exe -f
COPY = $(dir $(SHELL))cp.exe

SHELL is defined by make itself. And mingw32-make should explicitly use the msys's shell.


KHMan

unread,
Apr 10, 2013, 1:35:58 PM4/10/13
to scite-i...@googlegroups.com
Uh no, mingw32-make does not need msys to work, and msys has its
own make.

Can you rustle up something that works under both cmd and bash?

George Brink

unread,
Apr 10, 2013, 2:27:38 PM4/10/13
to scite-i...@googlegroups.com
Ok, how is that:

-- at the beginning of makefile:
# choose MinGW/MSYS or Windows style tools for file deletion and copy
DEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, cmd.exe /C del)
# the hasCP variable is also used to decide do we need to convert '/' to '\' for the copy procedure
hasCP = $(wildcard $(dir $(SHELL))cp.exe)
COPY = $(if $(hasCP), $(dir $(SHELL))cp.exe, cmd.exe /C copy)
# get the version of the Windows
VER = cmd.exe /C ver

-- and in the middle:
../bin/Scintilla.dll:    ../../scintilla/bin/Scintilla.dll
    $(COPY) $(if $(hasCP), $< $@, $(subst /,\, $< $@))

../bin/SciLexer.dll:    ../../scintilla/bin/SciLexer.dll
    $(COPY) $(if $(hasCP), $< $@, $(subst /,\, $< $@))

../bin/%.properties:    ../src/%.properties
    $(COPY) $(if $(hasCP), $< $@, $(subst /,\, $< $@))



From yet another point of view. we can probably live with just this:
DEL = cmd.exe /C del
COPY = cmd.exe /C copy

../bin/%.properties:    ../src/%.properties
    $(COPY) $(subst /,\, $< $@)
If we already know that we are on Windows, then we can always use Windows-style tools, even though it will rise some MSYS-able eyebrows :)







--
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scite-interest+unsubscribe@googlegroups.com.
To post to this group, send email to scite-interest@googlegroups.com.
Visit this group at http://groups.google.com/group/scite-interest?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



Neil Hodgson

unread,
Apr 10, 2013, 6:42:19 PM4/10/13
to scite-i...@googlegroups.com
George Brink:

> -- at the beginning of makefile:
> # choose MinGW/MSYS or Windows style tools for file deletion and copy
> DEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, cmd.exe /C del)

Doesn't msys have an identifying environment variable that can be tested?

Neil

George Brink

unread,
Apr 10, 2013, 6:46:45 PM4/10/13
to scite-i...@googlegroups.com

Unfortunately no. MinGW does not add any variables system-wide. You can recognize msys environment if you run application from msys' shell. But not from cmd.exe

On Apr 10, 2013 6:42 PM, "Neil Hodgson" <nyama...@me.com> wrote:

George Brink:


> -- at the beginning of makefile:

> # choose MinGW/MSYS or Windows style tools for file deletion a...

   Doesn't msys have an identifying environment variable that can be tested?

   Neil


--
You received this message because you are subscribed to the Google Groups "scite-interest" grou...

Neil Hodgson

unread,
Apr 10, 2013, 7:01:17 PM4/10/13
to scite-i...@googlegroups.com
George Brink:

Unfortunately no. MinGW does not add any variables system-wide. You can recognize msys environment if you run application from msys' shell. But not from cmd.exe

   You can use the Windows command tools when the shell is cmd.exe. Its only when using msys (or cygwin) that you need to redirect to rm/cp.

   Neil

George Brink

unread,
Apr 11, 2013, 10:29:53 AM4/11/13
to scite-i...@googlegroups.com
I am a little surprised but yes. When you run make from under msys's shell the cmd.exe does not behave well. It starts in the interactive mode and ignore the /C key (as well as the rest of a command line).
So my previous suggestion with a check of existence of rm.exe and cmd.exe remains the best choice...



--
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scite-interes...@googlegroups.com.
To post to this group, send email to scite-i...@googlegroups.com.

Neil Hodgson

unread,
Apr 11, 2013, 7:51:20 PM4/11/13
to scite-i...@googlegroups.com
George Brink:
I am a little surprised but yes. When you run make from under msys's shell the cmd.exe does not behave well. It starts in the interactive mode and ignore the /C key (as well as the rest of a command line).
 
   It may want to treat /C as a drive path. The rules for the treatment of command lines by msys is http://www.mingw.org/wiki/Posix_path_conversion


So my previous suggestion with a check of existence of rm.exe and cmd.exe remains the best choice...
 
   Make functions are easy to get wrong so I'd prefer to keep this simple and avoid them where possible. Since cmd.exe's del is only called when run from cmd, it doesn't need cmd /c:

DEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q)
 
   Since commands outside cmd will run OK and the copy commands are between directories, copy can be repaced with xcopy and a directory destination.

-COPY = copy
+COPY = xcopy
...

 ..\bin\Scintilla.dll:    ..\..\scintilla\bin\Scintilla.dll
-    $(COPY) ..\..\scintilla\bin\Scintilla.dll $@
+    $(COPY) $^ $(@D)
 
 ..\bin\SciLexer.dll:    ..\..\scintilla\bin\SciLexer.dll
-    $(COPY) ..\..\scintilla\bin\SciLexer.dll $@
+    $(COPY) $^ $(@D)
 
 # Using '/' rather than '\' as that allows make to match the next rule
 ../bin/%.properties:    ../src/%.properties
-    $(COPY) $(subst /,\,$^) $(subst /,\,$@)
+    $(COPY) $(subst /,\, $< $(@D))

   Neil

Neil Hodgson

unread,
Apr 13, 2013, 8:32:14 PM4/13/13
to scite-i...@googlegroups.com
Committed a change that should allow win32/makefile to work on msys, cygwin and cmd.

http://sourceforge.net/p/scintilla/scite/ci/71cdce7d62a92dccaf0331b77b37da5c6290f3af/

Neil

Reply all
Reply to author
Forward
0 new messages