delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/10/21/15:38:02

From: paolog AT net4u DOT it (Paolo Greppi)
Subject: NEWBIE PAIN: the universal remedy
21 Oct 1996 15:38:02 -0700 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <1.5.4.32.19961021195050.002a4b94.cygnus.gnu-win32@net4u.it>
Mime-Version: 1.0
X-Sender: paolog AT net4u DOT it
X-Mailer: Windows Eudora Light Version 1.5.4 (32)
Original-To: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Hi to everybody !

In the attempt to help the progress of the project I send a summary of
instructions about installing and setting up cygwin32.

GnuWin32.txt - 20.10.1996
****************************************************************************
*********
Terence Ripperda <ripperda AT engin DOT umich DOT edu> wrote:
"Perhaps we should all submit any problems we've had setting this up on our 
systems (no matter how obscure the error) and form a new faq on installing 
the software for newcomers.."

Geoffrey Noer <noer AT cygnus DOT com> answered:
"I agree.  I'd be glad to have more/better information up on how to install
everything.  I would like it better if the list was primarily for technical
discussion and announcements instead of a forum for basic help.
What needs to change?  What's incomplete?"

This is MY attempt.
It is limited by my ignorance; moreover, I can not read the listserv traffic
between 1.5.1996 and 9.10.1996.
Grammar corrections, suggestions, new ideas and differencies that hold for 
Win95 are welcome.

How to install the gnu-win32 development tools.
----------------------------------------------

The following is (possibly) valid for beta16 and NT 3.51, under the
assumpion that the
Administrator is the one and only user (no multiple .bashrc and no proper
set up of
permissions).

Nothing is said here about the windows32api package or other specific tools.

NOTE1: I have a personal idea of how things should be made, but I try to put 
	here ALL the various solutions that heve appeared.
	FYI my path is: Ia, IIa, IIB, IIIc
NOTE2: you will always have to understand yourself when e:\root should be
	read / and so on since I did not care to keep consistency between
	dirs. This expecially when I cite ideas from others ...
NOTE3: I broke several lines for readabilty reasons only.

I) DOWNLOADING
--------------

You have here 2 options: with gzip/tar (UNIX fan option) or with unzip.

Ia) gzip/tar
 1) download the files (notice the extension .tar.gz is equivalent to .tgz):
	one.tar.gz
	two.tar.gz
	three.tar.gz
	four.tar.gz
	five.tar.gz
    from ftp.cygnus.com:/pub/gnu-win32 or mirrors
Ib) unzip
 1) download the files:
	one.zip
	two.zip
	three.zip
	four.zip
	five.zip

If you want to use c++, download also libs.zip from the beta14 distribution.

In case you use gzip/tar and you want to work confortably you need 14,468 kb
for the 
compressed files, 37,662 kb for the tarred files and another 37 Mb for
the extracted files.
With unzip you need less, and even more you can save if you are tricky, but at
the end you will have anyway + 37 Mb on your HD.

II) EXTRACTING AND MOUNTING (if required)
-----------------------------------------

At this point you may choose the best directory structure that fits for you.

The POSIX subsystem sees directories in a different way in respect to DOS or 
NT (Bill choose the backslash to differentiate \DOS from /UNIX...). 
It is adviseable to set up everything on a NTFS partition, since POSIX 
support is guaranteed to work only there.

Any parameters consisting of filenames or paths should be in the POSIX format; 
the separator between dir names is slash / and not backslash, and hard drive
names 
are written //d/ and not d:\
	type d:\tmp\pippo
becomes under bash:
	cat //D/tmp/pippo
The unix idea of how dirs are organized is controlled by mount (see
following) and
links (hard ones and symbolic ones) - in this release this 2nd magic does
not work
anyway ...

I see at least three alternatives:
A) let some physical disk root (for example e:\) be the seat for the unix root 
   and create on it the following directories or anything similar:
	e:\bin
	e:\usr <-- cygnus directory
	e:\tmp
   this is the suggested way to do it, from Cygnus (they say to create a 
   Cygnus dir).

B) to avoid chaos on e: make everything under e:\root
	e:\root\bin
	e:\root\usr <-- cygnus directory
	e:\root\tmp
   This is the solution I like.
   Like Alex P. Madarasz puts it: "a single GNU 'mount' command will let me 
   establish 'E:\root' as '/', and  the other subdirs will then fall into the 
   required / desired Unix tree automagically".
C) hybrid solution - do as adviced by Steve Willer <willer AT sq DOT com>
   create c:\cygnus <-- cygnus directory
   create c:\bin and copied "sh.exe" from cygnus\h-i386-cygwin32\bin to \bin
   NOTE: in this case you don't have to mess around with mount
