To POSIX or not to POSIX

Started by rooprob, February 20, 2017, 08:07:27 am

Previous topic - Next topic

rooprob

Hi there,

I've read with great interest the threads concerning package building, particularly from @t-rexky and @kb7sgi. Well done guys for the *years* of package updates.

I can definitely see a goal being modernizing the library and POSIX support, and several attempts to update the tool chain.

I've been building MIT Kerberos, as I think it's useful, and I haven't found it built anywhere yet.

I've ended fixing up the compile as-i-go, no source changes, just mainly coercing make around the first autoconf configure I ran with the DEFS additions of -D_POSIX_SOURCE=1
  • , or the LIBS -L/mylibs -lnext_posix [1]

  • I've since learned is the result of cc -posix, and have further learned that it's better not to use it, but that's my question.... (I'm not sure what's actually broken)

    [1] This library started off as the libposix.a in the Software archive, but that threw lots of  errors (cant remember exact text, I get a Arithmetic error on a cwd test), so I built a bastardisation of the posix.txt email C file in the http://www.nextcomputers.org/NeXTfiles/Software/OPENSTEP/Developer/posix.txt  plus some missing putenv from http://www.nextcomputers.org/NeXTfiles/Software/OPENSTEP/Developer/NScompatlib/.

    Seems to work, though I may have run out runway on this.

    OK so my question: So far so slow, I have built a lot of MIT Kerberos, but as the end draws near, we're starting to get into daemon's needs around waitpid and signal handling things I believe the POSIX support in OpenStep is getting a bit squiffy.

    So have there been any HOWTO guides written for navigating the POSIX problems of OpenStep - I haven't yet stumbled upon them if they're in posts in this forum.

    I did have to throw in a -DBYTE_ORDER=1 -DBIG_ENDIAN=1 as we invoked arpa/nameser.h processing;  I was really just hacking and not understanding the Right Way.

    The huge amount of packages that have been built leads me to believe much of what I want to build is possible; I just need to figure out the right path I should be on for POSIX.

    Again, many thanks for the huge archive of packages in https://drive.google.com/drive/folders/0B0gDYBETjc4WSENkOWd3aUZFMWc ; plus everything on NextComputers.   Thanks Nitro, Rob and everyone else.
:O2: r12 400 mapleleaf :Indigo2IMP: r10 195 IRIS :SlabMonoTurbo: NeXT
New Zealand

oneNeXT

Which release are you working on ?

rooprob

Oops: OpenStep 4.2


I've build m4, autoconf and automake as a starter to putting together my own POSIX library - and learn a bit of automake.

I've built perl5.6.2 without posix support, which has passed a lot of its tests.

I did the perl build because it's configuration script shines lots of lights into the system, so good for learning. Also the perl build from kb7sgi blew up in IO module with lots of missing posix unresolved symbols and I could not find anything on the system or his google drive which might fill the gabs.

The system perl is 5.001 I think and automake required at least 5.004, however not really, and hacking it's configure script to remove the condition works ok. This is an early version of the auto* tools.

So I have a perl without posix built, which obviously doesn't contain any of the IO or POSIX modules.

Anyway - I'm dripping into this as free time allows.
:O2: r12 400 mapleleaf :Indigo2IMP: r10 195 IRIS :SlabMonoTurbo: NeXT
New Zealand

rjbrown99

Magnus Lindholm created a version of a library called "libnext" which adds Posix support for some of the key missing functions.

Here's a copy, perhaps it would help:
https://s3.amazonaws.com/nextstuff/libnext-20120225.tar.gz

Rob Blessin Black Hole

Hello All: Nice work ,  I'll be happy to upload any old or new packages , compiles , etc to the  NeXTcomputers.org archives just pm with drop box links or whatever works best to me.
Rob Blessin President computerpowwow ebay  sales@blackholeinc.com http://www.blackholeinc.com
303-741-9998 Serving the NeXT Community  since 2/9/93

t-rexky

Before my now two-and-a-half year old son was born, I had intentions of porting NEWLIB to NEXTSTEP and building a replacement system library with modern functions in it.  Those would include most of the POSIX functionality.  Unfortunately I have zero time now for such "frivolous" activities, but may return to it at some point in the future...

rooprob

Newlib: great link. Reading.

As for time: Understood. I have (now) a three and half, and one and half.  This is now an information gathering exercise and edu history lesson into POSIX.

Quote from: "t-rexky"Before my now two-and-a-half year old son was born, I had intentions of porting NEWLIB to NEXTSTEP and building a replacement system library with modern functions in it.  Those would include most of the POSIX functionality.  Unfortunately I have zero time now for such "frivolous" activities, but may return to it at some point in the future...
:O2: r12 400 mapleleaf :Indigo2IMP: r10 195 IRIS :SlabMonoTurbo: NeXT
New Zealand

t-rexky

Back in the day I did a lot of research on the various available C libraries and  Newlib seemed like the best choice: very low weight since it's meant for (today's) embedded systems, very portable and (theoretically) easy to patch into an existing system.

In another thread on here I described my success in porting OS X cctools to NEXTSTEP:

http://www.nextcomputers.org/forums/viewtopic.php?p=20179

This ultimately provides the ability to build NEXTSTEP style shared libraries, which was previously impossible outside of NeXT.  This allows creation of new system library with all obsolete functions replaced by Newlib equivalents, while maintaining total compatibility with the current shared system library for the existing software, as I described in here:

http://www.nextcomputers.org/forums/viewtopic.php?t=2980&start=55

Maybe I will have some time to play again once I retire?  In the meantime it would be great if someone else could continue the efforts.

As a side note I was also able to create a GCC-4.6.x cross compiler that runs on PPC OS X 10.5 and creates good and working object files.  I am unable to get 4.6 to work on m68k and I believe it is because of its insanely huge resource requirement, in the m68k sense.

rooprob

Yup I ve read those posts - thems hard yards, custom gcc builds and all, you're a genius.

What I need to fix for myself in order to be level up to being anywhere near a contributor
- revise my C compilation process, particularly building dylibs
- revise newlib
- comb over my POSIX research to date
- understand where NeXT/OPENStep deviates from BSD4.3 with good appreciation of how that's different to, say late 90s Linux, *bsd.

I don't know if rhapsody should be in there too; a lot of a stretch.

My wife said why: I equated it to like a jigsaw my granddad used to do. Real retirement project, this. Hard to justify for now. We'll see.


Quote from: "t-rexky"

Back in the day I did a lot of research on the various available C libraries and  Newlib seemed like the best choice: very low weight since it's meant for (today's) embedded systems, very portable and (theoretically) easy to patch into an existing system.

In another thread on here I described my success in porting OS X cctools to NEXTSTEP:

http://www.nextcomputers.org/forums/viewtopic.php?p=20179

This ultimately provides the ability to build NEXTSTEP style shared libraries, which was previously impossible outside of NeXT.  This allows creation of new system library with all obsolete functions replaced by Newlib equivalents, while maintaining total compatibility with the current shared system library for the existing software, as I described in here:

http://www.nextcomputers.org/forums/viewtopic.php?t=2980&start=55

Maybe I will have some time to play again once I retire?  In the meantime it would be great if someone else could continue the efforts.

As a side note I was also able to create a GCC-4.6.x cross compiler that runs on PPC OS X 10.5 and creates good and working object files.  I am unable to get 4.6 to work on m68k and I believe it is because of its insanely huge resource requirement, in the m68k sense.
:O2: r12 400 mapleleaf :Indigo2IMP: r10 195 IRIS :SlabMonoTurbo: NeXT
New Zealand