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:
- 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
Eagle, Target or
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:
And the x-windows environment.
- gcc (upgrade helper)
The easiest way is to select any x-application (e.g.: xpdf, lyx, xfig, ...).
This will install (almost) all required packages.
- ... any other fonts you need
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:|
alias d='ls -la --color'
alias t='xterm -bg black -fg white -ls -fn 10x20'
Edit "/bin/startx" and change the line...
Copy "/etc/X11/xinit/xinitrc" to "$HOME/.xinitrc" (renaming it), and replace...
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
xterm -bg black -fg white -ls -fn 10x20
to fire up the x-server and the xterm (from ".xinitrc", above).
Closing this xterm will close the x-server too.
Download gEDA/gaf and slam it into an empty directory
in your $HOME environment.
gzip -dc geda-gaf-1.6.0.tar.gz | tar -xvf -
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.
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):
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
- remove your Windoze "make" from the path
- or type "/usr/bin/make" instead of just "make"
install it (defaults to /usr/local if not overridden by "./configure"):
If this fires up the schematic entry application: Congratulation...
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...
...to the Cygwin gEDA component directory. Usually:
Otherwise gsch2pcb, the main gEDA - PCB interface is not able to find the components:
gsch2pcb backend configuration:
Variables which may be changed in gafrc:
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$HOME/.pcb -I. /usr/local/share/pcb/m4/common.m4 - >> kekse.pcb
Variables which may be changed in the project file:
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.
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
DOWNLOAD: removed (03/2010)
ASkr 10/2006 initial version
ASkr 03/2010 update (aka.: completely new) for Cygwin v1.7