EEVblog Electronics Community Forum
Electronics => PCB/EDA/CAD => KiCad => Topic started by: Brian Swatton on April 06, 2014, 10:02:37 pm
-
I'm a relatively new user to kicad, previously using DesignSpark. I liked DS but am trying to ditch the last windows xp machine and use linux instead. DS was a bit overpowered for what I needed anyway.
My OS is Ubuntu Studio 12.04LTS, i originally installed kicad from the software centre, it ran ok, but it was a very old version. After trying out redoing an existing design of mine with it, I thought I'd like to update the program.
I've added the kicad ppa and used apt-get to get the latest version, but am running into problems with footprint tables not accessing the modules that were installled into /usr/share/kicad/modules, I note the KISYSMOD variable isn't being set to this either. On further reading it seems I have masses of table editing to do?
I've have had some experience with linux, but no expert. Have I made a mistake in trying to get the latest build working? It is dated 25 jan 2014, where I've now seen the last 12.04LTS stable was 18 may 2013. Should I remove the latest and put that on, or am I only pushing bacxk problems for a while?
Any pointers appreciated.
-
I can not help with your specific problem, but:
I build from source whenever I see an interesting bug fixed, or feature added. There is a script to automate this here: http://bazaar.launchpad.net/~kicad-product-committers/kicad/product/view/head:/scripts/kicad-install.sh (http://bazaar.launchpad.net/~kicad-product-committers/kicad/product/view/head:/scripts/kicad-install.sh)
I set environment variables in ~/.bashrc, rightly or wrongly...
There is a users mailing list hosted by yahoo, but I can't remember the url off the top of my head. Found it... http://tech.groups.yahoo.com/group/kicad-users/ (http://tech.groups.yahoo.com/group/kicad-users/)
More interesting links here, if you haven't found it yet: https://launchpad.net/kicad (https://launchpad.net/kicad)
-
Should I remove the latest and put that on, or am I only pushing bacxk problems for a while?
I haven't used it on linux but I feel you may as well start with the newer library system. Otherwise any work you do now will be difficult to manage in future.
So find a version, the latest that you can get working. To do this you will have to set those environment variables.
Then do the table editing.
This is obviously best done via script or spreadsheet. People have written scripts on this blog for this but I haven't used them.
Hopefully this will all be streamlined soon. Pls.
-
I haven't got it workig either after switching to nighly.
The table resides in yor home directory. It's called fp-lib-table.
-
Thanks guys, I too think I should be trying to get the latest footprint method working.
I did manage to get the table built eventually, by using a script I found on this forum, but I had to copy my modules dir to my home before the script would run properly in it. I removed ${KYSYSMOD} and put /usr/share/kicad/modules for the path instead.
The table got built and at first I could then select footprints in CvPCB. Unfortunately when I re-ran it they had disappeared again.
I haven't had opportunity to look closer at it since and won't be able to until later today now.
I'm pretty keen to make this work. I'll post here if I make any progress.
-
In Windows I had something like that disappearing table problem.
Now when I run Kicad I run it from Batch file and set the environment variables in the batch file.
I appreciate this may not help you one bit, but here it is just in case.
@ECHO OFF
SET KICAD=%CD%
SET KIGITHUB=https://github.com/KiCad
SET KISYSMOD="C:\Kicad\KicadLibs\Footprints"
SET KISYS3DMOD="C:\Kicad\KicadLibs\3D-Models"
SET KIGITHUB="C:\Kicad\KicadLibs\Templates"
.\kicad.exe
-
I (seem to) have it working by creating the following symbolic link in my home directory:
ln -s /usr/local/share/kicad/template/fp-lib-table.for-github ./fp-lib-table
-
Well, it seems to be working. I added a github entry which worked. Shortly after, I realised I could select components and see their local footprints again too. Not sure if those things related.
There certainly seems to be something awry with KISYSMOD, it doesn't seem to be being set where CvPCB.pdf claims, and it doesn't help to set it manually it seems. I have noticed the configure button in the cvpcb's toolbar doesn't respond either.
Thanks for the help anyway, much appreciated. I'll stick with it for and see how we get on.
-
Heh, I spoke too soon. The very next part of the workflow doesn't run at all, the program "pcbnew".
If I run it from terminal it gives errors too :
x--
brian@Office:~$ pcbnew
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/__init__.py", line 45, in <module>
from wx._core import *
File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 4, in <module>
import _core_
ImportError: /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so: undefined symbol: PyExc_ValueError
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
from apport.report import Report
File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
from xml.parsers.expat import ExpatError
File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: /usr/lib/python2.7/lib-dynload/pyexpat.so: undefined symbol: _Py_ZeroStruct
Original exception was:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/__init__.py", line 45, in <module>
from wx._core import *
File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 4, in <module>
import _core_
ImportError: /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so: undefined symbol: PyExc_ValueError
Segmentation fault (core dumped)
brian@Office:~$
x--
Ho hum...
-
Looks like python is not working on you machine.
You might be running different versions of python.
If you can set your environment to run python 2.7, then check python runs ok.
Then set kicad up to run with the same environment then it might be ok.
Something like
http://scipher.wordpress.com/2010/05/10/setting-your-pythonpath-environment-variable-linuxunixosx/
(http://scipher.wordpress.com/2010/05/10/setting-your-pythonpath-environment-variable-linuxunixosx/)
Keep a record of what you changed as some of your other apps will like like a different version of python.
-
Thanks, looking into python now, this is new to me. I have nothing set in $PYTHONPATH or $PYTHON already, that is for sure.
I couldn't find the .bashrc or .bash_profile in /etc, only bash.bash_rc
I do seem to have python versions 2.7, 3 and 3.2 here in /usr/lib
Should I be setting (one or both) variables in a command shell to point at 2.7, and then starting the program from there to test the theory? or do I need to alter the startup files that I haven't found yet?
-
There is a bug report on this, go to the bottom.
https://bugs.launchpad.net/kicad/+bug/1299217 (https://bugs.launchpad.net/kicad/+bug/1299217)
Seems if you are not building it then use an earlier version.
If you are building it then you disable wxPython.
Another reference to this.
https://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg07958.html (https://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg07958.html)
good luck, hopefully they will get over the hump soon and start favouring stability over changes.
-
Ok, thanks. I had a read but it's all way over my head.
I think I'll try and remove this version and go back to the last 12.04LTS stable I found previously.
-
Free software isn't always worth the effort involved. Sometimes paying for something that just works is better, and KiCad is one of those cases, if you need a recent version, in my personal opinion. I'm not saying that I'm right and all KiCad users are wrong.
It is unlikely that I will ever use KiCad due to the build problems on Windows, and I won't ever use Linux as a desktop again, both due to the work involved in order to just get the tools up and running satisfactorily. YMMV.
-
Free software isn't always worth the effort involved. Sometimes paying for something that just works is better, and KiCad is one of those cases, if you need a recent version, in my personal opinion. I'm not saying that I'm right and all KiCad users are wrong.
Your right there isn't always one answer, but I do like Kicad, hated the short time I tried Eagle. Had a lot of trouble with Altium Reader so didn't feel the need to fork out large sums of money for the design package.
I have probably been burned more often by Purchased software than Free software, and I especially hate frigging around trying to validate licences that you have bought and doing it again every time you change computer or whatever.
Latest example is Avast anti virus. I just purchased an extension licence but because i haven't given them my bank account details I think have to put the licence on every computer manually. IDK why I bought the damn thing I clicked the button that said renew your licence, did everything and it still gives me warnings that virus protection is about to run out. It also says that the licence starts when you purchase it not when it is installed, so I have lost a few days there. Why why why?
That said the software itself seems good.
-
ubuntu is a derivation of debian so maybe this will help, I'm not on anything related to either and it gave me the info I needed. I needed to build a custom kicad and it was painful. Between cmake and wxwidgets and broken kicad cmake files and some other things it was a a nightmare. Please note I said "maybe".
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=736180
Quote:
"Finally i was success with the testing's KiCad version. Steps below.
Whole problem is coming from the change of footprints/modules syntax.
The KiCad was moved from the .mod files to the .pretty directories. But
this behavior became default from the bzr revision r4535, and the
library repository was changed and the .mod files was removed from it.
But old footprints repository is archived here:
https://code.launchpad.net/~dickelbeck/kicad/library-read-only
The new .pretty footprints format seems to be nice, because KiCad is
moving from libraries where more footprints was in one common file(s)
and new format is only one footprint in one .mod file and librery is
the directory which name ends with .pretty.
How to get old .mod files back to KiCad:
1, clone the bzr repo somewhere (i use the /tmp dir):
cd /tmp
bzr branch lp:~dickelbeck/kicad/library-read-only
2, make and install it:
cmake .
make
sudo make install
- they will be installed into /usr/local/share/kicad, where kicad
can find them
3, create the footprints.pdf:
cd /usr/local/kicad/modules/footprints_doc
psmerge -ofootprints.pdf merge_ps-files.ps
Due naming changes (mostly only uppercase), the kicad.pro
need to be updated:
1, copy /usr/share/kicad/template/kicad.pro somewhere into writable dir
1a, open copied kicad.pro in kicad
2, open cvpcb from kicad, go to Preferences - Libraries, remove all
missing libraries and add new from /usr/share/kicad/modules/
2a, if one want, do the same for the Footprint alias files
3, open pcbnew from kicad, go to Preferences - Libraries, check
that libraries was changed
3b, set the path to the footprints.pdf
4, close kicad
5, copy kicad.pro back to the /usr/share/kicad/template/ (need root)
I suggest to make backup of the kicad.pro file, because it will be
changed on kicad-common update. Or do dpkg-divert on it...
To make the "New from template" to work, one can create symlink:
cd /usr/share
sudo ln -s kicad/template template
The steps need to do for all old .pro files or delete the project file
and create the new one..."
One other thing (of way too many), the library mentioned was recently modified, the last commit removed all the files so you need to use the -r flag to bzr and use the next to last revision.
-
It's working ok since the last few days :)