Building codelite from sources (Windows)

CodeLite installation/troubleshooting forum
zzz7net

Building codelite from sources (Windows)

Post by zzz7net »

Greetings community!

I'm new to the CodeLite that's why I've decided to give feedback and
share the problem with you. I want to build CodeLite on my Windows 7 64bit machine
to get a native wxWidgets GUI. I have no idea why IDE doesn't give you all of it out of the box
but I hope there is a good reason for it.

I followed almost all the instructions on the site:
https://docs.codelite.org/build/build_from_sources/

I've skipped these steps:
1) Building zlib
2) Building OpenSSL
3) Building libssh
because I have all of this in my MSYS2 MinGW-w64 toolchain after:

Code: Select all

pacman -S mingw-w64-x86_64-toolchain

The system also has mingw-w64-clang-x86_64-toolchain
and nothing more. 32-bit versions of both toolchains are
not installed.

Here is my Windows OS Environment:

Code: Select all

C:\dev-tools\codelite;
C:\dev-tools\msys\mingw64\bin;
C:\dev-tools\msys\clang64\bin;
C:\Windows;
C:\Windows\system32;
C:\Windows\System32\Wbem;

Building WxWidgets stage was successful.
Building CodeLite stage seems like an impossible task for me.

I didn't change anything in

CodeLiteIDE.workspace file

Except for the environment variables:

My Workspace env vars:

Code: Select all

WXWIN=C:\dev-tools\msys\home\Admin\wxWidgets
WXCFG=gcc_x64_dll/mswu

My Project env vars:

Code: Select all

PATH=$WXWIN\lib\gcc_x64_dll;../sdk/clang/lib;../sdk/libssh/lib;$(PATH)

By the way what is the difference between <Use Defaults> and Default sets?
Really confusing naming because it looks like one thing with different names.

What style of paths should I use in CodeLite user interface?
Windows style with backslash C:\\\\\ or Linux style with common slash /c//////?

It looks like a hybrid in Eran's file:
PATH=$WXWIN\lib\gcc_x64_dll;../sdk/clang/lib;../sdk/libssh/lib;$(PATH)
Used both styles /\/\/\/\/\/\/\/\/\/\/\/ what?

If this helps here is my Build.Log

Code: Select all

C:\Windows\system32\cmd.exe /C C:/dev-tools/msys/mingw64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  Makefile
"----------Building project:[ PCH - Win_x64_Release ]----------"
mingw32-make[1]: Entering directory 'C:/dev-tools/msys/home/Admin/codelite/PCH'
C:/dev-tools/msys/mingw64/bin/g++.exe -c  precompiled_header_release.h  -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/dev-tools/msys/home/Admin/wxWidgets/lib/gcc_dll/mswu -IC:/dev-tools/msys/home/Admin/wxWidgets/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0     -O2 -D__WX__ -DWXUSINGDLL -DWXUSINGDLL_WXSQLITE3 -DWXUSINGDLL_SDK -DWXUSINGDLL_CL -DYY_NEVER_INTERACTIVE=1 -DUSE_SFTP=1  -I. -I.
mingw32-make[1]: Leaving directory 'C:/dev-tools/msys/home/Admin/codelite/PCH'
mingw32-make[1]: Entering directory 'C:/dev-tools/msys/home/Admin/codelite/PCH'
C:/dev-tools/msys/mingw64/bin/g++.exe -include precompiled_header_release.h  -c  "C:/dev-tools/msys/home/Admin/codelite/PCH/dummy.cpp" -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/dev-tools/msys/home/Admin/wxWidgets/lib/gcc_dll/mswu -IC:/dev-tools/msys/home/Admin/wxWidgets/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0     -O2 -D__WX__ -DWXUSINGDLL -DWXUSINGDLL_WXSQLITE3 -DWXUSINGDLL_SDK -DWXUSINGDLL_CL -DYY_NEVER_INTERACTIVE=1 -DUSE_SFTP=1  -o ../build-Win_x64_Release/PCH/dummy.cpp.o -I. -I.
mingw32-make[1]: Leaving directory 'C:/dev-tools/msys/home/Admin/codelite/PCH'
"----------Building project:[ sqlite3 - Win_x64_Release ]----------"
mingw32-make[1]: Entering directory 'C:/dev-tools/msys/home/Admin/codelite/sqlite3'
C:/dev-tools/msys/mingw64/bin/gcc.exe -c  "C:/dev-tools/msys/home/Admin/codelite/sqlite3/sqlite3.c" -O2 -D__WX__ -DWXUSINGDLL -DASTYLE_LIB -DWXUSINGDLL_CL -DWXUSINGDLL_SDK  -o ../build-Win_x64_Release/sqlite3/sqlite3.c.o -I. -I.
C:/dev-tools/msys/home/Admin/codelite/sqlite3/sqlite3.c: In function 'sqlite3SelectNew.isra':
C:/dev-tools/msys/home/Admin/codelite/sqlite3/sqlite3.c:95039:10: warning: function may return address of local variable [-Wreturn-local-addr]
95039 |   return pNew;
      |          ^~~~
