9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] 8l follows a precedence based on the commandline arrangement
@ 2011-02-28 14:23 Fernan Bolando
  2011-02-28 16:31 ` Charles Forsyth
  2011-03-02 13:28 ` Greg Comeau
  0 siblings, 2 replies; 8+ messages in thread
From: Fernan Bolando @ 2011-02-28 14:23 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

just curious is it normal for 8l to follow some sort of precendence
based on the commandline? this being done through ape/pcc

this is unable to build
8l -o spice -v /386/lib/ape/libf2c.a spice.8 unix.8 /386/lib/ape/libap.a

this was able to build
8l -o spice -v spice.8 unix.8 /386/lib/ape/libf2c.a /386/lib/ape/libap.a

the listing below is a longer snippet of what happend.
-------------------
Failed linking
8l -o spice -v /386/lib/ape/libf2c.a spice.8 unix.8 /386/lib/ape/libap.a
<snip>
 0.20 mkfwd
 0.20 patch
MAIN__: iargc_ is undefined
MAIN__: s_wsfe is undefined
MAIN__: e_wsfe is undefined
MAIN__: do_fio is undefined
MAIN__: s_stop is undefined
magphs_: r_imag is undefined
card_: d_sign is undefined
getlin_: s_rsfe is undefined
getlin_: e_rsfe is undefined
disto_: r_cnjg is undefined
disto_: d_lg10 is undefined
_main: main is undefined
 0.21 follow
 0.22 dodata
 0.23 span
 0.24 span 1
 0.24 span 2
 0.25 span 3
 0.25 span
 0.26 span 4
etext = 554fb
 0.26 asmb
 0.27 datblk
 0.28 sym
symsize = 155027
 0.28 sp
 0.28 pc
lcsize = 42324
 0.28 headr
sigsetjmp: xargc: not defined
sigsetjmp: xargv: not defined
 0.28 cpu time
5051 symbols
7500000 memory used
16 sizeof adr
60 sizeof prog
pcc: 8l: 8l 5466: error

successful link
8l -o spice -v spice.8 unix.8 /386/lib/ape/libf2c.a /386/lib/ape/libap.a
<snip>
0.24 mkfwd
 0.25 patch
 0.25 follow
 0.27 dodata
 0.27 span
 0.28 span 1
 0.29 span 2
 0.29 span 3
 0.30 span
 0.31 span 4
etext = 5c77e
 0.31 asmb
 0.34 datblk
 0.34 sym
symsize = 198845
 0.34 sp
 0.34 pc
lcsize = 46938
 0.34 headr
 0.35 cpu time
5236 symbols
10000000 memory used
16 sizeof adr
60 sizeof prog



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

* Re: [9fans] 8l follows a precedence based on the commandline arrangement
  2011-02-28 14:23 [9fans] 8l follows a precedence based on the commandline arrangement Fernan Bolando
@ 2011-02-28 16:31 ` Charles Forsyth
  2011-02-28 16:41   ` Rob Pike
  2011-03-02 13:28 ` Greg Comeau
  1 sibling, 1 reply; 8+ messages in thread
From: Charles Forsyth @ 2011-02-28 16:31 UTC (permalink / raw)
  To: fernanbolando, 9fans

>just curious is it normal for 8l to follow some sort of precendence
>based on the commandline? this being done through ape/pcc

it seems fairly logical; the procedure is somewhat unsportingly documented
in man page 2l(1).



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

* Re: [9fans] 8l follows a precedence based on the commandline arrangement
  2011-02-28 16:31 ` Charles Forsyth
@ 2011-02-28 16:41   ` Rob Pike
  2011-03-02  7:22     ` Ethan Grammatikidis
  0 siblings, 1 reply; 8+ messages in thread
From: Rob Pike @ 2011-02-28 16:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs; +Cc: Charles Forsyth

someone should move those pages and all links from 2 to 8.

-rob



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

* Re: [9fans] 8l follows a precedence based on the commandline arrangement
  2011-02-28 16:41   ` Rob Pike
@ 2011-03-02  7:22     ` Ethan Grammatikidis
  0 siblings, 0 replies; 8+ messages in thread
From: Ethan Grammatikidis @ 2011-03-02  7:22 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, 28 Feb 2011 08:41 -0800, "Rob Pike" <robpike@gmail.com> wrote:
> someone should move those pages and all links from 2 to 8.

There's no problem accessing any ?l page with man(1), unless it's grown
a bug since I last pulled. I assume the problem is with web man indexes?
If so, shouldn't the indexing be fixed? I mean if we move them all to 8,
what about 5l or vl?



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

* Re: [9fans] 8l follows a precedence based on the commandline arrangement
  2011-02-28 14:23 [9fans] 8l follows a precedence based on the commandline arrangement Fernan Bolando
  2011-02-28 16:31 ` Charles Forsyth
@ 2011-03-02 13:28 ` Greg Comeau
  2011-03-02 14:21   ` Charles Forsyth
  2011-03-03  0:51   ` Fernan Bolando
  1 sibling, 2 replies; 8+ messages in thread
