Author Topic: FreeBSD 6.0 Port - Updated 12/09/05 Port and package made  (Read 14741 times)

anonuser

  • Guest
FreeBSD 6.0 Port - Updated 12/09/05 Port and package made
« on: November 18, 2005, 10:57:31 pm »
12/09/05
Alright port and binary are totally done, from latest trunk of the svn.
I'm talking to edwin@freebsd.org to see if we can merge our ports His doesn't use the configure or autotools stuff which I believe might be fatal as the files that are generated are generated with hard paths.
I can provide anyone who wants to try the binary out and help me test it on other machines. Note this is a native port, this is pre-patched (hopefully I'll get arround to generating patch files) and will install everything and register itself.

Less changes are required with the latest source. prefix.cpp still needs to patched as usually I've done this so you don't need to. And AngleScript expects malloc.h but that's depreicated and malloc is included in stdlib.h This is also fixed for you. Other than that the Makefile.in for src/plugins/codecompletion/resources was changed because INSTALL_PROGRAM is for binaries only on FreeBSD this was changed to INSTALL_DATA.

Mandrav:
associations.cpp needs to be wrapped in some #ifdefs __WXMSW__ 
They are for windows registry settings only. unix doesn't support them.
And any chance you'll ever get around to fixing the prefix.cpp? its really simple. I've provided you with the fix.
11/19/05
I have made a port I will be testing and submitting the port to freebsd.org
I will make a binary package for freebsd that way they can portinstall -P or pkg_add [-r] it and it'll work.
It does check for dependencies and will setup the autotools for you. the configure script is not longer built by the bootstrap, I have no idea if this will work or not.
configure should handle it self, if it doesn't i'll set up the bootstrap script.

One particular note I had to change the Makefile.am for a few things.

Everything seems to compile correctly.
It uses gmake rather than regular old make and will check for your version of autotools in there.

I'll let you know when the port is available for installation, hopefully it'll be up with in a few days. I just need to find host sites. for the tarball.

--------------------------------------------------------------------------------------------- ---------------------------------------------

I had a working version just last night, then major cvs updates so I decided to get going on that.

And so I did.

There were several linker problems, src/src wasn't linking against src/sdk src/sdk/tinxml src/sdk/as
No idea why configure didn't set this up.
As a result added objects:

configmanager
projectmanager
base64
crc32
globals
libangelscript
libtinyxml

to the src/src Makefile. and added ../sdk/.libs as an include dir and library include directory

make sure you export SED='sed' to make sure libtool works
its added to the libtool (which is what needs it) so just a fair warning. It has compiled cleanly.

my new prefix.cpp should be merged into cvs as it gets rid of all that nasty implict casting to char* from NULL.

I'm going to make an actual port that'll be in the ports tree soon

It will compile in FreeBSD and run. There are some pre-reqs though you must have wxgtk2-xxx built across the board and the files still available.  aclocal expects them for some reason. Going to read up to get configure a prebuilt thing that will autoconfigure it self.

when you goto configure makesure you configure with your version of wx-config unless you decided to link it before hand.
ex. ./configure --with-wx-config=wxgtk2-2.6-config

optionally you can add --enable-contrib  and it should sitll all work.

Though it expects wx-config to be there for your wx-applications so please make a link to it if you're going to be using it.
An oddity is when creating a wx-app it does not generate the wx_pch.h file. No clue why and trying to add it crashes Code::Blocks.

« Last Edit: December 10, 2005, 02:48:55 am by anonuser »

Offline heromyth

  • Multiple posting newcomer
  • *
  • Posts: 98
    • http://
Re: FreeBSD 6.0 Port - Updated 11/19/05 Port and package made
« Reply #1 on: November 26, 2005, 06:58:04 am »
Thank you!
You have done what I had thought about.

============

I successfully built codeblocks-1.0rc2 with Autotools under FreeBSD-6.0-Realease  on November 30, 2005.  Just modify something about redefinition of NULL in src/prefix.cpp which is no problem under Windows OS.

The method of building can been seen at http://wiki.codeblocks.org/index.php?title=Compiling_Code::Blocks_in_FreeBSD.

Regretly, I can't run
  make install-strip

Here is my snapshot of CB in FreeBSD.


[attachment deleted by admin]
« Last Edit: December 01, 2005, 04:28:56 am by heromyth »

Offline heromyth

  • Multiple posting newcomer
  • *
  • Posts: 98
    • http://
Re: FreeBSD 6.0 Port - Updated 11/19/05 Port and package made
« Reply #2 on: December 01, 2005, 04:23:33 pm »
I have submited a patch for building CB CVS in FreeBSD 6.0. You can see it at http://sourceforge.net/tracker/index.php?func=detail&aid=1370946&group_id=126998&atid=707418.

Now, the command
   make install-strip
works.

However, there are some errors still unfixed in some plugins like compilergcc and debuggergdb . Below is the log:

Code
/usr/local/share/codeblocks/plugins/libcompiler.so: Undefined symbol "_ZN11EditPairDlgC1EP8wxWindowR8wxStringS3_RKS2_NS_10BrowseModeE"
/usr/local/share/codeblocks/plugins/libdebuggergdb.so: Undefined symbol "_ZN13DebuggerState7CleanUpEv"
« Last Edit: December 01, 2005, 04:26:22 pm by heromyth »

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: FreeBSD 6.0 Port - Updated 11/19/05 Port and package made
« Reply #3 on: December 01, 2005, 04:53:27 pm »
However, there are some errors still unfixed in some plugins like compilergcc and debuggergdb . Below is the log:

Code
/usr/local/share/codeblocks/plugins/libcompiler.so: Undefined symbol "_ZN11EditPairDlgC1EP8wxWindowR8wxStringS3_RKS2_NS_10BrowseModeE"
/usr/local/share/codeblocks/plugins/libdebuggergdb.so: Undefined symbol "_ZN13DebuggerState7CleanUpEv"

Look here for the solution.

Offline heromyth

  • Multiple posting newcomer
  • *
  • Posts: 98
    • http://
Re: FreeBSD 6.0 Port - Updated 11/19/05 Port and package made
« Reply #4 on: December 02, 2005, 09:34:40 am »
Look here for the solution.

Thank you! I have solved it myself before I seen that.  :shock:

anonuser

  • Guest
Re: FreeBSD 6.0 Port - Updated 11/19/05 Port and package made
« Reply #5 on: December 03, 2005, 02:37:48 am »
I've sent mandrav an updated configure and bootstrap and make files to alleviate these problems.
He said thanks not sure if they ever made them in. Also made prefix more c99 happy. Taking out implicit casting which you had to do. Also the Pthread init was a bit off so I re did that. So what Im in the process of doing is making a patch set for each thing. Rather I was doing. SOmeone beat me to it and already submitted it to FreeBSD.

Over all I didn't need to change much code. CVS (SVN now) version had some make file issues for me, may have been fxied by now. But glad to see it working for you. I didn't bother with a screen shot because there's already a C::B SS in the gallery.

anonuser

  • Guest
Re: FreeBSD 6.0 Port - Updated 12/09/05 Port and package made
« Reply #6 on: December 10, 2005, 02:49:32 am »
The new port was sent to pr and waiting on feedback.

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: FreeBSD 6.0 Port - Updated 11/19/05 Port and package made
« Reply #7 on: December 13, 2005, 11:35:08 am »
Also the Pthread init was a bit off so I re did that.
I think you mean line 225 with that. Before it was:
Code
static pthread_once_t br_thread_key_once = PTHREAD_ONCE_INIT;
Now it is:
Code
static pthread_once_t br_thread_key_once = {0, (pthread_mutex_t)NULL};//PTHREAD_ONCE_INIT;
I have no idea why this should be changed. Anyway, I am not a pthread expert so I assume you know what you are doing. But: This line seems to break the Linux-version:
Quote from: gcc3.4.4
prefix.cpp:225: error: no matching function for call to `pthread_mutex_t::._10(NULL)'
/usr/include/bits/pthreadtypes.h:89: note: candidates are: pthread_mutex_t::._10()
/usr/include/bits/pthreadtypes.h:89: note:                 pthread_mutex_t::._10(const pthread_mutex_t&)
prefix.cpp:225: error: initializer for scalar variable requires one element
Well, if I undo the change made in rev1482 to the old version (which even can be found in the manpage for pthread_once!) everything seems to be ok.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

anonuser

  • Guest
Re: FreeBSD 6.0 Port - Updated 12/09/05 Port and package made
« Reply #8 on: December 13, 2005, 05:42:08 pm »
hrrm, odd, PTHREAD_ONCE_INIT is defined as follows in pthread.h
#define PTHREAD_NEEDS_INIT 0
#define PTHREAD_ONCE_INIT   { PTHREAD_NEEDS_INIT, NULL }
I suppose I'll wrap in defines it for FreeBSD.

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: FreeBSD 6.0 Port - Updated 12/09/05 Port and package made
« Reply #9 on: December 13, 2005, 08:35:03 pm »
At the moment I don't have access to a linux machine, so I can't check this. But from your quote and from the error message I got from gcc today I would assume that pthread_once_t is implemented differently on Linux and FreeBSD. This would declare the problems. But what is the problem with PTHREAD_ONCE_INIT on FreeBSD?
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

anonuser

  • Guest
Re: FreeBSD 6.0 Port - Updated 12/09/05 Port and package made
« Reply #10 on: December 13, 2005, 09:21:46 pm »
basically the problem is there's an implicit cast that shouldn't be there.
I sent mandrav a fix, so it'll use the regular PTHREAD_ONCE_INIT. So i'm sure it'll be in the repo soon.
Also a note the freebsd version angel script is still broken the #ifdef's are wrong and working on getting the patch in.

anonuser

  • Guest
Re: FreeBSD 6.0 Port - Updated 12/09/05 Port and package made
« Reply #11 on: December 13, 2005, 11:00:36 pm »
After rereading your replay it seems i didn't anser your question.
Pthread was erroring out on the PTHREAD_ONCE_INIT because some function call using the key was not exepecting NULL, it was expecting pthread_mutex_t. Now it seems my little fix by casting the defintion, at least for freebsd now breaks some linux implementations. I personally never use pthread_once. its said to be dynamic package intitilization, but frankly I've no idea what its pertaining to. So I fixed it and let it be. But the patch was sent so hopefully it'll be there soon. Glad you noticed it.

Also for people on freebsd who want to build codebocks open bootstrap and execute them by hand, when you run libtool it'll ask you to add your local aclocal.m4 cache. so cat that into the codeblocks generated one. No idea why it already doesn't do it, not a problem in my port of it though.