BTW: Mount is part of the UNIX paradigm.
     It allows UNIX machines to set up after every boot a proper directory
     structure, independent from the physical drives.
     As implemented in cygwin32 API though it works differently: you don't
     have to set up any script or configuration file since the mount table
     is recorded in the Registry and you make it ONCE FOR ALL.
     (see HKEY_CURRENT_USER\Software\Cygnus Support\CYGWIN.DLL setup\b15.0\
     mounts)
     I don't therefore see any advantage in avoiding mount.
     NOTE: except you will have occasionally to paste the Registry ;-)

After you created the directories, you extract the stuff using gzip/tar or
unzip.
GO in the directory maked above with <-- cygnus directory and:
 IIa) unpack the gzipped archives using 
	gzip -d one.tar.gz
	...
   you can find gzip.exe for NT on:
   	ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/...
	ftp.cica.indiana.edu/winnt/misc/gzip.zip
   untar the tar archives using
	tar xvf one.tar
	...
	NOTE: the tar program will give you several "couldn't 
		change access and modification times of ..." warnings -
		this is normal
		You will also get some "cannot link to ..." errors and these
		are worse - but it copies the files and this is OK.
   you can find this utility on:
	ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/...
	ftp.cica.indiana.edu/winnt/misc/tar.zip

 IIb) unpack the zipped archives using 
	unzip -x one.zip
	...
    I tell you you better use a proper unzipper, that recognises long path- 
    and file-names. I advice UnZip 5.0p1 of 12 January 1993, to be found on:
	ftp://ftp.csusm.edu/pub/winworld/nt/unzipnt.zip

At this point, if you want to do C++ take the libs.zip and extract only the file
lib/libstdc++.a and copy it over e:\root\usr\H-i386-cygwin32\lib\libstdc++.a

If you took route A or B you must now mount something (change dir names as 
required). Do the following from the CMD.EXE prompt while you are in the 
e:\root\usr\H-i386-cygwin32\bin (or whatever) directory.
 IIA)
	mount e:\usr /usr
	mount e:\tmp /tmp
	mount e:\usr\H-i386-cygwin32\bin /bin
      NOTE: I mount the /usr/bin on /bin, so I am sure everything is at the
      right place.
      Steve Willer <willer AT sq DOT com> advice on the other side is materially 
      copy sh.exe:
	"c) created a "bin" directory off root on my C: drive
	d) copied "sh.exe" from cygnus\h-i386-cygwin32\bin to \bin"

 IIB)
	umount /
	mount e:\root /
	NOTE: if this does not work, you will have to edit the Registry.
		for example if mount says "/ busy" from the very 1st time you
		try to mount e:\root on it, take CMD.EXE and digit START REGEDT32
		(BE CAREFUL NOW !!!!) 
		Take the key HKEY_CURRENT_USER\Software\Cygnus Support and delete it
		(this resets everything) then call mount once; you wiil have now the
		defaults in the registry - set to "e:\root" the key
		HKEY_CURRENT_USER\Software\Cygnus Support\
			CYGWIN.DLL setup\b15.0\mounts\04\native
		and be happy.
      now copy sh.exe and bash.exe from /usr/bin to /bin

In any case you should care to see if these settings:
	\\.\tape1:       /dev/st1
	\\.\tape0:       /dev/st0
	\\.\b:           /dev/fd1
	\\.\a:           /dev/fd0
(that are the default mount takes when started for the 1st time) apply.
NOTE: there seems to be no way to take them away ... 

III) ENVIRONMENT
----------------

You basically must allow:
1) CMD.EXE to find cygwin32.dll 
2) CMD.EXE to find bash.exe
   To do the both simply put e:\root\usr\H-i386-cygwin32\bin in front
   of your path (you can do this in two different ways - see IIIa and IIIb)
moreover, 
3) if you want to compile under COMMAND, the paths for the include and the
   libraries must be available to the CMD.EXE
4) otherwise, if you do the development under bash you can put these
   initializations in the .bashrc file

As stated at the beginning these instructions apply to "almost single user"
set ups,
so I use only one .bashrc, located in the UNIX root (also /.bashrc)
To edit .bashrc, use notepad.exe !

