Subject: Re: FAQ

From: [email-masked] (Maurizio Codogno)
Date: Tue, 07 Mar 1995 15:47:31 +0100

Alexander said:

% >   so if anybody else wants to maintain the
% >   FAQ, please do it !

and Russell answered:
 
% If there are no others (more qualified, more able) leaping forward to
% the challange I would be prepared to maintain this "in my copious
% spare time(tm)".

I could do it, but my qualifications are not so good :-) Anyway, here there
is another volunteer.
 
% > Feel free to correct the answers and re-post the FAQ.

The only thing I want to point out is that in question 10. there is a huge 
difference between ls and dir. ls is builtin, so if it doesn't work it is 
sign of *many* thing missing and people could not get any file; dir calls
~ftp/bin/ls, and it needs more shared libraries (or better, a static
ls - I suggest grabbing binutils* at prep.ai.mit.edu or any GNU mirror site.

ciao, .mau.

---

From: [email-masked] (Russell Street)
Date: Wed, 8 Mar 1995 20:33:00 +1300 (NDT)

Hello..

> I could do it, but my qualifications are not so good :-) Anyway, here there

I would be all for having some help and co-operation in an effort.

Was there not another FAQ floating around somewhere as well?  If
someone ones it, could they please speak up!

> ls - I suggest grabbing binutils* at prep.ai.mit.edu or any GNU mirror site.

Then we would have the FAQ 
	what are these undefined symbols 
		dl_open
		dl_close
		...
	when I try to build static binaries on Solaris 
:-)

Cheers
Russell

---

From: [email-masked] (Patrick Salsbury)
Date: Thu, 09 Mar 1995 17:25:25 -0800 (PST)

-> ~ftp/bin/ls, and it needs more shared libraries (or better, a static
-> ls - I suggest grabbing binutils* at prep.ai.mit.edu or any GNU mirror site.
-
-Then we would have the FAQ 
-	what are these undefined symbols 
-		dl_open
-		dl_close
-		...
-	when I try to build static binaries on Solaris 
-:-)
-
-Cheers
-Russell
-
	I'm using SunOS, but haven't figured out how binutils is supposed to
help me. The READMEs don't seem to offer any help, and there's no ls program
in that distribution that I can see. What am I missing?

Pat

---

From: [email-masked] (Russell Street)
Date: Fri, 10 Mar 1995 18:43:32 +1300 (NDT)

[I did not write these next two lines]

> -> ls - I suggest grabbing binutils* at prep.ai.mit.edu or any GNU mirror site.

I think he meant
	fileutils
which contains
	ls,chown,dd,du,df,chgrp,mv,cp and friends

binutils are things to play with object files, executables and other
such nasty things.

Russell

---

From: [email-masked] (Patrick Salsbury)
Date: Fri, 10 Mar 1995 16:52:42 -0800 (PST)

-Errors-To: [email-masked]
-Date: Fri, 10 Mar 1995 18:43:32 +1300 (NDT)
-From: [email-masked] (Russell Street)
-Errors-To: [email-masked]
-Reply-To: [email-masked]
-Mime-Version: 1.0
-X-Mailer: ELM [version 2.4 PL23]
-Content-Type: text/plain; charset=US-ASCII
-Content-Transfer-Encoding: 7bit
-Content-Length: 382
-
-
-[I did not write these next two lines]
-
-> -> ~ftp/bin/ls, and it needs more shared libraries (or better, a static
-> -> ls - I suggest grabbing binutils* at prep.ai.mit.edu or any GNU mirror site.
-
-I think he meant
-	fileutils
-which contains
-	ls,chown,dd,du,df,chgrp,mv,cp and friends
-
-binutils are things to play with object files, executables and other
-such nasty things.
-
-Russell
-
-
	Thanks for the clarification. I've grabbed that, figured out (I think)
how to compile statically (although the ls file came out the same size both
times....), and it's still not working. Even after I updated the libraries
with those called for by the 'ldd ls' command.

	Next? :)

