Building/compiling CodeLite on MacOSX 10.6.2 (Intel)

Discussion about CodeLite development process and patches
wuffe
CodeLite Enthusiast
Posts: 27
Joined: Wed Jun 24, 2009 12:41 pm
Contact:

Building/compiling CodeLite on MacOSX 10.6.2 (Intel)

Post by wuffe »

Hi,
I'm trying to build CodeLite on MacOSX 10.6.2 (Intel)

The Makefile generated by "configure" needs some modifications to the variables (in the top of the file) - for the build to work:

< OPT= -O3 -DREGEXP_UNICODE
---
> OPT= -m32 -O3 -DREGEXP_UNICODE

< GCC=gcc
---
> GCC=gcc $(DEBUG) $(OPT)

< WXCFG=--unicode=yes --debug=no
---
> WXCFG=--unicode=yes --debug=yes

With these modifications (above) the build seems to run.
But after (a while) building 100's of object files the build process stops - below it the last ~20 lines of the build before the error:

g++ -m32 -O3 -DREGEXP_UNICODE -fPIC -dynamiclib -o ./lib/libcodeliteu.so Release_gcc_unicode/cl_indexer_reply.o Release_gcc_unicode/cl_indexer_request.o Release_gcc_unicode/clindexerprotocol.o Release_gcc_unicode/named_pipe.o Release_gcc_unicode/named_pipe_client.o Release_gcc_unicode/named_pipe_server.o Release_gcc_unicode/np_connections_server.o Release_gcc_unicode/archive.o Release_gcc_unicode/asyncprocess.o Release_gcc_unicode/cl_calltip.o Release_gcc_unicode/cl_process.o Release_gcc_unicode/comment.o Release_gcc_unicode/cpp_comment_creator.o Release_gcc_unicode/cpp_expr_lexer.o Release_gcc_unicode/cpp_expr_parser.o Release_gcc_unicode/cpp_func_parser.o Release_gcc_unicode/cpp_lexer.o Release_gcc_unicode/cpp_scanner.o Release_gcc_unicode/crawler_lexer.o Release_gcc_unicode/ctags_manager.o Release_gcc_unicode/dirtraverser.o Release_gcc_unicode/entry.o Release_gcc_unicode/expression_result.o Release_gcc_unicode/fc_fileopener.o Release_gcc_unicode/fileentry.o Release_gcc_unicode/fileextmanager.o Release_gcc_unicode/fileutils.o Release_gcc_unicode/function.o Release_gcc_unicode/include_finder.o Release_gcc_unicode/language.o Release_gcc_unicode/lex.yy.o Release_gcc_unicode/parse_thread.o Release_gcc_unicode/performance.o Release_gcc_unicode/processreaderthread.o Release_gcc_unicode/procutils.o Release_gcc_unicode/progress_dialog.o Release_gcc_unicode/readtags.o Release_gcc_unicode/scope_parser.o Release_gcc_unicode/setters_getters_data.o Release_gcc_unicode/symbol_tree.o Release_gcc_unicode/tag_tree.o Release_gcc_unicode/tags_options_data.o Release_gcc_unicode/tags_storage_sqlite3.o Release_gcc_unicode/tokenizer.o Release_gcc_unicode/unixprocess_impl.o Release_gcc_unicode/var_parser.o Release_gcc_unicode/variable.o Release_gcc_unicode/winprocess.o Release_gcc_unicode/winprocess_impl.o Release_gcc_unicode/worker_thread.o -L./lib -framework IOKit -framework Carbon -framework Cocoa -framework System -framework QuickTime -framework OpenGL -framework AGL -lwx_macud-2.8 -L./lib -lwxsqlite3u

