Author Topic: Compiling on Mac OS X  (Read 32294 times)

Offline xjluo

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Compiling on Mac OS X
« Reply #15 on: August 31, 2005, 06:15:47 am »
I tried on the tarball version and failed again. :(

According to byo's commention, I removed all flags except -Wall -g `wx-config --cflags`. I also modified the Makefile to avoid other compile errors. All modules compiled and linked successfully except plugin_CompilerGCC (So, I skip it), Code::Blocks got segment fault on running. :?
AMD Athlon64 3000+ / Kingmax DDR400 512MB / Maxtor 160GB /
Epox 8HDA5J / Unika Power 9608 (ATI mobility 9600)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Apple iBook 9623 / G4 1.2GHz / 768MB / 30GB / ATI Mobility 9200

Offline xjluo

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Compiling on Mac OS X
« Reply #16 on: August 31, 2005, 06:28:39 am »
It's a pitty that wxDockit does not support wxMac, which means the newer Code::Blocks versions won't support Mac either.  :(

Though the tarball version of Code::Blocks does not use wxDockit, it failed me.  :( :( :(
AMD Athlon64 3000+ / Kingmax DDR400 512MB / Maxtor 160GB /
Epox 8HDA5J / Unika Power 9608 (ATI mobility 9600)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Apple iBook 9623 / G4 1.2GHz / 768MB / 30GB / ATI Mobility 9200

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Compiling on Mac OS X
« Reply #17 on: August 31, 2005, 07:28:14 am »
"Porting" wxDockIt to Mac, anyone?
or
"Porting" wxIFM to Mac, anyone?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Compiling on Mac OS X
« Reply #18 on: August 31, 2005, 08:35:22 am »
We will soon be evaluating wxIFM (which works under Mac AFAIK), so keep an eye open ;)
Be patient!
This bug will be fixed soon...

Offline zieQ

  • Almost regular
  • **
  • Posts: 155
Re: Compiling on Mac OS X
« Reply #19 on: August 31, 2005, 08:40:55 am »
I tried on the tarball version and failed again. :(

According to byo's commention, I removed all flags except -Wall -g `wx-config --cflags`. I also modified the Makefile to avoid other compile errors. All modules compiled and linked successfully except plugin_CompilerGCC (So, I skip it), Code::Blocks got segment fault on running. :?

Can you report the errors you have with compilerGCC plugin? That would be cool if it compiles at least ;) And where did the segfault happens?

Offline xjluo

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Compiling on Mac OS X
« Reply #20 on: August 31, 2005, 11:37:15 am »
Error message on linking plugin_CompilerGCC:
=====================================================
Linking shared library devel/share/CodeBlocks/plugins/libcompilergcc.dylib...
ld: common symbols not allowed with MH_DYLIB output format with the -multi_module option
.objs/2.6/plugins/compilergcc/depslib/src/depslib.o definition of common _g_stats (size 12)
/usr/bin/libtool: internal link edit command failed
make: *** [devel/share/CodeBlocks/plugins/libcompilergcc.dylib] Error 1
=====================================================

Error message on executing run.sh:
=====================================================
kevin-ibook:~/share/codeblocks-1.0-RC1-1/src/output kevin$ ./run.sh
./run.sh: line 5: 27881 Segmentation fault      $APP_DIR/codeblocks.exe [email protected]
=====================================================
The splash window of Code::Blocks was shown.
AMD Athlon64 3000+ / Kingmax DDR400 512MB / Maxtor 160GB /
Epox 8HDA5J / Unika Power 9608 (ATI mobility 9600)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Apple iBook 9623 / G4 1.2GHz / 768MB / 30GB / ATI Mobility 9200

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: Compiling on Mac OS X
« Reply #21 on: August 31, 2005, 11:56:44 am »
Check if You have all files from compiler plugin added into project, ecpecially compilerSDCC.cpp

Offline xjluo

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Compiling on Mac OS X
« Reply #22 on: August 31, 2005, 12:02:16 pm »
There is no file named compilerSDCC.cpp in the tarball version.

It's included in the CVS version.

AMD Athlon64 3000+ / Kingmax DDR400 512MB / Maxtor 160GB /
Epox 8HDA5J / Unika Power 9608 (ATI mobility 9600)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Apple iBook 9623 / G4 1.2GHz / 768MB / 30GB / ATI Mobility 9200

Offline TheWizzard

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Compiling on Mac OS X
« Reply #23 on: August 31, 2005, 02:04:19 pm »
So It seems that I have two options:

port wxDockit

or wait for C::B to use wxIFM


Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: Compiling on Mac OS X
« Reply #24 on: August 31, 2005, 03:20:15 pm »

Offline TheWizzard

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Compiling on Mac OS X
« Reply #25 on: August 31, 2005, 03:40:13 pm »
Ok,

with the updated make and latest CVS I get:

Quote
Compiling sdk/wxscintilla/src/PlatWX.cpp...
sdk/wxscintilla/src/PlatWX.cpp: In constructor `Font::Font()':
sdk/wxscintilla/src/PlatWX.cpp:93: error: `ascent' undeclared (first use this function)

I'm confused. Guess I'll just have to wait for a new codeblocks, as I have little to no knowledge of wx.

Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: Compiling on Mac OS X
« Reply #26 on: August 31, 2005, 03:52:42 pm »
I'm compiling right now.  As soon as everything tests OK I'll post needed changes to the CVS Makefile (based on the Makefile byo posted), but try this:

remove all -fno-pcc-struct-return
(i.e. change PROJECT CFLAGS to
*_PROJECT_CFLAGS= -Wall -g -pipe -fmessage-length=0 `wx-config --cflags`
)

scintilla is missing #defines.  change the scintilla target CFLAGS (which fixes your error):
scintilla_CFLAGS= $(scintilla_PROJECT_CFLAGS) -DGTK -DSCI_LEXER -DLINK_LEXERS -DWXMAKINGDLL_SCI $(scintilla_GLOBAL_CFLAGS)

add -Ldevel for sdk :
sdk_PROJECT_LIBDIRS= -Lsdk/tinyxml -Ldevel

also make sure you compiled wxwidgets 2.6 as nonunicode.  wxdockit 2.01 needs some unicode patches (2.1 is unicode compatible and wxIFM is also being looked at).
« Last Edit: August 31, 2005, 04:09:16 pm by grv575 »

Offline TheWizzard

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Compiling on Mac OS X
« Reply #27 on: August 31, 2005, 05:19:14 pm »
Okay,

Thx, your tips worked. I (of course) got an error when compiling wxDockit. I tried to just make it use GTK for the mac platform, which actually compiled, but won't link.

I get many of those:

Quote
ld: src/wxDockit/lib/libwxDockit.a(dockhost.o) illegal reference for -dynamic code (section difference reference from section (__TEXT,__eh_frame) relocation entry (138) to symbol: __ZN12wxWindowListD0Ev defined in dylib: /usr/local/lib/libwx_mac_core-2.6.dylib)

Is it really incompatible or just something that can be fixed with some minor tweaks? As aforementioned I know little to nothing about wx, so I can't really port it. All the stuff wxDockit calls seems to be there in wxMac (it compiles), but I can't figure out what the linker message means.

Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: Compiling on Mac OS X
« Reply #28 on: August 31, 2005, 05:37:49 pm »
`wx-config --cflags` gives you which flags?
is -fPIC defined (think mac needs PIC libs)

Offline TheWizzard

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Compiling on Mac OS X
« Reply #29 on: August 31, 2005, 07:24:30 pm »
Quote
-I/usr/local/lib/wx/include/mac-ansi-release-2.6 -I/usr/local/include/wx-2.6 -D__WXMAC__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA

That's wx-config --cflags

I just added -fPIC to ???_PROJECT_CFLAGS

It's now compiling.