Pat
-------------------------------------------------------------------------------
	  Patrick Salsbury 	                IXI/Visionware           
	Sys Admin/Webmaster             4500 Bohannon Dr., Suite #280  
	Voice: 415/325-2113	             Menlo Park, CA 94025      
	 FAX: 415/325-8710	      X/UNIX/PC Integration Specialists

---

From: [email-masked] (Russell Street)
Date: Sat, 11 Mar 1995 21:13:08 +1300 (NDT)

> with those called for by the 'ldd ls' command.

ldd.. are you using Solaris 2.{3,4}?  If so, these hacks might work
for you...

If you are using gcc, then you will want to do
	./configure --your-favourite-arguments

edit the makefiles in lib and src to add the -static option to the
definition of CC.

In src/Makefile you need to add to the end of the LIBS definition
	dl.o
and create a file called dl.c containing

	dlclose() { abort() ; }
	dlsym() { abort() ; }
	dlopen() { abort() ; }

compile dl.c with
	gcc -c dl.c
and put the .o file into the src directory
(I can't be bothered hitting the makefile to do this automatically)
then type
	make 

this should build the binaries staticly.

To check...
	$ ldd src/ls
	ldd: src/ls: file is not a dynamic executable or shared object

	$ file src/ls
	src/ls:		ELF 32-bit MSB executable SPARC Version 1, statically linked, not stripped

and
	# chroot `pwd`/src ./ls

should work.

You should also make a mental note to bitch-n-moan to Sun about not
being able to build static binaries "easily".

Hope this is of some help...
Russell

---

From: [email-masked] (Patrick Salsbury)
Date: Mon, 13 Mar 1995 13:58:14 -0800 (PST)

-> 	Thanks for the clarification. I've grabbed that, figured out (I think)
-> how to compile statically (although the ls file came out the same size both
-> times....), and it's still not working. Even after I updated the libraries
-> with those called for by the 'ldd ls' command.
-
-ldd.. are you using Solaris 2.{3,4}?  If so, these hacks might work
-for you...
	No, actually, I'm on SunOS 4.1.3, but it has 'ldd' too.

-If you are using gcc, then you will want to do
-	./configure --your-favourite-arguments
-
-edit the makefiles in lib and src to add the -static option to the
-definition of CC.
	I managed to do this, and created the static binary, as noted above,
but the size on both was the same. (Maybe it's not static, after all?)
	I passed a '-static' CFLAG to gcc on the command line in the makefile. 
Seemed to compile ok with '-static' showing up in the ouput lines, but doesn't
seem to have taken.

-In src/Makefile you need to add to the end of the LIBS definition
-	dl.o
-and create a file called dl.c containing
-
-	dlclose() { abort() ; }
-	dlsym() { abort() ; }
-	dlopen() { abort() ; }
-
-compile dl.c with
-	gcc -c dl.c
-and put the .o file into the src directory
-(I can't be bothered hitting the makefile to do this automatically)
-then type
-	make 
-
-this should build the binaries staticly.
-
-To check...
-	$ ldd src/ls
-	ldd: src/ls: file is not a dynamic executable or shared object
-
-	$ file src/ls
-	src/ls:		ELF 32-bit MSB executable SPARC Version 1, statically linked, not stripped
-
-and
-	# chroot `pwd`/src ./ls
-
-should work.
-
-You should also make a mental note to bitch-n-moan to Sun about not
-being able to build static binaries "easily".
-
-Hope this is of some help...
-Russell
-
	Hmm. Doesn't look like it worked, statically: 

(1:54pm)Mon 13#ldd ./ls
        -lc.1 => /usr/lib/libc.so.1.9
        -ldl.1 => /usr/lib/libdl.so.1.0
(1:54pm)Mon 13#l ls
-rwxr-xr-x  1 root       114688 Mar 10 16:32 ls

	Bleah. 

;^)

Pat