Compiling CodeLite under Windows 7 / 64 bit fails

Discussion about CodeLite development process and patches
tlang

Re: Compiling CodeLite under Windows 7 / 64 bit fails

Post by tlang »

eranif wrote:Try deleting/renaming the folder %APPDATA%\CodeLite

Eran
Hi Eran,
I already tried this before (and tried again) - the compiled binaries simply don't start.

To get as much control over the build process as possible I started CodeLite from the command shell (cmd.exe) with a totally cleared out path. As all NT based windows system strictly hand down the environment from parent to child process there should be no way to get unwanted folders into the path again. Compilation runs through (which means that CodeLite adds the required paths to the build environment again), but after installation (and clearing out the configuration - although the 5.4 version I build should be compatible with the binary 5.4 distribution) the compiled binary does not start. It shows the splash, creates the files codelite.conf, environment_variables.xml and copies codelite.xml in the config folder, creates an empty lexers folder and a codelite.log with the single entry "starting codelite...". And then hangs forever...

Could you see any difference from my logs to your (working) build process?

Regards,
Torsten
tlang

Re: Compiling CodeLite under Windows 7 / 64 bit fails

Post by tlang »

Hi Eran,
at least some positive news: I replaced your ready-to-use wxWidgets packet 3.0 by the sources and compiled them according to http://codelite.org/Developers/BuildingWxWidgetsWin, after that I compiled and installed CL again, and finally the binaries start up. So may the precompiled wxWidgets be broken?

Regards,
Torsten
Last edited by tlang on Mon May 26, 2014 7:18 pm, edited 1 time in total.
tlang

Re: Compiling CodeLite under Windows 7 / 64 bit fails

Post by tlang »

Hi Eran,
as "my" version of CL 5.4 now works I updated my local copy and gave CL 6.0 (version of today, 15:55:51) another chance - this one currently doesn't compile, I get the following error:

Code: Select all

