Page 1 of 1

Build failure on Jan.12.2015 git clone

Posted: Mon Jan 12, 2015 10:44 pm
by foxmuldr
I haven't had a successful build of Codelite since it was in the 3.x series, but that is due to me not having tried to build it in that time.

Today, I git clone'd the repository to C:\codelite\ in Win7-64. I downloaded and installed CodeLite 6.1.1 with MinGW 4.8.1-3. I downloaded and installed wxWidgets 3.0.2. I opened LiteEditor.workspace, selected CodeLiteIDE and Win Release Unicode and hit F7.

Code: Select all

C:/codelite/sdk/wxsqlite3/src/wxsqlite3_resourecs.rc:1:24: fatal error: wx/msw/wx.rc: No such file or directory
I tried moving the C:\wxWidgets-3.0.2\include\wx\ directory into the c:\mingw\include\ directory, also gcc_dll into lib\. Same error on rebuild. Not sure what I'm not doing. Any help is appreciated.

Re: Build failure on Jan.12.2015 git clone

Posted: Mon Jan 12, 2015 10:51 pm
by eranif
Fixed in git master, try pulling changes and build it again
Eran

Re: Build failure on Jan.12.2015 git clone

Posted: Mon Jan 12, 2015 11:31 pm
by foxmuldr
eranif wrote:Fixed in git master, try pulling changes and build it again
Eran
That fixed that part of it. It looked like it was going strong, but then I got an error.

I also got 276 of these messages about ../PCH/precompiled_header_release.h.gch not used because __WX__ not defined:

Code: Select all

C:/MinGW-4.8.1-3/bin/g++.exe  -include ../PCH/precompiled_header_release.h  -c  "C:/codelite/CodeFormatter/clClangFormatLocator.cpp" -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/wxWidgets-3.0.2/lib/gcc_dll/mswu -IC:/wxWidgets-3.0.2/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -fno-keep-inline-dllexport  -O2 -Winvalid-pch -DWXUSINGDLL_SDK -DWXUSINGDLL_CL  -o ./WinReleaseUnicode/clClangFormatLocator.cpp.o -I. -I. -I../Interfaces -I../CodeLite -I../Plugin -I../sdk/wxsqlite3/include -I../PCH

cc1plus.exe: warning: ./../PCH/precompiled_header_release.h.gch: not used because `__WX__' not defined [-Winvalid-pch]
cc1plus.exe: warning: ./../PCH/precompiled_header_release.h.gch: not used because `__WX__' not defined [-Winvalid-pch]
cc1plus.exe: warning: ./../PCH/precompiled_header_release.h.gch: not used because `__WX__' not defined [-Winvalid-pch]
The actual errors are in this second block:

Code: Select all

C:/MinGW-4.8.1-3/bin/g++.exe  -include ../PCH/precompiled_header_release.h  -c  "C:/codelite/CodeFormatter/astyle_main.cpp" -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/wxWidgets-3.0.2/lib/gcc_dll/mswu -IC:/wxWidgets-3.0.2/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -fno-keep-inline-dllexport  -O2 -Winvalid-pch -DWXUSINGDLL_SDK -DWXUSINGDLL_CL  -o ./WinReleaseUnicode/astyle_main.cpp.o -I. -I. -I../Interfaces -I../CodeLite -I../Plugin -I../sdk/wxsqlite3/include -I../PCH
cc1plus.exe: warning: ./../PCH/precompiled_header_release.h.gch: not used because `__WX__' not defined [-Winvalid-pch]

In file included from C:/codelite/CodeFormatter/astyle_main.cpp:53:0:
C:/codelite/CodeFormatter/astyle_main.h:82:0: warning: "_" redefined [enabled by default]
 #define _(a) localizer.settext(a)
 ^
In file included from C:/wxWidgets-3.0.2/include/wx/intl.h:17:0,
                 from C:/wxWidgets-3.0.2/include/wx/wx.h:22,
                 from ./../PCH/precompiled_header_release.h:31,
                 from <command-line>:0:
C:/wxWidgets-3.0.2/include/wx/translation.h:38:0: note: this is the location of the previous definition
     #define _(s)                     wxGetTranslation((s))
 ^
