gEDA/PCB on Cygwin

How to compile and install gEDA/PCB on Cygwin.


About three years ago, I was in need of a test layout for an important pre-series, but our CAD department was lonely and deserted...

Some 100kEuro machines, fully equipped with finest tools from Mentor, Zuken, LPKF and others, were doing nothing else but creating heat and entropy...

The circuit was far too complex and the components too small for a manual soldering orgy...
The Eagle Notebook, yes! The last resort... It saluted with a bluescreen and could not be turned on again...
Damn, all I needed was a "little" layout and some gerber files for our milling-machine-technician.

That was the time I remembered PCB and gEDA (I had a Linux installation at home several years before)...
Although PCB was available as a native Windoze binary these days, I still needed a schematic entry tool, but unfortunately I had nothing else but Cygwin available...
Should this work?

Google did not find anything useful on this, so I tried it by my own.
And yes, it indeed can be done...


The latest major release of Cygwin (12/2009), PCB (11/2009) and gEDA/gaf (10/2009) required an updated to this page (3/2010).
And let me tell you:
Installing gEDA, PCB and the rest of the tools was never easier!


I assume you are already familiar with:

  • Cygwin
  • handling UN*X systems
  • building (or even better developing) programs and reading or interpreting compiler/linker error messages output
  • the usual patience...

Otherwise, you probably won't get far and should try out one of the free versions of Cadstar, Eagle, Target or Kicad...

Cygwin Installation

If you have any older versions than v1.7, the new major release (12/2009), installed, you are advised to create a backup copy, delete your old system and do a fresh Cygwin install...

As usual, download Cygwin's setup.exe and install the base system, if not already available...

Install the following additional packages.

Note #1: Sometimes "setup.exe" crashes while downloading or installing.
Don't spend too much time adding these packages all at once. If the setup tool locks up, you have to start and select it once more, and more and more. This can be very frustrating...
I usually do not add more than ~10 clicks at once... (But may be this version of setup.exe improved???)

Note #2: Not all of these are required by gEDA/gaf (e.g.: joe, mc, ...) but clicking them will automatically select other packages...

Here we go:

  • autoconf
  • automake
  • binutils
  • bison
  • boost
  • boost-devel
  • flex
  • gcc (upgrade helper)
  • gettext-devel
  • guile-devel
  • libjpeg-devel
  • libncurses-devel
  • libtool
  • make
  • pkg-config
  • readline
  • joe
  • mc
  • libpng12-devel
  • libglib1.2-devel
  • libglib2.0-devel
  • libglib2.0_0
  • libgtk1.2-devel
  • libgtk1.2_0
  • libgtk2.0-devel
  • libgtk2.0_0
  • libgdk_pixbuf_xlib2.0-devel
  • libgdk_pixbuf_xlib2.0_0
  • libgif-devel
  • libpango1.0-devel
  • libjpeg-devel
  • gawk
  • libgmp-devel
  • libgmp3
  • libstdc++6-devel
  • wget
And the x-windows environment.
The easiest way is to select any x-application (e.g.: xpdf, lyx, xfig, ...). This will install (almost) all required packages.

Additionally:

  • xorg-server
  • xorg-scripts
  • xterm
  • font-adobe-dpi100
  • ... any other fonts you need
  • xfontsel
  • xhost
  • xauth
  • xinit

Get a complete list of installed packages here.

If you never used Cygwin before, this little customization might come in handy:


Edit (or create) "$HOME/.bashrc" and add these at the end:
			
  export EDITOR=/usr/bin/joe
  export PS1="\w:"
  alias d='ls -la --color'      
  alias t='xterm -bg black -fg white -ls -fn 10x20'	
			


Edit "/bin/startx" and change the line...
			
  defaultserverargs=""    
			

...to:
			
  defaultserverargs="-multiwindow"        
			


Copy "/etc/X11/xinit/xinitrc" to "$HOME/.xinitrc" (renaming it), and replace...
			
  twm &
  xclock -geometry 50x50-1+1 &
  xterm -geometry 80x50+494+51 &
  xterm -geometry 80x20+494-0 &
  exec xterm -geometry 80x66+0+0 -name login    
			