C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 8 -e -f  Makefile"
...
"----------Building project:[ CppChecker - WinReleaseUnicode ]----------"
mingw32-make.exe[1]: Entering directory 'D:/Projekte.git/Intern/CodeLite6.0/cppchecker'
mingw32-make.exe[1]: '../PCH/precompiled_header_release.h.gch' is up to date.
mingw32-make.exe[1]: Leaving directory 'D:/Projekte.git/Intern/CodeLite6.0/cppchecker'
mingw32-make.exe[1]: Entering directory 'D:/Projekte.git/Intern/CodeLite6.0/cppchecker'
g++ -shared -fPIC -o ./WinReleaseUnicode/CppChecker.dll @"CppChecker.txt" -L. -L../lib/gcc_lib  -lplugin_sdku -lcodeliteu -lwxsqlite3u  -O2  -mthreads -LC:/wxWidgets-3.0.0/lib/gcc_dll -lwxmsw30u_stc -lwxmsw30u_richtext -lwxmsw30u_xrc -lwxmsw30u_aui -lwxmsw30u_html -lwxmsw30u_adv -lwxmsw30u_core -lwxbase30u_xml -lwxbase30u_net -lwxbase30u -lwxscintilla -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32  -s
./WinReleaseUnicode/cppchecksettingsdlgbase.o:cppchecksettingsdlgbase.cpp:(.text+0x1760): undefined reference to `wxCrafterRo2g8MInitBitmapResources()'
./WinReleaseUnicode/cppchecksettingsdlgbase.o:cppchecksettingsdlgbase.cpp:(.text+0x80c0): undefined reference to `wxCrafterRo2g8MInitBitmapResources()'
c:/mingw-4.8.1/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: ./WinReleaseUnicode/cppchecksettingsdlgbase.o: bad reloc address 0x2 in section `.text$_ZNK15wxAnyButtonBase11DoGetBitmapENS_5StateE[__ZNK15wxAnyButtonBase11DoGetBitmapENS_5StateE]'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[1]: *** [WinReleaseUnicode/CppChecker.dll] Error 1
CppChecker.mk:79: recipe for target 'WinReleaseUnicode/CppChecker.dll' failed
mingw32-make.exe[1]: Leaving directory 'D:/Projekte.git/Intern/CodeLite6.0/cppchecker'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target 'All' failed
2 errors, 0 warnings, total time: 00:00:12 seconds
Unfortunately I updated the repo I pulled before the weekend which compiled (but did not start), so I assume this problem must have occured within the last few days...

It seems that the file cppchecksettingsdlg_cppchecker_bitmaps.cpp is missing in the CppChecker project.

Regards,
Torsten

P. S. After adding the missing file the project compiles, CL 6.0 starts up, but it hangs when trying to terminate.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Compiling CodeLite under Windows 7 / 64 bit fails

Post by DavidGH »

Hi,
It seems that the file cppchecksettingsdlg_cppchecker_bitmaps.cpp is missing in the CppChecker project.
Yes, it's a new file. You needed to run the Workspace > Reconcile the current project dialog. (I have my own CodeLite workspace, I don't use the standard one, so this often happens with my commits ;) ).

Regards,

David
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Compiling CodeLite under Windows 7 / 64 bit fails

Post by eranif »

DavidGH wrote:Yes, it's a new file. You needed to run the Workspace > Reconcile the current project dialog. (I have my own CodeLite workspace, I don't use the standard one, so this often happens with my commits ).
I did not had a chance to fix this yet on Windows, will do this tonight
tlang wrote:So may the precompiled wxWidgets be broken?
I am using these binaries to build and publish codelite on windows, so I doubt this the reason. It can happen if you use a different MinGW toolchain than the one I used to compile them
There are 2 options there: mingw-4.7.1 and mingw-4.8.1 make sure you pick the 4.8.1 ones

Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Compiling CodeLite under Windows 7 / 64 bit fails

Post by eranif »

eranif wrote:I did not had a chance to fix this yet on Windows, will do this tonight
This should be fixed now

Eran
Make sure you have read the HOW TO POST thread
Gibbon1
CodeLite Expert
Posts: 167
Joined: Fri Jul 22, 2011 5:32 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Compiling CodeLite under Windows 7 / 64 bit fails

Post by Gibbon1 »

I have WinAvr in my path and that includes an sh.exe (WinAVR includes a bunch unix like commands that work under dos, but aren't full replacements like you get under Cig*spit*Win)

The problem as far as I can tell goes like this.

1. make.exe first looks for SHELL= on the command line If it finds it, it uses whatever it's set to as the command shell. FULL STOP.
2. make.exe then looks for sh.exe in the path. If it finds it, it uses it. FULL STOP.
3. make.exe then looks for SHELL= in the environment.

If sh.exe (or even sh.bat) is in the path, you must override it, to do that you must put SHELL=CMD.exe on make's command line, putting SHELL=CMD.exe in the environment does not work.

To fix as follows in codelite

Settings -> Build Settings-> gnu g++

Make : make.exe -j 4 SHELL=CMD.EXE

This is for windows (of course)
Gibbon1
CodeLite Expert
Posts: 167
Joined: Fri Jul 22, 2011 5:32 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Compiling CodeLite under Windows 7 / 64 bit fails

Post by Gibbon1 »

I tried building codelite (latest trunk) from sources and got it build.

However when I run update.bat it complains about no wxrc.exe (file not found). Looking at update bat it looks like it trying to copy it from

C:\wxWidgets-3.0.0\lib\gcc_dll\wxrc.exe

However it's not there... Any idea what wrong?
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Compiling CodeLite under Windows 7 / 64 bit fails

Post by eranif »

Just comment this line - I have uncomment and committed it to git head
Eran
Make sure you have read the HOW TO POST thread
Gibbon1
CodeLite Expert
Posts: 167
Joined: Fri Jul 22, 2011 5:32 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Compiling CodeLite under Windows 7 / 64 bit fails

Post by Gibbon1 »

Edit2: Needed to build wxwidgets and then it worked okay. (using the pre-made binaries no workie)

Edit: missed having to build codelite_utils...

Fixing that, this line in update.bat fails... might be okay

xcopy templates\ "%TARGET_DIR%\CodeLite\templates\" /E /I /H /Y /EXCLUDE:excludes

After running update.bat, codelite hangs with the processor pegged at 25%

-----
What happens when you don't build the codelite_utils workspace...


I tried rebuilding again, update.bat can't find the following files in \Runtime

copy codelite_indexer.exe "%TARGET_DIR%\CodeLite\" /Y
copy codelite-cc.exe "%TARGET_DIR%\CodeLite\" /Y
copy codelite_cppcheck.exe "%TARGET_DIR%\CodeLite\" /Y
copy codelite_launcher.exe "%TARGET_DIR%\CodeLite\" /Y
copy codelite-echo.exe "%TARGET_DIR%\CodeLite\" /Y

copy makedir.exe "%TARGET_DIR%\CodeLite\" /Y
copy le_exec.exe "%TARGET_DIR%\CodeLite\" /Y

copy codelite-clang.exe "%TARGET_DIR%\CodeLite\" /Y
copy codelite-make.exe "%TARGET_DIR%\CodeLite\" /Y
copy codelite-terminal.exe "%TARGET_DIR%\CodeLite\" /Y

None of these seem to be getting built...
Post Reply