Author Topic: Solaris  (Read 16721 times)

murlock

  • Guest
Solaris
« on: November 23, 2006, 11:22:36 am »
I've made a little tutorial to build CodeBlocks for Solaris : http://www.murlock.org/wiki/?wakka=CodeBlocksEN
(don't hesitate to contact me or correct my english)

There are several problems :
I've installed CodeBlocks in /usr/local/test_cb but CodeBlocks search icons in /usr/local/share instead of /usr/local/test_cb/share
Crash when creating a new project (I'll launch CodeBlocks with gdb and report later)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Solaris
« Reply #1 on: November 23, 2006, 11:27:57 am »
I've installed CodeBlocks in /usr/local/test_cb but CodeBlocks search icons in /usr/local/share instead of /usr/local/test_cb/share

This happens on other platforms too, it's under a little refactoring at the moment...

BTW; How do you recognize Solaris with the preprocessor ? We have a little patch
to do for binreloc support (using getexecname), but don't have the defs to look for ?

I've seen this mentioned somewhere:
Code
#if defined (__SVR4) && defined (__sun)

murlock

  • Guest
Re: Solaris
« Reply #2 on: November 23, 2006, 12:14:02 pm »
#ifdef __sun seems ok for me but I'll check http://docs.sun.com to be sure.

Otherwise, I'll try to compile codeblocks with Sun Studio (for x86 and sparc)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Solaris
« Reply #3 on: November 23, 2006, 12:19:23 pm »
Will go with __sun for now then, and let you test it out later.

takeshimiya

  • Guest
Re: Solaris
« Reply #4 on: November 23, 2006, 02:59:29 pm »

murlock

  • Guest
Re: Solaris
« Reply #5 on: November 24, 2006, 12:24:05 pm »
I've tried to compile CodeBlocks with Sun Studio

There is a problem because when linking executable, bad flag are used, any tips ?

use of -fPIC instead of -KPIC ?

please check http://www.murlock.org/wiki/?wakka=CodeBlocksENSunStudio for output errors,
I can't manage to put them here

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Solaris
« Reply #6 on: November 24, 2006, 12:37:02 pm »
I've tried to compile CodeBlocks with Sun Studio

There is a problem because when linking executable, bad flag are used, any tips ?

use of -fPIC instead of -KPIC ?

This is a bug with the Code::Blocks configure.in, it hardcodes those flags:

Code
CXXFLAGS="$CXXFLAGS $PCH_FLAGS -fPIC -DPIC"

Try taking those out from there, and let me know if it works for you then...

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Solaris
« Reply #7 on: November 24, 2006, 12:44:03 pm »
    *  You have to remove thoses two lines from bootstrap :

Code
export WANT_AUTOMAKE='1.7'
export WANT_AUTOCONF='2.5'

Why do you need to remove those two ? (I believe they were added for Gentoo)
Do they conflict with some Sun magic ? (not a problem to wrap in "if Linux", but)

Quote
For one file, you'll have an error for compiling ( strlen undefined) due to missing #include <string.h>,

Which file was this ? Seems like a harmless fix, so report it as a bug/patch.

FYI: wxAUI/wxGTK LDFLAGS and wxHIDE_READONLY will be fixed, eventually...

murlock

  • Guest
Re: Solaris
« Reply #8 on: November 24, 2006, 03:50:00 pm »
    *  You have to remove thoses two lines from bootstrap :

Code
export WANT_AUTOMAKE='1.7'
export WANT_AUTOCONF='2.5'

Why do you need to remove those two ? (I believe they were added for Gentoo)
Do they conflict with some Sun magic ? (not a problem to wrap in "if Linux", but)


the script abort with this error :
Code
./bootstrap: WANT_AUTOMAKE=1.7: is not an identifier
Maybe due to difference between sun sh and gnu/linux sh ?
It seems that sh don't like export VAR=VALUE, with
Code
WANT_AUTOMAKE=1.7
export WANT_AUTOMAKE
it works


Quote
Quote
For one file, you'll have an error for compiling ( strlen undefined) due to missing #include <string.h>,

Which file was this ? Seems like a harmless fix, so report it as a bug/patch.

FYI: wxAUI/wxGTK LDFLAGS and wxHIDE_READONLY will be fixed, eventually...


I'll report later :)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Solaris
« Reply #9 on: November 24, 2006, 06:15:22 pm »
Why do you need to remove those two ? (I believe they were added for Gentoo)
Do they conflict with some Sun magic ? (not a problem to wrap in "if Linux", but)

the script abort with this error :
Code
./bootstrap: WANT_AUTOMAKE=1.7: is not an identifier
Maybe due to difference between sun sh and gnu/linux sh ?
It seems that sh don't like export VAR=VALUE, with
Code
WANT_AUTOMAKE=1.7
export WANT_AUTOMAKE
it works

Cool, that change should go in for all platforms then.

Will look at it with the other configure.in changes.

murlock

  • Guest
Re: Solaris
« Reply #10 on: November 24, 2006, 08:46:21 pm »
The file src/sdk/scripting/sqplus/SquirrelVM.cpp require to add #include <string.h> for strlen function.

On other side with Sun Studio, I have to remove -fPIC and -DPIC from configure.in and -ffast-math from aclocal.m4
After, compile stop with this error :
"scriptbindings.cpp", line 563: Error: Could not find a match for
Code
SqPlus::SQClassDef<CompilerFactory>::staticFunc<SqPlus::SQClassDef<CompilerFactory>::Func>(bool(*)(const wxString&,const wxString&), const char[21]) needed in ScriptBindings::RegisterBindings() 

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Solaris
« Reply #11 on: November 25, 2006, 03:08:35 pm »
I added a placeholder to the Code::Blocks Wiki for Solaris instructions.
(I don't know anything about Solaris, but do have a copy of NexentaOS)

http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Solaris

If you could copy your English instructions to there, it'd be appreciated.
You can see the pages for other platforms for how it should look like ?

murlock

  • Guest
Re: Solaris
« Reply #12 on: November 25, 2006, 05:36:55 pm »
Ok, I'll do it

Thanks

murlock

  • Guest
Re: Solaris
« Reply #13 on: November 28, 2006, 10:57:49 pm »
Wiki is done, I'll report crash on solaris later

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Solaris
« Reply #14 on: November 28, 2006, 11:17:09 pm »
I noticed that you use --disable-compat24 when compiling wxWidgets, this is currently known to cause crashes with Code::Blocks and something we are investigating. I'd recommend not using that...