...by:
			
  xterm -bg black -fg white -ls -fn 10x20
			


just type:
			
  startx
			

to fire up the x-server and the xterm (from ".xinitrc", above). Closing this xterm will close the x-server too.

gEDA/gaf Installation

Download gEDA/gaf and slam it into an empty directory in your $HOME environment.


unpack it:
			
  gzip -dc geda-gaf-1.6.0.tar.gz | tar -xvf -			
  cd geda-gaf-1.6.0
			


configure it:
			
  ./configure --disable-update-xdg-database			
			

and pray...
If any of the tools/libraries/whatever is missing, configure will abort with an error message. Check the installed packages and run configure again, until it ends cleanly.


build it:
			
  make
			

Note: The default behaviour of Cygwin is, that it includes all your Windoze system paths.
If you have any other "make" installed (like I have):
  • remove your Windoze "make" from the path
  • or type "/usr/bin/make" instead of just "make"
Although "configure" checked most of the depedencies before, the make process might bring up additional compiler or linker messages. Just check the output and install the missing libs.


install it (defaults to /usr/local if not overridden by "./configure"):
			
  make install
			


test it:
			
  gschem
			

If this fires up the schematic entry application: Congratulation...

PCB Installation

The installation of PCB should be pretty straightforward:
  • download the Windoze binary of PCB here
  • install it


You can save a lot of clicks if you set the PCB working path to your gEDA directory in your Cygwin $HOME environment: Just enter the Cygwin path here.
Although your Windoze version might use different languages, this should not really be a problem for you, right? ;-)
Ignore this ;)
The "load" dialog now directly opens up in your gEDA directory...


The last thing you need to do is to copy the Windoze-PCB "share\pcb" folder, e.g...

  c:\windoof\PCB\share\pcb
			

...to the Cygwin gEDA component directory. Usually:

  /usr/local/share
			


Otherwise gsch2pcb, the main gEDA - PCB interface is not able to find the components:
			
~/Dokumente/geda/Test:gsch2pcb.exe kekse.sch 
=====================================================
gsch2pcb backend configuration:

   ----------------------------------------
   Variables which may be changed in gafrc:
   ----------------------------------------
   gsch2pcb:pcb-m4-command:    /usr/bin/m4
   gsch2pcb:pcb-m4-dir:        /usr/local/share/pcb/m4
   gsch2pcb:pcb-m4-confdir:    /usr/local/etc/pcb
   gsch2pcb:pcb-m4-path:       /usr/local/share/pcb/m4  /usr/local/etc/pcb  $HOME/.pcb  .
   gsch2pcb:m4-command-line:   /usr/bin/m4 -d  -I/usr/local/share/pcb/m4 \
	   -I/usr/local/etc/pcb \
	   -I$HOME/.pcb -I. /usr/local/share/pcb/m4/common.m4 - >> kekse.pcb

   ---------------------------------------------------
   Variables which may be changed in the project file:
   ---------------------------------------------------
   gsch2pcb:use-m4:            yes

=====================================================
Using the m4 processor for pcb footprints
/usr/bin/m4: cannot open `/usr/local/share/pcb/m4/common.m4': No such file or directory
R3: can't find PCB element for footprint 1206 (value=unknown)
So device R3 will not be in the layout.
R2: can't find PCB element for footprint 1206 (value=unknown)
So device R2 will not be in the layout.
R1: can't find PCB element for footprint 1206 (value=unknown)
So device R1 will not be in the layout.
No elements found, so nothing to do.
			

Using it

I temporarily removed this section. It might come back if I find a little time...
Nowadays, threre's plenty of information about gEDA/gaf and PCB available on the web, just open your eyes 8)

Download

gEDA/PCB gimmicks:

DOWNLOAD: removed (03/2010)




ASkr 10/2006 initial version
ASkr 03/2010 update (aka.: completely new) for Cygwin v1.7