Page 1 of 1

Windows backslash in paths cause build failure

Posted: Fri Sep 20, 2013 8:37 pm
by zeb
Eran,

I'm having trouble building on Windows 7. I'm following ref: http://codelite.org/Developers/Windows.

I did the "git clone..." and began running the Release build in codelite_utils/codelite_utils.workspce. Calls to g++ under mingw32-make can't seem to handle windows path names with '\' delimiters.

(I installed the 2.9.5 version of wxwidgets, but then realized that the Windows build for codelite remains wired for 2.9.4 wxwidgets. So, I installed wxwidget 2.9.4, too.)

It's odd. This line copied from the codelite build window:

g++ -c "C:/ref/codelitegit/codelite_clang/clang_utils.cpp" -O2 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:\wxWidgets-2.9.4\lib\gcc_dll\mswu -IC:\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -o ./Release/clang_utils.o -I. -I../sdk/clang/include

- Fails when called within codelite_clang build project
- Fails when called within an Msys window
- Succeeds when called within a standard Windows cmd window

If I add compiler and linker directives to codelite_clang project settings:

-IC:/wxWidgets-2.9.4/lib/gcc_dll/mswu -IC:/wxWidgets-2.9.4/include
-LC:/wxWidgets-2.9.4/lib/gcc_dll

...everything works.

Is there something that I can reinstall to fix this rather than modifying codelite projects to work around this problem?

Thanks.
Ken

Re: Windows backslash in paths cause build failure

Posted: Fri Sep 20, 2013 11:59 pm
by eranif
This is should be a FAQ in this forum...
The problem is with your GCC, it is set to work with MSYS _or_ Cygwin

Please use a native gcc (a gcc that accepts backslashes)
zeb wrote:(I installed the 2.9.5 version of wxwidgets, but then realized that the Windows build for codelite remains wired for 2.9.4 wxwidgets. So, I installed wxwidget 2.9.4, too.)
I am not sure what you mean by "wire", but in order to build git from head, you will need wxWidgets 2.9.5 and later

Which gcc are you using? I suggest that you use the one that I provide with the the Windows installer it will work. Also make sure that it is the first MinGW the WInodws will find in the PATH environment variable

Eran

Re: Windows backslash in paths cause build failure

Posted: Sat Sep 21, 2013 2:01 am
by zeb
Trying this again...

Your download page for v5.1 has: codelite-5.1.0-mingw4.7.1-wx2.9.4.exe
But your page for v5.2 does not seem to have a "codelite-5.1-mingw4.7.1-wx2.9.5.exe" or equivalent which has the 2.9.5 wxwidgets.

So, I downloaded and installed: wxwidgets-295-tdm-gcc-471-32-devel.exe

I changed my PATH to remove the reference to 2.9.4 wxwidgets so that it only points to thw new 2.9.5 version.

Then, I downloaded and installed: codelite-5.2-mingw4.7.1.exe

Completely cleaned git codelite source code folder:
git clean -df & git checkout -- .

Started-up codelite. Edited Settings > Environment Variables > Default to:
WXWIN=C:\wxWidgets-2.9.5

Opened codelite_utils.workspace. Selected project: codelite_clang
When building codelite_clang:

g++ -c "C:/ref/codelitegit/codelite_clang/clang.cpp" -O2 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:\wxWidgets-2.9.5\lib\gcc_dll\mswu -IC:\wxWidgets-2.9.5\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -o ./Release/clang.o -I. -I../sdk/clang/include

...I'm seeing the same problems as before:
- Fails when called within codelite_clang build project
- Fails when called within an Msys window
- Succeeds when called within a standard Windows cmd window

g++ --version returns: g++ (tdm-1) 4.7.1
That is true when running this on both MSYS and DOS prompt

From MSYS prompt:
$ echo $PATH
.:/usr/local/bin:/mingw/bin:/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/c/Program Files (x86)/Common Files/Roxio Shared/DLLShared/:/c/Program Files (x86)/Common Files/Roxio Shared/10.0/DLLShared/:/c/Program Files (x86)/Windows Imaging/:/c/Program Files/SlikSvn/bin:/c/Program Files/SourceGear/Common/DiffMerge/:/c/tools:/c/Program Files (x86)/Seapine/TestTrack:/c/Program Files (x86)/Pandoc/bin:/c/Program Files/Microsoft Network Monitor 3/:/c/MinGW-4.7.1/bin:/c/Program Files (x86)/Git/bin:/c/wxWidgets-2.9.5/lib/gcc_dll

$ ls -l /mingw/bin
ls: /mingw/bin: No such file or directory

$ command -v g++
/c/MinGW-4.7.1/bin/g++

Thanks.
Ken B.

Re: Windows backslash in paths cause build failure

Posted: Sat Sep 21, 2013 2:33 am
by eranif
codelite is best working with CMD.EXE and not MSYS/CYGWIN et al
zeb wrote:But your page for v5.2 does not seem to have a "codelite-5.1-mingw4.7.1-wx2.9.5.exe" or equivalent which has the 2.9.5 wxwidgets
Its explained in the "Announcement" forum: there are no longer 3 different installer for Windows, instead 1 installer with MinGW+codelite
I also provide a separate installer for wxWidgets 2.9.5 - as you can see here
zeb wrote:..I'm seeing the same problems as before:
- Fails when called within codelite_clang build project
- Fails when called within an Msys window
This is because your gcc from MSYS is used instead of the one that codelite installed. I wrote earlier:
eranif wrote:Also make sure that it is the first MinGW the WInodws will find in the PATH environment variable
So either edit your PATH environment variable (system wise) OR (better) update your environment variables within codelite:

Code: Select all

SHELL=cmd.exe
PATH=C:\MinGW-4.7.1\bin;$PATH
EDIT: here is another post with the same proble:
http://forums.codelite.org/viewtopic.php?f=3&t=2161

Eran

Re: Windows backslash in paths cause build failure

Posted: Sat Sep 21, 2013 5:08 am
by zeb
Eran,

The problem was not with PATH or multiple copies of g++.exe (there is only one copy of g++.exe on my hard drive).

The fix was just adding SHELL=cmd.exe to the codelite environment variables.

Thanks for the help!
Ken

Re: Windows backslash in paths cause build failure

Posted: Sat Sep 21, 2013 9:16 am
by eranif
zeb wrote:Eran,

The problem was not with PATH or multiple copies of g++.exe (there is only one copy of g++.exe on my hard drive).

The fix was just adding SHELL=cmd.exe to the codelite environment variables.

Thanks for the help!
Ken
Maybe its time that I will fix the wx-config to produce forward slashes output on Windows ( I often see this issues on the forum )

Eran

Re: Windows backslash in paths cause build failure

Posted: Mon Sep 23, 2013 2:47 am
by Gibbon1
BTW: For my setup I had to add SHELL=CMD.EXE to the command line for make to prevent it from finding SH,exe in my path. Adding it to the environment did not work.