9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] plan 9 software for unix
@ 2003-02-12 20:13 Russ Cox
  2003-02-12 20:46 ` northern snowfall
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Russ Cox @ 2003-02-12 20:13 UTC (permalink / raw)
  To: 9fans

http://pdos.lcs.mit.edu/~rsc/software
has convenient packagings of libfmt,
libbio, libregexp, and mk that should build
on unix systems with minimal efforts.
i wrote freebsd/386 and linux/386 make files
and would welcome others.

the libraries are intended to integrate well
with the native unix c library, so that they
can be used in unix programs (rather than
just ports of plan 9 programs).

they're all in tgz, rpm, and freebsd ports formats.
enjoy.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] plan 9 software for unix
  2003-02-12 20:13 [9fans] plan 9 software for unix Russ Cox
@ 2003-02-12 20:46 ` northern snowfall
  2003-02-12 22:58   ` Dan Cross
  2003-02-13  0:26 ` Glenn McGuire
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: northern snowfall @ 2003-02-12 20:46 UTC (permalink / raw)
  To: Russ Cox; +Cc: 9fans

libbio compiles a.o.k. on SunOS-sun4u with the Linux makefile (using
GCC. I dont have a spro licence).
libregexp9-10 compiles fine.

With libfmt I get a warning:
    gcc -Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c
fltfmt.c
    fltfmt.c: In function `xdodtoa':
    fltfmt.c:180: warning: implicit declaration of function `isinf'
which manifests later when linking:
    blueberry.north_ % make test
    gcc -o test test.c libfmt.a
    Undefined                       first referenced
     symbol                             in file
    isinf                               libfmt.a(fltfmt.o)
    ld: fatal: Symbol referencing errors. No output written to test
    collect2: ld returned 1 exit status
    make: *** [test] Error 1
    blueberry.north_ %

Apparently Solaris 2.9 doesn't have isinf in its libc. It does, however,
have
isnan() and finite(). finite() returns TRUE(1) if the argument is
neither infinity nor
NaN. isnan() returns TRUE if the argument is NaN. Therefore,
    if(finite(x) == FALSE && isnan(x) == FALSE) {
        // infinite found
    }

I guess you could ifdef a macro in based on underlying architecture in
the source and
-Dx in the Makefile, but, it seems very non-plan9 to be so crude for
just one function.
Then again, creating an external dependency file seems crude for one
function as well...
Don




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] plan 9 software for unix
  2003-02-12 20:46 ` northern snowfall
@ 2003-02-12 22:58   ` Dan Cross
  2003-02-13  2:33     ` Russ Cox
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Cross @ 2003-02-12 22:58 UTC (permalink / raw)
  To: 9fans

>     isinf                               libfmt.a(fltfmt.o)
>     ld: fatal: Symbol referencing errors. No output written to test
>     collect2: ld returned 1 exit status
>     make: *** [test] Error 1
>     blueberry.north_ %

Stuff like that is annoying, but easy to work around if you have access
to the libraries that come with workshop (nevermind the workshop compilers,
which are the big deal).  I did this:

	gmake
	ld -r -o _fltfmt.o fltfmt.o /opt/SUNWspo/WS6U2/lib/libsunmath.a
	mv _fltfmt.o fltfmt.o
	gmake test

That fixed my libfmt.a.  Of course, if you don't have access to the
workshop libraries, you're still out of luck.

	- Dan C.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] plan 9 software for unix
  2003-02-12 20:13 [9fans] plan 9 software for unix Russ Cox
  2003-02-12 20:46 ` northern snowfall
@ 2003-02-13  0:26 ` Glenn McGuire
  2003-02-13 12:28 ` Eric Grosse
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Glenn McGuire @ 2003-02-13  0:26 UTC (permalink / raw)
  To: 9fans

Cool!

I downloaded the RPMs to my Redhat 8 box, and the mk RPM did not work
for me  (I suspect the dependency on libregexp was looking for regexp,
and not regexp9, but have not had the time to check it out yet.)

I compiled the source in the tgz file, and it succeeded without warnings.

Incidentally, it appears that newer versions of rpm have seperated the
creation function to another executable named 'rpmbuild'.  I made the
following changes in my copy of the makefile:

RPMBLD=rpmbuild
RPMDIR=/usr/src/redhat

[...]

rpm:
         make tgz
         cp mk-$(VERSION).tgz $(RPMDIR)/SOURCES
         $(RPMBLD) -ba rpm.spec
         cp $(RPMDIR)/SRPMS/mk-$(VERSION)-1.src.rpm .
         cp $(RPMDIR)/RPMS/i586/mk-$(VERSION)-1.i586.rpm .


I don't have the rpm.spec, so the 'rpm' build target still isn't fully
functional yet. I'm happy enough that mk is working, so I'm setting this
aside, but I figured I had enough feedback to make worth sending out a note.
	-gm



