Trouble compiling CL using CL

CodeLite installation/troubleshooting forum
SlimFast
CodeLite Enthusiast
Posts: 43
Joined: Fri Jun 17, 2011 9:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Trouble compiling CL using CL

Post by SlimFast »

Dear all,

I am having trouble compiling CodeLite using CodeLite. What I did was
- installing the 2.10
- installing GCC TDM 4.5.2
- installing wxWidgets 2.8.12, built with

Code: Select all

mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 USE_OPENGL=1 UNICODE=1
- setup WX_DIR envvar
- opening CodeLite
- setup the TDM compiler
- checking out CodeLite from SVN (tried with several recent revisions)
- hit "compile workspace".

The first issue I encountered was that all went green (all built OK), but actually NOTHING has happened. It turned out that my firewall was blocking the spawn of the processes to build. Weird thing that CodeLite reports a success in this case... however, inspecting the full build log showed the reason.

The second issue (which I was unable to resolve) is that all is compiled fine, but linking always fails. For each component. :-(

These are the last compiler, first linker step and the first few errors, a LOT more follow usually:

Code: Select all

C:\Devel\GCC45TDM\bin\mingw32-g++.exe -c  "D:/Devel/CodeLite/CodeLite/stringaccessor.cpp" -mthreads -DHAVE_W32API_H -D__WXMSW__ -D_UNICODE -IC:\Devel\wxWidgets\lib\gcc_dll\mswu -IC:\Devel\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0    -Wall -O2 -D__WX__ -DWXUSINGDLL -DWXMAKINGDLL_CL -DWXUSINGDLL_WXSQLITE3 -D_WIN32_WINNT=0x0501  -o ./WinReleaseUnicode/stringaccessor.o -IC:/Devel/GCC45TDM/include  -I. -I. -I./include -I../sdk/wxsqlite3/include -I../sdk/codelite_indexer/network 
C:\Devel\GCC45TDM\bin\mingw32-g++.exe -shared -fPIC -o ../lib/gcc_lib/libcodeliteu.dll ./WinReleaseUnicode/worker_thread.o ./WinReleaseUnicode/tokenizer.o ./WinReleaseUnicode/tag_tree.o ./WinReleaseUnicode/symbol_tree.o ./WinReleaseUnicode/readtags.o ./WinReleaseUnicode/progress_dialog.o ./WinReleaseUnicode/procutils.o ./WinReleaseUnicode/parse_thread.o ./WinReleaseUnicode/lex.yy.o ./WinReleaseUnicode/language.o ./WinReleaseUnicode/fileutils.o ./WinReleaseUnicode/dirtraverser.o ./WinReleaseUnicode/ctags_manager.o ./WinReleaseUnicode/cpp_scanner.o ./WinReleaseUnicode/cl_process.o ./WinReleaseUnicode/scope_parser.o ./WinReleaseUnicode/cpp_lexer.o ./WinReleaseUnicode/cpp_comment_creator.o ./WinReleaseUnicode/tags_options_data.o ./WinReleaseUnicode/setters_getters_data.o ./WinReleaseUnicode/archive.o ./WinReleaseUnicode/winprocess.o ./WinReleaseUnicode/cl_calltip.o ./WinReleaseUnicode/performance.o ./WinReleaseUnicode/fileextmanager.o ./WinReleaseUnicode/parsedtoken.o ./WinReleaseUnicode/file_logger.o ./WinReleaseUnicode/cpp_expr_lexer.o ./WinReleaseUnicode/cpp_expr_parser.o ./WinReleaseUnicode/cpp_func_parser.o ./WinReleaseUnicode/expression_result.o ./WinReleaseUnicode/function.o ./WinReleaseUnicode/var_parser.o ./WinReleaseUnicode/variable.o ./WinReleaseUnicode/typedef_parser.o ./WinReleaseUnicode/scope_optimizer.o ./WinReleaseUnicode/comment_parser.o ./WinReleaseUnicode/entry.o ./WinReleaseUnicode/comment.o ./WinReleaseUnicode/fileentry.o ./WinReleaseUnicode/tags_storage_sqlite3.o ./WinReleaseUnicode/network_cl_indexer_reply.o ./WinReleaseUnicode/network_cl_indexer_request.o ./WinReleaseUnicode/network_clindexerprotocol.o ./WinReleaseUnicode/network_named_pipe.o ./WinReleaseUnicode/network_named_pipe_client.o ./WinReleaseUnicode/network_named_pipe_server.o ./WinReleaseUnicode/network_np_connections_server.o ./WinReleaseUnicode/crawler_lexer.o ./WinReleaseUnicode/fc_fileopener.o ./WinReleaseUnicode/asyncprocess.o ./WinReleaseUnicode/processreaderthread.o ./WinReleaseUnicode/unixprocess_impl.o ./WinReleaseUnicode/winprocess_impl.o ./WinReleaseUnicode/include_finder.o ./WinReleaseUnicode/pp.o ./WinReleaseUnicode/pp_lexer.o ./WinReleaseUnicode/pptable.o ./WinReleaseUnicode/refactorengine.o ./WinReleaseUnicode/cpptoken.o ./WinReleaseUnicode/cppwordscanner.o ./WinReleaseUnicode/stringaccessor.o  -LC:/Devel/GCC45TDM/lib  -L. -L../lib/gcc_lib  -lwxsqlite3u   -mthreads -LC:\Devel\wxWidgets\lib\gcc_dll -lwxmsw28u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32  -s
./WinReleaseUnicode/symbol_tree.o:symbol_tree.cpp:(.text$_ZNSt8_Rb_treeI8wxStringSt4pairIKS0_18wxSQLite3StatementESt10_Select1stIS4_ESt4lessIS0_ESaIS4_EE8_M_eraseEPSt13_Rb_tree_nodeIS4_E[std::_Rb_tree<wxString, std::pair<wxString const, wxSQLite3Statement>, std::_Select1st<std::pair<wxString const, wxSQLite3Statement> >, std::less<wxString>, std::allocator<std::pair<wxString const, wxSQLite3Statement> > >::_M_erase(std::_Rb_tree_node<std::pair<wxString const, wxSQLite3Statement> >*)]+0x37): undefined reference to `_imp___ZN18wxSQLite3StatementD1Ev'
./WinReleaseUnicode/symbol_tree.o:symbol_tree.cpp:(.text$_ZN10clSqliteDBD1Ev[clSqliteDB::~clSqliteDB()]+0x62): undefined reference to `_imp___ZN17wxSQLite3DatabaseD2Ev'
./WinReleaseUnicode/symbol_tree.o:symbol_tree.cpp:(.text$_ZN10clSqliteDBD1Ev[clSqliteDB::~clSqliteDB()]+0x8b): undefined reference to `_imp___ZN17wxSQLite3DatabaseD2Ev'
./WinReleaseUnicode/symbol_tree.o:symbol_tree.cpp:(.text$_ZN10clSqliteDBD0Ev[clSqliteDB::~clSqliteDB()]+0x62): undefined reference to `_imp___ZN17wxSQLite3DatabaseD2Ev'
./WinReleaseUnicode/symbol_tree.o:symbol_tree.cpp:(.text$_ZN10clSqliteDBD0Ev[clSqliteDB::~clSqliteDB()]+0x96): undefined reference to `_imp___ZN17wxSQLite3DatabaseD2Ev'
./WinReleaseUnicode/parse_thread.o:parse_thread.cpp:(.text+0x187): undefined reference to `_imp___ZN17wxSQLite3Database5BeginE24wxSQLite3TransactionType'
./WinReleaseUnicode/tags_storage_sqlite3.o:tags_storage_sqlite3.cpp:(.text+0x34): undefined reference to `_imp___ZN17wxSQLite3Database6IsOpenEv'
after full compilation I have no binaries (except the object files and libs) built, but around 1300 linker errors. I have no glue, why that is - probably it's related to the switch "_WIN32_WINNT=0x0501" which I don't have used when building wxWidgets? But I didn't find where to turn that off.

Funnily I tried setting up a CodeLite component to compile using Code::Blocks with the same compiler/framework. This worked strangely, so I am a bit lost. Any ideas what I could be missing?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble compiling CL using CL

Post by eranif »

SlimFast wrote:- setup WX_DIR envvar
- opening CodeLite
- setup the TDM compiler
- checking out CodeLite from SVN (tried with several recent revisions)
- hit "compile workspace".
You should not use "compile workspace"

"Compile workspace" is building the workspace in an alphabetic order (IIRC), what you should do is:

- Make sure that the project 'LiteEditor' is the active one (double click it)
- make sure that the selected configuration is "Win Release Unicode"
- Hit F7, this will build the LiteEditor project with all its dependencies - in the correct order

Eran
Make sure you have read the HOW TO POST thread
SlimFast
CodeLite Enthusiast
Posts: 43
Joined: Fri Jun 17, 2011 9:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble compiling CL using CL

Post by SlimFast »

Thanks for the answer. Well, I did what you said, but no luck:

Code: Select all

C:\Devel\GCC45TDM\bin\mingw32-g++.exe -c  "D:/Code/CodeLite/CodeLite/stringaccessor.cpp" -mthreads -DHAVE_W32API_H -D__WXMSW__ -D_UNICODE -IC:\Devel\wxWidgets\lib\gcc_dll\mswu -IC:\Devel\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0    -Wall -O2 -D__WX__ -DWXUSINGDLL -DWXMAKINGDLL_CL -DWXUSINGDLL_WXSQLITE3 -D_WIN32_WINNT=0x0501  -o ./WinReleaseUnicode/stringaccessor.o -IC:/Devel/GCC45TDM/include  -I. -I. -I./include -I../sdk/wxsqlite3/include -I../sdk/codelite_indexer/network 
C:\Devel\GCC45TDM\bin\mingw32-g++.exe -shared -fPIC -o ../lib/gcc_lib/libcodeliteu.dll ./WinReleaseUnicode/worker_thread.o ./WinReleaseUnicode/tokenizer.o ./WinReleaseUnicode/tag_tree.o ./WinReleaseUnicode/symbol_tree.o ./WinReleaseUnicode/readtags.o ./WinReleaseUnicode/progress_dialog.o ./WinReleaseUnicode/procutils.o ./WinReleaseUnicode/parse_thread.o ./WinReleaseUnicode/lex.yy.o ./WinReleaseUnicode/language.o ./WinReleaseUnicode/fileutils.o ./WinReleaseUnicode/dirtraverser.o ./WinReleaseUnicode/ctags_manager.o ./WinReleaseUnicode/cpp_scanner.o ./WinReleaseUnicode/cl_process.o ./WinReleaseUnicode/scope_parser.o ./WinReleaseUnicode/cpp_lexer.o ./WinReleaseUnicode/cpp_comment_creator.o ./WinReleaseUnicode/tags_options_data.o ./WinReleaseUnicode/setters_getters_data.o ./WinReleaseUnicode/archive.o ./WinReleaseUnicode/winprocess.o ./WinReleaseUnicode/cl_calltip.o ./WinReleaseUnicode/performance.o ./WinReleaseUnicode/fileextmanager.o ./WinReleaseUnicode/parsedtoken.o ./WinReleaseUnicode/file_logger.o ./WinReleaseUnicode/cpp_expr_lexer.o ./WinReleaseUnicode/cpp_expr_parser.o ./WinReleaseUnicode/cpp_func_parser.o ./WinReleaseUnicode/expression_result.o ./WinReleaseUnicode/function.o ./WinReleaseUnicode/var_parser.o ./WinReleaseUnicode/variable.o ./WinReleaseUnicode/typedef_parser.o ./WinReleaseUnicode/scope_optimizer.o ./WinReleaseUnicode/comment_parser.o ./WinReleaseUnicode/entry.o ./WinReleaseUnicode/comment.o ./WinReleaseUnicode/fileentry.o ./WinReleaseUnicode/tags_storage_sqlite3.o ./WinReleaseUnicode/network_cl_indexer_reply.o ./WinReleaseUnicode/network_cl_indexer_request.o ./WinReleaseUnicode/network_clindexerprotocol.o ./WinReleaseUnicode/network_named_pipe.o ./WinReleaseUnicode/network_named_pipe_client.o ./WinReleaseUnicode/network_named_pipe_server.o ./WinReleaseUnicode/network_np_connections_server.o ./WinReleaseUnicode/crawler_lexer.o ./WinReleaseUnicode/fc_fileopener.o ./WinReleaseUnicode/asyncprocess.o ./WinReleaseUnicode/processreaderthread.o ./WinReleaseUnicode/unixprocess_impl.o ./WinReleaseUnicode/winprocess_impl.o ./WinReleaseUnicode/include_finder.o ./WinReleaseUnicode/pp.o ./WinReleaseUnicode/pp_lexer.o ./WinReleaseUnicode/pptable.o ./WinReleaseUnicode/refactorengine.o ./WinReleaseUnicode/cpptoken.o ./WinReleaseUnicode/cppwordscanner.o ./WinReleaseUnicode/stringaccessor.o  -LC:/Devel/GCC45TDM/lib  -L. -L../lib/gcc_lib  -lwxsqlite3u   -mthreads -LC:\Devel\wxWidgets\lib\gcc_dll -lwxmsw28u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32  -s
./WinReleaseUnicode/symbol_tree.o:symbol_tree.cpp:(.text$_ZNSt8_Rb_treeI8wxStringSt4pairIKS0_18wxSQLite3StatementESt10_Select1stIS4_ESt4lessIS0_ESaIS4_EE8_M_eraseEPSt13_Rb_tree_nodeIS4_E[std::_Rb_tree<wxString, std::pair<wxString const, wxSQLite3Statement>, std::_Select1st<std::pair<wxString const, wxSQLite3Statement> >, std::less<wxString>, std::allocator<std::pair<wxString const, wxSQLite3Statement> > >::_M_erase(std::_Rb_tree_node<std::pair<wxString const, wxSQLite3Statement> >*)]+0x37): undefined reference to `_imp___ZN18wxSQLite3StatementD1Ev'
./WinReleaseUnicode/symbol_tree.o:symbol_tree.cpp:(.text$_ZN10clSqliteDBD1Ev[clSqliteDB::~clSqliteDB()]+0x62): undefined reference to `_imp___ZN17wxSQLite3DatabaseD2Ev'
./WinReleaseUnicode/symbol_tree.o:symbol_tree.cpp:(.text$_ZN10clSqliteDBD1Ev[clSqliteDB::~clSqliteDB()]+0x8b): undefined reference to `_imp___ZN17wxSQLite3DatabaseD2Ev'
./WinReleaseUnicode/symbol_tree.o:symbol_tree.cpp:(.text$_ZN10clSqliteDBD0Ev[clSqliteDB::~clSqliteDB()]+0x62): undefined reference to `_imp___ZN17wxSQLite3DatabaseD2Ev'
./WinReleaseUnicode/symbol_tree.o:symbol_tree.cpp:(.text$_ZN10clSqliteDBD0Ev[clSqliteDB::~clSqliteDB()]+0x96): undefined reference to `_imp___ZN17wxSQLite3DatabaseD2Ev'
./WinReleaseUnicode/parse_thread.o:parse_thread.cpp:(.text+0x187): undefined reference to `_imp___ZN17wxSQLite3Database5BeginE24wxSQLite3TransactionType'
./WinReleaseUnicode/tags_storage_sqlite3.o:tags_storage_sqlite3.cpp:(.text+0x34): undefined reference to `_imp___ZN17wxSQLite3Database6IsOpenEv'
./WinReleaseUnicode/tags_storage_sqlite3.o:tags_storage_sqlite3.cpp:(.text+0x1e7): undefined reference to `_imp___ZN17wxSQLite3Database13ExecuteUpdateERK8wxString'
...and more undefined references will follow.

I've also removed my firewall completely (after the experience I stated above). In the meantime I created a tiny dummy project, this works. What's going on here?!
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble compiling CL using CL

Post by eranif »

Where is the rest of the build log? Is it possible so attach it here?
(please, do not truncate the log to the portion that *you* think shows the problem)
http://codelite.org/forum/viewtopic.php ... &sk=t&sd=a

Also:
SlimFast wrote:- installing GCC TDM 4.5.2
- installing wxWidgets 2.8.12, built with
The wxWidgets 2.8.12 that comes with codelite was built with gcc4.4 while you are using 4.5 - there is a difference between the two.

Have you tried building codelite with the compiler that comes with codelite? (this is how I do it and it is always working for me)

Try downloading a full package from here:
http://sourceforge.net/projects/codelit ... e/download

And rebuild codelite (make sure that TDM G++ is not in the path)
Eran
Make sure you have read the HOW TO POST thread
SlimFast
CodeLite Enthusiast
Posts: 43
Joined: Fri Jun 17, 2011 9:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble compiling CL using CL

Post by SlimFast »

eranif wrote:Where is the rest of the build log? Is it possible so attach it here?
[...]
Have you tried building codelite with the compiler that comes with codelite? (this is how I do it and it is always working for me)
[..]
http://sourceforge.net/projects/codelit ... e/download
[...]
And rebuild codelite (make sure that TDM G++ is not in the path)
Sorry for the late reply, I was on a business journey. And I am sorry for breaking the rules. In fact I tried, but I stumbled accross the 60.000 character limit for the message, so I truncated the log :roll: . I will attach the full (re-)build output at the end. I've done what you said: Downloading this release and re-compiling (renamed the TDM GCC path and also changing the PATH environment variable in CodeLite to only "know" Windows, Windows\system32, CodeLite and the BIN folder of the MinGW shipping with CodeLite. There is also no other compiler in the way (I am very sure about this). Hence the issue persists. :-(

Attached is the full log that might help.
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble compiling CL using CL

Post by eranif »

The only different I see is that you have this

Code: Select all

-LC:/Devel/CodeLite/MinGW/lib
set in the link line, while it does not present here

So I know you tempered somehow with codelite's settings (another example: the default g++ compiler should be plain 'g++' and not 'mingw32-g++') I just don't know how and what you did that could break the link like that.

My suggestion remains:
  • install codelite from scratch using the installer link I provided above
  • do a fresh checkout of codelite sources (incase you modified any of the project settings files)
  • rename the folder '%AppData%\CodeLite' to something like '%AppData%\CodeLite.1'
  • build codelite without modifying anything and see what happens
It should work as I am building codelite before each release in a "chrooted" environment (not to mention on daily basis)

Eran
Make sure you have read the HOW TO POST thread
SlimFast
CodeLite Enthusiast
Posts: 43
Joined: Fri Jun 17, 2011 9:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble compiling CL using CL

Post by SlimFast »

eranif wrote:
  • rename the folder '%AppData%\CodeLite' to something like '%AppData%\CodeLite.1'
I think that did the trick. Today I've managed to compile it successfully. :-) Thanks for your help!
Post Reply