C:/MinGW-4.8.1-3/bin/g++.exe  -include ../PCH/precompiled_header_release.h  -c  "C:/codelite/CodeFormatter/ASBeautifier.cpp" -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/wxWidgets-3.0.2/lib/gcc_dll/mswu -IC:/wxWidgets-3.0.2/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -fno-keep-inline-dllexport  -O2 -Winvalid-pch -DWXUSINGDLL_SDK -DWXUSINGDLL_CL  -o ./WinReleaseUnicode/ASBeautifier.cpp.o -I. -I. -I../Interfaces -I../CodeLite -I../Plugin -I../sdk/wxsqlite3/include -I../PCH
cc1plus.exe: warning: ./../PCH/precompiled_header_release.h.gch: not used because `__WX__' not defined [-Winvalid-pch]
C:/codelite/CodeFormatter/astyle_main.cpp: In member function 'void astyle::ASConsole::displayLastError()':
C:/codelite/CodeFormatter/astyle_main.cpp:721:23: error: cannot convert 'LPSTR {aka char*}' to 'LPWSTR {aka wchar_t*}' for argument '5' to 'DWORD FormatMessageW(DWORD, PCVOID, DWORD, DWORD, LPWSTR, DWORD, char**)'
                   NULL);
                       ^
C:/codelite/CodeFormatter/astyle_main.cpp: In member function 'std::string astyle::ASConsole::getCurrentDirectory(const string&) const':
C:/codelite/CodeFormatter/astyle_main.cpp:739:53: error: cannot convert 'char*' to 'LPWSTR {aka wchar_t*}' for argument '2' to 'DWORD GetCurrentDirectoryW(DWORD, LPWSTR)'
     if(!GetCurrentDirectory(sizeof(currdir), currdir)) error("Cannot find file", fileName_.c_str());
                                                     ^
C:/codelite/CodeFormatter/astyle_main.cpp: In member function 'void astyle::ASConsole::getFileNames(const string&, const string&)':
C:/codelite/CodeFormatter/astyle_main.cpp:758:66: error: cannot convert 'const char*' to 'LPCWSTR {aka const wchar_t*}' for argument '1' to 'void* FindFirstFileW(LPCWSTR, LPWIN32_FIND_DATAW)'
     HANDLE hFind = FindFirstFile(firstFile.c_str(), &findFileData);
                                                                  ^
C:/codelite/CodeFormatter/astyle_main.cpp:779:67: error: conversion from 'wxString' to non-scalar type 'std::string {aka std::basic_string<char>}' requested
             string subDirectoryPath = directory + g_fileSeparator + findFileData.cFileName;
                                                                   ^
C:/codelite/CodeFormatter/astyle_main.cpp:788:59: error: conversion from 'wxString' to non-scalar type 'std::string {aka std::basic_string<char>}' requested
         string filePathName = directory + g_fileSeparator + findFileData.cFileName;
                                                           ^
C:/codelite/CodeFormatter/astyle_main.cpp:792:60: error: no matching function for call to 'astyle::ASConsole::wildcmp(const char*, WCHAR [260])'
         if(wildcmp(wildcard.c_str(), findFileData.cFileName)) {
                                                            ^
C:/codelite/CodeFormatter/astyle_main.cpp:792:60: note: candidate is:
In file included from C:/codelite/CodeFormatter/astyle_main.cpp:53:0:
C:/codelite/CodeFormatter/astyle_main.h:332:9: note: int astyle::ASConsole::wildcmp(const char*, const char*) const
     int wildcmp(const char* wild, const char* data) const;
         ^
C:/codelite/CodeFormatter/astyle_main.h:332:9: note:   no known conversion for argument 2 from 'WCHAR [260] {aka wchar_t [260]}' to 'const char*'
C:/codelite/CodeFormatter/astyle_main.cpp: In member function 'std::string astyle::ASConsole::getNumberFormat(int, size_t) const':
C:/codelite/CodeFormatter/astyle_main.cpp:838:75: error: cannot convert 'const char*' to 'LPCWSTR {aka const wchar_t*}' for argument '3' to 'int GetNumberFormatW(LCID, DWORD, LPCWSTR, const NUMBERFMTW*, LPWSTR, int)'
     int outSize = ::GetNumberFormat(lcid, 0, number.c_str(), NULL, NULL, 0);
                                                                           ^
C:/codelite/CodeFormatter/astyle_main.cpp:841:69: error: cannot convert 'const char*' to 'LPCWSTR {aka const wchar_t*}' for argument '3' to 'int GetNumberFormatW(LCID, DWORD, LPCWSTR, const NUMBERFMTW*, LPWSTR, int)'
     ::GetNumberFormat(lcid, 0, number.c_str(), NULL, outBuf, outSize);
                                                                     ^
C:/codelite/CodeFormatter/astyle_main.cpp:848:59: error: cannot convert 'char*' to 'LPWSTR {aka wchar_t*}' for argument '3' to 'int GetLocaleInfoW(LCID, LCTYPE, LPWSTR, int)'
     ::GetLocaleInfo(lcid, LOCALE_SDECIMAL, decBuf, decSize);
                                                           ^
mingw32-make.exe[1]: *** [WinReleaseUnicode/astyle_main.cpp.o] Error 1
mingw32-make.exe[1]: *** Waiting for unfinished jobs....
CodeFormatter.mk:131: recipe for target 'WinReleaseUnicode/astyle_main.cpp.o' failed
mingw32-make.exe: *** [All] Error 2
mingw32-make.exe[1]: Leaving directory 'C:/codelite/CodeFormatter'
Makefile:4: recipe for target 'All' failed
10 errors, 74 warnings, total time: 00:08:05 seconds

Re: Build failure on Jan.12.2015 git clone

Posted: Mon Jan 12, 2015 11:48 pm
by eranif
This should also be fixed now

Eran

Re: Build failure on Jan.12.2015 git clone

Posted: Tue Jan 13, 2015 12:48 am
by foxmuldr
eranif wrote:This should also be fixed now
It built successfully. I went on to build codelite_utils.build_all successfully. I went to c:\codelite\runtime\ and went to run codelite.exe and I get the error:

Code: Select all

The program can't start because libclang.dll is missing from your
computer.  Try reinstalling the program to fix this problem.
I found libclang.dll in the c:\codelite\sdk\clang\ directory. Copying this DLL over then caused other DLLs to show up missing. Is there an install step I'm missing somewhere?

Re: Build failure on Jan.12.2015 git clone

Posted: Tue Jan 13, 2015 1:00 am
by foxmuldr
Okay, I found update.bat ... and just for grins and giggles I double-clicked it to see what would happen. It seemed to crank away doing something. I then went back into Codelite and it was showing the new version after initializing some themes.

It seems to be working correctly now in 7.0 Beta.

Thank you for all of your assistance, Eran.

Re: Build failure on Jan.12.2015 git clone

Posted: Tue Jan 13, 2015 10:39 am
by eranif
Just for future reference (for other people who might search the forum):

Building CodeLite on Windows:
http://codelite.org/Developers/Windows

Eran

Re: Build failure on Jan.12.2015 git clone

Posted: Tue Jan 13, 2015 1:27 pm
by Gibbon1
BTW: Update.bat (at least for me) fails when I run it in user mode from the command line, needs to be run as administrator. I think this is because on my computers user mode doesn't have doesn't have permissions to copy stuff into Program Files (x86)\CodeLite

PS: I found on the wiki

To update your installation with the new codelite, close codelite and from a CMD.EXE window navigate to codelite-sources/Runtime/ and run the file
update.bat

To be confusing at first; there is no codelite-sources directory wat? Might help if 'codelite-sources' was in italics.

Re: Build failure on Jan.12.2015 git clone

Posted: Tue Jan 13, 2015 2:52 pm
by foxmuldr
eranif wrote:Just for future reference (for other people who might search the forum):

Building CodeLite on Windows:
http://codelite.org/Developers/Windows

Eran
I was going off the instructions on GitHub's .md file. The description stops too soon on the last step and says,

Code: Select all

    Download codelite installer for Windows from our Download Page
    Download wxWidgets 3.0 installer. Also from our Download Page
    Open the workspace LiteEditor.workspace (located in the codelite folder)
    Make sure that the project CodeLiteIDE is selected (the active project uses bold font)
    Select the configuration Win Release Unicode hit F7
    When the compilation is over, close the workspace
    Next, locate the workspace codelite_utils/codelite_utils.workspce and open it
    Select the Release build configuration hit F7 and wait for the compilation to end
    Close CodeLite

// This part is truncated:
    To update your installation with the new codelite, close codelite and from a CMD.EXE window
    navigate to codelite-sources/Runtime/ and run the file
... and that's all. The rest of the sentence about update.bat is not present on the README.md instructions, so I took what was there ("the file") to mean "codelite.exe" and tried to run it directly, hence my troubles as it was not updated/installed properly.

I also found "codelite-sources" confusing and would suggest something like "./Runtime/update.bat".

Re: Build failure on Jan.12.2015 git clone

Posted: Tue Jan 13, 2015 10:57 pm
by foxmuldr
foxmuldr wrote:

Code: Select all

C:/codelite/sdk/wxsqlite3/src/wxsqlite3_resourecs.rc:1:24: fatal error: wx/msw/wx.rc: No such file or directory
I got the same error today after a git pull when I switched from windows release unicode to windows debug unicode and tried to compile.

I was going to see about how to run Codelite in debug mode to address this issue on GitHub https://github.com/eranif/codelite/pull ... t-69794936.