News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Solaris

Started by murlock, November 23, 2006, 11:22:36 AM

Previous topic - Next topic

murlock

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)

afb

Quote from: murlock on November 23, 2006, 11:22:36 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:
#if defined (__SVR4) && defined (__sun)

murlock

#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)

afb

Will go with __sun for now then, and let you test it out later.


murlock

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

afb

Quote from: murlock 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 ?

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

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

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

afb

Quote from: http://www.murlock.org/wiki/?wakka=CodeBlocksEN
    *  You have to remove thoses two lines from bootstrap :

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)

QuoteFor 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

Quote from: afb on November 24, 2006, 12:44:03 PM
Quote from: http://www.murlock.org/wiki/?wakka=CodeBlocksEN
    *  You have to remove thoses two lines from bootstrap :

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 :

./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

WANT_AUTOMAKE=1.7
export WANT_AUTOMAKE

it works


Quote
QuoteFor 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 :)

afb

Quote from: murlock on November 24, 2006, 03:50:00 PM
Quote from: afb on November 24, 2006, 12:44:03 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 :

./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

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

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
SqPlus::SQClassDef<CompilerFactory>::staticFunc<SqPlus::SQClassDef<CompilerFactory>::Func>(bool(*)(const wxString&,const wxString&), const char[21]) needed in ScriptBindings::RegisterBindings()

afb

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

Ok, I'll do it

Thanks

murlock

Wiki is done, I'll report crash on solaris later

afb

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...