← Back to team overview

kicad-developers team mailing list archive

Re: pcbnew hang

 

On 6/17/2013 2:10 PM, Dick Hollenbeck wrote:
> On 06/17/2013 11:34 AM, Wayne Stambaugh wrote:
>> On 6/17/2013 6:19 AM, Chris Morgan wrote:
>>> It looks like I won't be able to test the fix here. The
>>> flag, /wxDIR_NO_FOLLOW/, appears to have been added in wxWidgets 2.9.5
>>> according to the documentation.
>>>
>>> http://docs.wxwidgets.org/trunk/dir_8h.html#aa45988fae9ce0d0c4f8312a6cf026232a25c09a8059a40281ca2d7919d84b4941
>>>
>>> But on Kubuntu 13.04 wxWidgets is version 2.8.12.....
>>>
>>> Chris
>>
>> Even if you had wxWidgets 2.9.5 installed (which isn't even released
>> yet), adding wxDIR_NO_FOLLOW still wouldn't work.  I just looked at the
>> the latest source code of dircmn.cpp in the wxWidgets repo and the
>> wxDirTraverserSimple is still the same as 2.8.12.  It looks like the
>> wxWidgets folks only added the new flag to <wx/dir.h> and haven't gotten
>> around to implementing anything with it yet.  The latest commit message
>> for dircmn.cpp is:
>>
>> "Change the way directory iteration flags are constructed.
>>
>> Instead of explicitly constructing the flags from the flags that should
>> be included, construct them by excluding the flags that shouldn't be
>> used. This makes the code more stable in the sense that it will continue
>> to work when new flags, such as the upcoming wxDIR_NO_FOLLOW, are added.
>>
>> See #14542."
>>
>> It looks like they already know about this problem and there is a bug
>> report filed against it.  You will have to remove your broken symlinks
>> to resolve your issue for now.  I looks like I have another task on my
>> list to find a solution in order to get the footprint library table
>> implemented... Sigh!!!
>>
>> Wayne
> 
> 
> Solutions, none of which are mutually exclusive:
> 
> 
> 
> Solution A:
> ===========
> 
> $ export KISYSMODS=/usr/local/share/modules
> C:>set KISYSMODS=C:/kicad/share/modules
> 
> This can be done as part of the desktop icons or program launchers, or other more
> permanent place.
> 
> On linux a person could do this to capture a temporary setting of the environment variable
> just before launching the application called kicad:
> 
> 
> KISYSMODS=/usr/local/share/modules kicad
> 
> 
> this text is actually a reasonable choice for the desktop shortcut.
> 
> 
> 
> 
> 
> Solution B:
> ===========
> 
> // Path list for KiCad data files
> static wxString    s_KicadDataPathList[] = {
> #ifdef __WINDOWS__
>     wxT( "c:/kicad/share/" ),
>     wxT( "d:/kicad/share/" ),
>     wxT( "c:/kicad/" ),
>     wxT( "d:/kicad/" ),
>     wxT( "c:/Program Files/kicad/share/" ),
>     wxT( "d:/Program Files/kicad/share/" ),
>     wxT( "c:/Program Files/kicad/" ),
>     wxT( "d:/Program Files/kicad/" ),
> #else
>     wxT( "/usr/share/kicad/" ),
>     wxT( "/usr/local/share/kicad/" ),
>     wxT( "/usr/local/kicad/share/" ),   // default data path for "universal
>                                         // tarballs" and build for a server
>                                         // (new)
>     wxT( "/usr/local/kicad/" ),         // default data path for "universal
>                                         // tarballs" and build for a server
>                                         // (old)
> #endif
>     wxT( "end_list" )                   // End of list symbol, do not change
> };
> 
> 
> Scrap the above in gestfich.cpp.
> 
> Go instead to a CMake "datapath" variable, something like CMAKE_INSTALL_PREFIX, but data
> specific.  (Must we always assume that application code and application data are tied
> together, please no.)  And generate the correct path from from a cmakedefine in
> config.h.in.  Then simply hard code that path in your code now, rather than guesstimating
> it.

This will work when installing from source and probably work well for
developers.  The downside to this is the NSIS windows installer allows
you to change the default install path to where ever the user chooses.
So hard coding the path will be problematic on Windows.  The other
option is to have the NSIS installer set KISYSMOD to the install path
for all users.  The guesstimating was for existing installations.  Since
the library search path is already valid and is one of the entries in
the library search list, on the surface it made sense to find the path
with the most libraries and use that path for KISYSMOD if it wasn't
already set.  Certainly a hard coded path would make my job a lot easier.

> 
> On the unrelated subject of CMAKE_INSTALL_PREFIX, what we have now is the possibility that
> someone sets CMAKE_INSTALL_PREFIX into a wild blue yonder, and that the wild blue yonder
> dir is not in the list above, not even in "end_list", although it seems everyone should
> have an "end_list", just for good luck.   Also, the poor guy who installs on drive G: in
> windows is hosed, of course that is another way of saying wild blue yonder.

I thought everybody installed their files in "end_list" :)  This list is
not the complete list used to define the library search paths.  The
executable path, several platform specific paths, and the KICAD
environment variable and several paths relative to these paths are added
the list of paths above at run time and then all of the paths that do no
exist are removed from the search list.  While I agree this is less than
optimal, we will have to keep this in order to convert existing projects
over to the new footprint library table.

> 
> 
> The installation system in CMake on Linux is actually at the top of my work queue now.
> Promise.  I am one of those guys that does not benefit from linux packages, so the
> install() statements in CMakeLists.txt have greater ramifications for me than most.  It
> would be nice to have the notion of a datapath and a codepath.  I read about that
> somewhere.  CMAKE_INSTALL_PREFIX can only serve one of those needs.
> 
> 
> I have two excellent sets of patches to look over, and this should happen in the next 10
> days.  I can give this option B some more thought at that time also, at least the
> cmakedefine.   Your choice to use it is something for you to think about.
> 
> 
> Dick
> 

<<<snipped>>>



Follow ups

References