Another BIG choice is presented now: do you want to use ONLY cygwin32 or you
have other SDKs around ?

 IIIa) you want to use only cygwin32 and you want to compile under CMD.EXE
       as Alex Madarasz (72537 DOT 707 AT compuserve DOT com) put it:
       "4. Start the NT 'Control Panel' and open up the 'System' icon.
       - Under 'System Environment Variables', find the 'Path' variable,
       and edit it (...omissis...) This will cause any app searching the
       path to always find the GNU Win32 apps first, before the NT/DOS
       utils like FIND.EXE, MKDIR.EXE, etc. and before any Resource Kit
       utilities.
       - Under 'User Environment Variables for ...', add an entry with
       the variable name of (...omissis...)
       - Select 'OK' to exit the 'System' dialog, and exit 'Control
       Panel'
       5. Logout then login. The edits you made to environment variables
       above will not take effect until you do (you were editing entries
       in the NT Registry, and NT reads those entries on login)."

       see the section "IIIa and IIIb" now

 IIIb) you want to use other SDK or compilers (like RSX) and you want to 
       compile under CMD.EXE.

       do like Steve Willer <willer AT sq DOT com>:
	"e) changed my autoexec.bat so that c:\bin was first in the path
	   and c:\cygnus\h-i386-cygwin32\bin is somewhere in the middle of the
	   path (it's up to you where you put it, but be sure to put
	   it before any other directory that has "make", like Borland C++)
	f) set these other environment variables:
	   (...omissis...)
        Note1: under NT you must modify the AUTOEXEC.NT or copy it in
               AUTOEXEC.CYG ... then create a new Console PIF and specify
               you want to boot it with the settings you like ...
        Note2: you will possibly encounter problems with the path length - 
               there seems to be a limit of 127 chars or so.

       see the section "IIIa and IIIb" now
        
 IIIa and IIIb) 
	Steve Willer <willer AT sq DOT com> writes:
		GCC_EXEC_PREFIX=/cygnus/h-i386-cygwin32/lib/gcc-lib/
		C_INCLUDE_PATH=/cygnus/h-i386-cygwin32/i386-cygwin32/include
		CPLUS_INCLUDE_PATH=
		/cygnus/h-i386-cygwin32/i386-cygwin32/include:
		/cygnus/include/g++"
	(these seem to have been set from within .bashrc: if you put them in
	 the Contro Panel or in AUTOEXEC.CYG use e:\root\)
	Bret A. Schuhmacher <bas AT wn DOT com> reports:
		Needed to set C_INCLUDE_PATH.
	Cyriaque.Rioux <Cyriaque DOT Rioux AT cdc DOT com> writes:
		set GCC_EXEC_PREFIX=c:\gnu\h-i386-c\lib\gcc-lib\
		set PATH=%PATH%;c:\gnu\h-i386-c\bin
		set INCLUDE_PATH=c:\gnu\h-i386-c\i386-cyg\include
	Laurent POULAIN (poulainl AT club-internet DOT fr or poulainl AT mygale DOT org)
	(see his http://www.mygale.org/05/poulainl/index_us.htm FAQ) writes:
		set COMPILER_PATH=/usr/bin
		set C_INCLUDE_PATH=/usr/include
		set CPLUS_INCLUDE_PATH=/usr/lib/g++-include;/usr/include
		set LIBRARY_PATH=/usr/lib
		set TMPDIR=/temp

	To say you the truth I put both Steve's and Laurent's variables 
	and things seem to work almost OK.

	For the famous "No CPP in cygwin32 for NT" error, you must put BOTH:
		/usr/H-i386-cygwin32/bin AND 
		/usr/H-i386-cygwin32/lib/gcc-lib/
	in the path !

 IIIc) As I do, you use bash for development and you just use your programs
       and the tools (tar ...) from the CMD.EXE.
       In this case do like in IIIa or in IIIb, but inizialize only HOME as /.
       Put the .bashrc in / and put there any other variable or path 
       definition - take them from the "IIIa and IIIb" section, BUT convert
       paths to UNIX and don't forget 
		export PATH
		export C_INCLUDE_PATH
		...
       at the end.

For justice's sake, here is my .bashrc:
	
	alias ll=ls -l
	
	PATH=/bin:/usr/bin:/usr/H-i386-cygwin32/bin:
		/usr/H-i386-cygwin32/lib/gcc-lib/:
		//F/WINNT35/system32:
		//F/WINNT35:
		//C/DOS:
		//C/UTILITY
	GCC_EXEC_PREFIX=/usr/H-i386-cygwin32/lib/gcc-lib/
	C_INCLUDE_PATH=/usr/include:
		/usr/H-i386-cygwin32/i386-cygwin32/include
	CPLUS_INCLUDE_PATH=/usr/include:
		/usr/H-i386-cygwin32/i386-cygwin32/include:
		/usr/include/g++
	
	COMPILER_PATH=/usr/bin
	LIBRARY_PATH=/usr/lib
	TMPDIR=/tmp
	
	export GCC_EXEC_PREFIX
	export C_INCLUDE_PATH
	export CPLUS_INCLUDE_PATH
	export PATH
	export COMPILER_PATH
	export LIBRARY_PATH
	export TMPDIR

	cat /.bashrc
	# just to see something happens ...

!---------------------------------------------------------------!
!                         Paolo Greppi                          !
!                        via  Cesati 12                         !
!                 13100   Vercelli  -   Italia                  !
!      Telefono 0039-161-256081  E-Mail paolog AT net4u DOT it         !
!---------------------------------------------------------------!

-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019