gnetlist may not find backends installed by pcb
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pcb |
Confirmed
|
High
|
Unassigned |
Bug Description
affects pcb
done
PCB is distributed with a gnetlist backend, 'gnet-pcbfwd.scm'. This
backend is used by PCB's 'Import' action to update a PCB layout from a
set of schematic files.
PCB's build process installs this backend to
'${pcb-
'${geda-
'${pcb-prefix}' is the same as '${geda-prefix}', the 'Import' action
will work as expected.
However, if '${pcb-prefix}' is *different* to '${geda-prefix}', gnetlist
can't find the backend. For example, this situation can arise if a user
has installed PCB from a distribution package (to '/usr') and has
installed gEDA from git (to '$HOME/geda', say).
Both 1.6.x and unstable gnetlist will fail with non-zero exit status if
they cannot load the backend.
There are two possible solutions:
- Develop 'gnet-pcbfwd.scm' as part of gEDA rather than as part of PCB.
This has the advantage of ensuring that it will be installed to the
correct place and will be kept up-to-date with changes to gnetlist,
but has the disadvantage that it may get out of sync with PCB's
actions.
- Assuming the user has a version of gEDA newer than Jan 6 2011, pass
'-L ${pcb-prefix}
path used to find backends. This has the disadvantage that it
requires the user to have a very up-to-date version of gEDA. If you
pass an '-L' option to the gEDA 1.6.x version of gnetlist, it will
output on stderr:
gnetlist: invalid option -- 'L'
and exit with status 0.
There is no workaround for this bug with gEDA 1.6.x or earlier. In
1.6.x, the '(scheme-
than adds to the path searched for Scheme files, so if a user put
(scheme-
in one of his gEDA rc files, gnetlist would still fail due to not being
able to load 'gnetlist.scm'.
My preferred solution would be:
1) Try and run gnetlist without an '-L' option.
2) If that fails, try and run gnetlist with an -L option, and try and
detect whether it worked by looking at its stderr output.
3) If that fails, ask the user to manually install 'gnet-pcbfwd.scm' to
somewhere gnetlist can find it, or upgrade gnetlist.
It is *not* a solution to assume that the '${geda-prefix}' can be
determined at compile and/or install time.
Changed in pcb: | |
status: | New → Confirmed |
tags: | added: core gnetlist |
Changed in geda-project: | |
importance: | Undecided → High |
status: | New → Confirmed |
Since people run into this bug about every 15 minutes (it's turning into a FAQ), I'm bumping it to High importance.