Author Topic: Solaris  (Read 21848 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...

murlock

  • Guest
Re: Solaris
« Reply #15 on: December 02, 2006, 12:04:03 am »
Hi,

I've updated wiki with the new svn, ( --enable-compact24 )
the bootstrap is ok now, thanks

for src/sdk/scripting/sqplus/SquirrelVM.cpp, I've added
Code
#ifdef __sun
#include <strings.h>
#endif

now, I can't use codeblocks, it's the backtrace of gdb :
Code
#0  0xd05712c5 in _lwp_kill () from /lib/libc.so.1
#1  0xd056e19a in thr_kill () from /lib/libc.so.1
#2  0xd051cfa3 in raise () from /lib/libc.so.1
#3  0xd067a667 in wxTrap () at ./src/common/appbase.cpp:599
#4  0xd067aa31 in ShowAssertDialog (szFile=0xd0b689c4, nLine=1229, szCond=0xd0b68984, szMsg=0xd0b68db4, traits=0x8210f98)
    at ./src/common/appbase.cpp:823
#5  0xd067a3c1 in wxAppConsole::OnAssert (this=0x813e8c0, file=0xd0b689c4, line=1229, cond=0xd0b68984, msg=0xd0b68db4)
    at ./src/common/appbase.cpp:457
#6  0xd091b821 in wxApp::OnAssert (this=0x813e8c0, file=0xd0b689c4, line=1229, cond=0xd0b68984, msg=0xd0b68db4)
    at ./src/gtk/app.cpp:728
#7  0xd067a71e in wxOnAssert (szFile=0xd0b689c4, nLine=1229, szCond=0xd0b68984, szMsg=0xd0b68db4)
    at ./src/common/appbase.cpp:645
#8  0xd067a69a in wxAssert (cond=0, szFile=0xd0b689c4, nLine=1229, szCond=0xd0b68984, szMsg=0xd0b68db4)
    at ./src/common/appbase.cpp:612
#9  0xd0a60da3 in wxGenericTreeCtrl::GetLastChild (this=0x8573c00, item=@0xce1ddee8) at ./src/generic/treectlg.cpp:1229
#10 0xce623989 in ClassBrowserBuilderThread::RemoveInvalidNodes (this=0x82c8460, tree=0x8573c00, parent={m_pItem = 0x0})
    at classbrowserbuilderthread.cpp:177
#11 0xce623baa in ClassBrowserBuilderThread::BuildTree (this=0x82c8460) at treectlg.h:203
#12 0xce623e0a in ClassBrowserBuilderThread::Entry (this=0x82c8460) at classbrowserbuilderthread.cpp:97
#13 0xd06fec21 in wxThreadInternal::PthreadStart (thread=0x82c8460) at ./src/unix/threadpsx.cpp:763
#14 0xd06feab8 in wxPthreadStart (ptr=0x82c8460) at ./src/unix/threadpsx.cpp:715
#15 0xd056f9be in _thr_setup () from /lib/libc.so.1
#16 0xd056fca0 in L3_doit () from /lib/libc.so.1
#17 0xcea41000 in ?? ()
#18 0x00000000 in ?? ()
#19 0x00000000 in ?? ()


Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Solaris
« Reply #16 on: December 02, 2006, 10:51:44 am »
Unfortunately NexentaOS looked good "on paper", but crashes a lot.
So I'll need to install a new Solaris distro before I can test anything...

Feel free to keep hacking on it yourself meanwhile, as that'll be a while.

murlock

  • Guest
Re: Solaris
« Reply #17 on: December 02, 2006, 08:45:44 pm »
There is another solution : my solaris for testing codeblocks is running inside vmware server (freely available), I can compress and host the iso.

gns

  • Guest
Re: Solaris
« Reply #18 on: December 06, 2006, 07:51:52 am »
I am trying to build codeblocks on a Solaris 9 box using the procedure at http://www.murlock.org/wiki/?wakka=CodeBlocksEN

wxWidgets built without problems.
But encountered problems while configuring CodeBlocks.
The link mentions about the ./configure that doesn't exist. The README from the svn checkout mentions about executing ./bootstrap. On executing the bootstrap script exited with the error
   /usr/sfw/share/aclocal/gimpprint.m4:8: warning: underquoted definition of AM_PATH_GIMPPRINT
   /usr/local/bin/autoconf: /usr/local/bin/autom4te: not found
   automake: autoconf failed with exit status: 1
The GNU autotools are installed on the system and automake,autoconf,autom4te exist at /usr/local/bin
Same error is encountered irrespective of whether the two export WANT_AUTOMAKE (gentoo fixes) are commented or not.

Any pointers would be appreciated.

~gns

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Solaris
« Reply #19 on: December 06, 2006, 10:41:07 am »
There is another solution : my solaris for testing codeblocks is running inside vmware server (freely available), I can compress and host the iso.

I downloaded a copy of Solaris 10 6/06 x86 from Sun, just haven't bothered with setting it up yet.
The beauty of the GNU system was that it was ready to go and had a familiar user environment...

murlock

  • Guest
Re: Solaris
« Reply #20 on: December 08, 2006, 11:07:06 pm »
I am trying to build codeblocks on a Solaris 9 box using the procedure at http://www.murlock.org/wiki/?wakka=CodeBlocksEN

I'm currently downloading Sol9, I'll try to build CodeBlocks

murlock

  • Guest
Re: Solaris
« Reply #21 on: December 10, 2006, 02:29:07 pm »
With last build (3362), for the crash on startup, I've done a little search and in src/plugins/codecompletion/classbrowserbuilderthread.cpp :
I've added at line 177, in void ClassBrowserBuilderThread::RemoveInvalidNodes(wxTreeCtrl* tree, wxTreeItemId parent)
Code
if ( !parent.IsOk() )
    return;
before
Code
wxTreeItemId existing = tree->GetLastChild(parent);


Otherwise, I've a lot of warning about
Code
./src/common/menucmn.cpp(994): assert"wxAssertFailure" failed: attempt to enable an item which doesn't exist
and lot of about different size of picture in imagelist. (not very important ?)


EDIT:
I've created a little project and added a minimal hello world example, when I try to run, I've this message :
Code
xterm: can't execvp LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH  /usr/local/test_cb/bin/cb_console_runner "/home/murlock/mytest/bin/Debug/mytest"

« Last Edit: December 10, 2006, 02:34:05 pm by murlock »

gns

  • Guest
Re: Solaris
« Reply #22 on: December 11, 2006, 03:15:22 pm »
I'm currently downloading Sol9, I'll try to build CodeBlocks
Ok. Will wait for the response. I had installed the GNU tools from sunfreeware.com.
One issue that I mentioned (quoted below) is independant of the Solaris version.

But encountered problems while configuring CodeBlocks.
The link mentions about the ./configure that doesn't exist.

rgds
gns

murlock

  • Guest
Re: Solaris
« Reply #23 on: December 11, 2006, 03:57:41 pm »
But encountered problems while configuring CodeBlocks.
The link mentions about the ./configure that doesn't exist.
configure is created by bootstrap.

I've tried to install Sol9 this weekend but I've to make space on my hd

gns

  • Guest
Re: Solaris
« Reply #24 on: January 20, 2007, 09:15:01 am »
I moved over to Solaris Express instead and gave the procedure a try.
This time, the bootstrap script executed without but subsequent command
./configure --prefix=/usr/local/test_cb/  --enable-debug
failed with the error message "You don't have pkg.m4 properly installed".
I have installed m4 from sunfreeware.com and it had installed without any problems.

Below is the last few lines of the output:

checking whether to build the scripted wizard plugin... yes
checking whether to build the to-do plugin... yes
checking whether to build the contrib plugins... no
checking if the compiler supports precompiled headers... yes
checking for pkg-config... DEBUG GNS : <Empty line>
DEBUG GNS : Value set to yes. -f=/usr/bin/pkg-config && test -x /usr/bin/pkg-config
DEBUG GNS : configure:24662: found /usr/bin/pkg-config
yes
DEBUG GNS : yes
WARNING GNS: You don't have pkg.m4 properly installed

The text marked GNS is due to additional echo statements that I included at the point of failure to get more information.
Any hints would be greatly appreciated.

best regards
gns

murlock

  • Guest
Re: Solaris
« Reply #25 on: January 27, 2007, 12:22:52 am »
Hi,

I've tried with Solaris 10 11/06 and ./configure is ok.
Have you got 'pkg-config' ? and /usr/share/aclocal/pkg.m4 ?

murlock

  • Guest
Re: Solaris
« Reply #26 on: January 27, 2007, 12:28:24 pm »
Otherwise I've put my yesterday build at http://murlock.free.fr/codeblocks_solaris.tar.bz2