From: Greg Comeau @ 2011-03-02 13:28 UTC (permalink / raw)
  To: 9fans

In article <AANLkTi=JkUoRaK30rhSjKxbo0eU9varQqo7+pZhC4kVR@mail.gmail.com>,
Fernan Bolando <fernanbolando@mailc.net> wrote:
>just curious is it normal for 8l to follow some sort of precendence
>based on the commandline? this being done through ape/pcc
>
>this is unable to build
>8l -o spice -v /386/lib/ape/libf2c.a spice.8 unix.8 /386/lib/ape/libap.a
>
>this was able to build
>8l -o spice -v spice.8 unix.8 /386/lib/ape/libf2c.a /386/lib/ape/libap.a
>...

8l requires it to be mentioned/presented in order, and once it
moves on from a library, requires still needed libraries to be repeatedly
mentioned/presented even if "the same library" was already mentioned
previously.  As per 8l "When scanning such libraries, the algorithm is
to scan each library repeatedly until no new undefined symbols are picked up,
then to start on the next library. Thus if library A needs B which
needs A again, it may be necessary to mention A explicitly so it will
be read a second time."  So your problem lib is probably having put
libf2c.a first.
--
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?



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

* Re: [9fans] 8l follows a precedence based on the commandline arrangement
  2011-03-02 13:28 ` Greg Comeau
@ 2011-03-02 14:21   ` Charles Forsyth
  2011-03-02 14:34     ` Charles Forsyth
  2011-03-03  0:51   ` Fernan Bolando
  1 sibling, 1 reply; 8+ messages in thread
From: Charles Forsyth @ 2011-03-02 14:21 UTC (permalink / raw)
  To: comeau, 9fans

the solution is to add

#pragma lib "/$M/lib/ape/libf2c.a"

to the include file that f2c's generated code uses,
and 8l will sort it out. you shouldn't need to mention libap.a,
either, since something should be including an ape include file
(and those have the #pragma libs)



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

* Re: [9fans] 8l follows a precedence based on the commandline arrangement
  2011-03-02 14:21   ` Charles Forsyth
@ 2011-03-02 14:34     ` Charles Forsyth
  0 siblings, 0 replies; 8+ messages in thread
From: Charles Forsyth @ 2011-03-02 14:34 UTC (permalink / raw)
  To: 9fans

>and 8l will sort it out.

by which i meant: you then don't name any libraries at all,
since 8l will pick up the names from the references in the
include files. and therefore, as well as not having to name libf2c.a,

> you shouldn't need to mention libap.a,



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

* Re: [9fans] 8l follows a precedence based on the commandline arrangement
  2011-03-02 13:28 ` Greg Comeau
  2011-03-02 14:21   ` Charles Forsyth
@ 2011-03-03  0:51   ` Fernan Bolando
  1 sibling, 0 replies; 8+ messages in thread
From: Fernan Bolando @ 2011-03-03  0:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Wed, Mar 2, 2011 at 9:28 PM, Greg Comeau <comeau@panix.com> wrote:
> In article <AANLkTi=JkUoRaK30rhSjKxbo0eU9varQqo7+pZhC4kVR@mail.gmail.com>,
> Fernan Bolando <fernanbolando@mailc.net> wrote:
>>just curious is it normal for 8l to follow some sort of precendence
>>based on the commandline? this being done through ape/pcc
>>
>>this is unable to build
>>8l -o spice -v /386/lib/ape/libf2c.a spice.8 unix.8 /386/lib/ape/libap.a
>>
>>this was able to build
>>8l -o spice -v spice.8 unix.8 /386/lib/ape/libf2c.a /386/lib/ape/libap.a
>>...
>
> 8l requires it to be mentioned/presented in order, and once it
> moves on from a library, requires still needed libraries to be repeatedly
> mentioned/presented even if "the same library" was already mentioned
> previously.  As per 8l "When scanning such libraries, the algorithm is
> to scan each library repeatedly until no new undefined symbols are picked up,
> then to start on the next library. Thus if library A needs B which
> needs A again, it may be necessary to mention A explicitly so it will
> be read a second time."  So your problem lib is probably having put
> libf2c.a first.
> --

yes, that was the problem after Charles pointed out to re-read the
manual. I did read it before posting :) my English comprehension is
probably sub par.

I seem to remember being able to place all the object files in
whatever order before, I guess this is the first time I actually hit
this so now i know.

thank you all



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

end of thread, other threads:[~2011-03-03  0:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-28 14:23 [9fans] 8l follows a precedence based on the commandline arrangement Fernan Bolando
2011-02-28 16:31 ` Charles Forsyth
2011-02-28 16:41   ` Rob Pike
2011-03-02  7:22     ` Ethan Grammatikidis
2011-03-02 13:28 ` Greg Comeau
2011-03-02 14:21   ` Charles Forsyth
2011-03-02 14:34     ` Charles Forsyth
2011-03-03  0:51   ` Fernan Bolando

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).