Russ Cox wrote:
> http://pdos.lcs.mit.edu/~rsc/software
> has convenient packagings of libfmt,
> libbio, libregexp, and mk that should build
> on unix systems with minimal efforts.
> i wrote freebsd/386 and linux/386 make files
> and would welcome others.
>
> the libraries are intended to integrate well
> with the native unix c library, so that they
> can be used in unix programs (rather than
> just ports of plan 9 programs).
>
> they're all in tgz, rpm, and freebsd ports formats.
> enjoy.
>




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] plan 9 software for unix
  2003-02-12 22:58   ` Dan Cross
@ 2003-02-13  2:33     ` Russ Cox
  0 siblings, 0 replies; 10+ messages in thread
From: Russ Cox @ 2003-02-13  2:33 UTC (permalink / raw)
  To: 9fans

This was an embarrassing oversight on my part.
I provided (a portable!) __isInf and __isNaN in nan64.c
but didn't rewrite fltfmt to use them.

There are updated packages on the web pages.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] plan 9 software for unix
  2003-02-12 20:13 [9fans] plan 9 software for unix Russ Cox
  2003-02-12 20:46 ` northern snowfall
  2003-02-13  0:26 ` Glenn McGuire
@ 2003-02-13 12:28 ` Eric Grosse
  2003-02-13 17:47 ` Jeff Sickel
  2003-02-13 18:37 ` Russ Cox
  4 siblings, 0 replies; 10+ messages in thread
From: Eric Grosse @ 2003-02-13 12:28 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

In the interests of keeping down the number of versions,
I'm willing to remove the material from netlib and point
to your mit directory, if that makes you editing life
easier.  Or we can move it to someplace else on the
Plan 9 web server.

Just to clarify, too:  I'm not mandating that there be
a single version.   If the difficulties in getting portable
code to compile everywhere pushes us to have a few versions,
so be it.   I just have a desire to minimize confusion.

[-- Attachment #2: Type: message/rfc822, Size: 2251 bytes --]

From: "Russ Cox" <rsc@achille.cs.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: [9fans] plan 9 software for unix
Date: Wed, 12 Feb 2003 15:13:16 -0500
Message-ID: <d1073f7492521fd20e9276602429ba3f@plan9.bell-labs.com>

http://pdos.lcs.mit.edu/~rsc/software
has convenient packagings of libfmt,
libbio, libregexp, and mk that should build
on unix systems with minimal efforts.
i wrote freebsd/386 and linux/386 make files
and would welcome others.

the libraries are intended to integrate well
with the native unix c library, so that they
can be used in unix programs (rather than
just ports of plan 9 programs).

they're all in tgz, rpm, and freebsd ports formats.
enjoy.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] plan 9 software for unix
  2003-02-12 20:13 [9fans] plan 9 software for unix Russ Cox
                   ` (2 preceding siblings ...)
  2003-02-13 12:28 ` Eric Grosse
@ 2003-02-13 17:47 ` Jeff Sickel
  2003-02-13 17:57   ` Russ Cox
  2003-02-13 18:37 ` Russ Cox
  4 siblings, 1 reply; 10+ messages in thread
From: Jeff Sickel @ 2003-02-13 17:47 UTC (permalink / raw)
  To: 9fans

Great to have mk in a cleanly packaged form, not so great to have it as GPL.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] plan 9 software for unix
  2003-02-13 17:47 ` Jeff Sickel
@ 2003-02-13 17:57   ` Russ Cox
  0 siblings, 0 replies; 10+ messages in thread
From: Russ Cox @ 2003-02-13 17:57 UTC (permalink / raw)
  To: 9fans

> Great to have mk in a cleanly packaged form, not so great to have it as GPL.

let's not start this war.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] plan 9 software for unix
  2003-02-12 20:13 [9fans] plan 9 software for unix Russ Cox
                   ` (3 preceding siblings ...)
  2003-02-13 17:47 ` Jeff Sickel
@ 2003-02-13 18:37 ` Russ Cox
  4 siblings, 0 replies; 10+ messages in thread
From: Russ Cox @ 2003-02-13 18:37 UTC (permalink / raw)
  To: 9fans

thanks to everyone who sent reports about building
on other systems.  i've incorporated the various
fixes and also put utf support back in.  there are
new packages on the web page.

http://pdos.lcs.mit.edu/~rsc/software



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] plan 9 software for unix
@ 2003-02-13 13:19 Eric Grosse
  0 siblings, 0 replies; 10+ messages in thread
From: Eric Grosse @ 2003-02-13 13:19 UTC (permalink / raw)
  To: 9fans

Caught again by Reply-To...

I intended to send that last message just to Russ.
The context is that we're trying to avoid having too
many differing versions of libfmt, etc. floating around.

Eric


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-02-13 18:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-12 20:13 [9fans] plan 9 software for unix Russ Cox
2003-02-12 20:46 ` northern snowfall
2003-02-12 22:58   ` Dan Cross
2003-02-13  2:33     ` Russ Cox
2003-02-13  0:26 ` Glenn McGuire
2003-02-13 12:28 ` Eric Grosse
2003-02-13 17:47 ` Jeff Sickel
2003-02-13 17:57   ` Russ Cox
2003-02-13 18:37 ` Russ Cox
2003-02-13 13:19 Eric Grosse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).