Porting Tips

NeXT Computer, Inc. -> Porting New Software

Title: Porting Tips
Post by: Mike_H on January 26, 2006, 01:26:42 AM
NEXTSTEP:

http://www.drolls.de/NeXT/Porting-General.html


OPENSTEP:

http://www.math.unl.edu/~rdieter1/OpenStep/Developer/PortingTips/
Title: Re: Porting Tips
Post by: da9000 on December 09, 2006, 05:22:34 AM
The 1st one asks for login :(

Haven't tested the 2nd as I don't have Openstep :/
Title: Re: Porting Tips
Post by: Mike_H on December 13, 2006, 01:06:56 PM
Quote from: "da9000"The 1st one asks for login :(

I wish I had made a copy of the web page, as it appears that their robots.txt file prohibits bots from archiving the NeXT section.  :(
Title: Re: Porting Tips
Post by: Nitro on June 29, 2007, 12:49:46 PM
Quote from: "Mike_H"I wish I had made a copy of the web page, as it appears that their robots.txt file prohibits bots from archiving the NeXT section.  :(
I contacted the owner of the site and asked if I could get a copy of the pages to host here.  I received a response from Sven Droll who kindly forwarded two of the main pages.  I'm in contact with him now to retrieve any remaining pages.  He also mentioned that he used to be one of the admins for the Peanuts Archive. :)

http://www.nextcomputers.org/NeXTfiles/Docs/Developer/Porting_Tips/
http://www.nextcomputers.org/NeXTfiles/Docs/Developer/Porting_Functions/
Title: Porting Tips
Post by: da9000 on July 12, 2007, 04:17:24 AM
Nice one Nitro! I'm sure it'll be handy to many.
Title: Porting Tips
Post by: Noth on October 03, 2009, 12:08:40 PM
Hi there,

 I'm trying to update my NeXT Cube running NS3.3 to be able to port some software over. I've already got gcc 2.7.2.3 installed along with its libs, but even basic stuff like grep 2.4.2 won't compile cleanly. Is there a list of all the updated tools I need to be able to port software for NS3.3 (plus how do you cross compile to create quadfat binaries?).

Cheers,

Noth
Title: Porting Tips
Post by: neozeed on October 03, 2009, 02:31:21 PM
Quote from: "Noth"Hi there,

 I'm trying to update my NeXT Cube running NS3.3 to be able to port some software over. I've already got gcc 2.7.2.3 installed along with its libs, but even basic stuff like grep 2.4.2 won't compile cleanly. Is there a list of all the updated tools I need to be able to port software for NS3.3 (plus how do you cross compile to create quadfat binaries?).

Cheers,

Noth

I build quadfat binaries with the shipped CC

cc -arch i386 -arch m68k -arch sparc -arch hppa

I suppose if you build enough cross compilers it'll do the job.....?  Just save the native 'gcc' binary...

I also build bison 1.25 /flex 2.5.4a/gawk 3.022/make 3.75 & bash 2.01

With those I have some good luck building things.
Title: Porting Tips
Post by: iDork on October 03, 2009, 02:46:04 PM
There was a thread about GCC 2.95.3 here:
http://www.nextcomputers.org/forums/viewtopic.php?t=830
with links to 68k binaries. If I my color turbo slab still works, I might give them a try. I remember reading the instructions on the linked page, but I couldn't figure out how to build it for x86.
Does anyone have pre-built x86 binaries?
Title: Porting Tips
Post by: neozeed on October 03, 2009, 02:55:41 PM
Quote from: "iDork"There was a thread about GCC 2.95.3 here:
http://www.nextcomputers.org/forums/viewtopic.php?t=830
with links to 68k binaries. If I my color turbo slab still works, I might give them a try. I remember reading the instructions on the linked page, but I couldn't figure out how to build it for x86.
Does anyone have pre-built x86 binaries?

I must have forgotten about the whole thing....

At the moment I'm being tripped up by 'dirname'....
Title: Porting Tips
Post by: neozeed on October 03, 2009, 03:29:09 PM
I lifted the dirname from opensolaris:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/dirname/dirname.c

And linked it against textutils-1.19's libintl.

I know. what a hack. :(

configure ran, and it's compiling stuff now.
Title: Porting Tips
Post by: neozeed on October 03, 2009, 03:52:54 PM
Ok, here we go "hot off the compiler"...

I've tested unzip to work.......

Anyways the object & exes are here:

http://dl.getdropbox.com/u/1694005/gcc-2.95.3-compile.tar.bz2
You'll also need the source code:
http://ftp.gnu.org/pub/gnu/gcc/gcc-2.95.3.tar.gz

*NOTE that this is just a compiled set, you'll probably still need some kind of gnu make ( make 3.75 works for me),and I would imagine all the nextstep dev tools.. I wouldn't imagine what this would do if you didn't have the libs in place...

You'll need to extract the source into a parallel directory, and run

gmake install

from the gcc-2.95.3-compile directory.

I guess you can manually place stuff...

/usr/local/lib/gcc-lib/i386-next-nextstep3/2.95.3
bash-2.01# ls
SYSCALLS.c.X  cc1plus       crtbegin.o    include       libobjc.a
cc1           collect2      crtend.o      libg2c.a      libstdc++.a
cc1obj        cpp0          f771          libgcc.a      specs



Anyways, it built somewhat cleanly, but you have to fix the one file as mentioned here: http://www.savarese.org/patches/gcc.html

-- edit
I've even tested the F77 compiler... and it works!

bash-2.01# time g77 *.f -o xx
np.f: In function `synmch':
np.f:683: warning:
  200       CALL UNPACK(J,NEWJ)
                 ^
Reference to unimplemented intrinsic `UNPACK' at (^) (assumed EXTERNAL)

real    0m3.650s
user    0m2.160s
sys     0m0.250s
bash-2.01# file xx
xx:     Mach-O executable (for architecture i386)
bash-2.01#


Much to my amazement, as it's documentation said G77 didn't work at all.. I guess there has been a LOT of improvements along the way...

bash-2.01# ./xx
Welcome to Dungeon.                    This version created 30-AUG-90.
You are in an open field west of a big white house with a boarded
front door.
There is a small mailbox here.
>history
Revision history:
30-AUG-90  Portable non-DEC version
18-JUL-80  Transportable data base file (V2.5A).
28-FEB-80  Compressed text file (V2.4A).
15-NOV-79  Bug fixes (V2.3A).
18-JAN-79  Revised DECUS version (V2.2A).
10-OCT-78  Puzzle Room (V2.1A).
10-SEP-78  Endgame (V2.0A).
10-AUG-78  DECUS version (V1.1B).
14-JUN-78  Public version with parser (V1.1A).
4-MAR-78   Debugging version (V1.0A).
>



--- another edit --
Also don't forget to 'fix' the specs files, or the posix stuff will break.

What is funny, is that the posix exe's are MASSIVE... like 360kb for a null executable....

bash-2.01$ cat x.c
void main(void){}
bash-2.01$ cc -posix x.c -o x;ls -l x
-rwxr-xr-x  1 me         87292 Oct  3 17:26 x
bash-2.01$ gcc -posix x.c -o x;ls -l x
x.c: In function `main':
x.c:1: warning: return type of `main' is not `int'
-rwxr-xr-x  1 me        364412 Oct  3 17:26 x
Title: Porting Tips
Post by: iDork on October 04, 2009, 12:41:14 AM
Thanks, I'll give it a try.

Alex
Title: Porting Tips
Post by: Noth on October 04, 2009, 06:19:06 AM
Thanks for the tips. So far I've been able to update the toolchain to the suggested level, but I still can't compile a basic command such as grep! I've been hunting high and low for a m68k binary but I can't find it on any mirror at //nextstuff.info/mirror/ or on this site's file repository. And grep is required for a shedload of compiles to work. I even get circular dependencies compiling the latest 2.5.3 grep asking for grep! I'm mainly trying to get the 2.4.* to work, but that fails... maybe I need gmake ? Which isn't easy to find either as a binary....
Title: Porting Tips
Post by: neozeed on October 04, 2009, 07:26:59 AM
Quote from: "Noth"Thanks for the tips. So far I've been able to update the toolchain to the suggested level, but I still can't compile a basic command such as grep! I've been hunting high and low for a m68k binary but I can't find it on any mirror at //nextstuff.info/mirror/ or on this site's file repository. And grep is required for a shedload of compiles to work. I even get circular dependencies compiling the latest 2.5.3 grep asking for grep! I'm mainly trying to get the 2.4.* to work, but that fails... maybe I need gmake ? Which isn't easy to find either as a binary....

gmake 3.75 should build with nothing....

I just wish I could figure out a 'nice' way to build ncurses as a quad fat library as it builds a .a file, then keeps adding to it, but you  can't do that with quadfat libs... :|

I'll probably just build out some stuff that I can as quad fat, basic stuff... minus gcc as I *think* Id have to do some intense moving around as a cross compiler... I'm not sure how next did it's config back then.

Version 2.0 of GNU's grep built with cc with no issues...  2.4 seemed to build fine as well, it configured fine for gcc and I just altered the makefile to use cc & include all the quad fat stuff, and it built.  I've included version 2.0 & 2.4 in the list of stuff....

-- edit

I've built a few things as quad fat...

http://dl.getdropbox.com/u/1694005/nextstep/bison-bzip2-flex-gawk-gmake-unzip.tar.gz

http://dl.getdropbox.com/u/1694005/nextstep/bash.gz

http://dl.getdropbox.com/u/1694005/nextstep/qgrep.gz

http://dl.getdropbox.com/u/1694005/nextstep/qgrep24.gz

The name should be pretty self explanatory... and gnutar on nextstep should be able to handle this file.  I've named all these exe's as Q???? ie qbzip2 incase you have an existing one... Or if you want to lipo it out.

I should also note that gmake isn't the most solid program out there, and it cannot build itself... but it can build all kinds of other things.. it's really odd but I've not spent that much time worrying about it.
Title: Porting Tips
Post by: Noth on October 04, 2009, 11:04:38 AM
Thanks a lot, I'll get these as soon as the server lets me get them. Hopefully that will do the trick.
Title: Porting Tips
Post by: allisa on February 11, 2010, 11:45:29 PM
I have a Toshiba Satellite A215 - S7425. My port for my power cord broke and is very loose inside the computer. I can barely get it to charge, and the repair places near me want to charge me $300+. Any tips to fix it myself? I am weary to even open it, in case I mess it up.
Title: Porting Tips
Post by: neozeed on February 11, 2010, 11:58:45 PM
Quote from: "allisa"I have a Toshiba Satellite A215 - S7425. My port for my power cord broke and is very loose inside the computer. I can barely get it to charge, and the repair places near me want to charge me $300+. Any tips to fix it myself? I am weary to even open it, in case I mess it up.

sounds like a hardware problem...

you would have to replace the cells... And the connectors.. Depends how good you are with a hacksaw, soldering iron and duct tape.....

Go to top  Forum index