C:/dev-tools/msys/home/Admin/codelite/sqlite3/sqlite3.c:95004:10: note: declared here
95004 |   Select standin;
      |          ^~~~~~~
C:/dev-tools/msys/mingw64/bin/ar.exe rcu ..\build-Win_x64_Release\lib\libsqlite3.a @../build-Win_x64_Release/sqlite3/ObjectsList.txt
mingw32-make[1]: Leaving directory 'C:/dev-tools/msys/home/Admin/codelite/sqlite3'
"----------Building project:[ wxsqlite3 - Win_x64_Release ]----------"
mingw32-make[1]: Entering directory 'C:/dev-tools/msys/home/Admin/codelite/sdk/wxsqlite3'
C:/dev-tools/msys/mingw64/bin/windres.exe -i "C:/dev-tools/msys/home/Admin/codelite/sdk/wxsqlite3/src/wxsqlite3_resourecs.rc" --define __WXMSW__ --define _UNICODE --include-dir C:/dev-tools/msys/home/Admin/wxWidgets/lib/gcc_dll/mswu --include-dir C:/dev-tools/msys/home/Admin/wxWidgets/include --define WXUSINGDLL    -o ../../build-Win_x64_Release/sdk/wxsqlite3/src_wxsqlite3_resourecs.rc.o
C:/dev-tools/msys/mingw64/bin/windres.exe: warning: 24: 1: 1033: duplicate value
C:/dev-tools/msys/mingw64/bin/g++.exe  -c  "C:/dev-tools/msys/home/Admin/codelite/sdk/wxsqlite3/src/wxsqlite3.cpp" -O2 -std=c++11 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/dev-tools/msys/home/Admin/wxWidgets/lib/gcc_dll/mswu -IC:/dev-tools/msys/home/Admin/wxWidgets/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0    -Winvalid-pch -DWXMAKINGDLL_WXSQLITE3  -o ../../build-Win_x64_Release/sdk/wxsqlite3/src_wxsqlite3.cpp.o -I. -I. -I./include -I./sqlite3/include
C:/dev-tools/msys/mingw64/bin/g++.exe -shared -fPIC -o ..\..\build-Win_x64_Release\lib\libwxsqlite3u.dll @../../build-Win_x64_Release/sdk/wxsqlite3/ObjectsList.txt -L. -LC:/dev-tools/msys/home/Admin/codelite/build-Win_x64_Release/lib  -lsqlite3   -mthreads -LC:/dev-tools/msys/home/Admin/wxWidgets/lib/gcc_dll -lwxmsw31u_richtext -lwxmsw31u_xrc -lwxmsw31u_aui -lwxmsw31u_html -lwxmsw31u_adv -lwxmsw31u_core -lwxbase31u_xml -lwxbase31u_net -lwxbase31u -lwxscintilla -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lversion -lshlwapi -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -luxtheme -loleacc
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxmsw31u_richtext
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxmsw31u_xrc
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxmsw31u_aui
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxmsw31u_html
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxmsw31u_adv
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxmsw31u_core
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxbase31u_xml
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxbase31u_net
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxbase31u
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxscintilla
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxtiff
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxjpeg
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxpng
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxzlib
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxregexu
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxexpat
C:/dev-tools/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxregexu
collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [wxsqlite3.mk:83: ..\..\build-Win_x64_Release\lib\libwxsqlite3u.dll] Error 1
mingw32-make: *** [Makefile:9: All] Error 2
mingw32-make[1]: Leaving directory 'C:/dev-tools/msys/home/Admin/codelite/sdk/wxsqlite3'
====0 errors, 2 warnings, total time: 00:00:53 seconds====

What am I doing wrong?

You do not have the required permissions to view the files attached to this post.
Last edited by zzz7net on Fri Aug 06, 2021 12:07 pm, edited 4 times in total.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Building CodeLite - Last Hope

Post by DavidGH »

Hi,

I don't use Windows, so I can't help you directly; however, have you noticed this current forum thread, and this slightly older one?

Regards,

David

zzz7net

Re: Building CodeLite - Last Hope

Post by zzz7net »

Really kind of you, David. I will look these threads. 8-)

Last edited by zzz7net on Sun Aug 01, 2021 5:49 pm, edited 1 time in total.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building CodeLite - Last Hope

Post by eranif »

I just noticed this in your build (notice that your WXCFG is not honored):

Code: Select all

-IC:/dev-tools/msys/home/Admin/wxWidgets/lib/gcc_dll/mswu

this means that CodeLite is using the old wx-config for Window (I have switched to a new version that support the build instructions).
Please build this wx-config:

https://github.com/eranif/wx-config-msys2

Once built, copy the bin\wx-config.exe (there are 2, make sure you copy this one)
to CodeLite's installation directory and replace the one that comes with it

Build again it should work now
Eran

Make sure you have read the HOW TO POST thread
zzz7net

Re: Building CodeLite - Last Hope

Post by zzz7net »

Now it's working but when it comes to building PHP Plugin mingw32-make fails:
NO RULE TO MAKE TARGET.

BuildLog:

Code: Select all

