Author Topic: Have questions about porting software to eCS?  (Read 11629 times)

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 46
  • Posts: 353
    • View Profile
Have questions about porting software to eCS?
« on: December 26, 2012, 09:44:14 am »
Hi All,

Wanting to encourage anyone who has an interest in porting software to eCS from unix, to post their questions in this forum.  I answer a lot of questions on IRC or when I see them in the newsgroups, but this forum is a far more convenient place for those questions (unless the server crashes again :P)

Cheers,

Paul



Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 243
  • -Receive: 46
  • Posts: 1638
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Have questions about porting software to eCS?
« Reply #1 on: December 26, 2012, 08:24:02 pm »
Hi Paul

I do not have current development skills, I did some programming back in my college days (post 2001) .

What do you think it will be a good exercise on porting some software to OS2-eCS to learn and get used to the tools?
Which tools are basic to start porting software?

Thanks
Martin
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 46
  • Posts: 353
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #2 on: December 27, 2012, 07:39:55 am »
In terms of tools  shameless plug is http://os2ports.smedley.id.au/index.php?page=BuildEnvDVD :)

In the absolute best case scenario, the process is:
1) extract source
2) run configure using something like:
    ash ./configure --prefix=/name_of_app --disable-shared --enable-static 2>&1 | tee configure.log
    --prefix specifies where we want to install the app - default will be /usr or /usr/local
    --disable-shared tells it not to build shared libraries (in most cases the app won't know how to build shared libraries (ie DLL's)
    --enable-static forces static libraries to be built
    2>&1 | tee configure.log puts the output from configure into a file called configure.log for debugging purposes
3) assuming configure completes:
     make 2>&1 | tee build.log
    runs make, with output of the command pipes into build.log
4) If no, errors.
    make install
    output will be put into the directory specified as prefix in 2)

I'd suggest starting with a simple command line app like wget

People seem to want to be ambitious and start with something like virtualbox!

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 7
  • -Receive: 87
  • Posts: 1095
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #3 on: December 27, 2012, 09:38:53 am »
Recent wget doesn't build cleanly. Might I suggest xz as a starting point. Seems to be very portable, is being used quite a bit, often with tar giving tar.xz archives and at least here DLLs also built fine.
http://tukaani.org/xz

Joop

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 30
  • Posts: 405
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #4 on: December 27, 2012, 02:12:30 pm »
Want to try to compile Rocrail, but its using Bazaar instead of CVS. How different are those two? Is it hard / difficult to port Bazaar to OS/2-eCS? Paul, you did CVS as far as I know, how difficult was it?

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 38
  • Posts: 925
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #5 on: December 27, 2012, 05:31:39 pm »
I'd suggest starting with a simple command line app like wget

People seem to want to be ambitious and start with something like virtualbox!

I was trying to lead a thread to get wget to build. The latest one wasn't cooperating. Then OS2world ended. I did download an older version, which has been built in the OS/2 environment previously, but I have done nothing with it, other than discover that it won't build either. I am pretty sure that it is just a minor setup problem, but I don't see what it might be, and need some guidance from those who know about these things.

I intend to restart that thread, sometime early next year, unless somebody else wants to start it earlier. Hopefully, it will serve as a guide for others, but it should also serve as a guide to get the build environment to work with a basic project, before a user decides to tackle more complicated things, like virtualbox.   ;D

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 46
  • Posts: 353
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #6 on: December 28, 2012, 01:34:34 am »
Want to try to compile Rocrail, but its using Bazaar instead of CVS. How different are those two? Is it hard / difficult to port Bazaar to OS/2-eCS? Paul, you did CVS as far as I know, how difficult was it?

yeah the build of cvs I use was built by me.  I've never looked at bazaar, but likely it is quite portable, so I will try and take a look at it.

Note Rocrail has source snapshots available too - https://launchpad.net/rocrail/sunrise/2.0/+download/rocrail-4282-sources.tar.gz

Note also, this uses wxwidgets, which doesn't work terribly well on OS/2.
« Last Edit: December 28, 2012, 01:38:27 am by Paul Smedley »

Andy Willis

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 9
  • Posts: 153
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #7 on: December 28, 2012, 06:00:13 am »
I'd suggest starting with a simple command line app like wget

People seem to want to be ambitious and start with something like virtualbox!

I was trying to lead a thread to get wget to build. The latest one wasn't cooperating. Then OS2world ended. I did download an older version, which has been built in the OS/2 environment previously, but I have done nothing with it, other than discover that it won't build either. I am pretty sure that it is just a minor setup problem, but I don't see what it might be, and need some guidance from those who know about these things.