g++ -m32 -O3 -DREGEXP_UNICODE -c Plugin/regex_processor.cpp -fPIC -Wall -I/usr/lib/wx/include/mac-unicode-debug-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXMAC__ -fno-strict-aliasing -DASTYLE_LIB -DYY_NEVER_INTERACTIVE=1 -DGTK -DSCI_LEXER -DLINK_LEXERS -D__WX__ -DINSTALL_DIR=\"/usr/share/codelite\" -DPLUGINS_DIR=\"/usr/lib/codelite\" -D__APPLE__ -DMACOSX -I. -I./sdk/codelite_indexer/network -I./sdk/wxsqlite3/include -I./sdk/wxsqlite3/sqlite3/include -I./sdk/wxscintilla/include -I./sdk/wxscintilla/src/scintilla/include -I./sdk/wxpropgrid/include -I./sdk/wxscintilla/src/scintilla/src -I./Interfaces -I./Debugger -I./Plugin -I./CodeLite -o Release_gcc_unicode/regex_processor.o
Plugin/regex_processor.cpp: In constructor 'RegexProcessor::RegexProcessor(const wxString&)':
Plugin/regex_processor.cpp:34: error: 'wxRE_ADVANCED' was not declared in this scope
make: *** [Release_gcc_unicode/regex_processor.o] Error 1

Now I guess that the release builds for macosx are propably done at macosx 10.5.x - but did anyone succeed building CodeLite itself at latest and greatest macosx 10.6.2 ?

Tests are done at lastest trunk extract (-r3533) - but have ben failing like this for weeks/months.

Any suggestions are welcome.

Thanks in advance.

Kind regards Uffe Jakobsen
wuffe
CodeLite Enthusiast
Posts: 27
Joined: Wed Jun 24, 2009 12:41 pm
Contact:

Re: Building/compiling CodeLite on MacOSX 10.6.2 (Intel)

Post by wuffe »

UPDATE:

Took a different approach:

Dropped the manual changes to genererated Makefiles and modified the ("configure") script generating the Makefiles...

With these changes wxRE_ADVANCED was still a problem: changed the code in "Plugin/regex_processor.cpp" referring to "wxRE_ADVANCED"...

It appears that this was the only problem because now CodeLite builds on MacOSX 10.6.2...

Reason for changes to the "configure" file:
Since MacOSX switched from default 32-bit in 10.5.x to default 64-bit in 10.6.x the Apple supplied (default) gcc/g++ compilers now produces 64-bit object files if not told otherwise with the -m32/-m64 switches.

As far as I can see my changes are portable - I hope that you'll accept the diff below for the "configure" file...

PS: Regarding the diff for Plugin/regex_processor.cpp below: I really do not know if I like it or not - due to lack of knowlegde I cannot really see the consequences of my change...

$ svn diff configure
Index: configure
===================================================================
--- configure (revision 3533)
+++ configure (working copy)
@@ -25,8 +25,11 @@
additional_include_path=$2

if [ "$is_64bit" = "yes" ]; then
- compiler_name=${compiler_name}" -DON_64_BIT "
- c_compiler_name=${c_compiler_name}" -DON_64_BIT "
+ compiler_name=${compiler_name}" -m64 -DON_64_BIT "
+ c_compiler_name=${c_compiler_name}" -m64 -DON_64_BIT "
+ else
+ compiler_name=${compiler_name}" -m32 "
+ c_compiler_name=${c_compiler_name}" -m32 "
fi

## If the non-plugin .so libs aren't installed with the plugin ones, add their dir to the rpath
@@ -55,7 +58,7 @@
echo "OPT=${optimization}" >> Makefile
echo "DEBUG=${debug_flag}" >> Makefile
echo "CMP=${compiler_name} \$(DEBUG) \$(OPT) " >> Makefile
- echo "GCC=${c_compiler_name}" >> Makefile
+ echo "GCC=${c_compiler_name} \$(DEBUG) \$(OPT) " >> Makefile
echo "EXE_NAME=${exe_name}" >> Makefile
echo "EXE_NAME_NO_PATH=${exe_name1}" >> Makefile
echo "OBJ_DIR=${objects_dir}" >> Makefile

$ svn diff configure Plugin/regex_processor.cpp
Index: Plugin/regex_processor.cpp
===================================================================
--- Plugin/regex_processor.cpp (revision 3533)
+++ Plugin/regex_processor.cpp (working copy)
@@ -31,7 +31,7 @@
#ifndef __WXMAC__
m_re = new wxRegEx(reStr);
#else
- m_re = new wxRegEx(reStr, wxRE_ADVANCED);
+ m_re = new wxRegEx(reStr);
#endif
}

Kind regards Uffe :-)
Post Reply