"----------Building project:[ PHPPlugin - Win_x64_Release ]----------"
mingw32-make[1]: Entering directory 'C:/dev-tools/msys/home/Admin/codelite/codelitephp/php-plugin'
mingw32-make[1]: *** No rule to make target '../PCH/precompiled_header_release.h', needed by '../PCH/precompiled_header_release.h.gch'.  Stop.
mingw32-make: *** [Makefile:51: All] Error 2
mingw32-make[1]: Leaving directory 'C:/dev-tools/msys/home/Admin/codelite/codelitephp/php-plugin'
====0 errors, 384 warnings, total time: 00:20:44 seconds====

"----------Building project:[ sqlite3 - Win_x64_Release ]----------" DONE
"----------Building project:[ wxsqlite3 - Win_x64_Release ]----------" DONE
"----------Building project:[ plugin_sdk - Win_x64_Release ]----------" DONE
"----------Building project:[ DebuggerGDB - Win_x64_Release ]----------" DONE
"----------Building project:[ CodeFormatter - Win_x64_Release ]----------" DONE
"----------Building project:[ Gizmos - Win_x64_Release ]----------" DONE
"----------Building project:[ Cscope - Win_x64_Release ]----------" DONE
"----------Building project:[ Copyright - Win_x64_Release ]----------" DONE
"----------Building project:[ UnitTestPP - Win_x64_Release ]----------" DONE
"----------Building project:[ CMakePlugin - Win_x64_Release ]----------" DONE
"----------Building project:[ CodeLiteDiff - Win_x64_Release ]----------" DONE
"----------Building project:[ ContinuousBuild - Win_x64_Release ]----------" DONE
"----------Building project:[ CppChecker - Win_x64_Release ]----------" DONE
"----------Building project:[ wxshapeframework - Win_x64_Release ]----------" DONE
"----------Building project:[ DatabaseExplorer - Win_x64_Release ]----------" DONE
"----------Building project:[ ExternalTools - Win_x64_Release ]----------" DONE
"----------Building project:[ LLDBDebugger - Win_x64_Release ]----------" DONE
"----------Building project:[ Outline - Win_x64_Release ]----------" DONE
"----------Building project:[ PHPParser - Win_x64_Release ]----------" DONE
"----------Building project:[ PHPPlugin - Win_x64_Release ]----------" FAILED
mingw32-make[1]: *** No rule to make target '../PCH/precompiled_header_release.h', needed by '../PCH/precompiled_header_release.h.gch'. Stop.

Last edited by zzz7net on Tue Aug 03, 2021 11:50 am, edited 2 times in total.
zzz7net

Re: Building CodeLite - Last Hope

Post by zzz7net »

I have done all instructions posted on the site.
This — https://docs.codelite.org/build/build_wx_widgets/
This — https://docs.codelite.org/build/mingw_builds/
And finally this — https://docs.codelite.org/build/build_from_sources/

Am I doing something wrong or the documentation is incorrect?
Maybe there are additional steps to build CodeLite for the Windows?

stahta01
CodeLite Enthusiast
Posts: 39
Joined: Thu Dec 29, 2011 10:07 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building CodeLite - Last Hope

Post by stahta01 »

Did you try doing an Re-Build of at least PCH?

Or can you post a build of PCH; why did you skip showing the build of PCH?

Edit: Which version of CodeLite IDE are you using?

Tim S.

stahta01
CodeLite Enthusiast
Posts: 39
Joined: Thu Dec 29, 2011 10:07 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building CodeLite - Last Hope

Post by stahta01 »

The OP might be using CLang instead of MinGW64 GCC to build CodeLite; does anyone know if this works?
Correction the OP has CLang installed; but, is using GCC in images.

Tim S.

Last edited by stahta01 on Tue Aug 03, 2021 6:51 pm, edited 1 time in total.
zzz7net

Re: Building CodeLite - Last Hope

Post by zzz7net »

Which version of CodeLite IDE are you using?

Version: 15.0.0

Or can you post a build of PCH; why did you skip showing the build of PCH?

BuildLog is to large (255 lines). I just don't want to inflate the topic. But I can attach the full
log. Here Only PCH part:

"----------Building project:[ PCH - Win_x64_Release ]----------"
mingw32-make[1]: Entering directory 'C:/dev-tools/msys/home/Admin/codelite/PCH'
mingw32-make[1]: 'precompiled_header_release.h.gch' is up to date.
mingw32-make[1]: Leaving directory 'C:/dev-tools/msys/home/Admin/codelite/PCH'
mingw32-make[1]: Entering directory 'C:/dev-tools/msys/home/Admin/codelite/PCH'
mingw32-make[1]: Leaving directory 'C:/dev-tools/msys/home/Admin/codelite/PCH'

Did you try doing an Re-Build of at least PCH?

Yes I did.

You do not have the required permissions to view the files attached to this post.
stahta01
CodeLite Enthusiast
Posts: 39
Joined: Thu Dec 29, 2011 10:07 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building CodeLite - Last Hope

Post by stahta01 »

And, you used the cmake build directions of wxWidgets 3.1 git?
I have not done that way; I will see if it works for me.
Could easily be a day for me to build wxWidgets using cmake since I have never done it that way.

Tim S.

Post Reply