I intend to restart that thread, sometime early next year, unless somebody else wants to start it earlier. Hopefully, it will serve as a guide for others, but it should also serve as a guide to get the build environment to work with a basic project, before a user decides to tackle more complicated things, like virtualbox.   ;D
wget built very easily with Paul's environment... I had to make one change to the code to make up for the fact that that some struct (sched_param) was getting defined twice in their code.  With my home grown environment I was having problems because it wanted gnutls which in turn wanted libnettles.  There is not a gnutls in the yum repository for that environment so I have the same issue there as I do with my own.

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 38
  • Posts: 925
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #8 on: December 28, 2012, 07:55:04 am »
Quote
wget built very easily with Paul's environment...

I assumed that that was the case, since Paul suggests starting with wget. As I said, I need some guidance, but I also need the time to tackle it again. The main objective, with this project, is to get the build environment to work with a simple project that is known to work, since others have done it. After that, it is easier to move on to more complicated projects.

Joop

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 30
  • Posts: 405
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #9 on: December 28, 2012, 10:05:15 am »
Want to try to compile Rocrail, but its using Bazaar instead of CVS. How different are those two? Is it hard / difficult to port Bazaar to OS/2-eCS? Paul, you did CVS as far as I know, how difficult was it?

yeah the build of cvs I use was built by me.  I've never looked at bazaar, but likely it is quite portable, so I will try and take a look at it.

Note Rocrail has source snapshots available too - https://launchpad.net/rocrail/sunrise/2.0/+download/rocrail-4282-sources.tar.gz

Note also, this uses wxwidgets, which doesn't work terribly well on OS/2.
Thanks Paul, it needs Bazaar, so you have to start somewhere. Didn't know that wxwidgets doesn't work well with OS/2  :(, its used in many programs which does something with graphics. Get the feeling that graphics is our weak spot.

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 46
  • Posts: 353
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #10 on: December 28, 2012, 10:09:32 am »
Quote
wget built very easily with Paul's environment...

I assumed that that was the case, since Paul suggests starting with wget. As I said, I need some guidance, but I also need the time to tackle it again. The main objective, with this project, is to get the build environment to work with a simple project that is known to work, since others have done it. After that, it is easier to move on to more complicated projects.

FWIW, I downloaded the wget 1.14 source this evening and have run configure.  Will see what's required for me to get it building and post back here

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 38
  • Posts: 925
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #11 on: December 28, 2012, 08:14:22 pm »
Quote
FWIW, I downloaded the wget 1.14 source this evening and have run configure.  Will see what's required for me to get it building and post back here

Don't waste too much time on it. I can't get wget 1.11.1 to build either. There is something in my configuration that is wrong, and I won't have time to try to figure it out, until next year.

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 46
  • Posts: 353
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #12 on: December 29, 2012, 06:16:18 am »
Quote
FWIW, I downloaded the wget 1.14 source this evening and have run configure.  Will see what's required for me to get it building and post back here

Don't waste too much time on it. I can't get wget 1.11.1 to build either. There is something in my configuration that is wrong, and I won't have time to try to figure it out, until next year.

Fairly trivial.

One minor diff:
diff -ur wget-1.14-o/lib/spawn.in.h wget-1.14/lib/spawn.in.h
--- wget-1.14-o/lib/spawn.in.h   2012-12-28 19:05:04.000000000 +1030
+++ wget-1.14/lib/spawn.in.h   2012-12-29 15:36:20.000000000 +1030
@@ -32,7 +32,7 @@
 
 /* Get definitions of 'struct sched_param' and 'sigset_t'.
    But avoid namespace pollution on glibc systems.  */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
+#if !(defined __GLIBC__ && !defined __UCLIBC__) && !defined __KLIBC__
 # include <sched.h>
 # include <signal.h>
 #endif

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 38
  • Posts: 925
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #13 on: December 29, 2012, 04:55:34 pm »
Quote
Fairly trivial.

For you maybe.  :)

Anyway, now I need to find the time to figure out what you just said, and get this thing to build.

Thanks...

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 46
  • Posts: 353
    • View Profile
Re: Have questions about porting software to eCS?
« Reply #14 on: December 29, 2012, 08:50:29 pm »
Thanks Paul, it needs Bazaar, so you have to start somewhere. Didn't know that wxwidgets doesn't work well with OS/2  :(, its used in many programs which does something with graphics. Get the feeling that graphics is our weak spot.

Re: bazaar - I'd forgotten, but it used python - so if you have python and gcc installed, trying to install it with 'python setup.py install' _may_ work.

Something triggered in my mind last night re: graphical toolkits like xwidgets and even gtk+ that it may be possible to compile them for OS/2 using the odin toolkit and the win32 api.  A lot of work has been done on odin recently - this may be a viable way to get other graphical toolkits than Qt onto OS/2.
I'm not committing _yet_ to take this on, but I am thinking about it.  Debugging apache2/php is starting to annoy me, so I need something fun to distract me :)

If I can compile the GTK+ toolkit using odin, there's a chance of getting an up to date Gimp for OS/2!