Mail Archives: geda-help/2014/06/18/10:54:02
Hello all!
I have recently installed the current
git://git.geda-project.org/geda-gaf and git://git.geda-project.org/pcb
on my freshly set up Wheezy-box, and now I can't create a simple pcb
from a simple circuit using gsch2pcb. (I know, that I could
alternatively use Load schematic from pcbs file menu, but I like to use
xgsch2pcb, which uses gsch2pcb, which uses gnetlist.)
The modifications I had to perform to get it all installed were:
Add '$(GIO_LIBS)' to the '<progname>_LDFLAGS = ' -assignments in the
following files:
contrib/sarlacc_schem/Makefile.am
gnetlist/src/Makefile.am
gsymcheck/src/Makefile.am
utils/gschlas/Makefile.am
My test-project is minimal. Two resistors with refdes R1 and R2 and
footprint R025 connected to a circle.
I have the following configuration files:
~/.gEDA/gafrc:
(component-library "${HOME}/gaf-neu/mysymbols")
~/.gEDA/gnetlistrc:
(component-library "${HOME}/gaf-neu/mysymbols")
~/.gEDA/gschemrc:
(load (build-path geda-rc-path "gschem-colormap-lightbg"))
(component-library "${HOME}/gaf-neu/mysymbols")
$GEDADATA is set to /usr/local/share/gEDA
when I called
gsch2pcb -v symtest.gsch2pcb
I found nonexisting dirctories in the output:
...
--------
Default m4-pcbdir: /usr/local/share/pcb/pcb/m4
--------
gnet-gsch2pcb-tmp.scm override file:
(define gsch2pcb:pcb-m4-dir "/usr/local/share/pcb/pcb/m4")
(define gsch2pcb:use-m4 #t)
...
So in utils/src/gsch2pcb.c I changed
m4_pcbdir = g_strconcat (pcbdata_path, "/pcb/m4", NULL);
...
m4_pcbdir = g_strconcat (PCBDATADIR, "/pcb/m4", NULL);
to
m4_pcbdir = g_strconcat (pcbdata_path, "/m4", NULL);
...
m4_pcbdir = g_strconcat (PCBDATADIR, "/m4", NULL);
After this, I tried again:
phil AT albus:~/gaf-neu/symtest$ gsch2pcb -v symtest.gsch2pcb
Reading project file: symtest.gsch2pcb
output-name "symtest"
schematics "symtest-page1.sch"
Processing
PCBLIBPATH="/usr/local/share/pcb/pcblib-newlib:/usr/local/share/pcb/newlib"
Adding /usr/local/share/pcb/pcblib-newlib to the newlib search path
Adding /usr/local/share/pcb/newlib to the newlib search path
Running command:
gnetlist -g pcbpins -o symtest.cmd symtest-page1.sch
--------
--------
Running command:
gnetlist -g PCB -o symtest.net symtest-page1.sch
--------
--------
Default m4-pcbdir: /usr/local/share/pcb/m4
--------
gnet-gsch2pcb-tmp.scm override file:
(define gsch2pcb:pcb-m4-dir "/usr/local/share/pcb/m4")
(define gsch2pcb:use-m4 #t)
Running command:
gnetlist -g gsch2pcb -o symtest.pcb -m gnet-gsch2pcb-tmp.scm
symtest-page1.sch
--------
--------
Running command:
rm symtest.pcb.tmp
--------
--------
Running command:
rm symtest.pcb
--------
--------
No elements found, so nothing to do.
phil AT albus:~/gaf-neu/symtest$
To me it seems, that the call to
gnetlist -g gsch2pcb -o symtest.pcb -m gnet-gsch2pcb-tmp.scm
fails, so in order to have a gnet-gsch2pcb-tmp.scm to reproduce the call
manually, I changed the code that deletes gnet-gsch2pcb-tmp.scm in
gsch2pcb.c to
if (m4_override_file)
{
if (verbose > 1)
{
printf("Leaving %s\n", m4_override_file);
}
else
{
unlink (m4_override_file);
}
}
Then I called
gsch2pcb -v -v symtest.gsch2pcb
to produce gnet-gsch2pcb-tmp.scm, and then called
gnetlist -g gsch2pcb -o symtest.pcb -m gnet-gsch2pcb-tmp.scm
symtest-page1.sch
manually:
phil AT albus:~/gaf-neu/symtest$ gnetlist -g gsch2pcb -o symtest.pcb -m
gnet-gsch2pcb-tmp.scm symtest-page1.sch
Loading schematic [/home/phil/gaf-neu/symtest/symtest-page1.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-path: ("$HOME/.pcb" ".")
gsch2pcb:m4-files: ""
---------------------------------------------------
Variables which may be changed in the project file:
---------------------------------------------------
gsch2pcb:use-m4: yes
----------------
M4 command line:
----------------
/usr/bin/m4 -d -I/usr/local/share/pcb/m4 -I$HOME/.pcb -I.
/usr/local/share/pcb/m4/common.m4 -
=====================================================
Using the m4 processor for pcb footprints
Backtrace:
In current input:
1: 0* [gsch2pcb "symtest.pcb"]
In /usr/local/share/gEDA/scheme/gnet-gsch2pcb.scm:
256: 1 (begin (set-current-output-port #) (gsch2pcb:write-top-header) ...)
293: 2* (if gsch2pcb:use-m4 (let* # # # ...) (begin # #))
295: 3 (let* (# # #) (message "Using the m4 processor for pcb footprints
") ...)
296: 4* [apply #<procedure gsch2pcb:open-io-pipe #> #]
In unknown file:
?: 5 [gsch2pcb:open-io-pipe "/usr/bin/m4" "-d" ...]
In /usr/local/share/gEDA/scheme/gnet-gsch2pcb.scm:
...
186: 6 (begin (ensure-batch-mode!) (let (# # #) (port-for-each #) (if
# #) ...))
188: 7* (ensure-batch-mode!)
/usr/local/share/gEDA/scheme/gnet-gsch2pcb.scm:188:10: In expression
(ensure-batch-mode!):
/usr/local/share/gEDA/scheme/gnet-gsch2pcb.scm:188:10: Unbound variable:
ensure-batch-mode!
phil AT albus:~/gaf-neu/symtest$
The contents of gnet-gsch2pcb-tmp.scm is:
(define gsch2pcb:pcb-m4-dir "/usr/local/share/pcb/m4")
(define gsch2pcb:use-m4 #t)
If I call
gnetlist -g gsch2pcb -o symtest.pcb symtest-page1.sch
(without -m gnet-gsch2pcb-tmp.scm)
I don't get an error.
I don't know much about scheme, so I have no clue what's going on, here.
And this is where I ask for help.
- Raw text -