← Back to team overview

kicad-developers team mailing list archive

Re: building kicad with wxWidgets on Linux

 

Maybe you should try an out-of-tree build (create a separate build directory and call cmake from there) and completely wipe out the build directory whenever you change path or compile switches.
Sometimes some things get left behind causing problems.


Regards,
Bernhard

On 01.10.2014, at 23:11, inkblotter <inkbottle@xxxxxxxxx> wrote:

> On 10/01/2014 07:46 AM, Wayne Stambaugh wrote:
>> Try using wxWidgets_CONFIG_EXECUTABLE=/path/to/wx-config instead of
>> -DwxWidgets_ROOT_DIR=/path/to/wx.  Even though FindwxWidgets.cmake
>> claims wxWidgets_ROOT_DIR is the way to specify a custom wxWidgets path,
>> I cannot get it to work either.
>> 
>> 
>> You could try temporarily removing you libwxgtk2.8-dev (Debian based
>> distros) package so the CMake will only be able find your custom
>> wxWidgets build.  This is what I thought I fixed by adding
>> NO_DEFAULT_PATH to the CMake find_file() command.  I will try to
>> duplicate this over the weekend and see if I can figure out why CMake is
>> having issues.  I will need to know what version of CMake you are using.
> 
> First,I put  /home/jfm/wx/bin at the front of my PATH so wx-config could be executed.
> 
> $ wx-config --libs
> -L/home/jfm/wx/lib -pthread   -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0
> 
> Then I put  /home/jfm/wx/lib on my LD_LIBRARY_PATH, but probably not necessary because of the -L flag in the output above.
> 
> 
> Then I  executed the minimal flags necessary to cmake to succeed
> 
> ]$ cmake . -DwxWidgets_CONFIG_EXECUTABLE=/home/jfm/wx/bin/wx-config
> CMake Error at CMakeModules/FindPackageHandleStandardArgs.cmake:136 (message):
>  Could NOT find wxWidgets: Found unsuitable version "2.8.12", but required
>  is at least "3.0.0" (found
> -L/home/jfm/wx/lib;-pthread;;;-lwx_gtk2u_gl-3.0;-lwx_gtk2u_aui-3.0;-lwx_gtk2u_adv-3.0;-lwx_gtk2u_html-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu_net-3.0;-lwx_baseu-3.0;-lwx_baseu_xml-3.0)
> Call Stack (most recent call first):
>  CMakeModules/FindPackageHandleStandardArgs.cmake:341 (_FPHSA_FAILURE_MESSAGE)
>  CMakeModules/FindwxWidgets.cmake:901 (find_package_handle_standard_args)
>  CMakeLists.txt:376 (find_package)
> 
> 
> -- Configuring incomplete, errors occurred!
> 
> This is the same error I get with using wxWidgets_ROOT_DIR instead or even with simply issuing the command
> 
> cmake .
> 
> 
> I am using the system cmake, version 2.8.12.2
> Fedora 20
> kernel 3.16.3
> g++ 4.8.3
> 
> I'll try moving libwxgtk2.8-devel out of the way so I can generate some makefiles and build kicad.
> 
>> 
>> 
>> On 9/30/2014 10:16 PM, inkblotter wrote:
>>> Wayne,
>>> 
>>> I tried at r5159 and got  exactly the same errors as I wrote about below.
>>> 
>>> Is it possible to have wxWidgets somewhere in the HOME directory tree?
>>> If so,  is cmake . -DwxWidgets_ROOT_DIR=/home/jfm/wx ...
>>> the right command to use on Linux to find my compiled wxWidgets?
>>> 
>>> I wish I knew more about the kicad cmake system than I do.
>>> Every other thing I have tried leads to the same result.  On the other
>>> hand, I know  a lot more about the cmake system than I did.
>>> 
>>> 
>>> On 09/30/2014 06:45 PM, Wayne Stambaugh wrote:
>>>> On 9/30/2014 4:57 PM, inkblotter wrote:
>>>>> well, I  took the advice offered and added the wxWidgets bin directory
>>>>> to the front of my PATH.  I added  the wxWidgets lib directory to the
>>>>> front of the LD_LIBRARY_PATH.
>>>>> 
>>>>> 
>>>>> 
>>>>> cmake . -DwxWidgets_CONFIG_EXECUTABLE=/home/jfm/wx/bin/wx-config
>>>>> 
>>>>> cmake . -DwxWidgets_CONFIG_EXECUTABLE=/home/jfm/wx/bin/wx-config
>>>>> CMake Error at CMakeModules/FindPackageHandleStandardArgs.cmake:136
>>>>> (message):
>>>>>    Could NOT find wxWidgets: Found unsuitable version "2.8.12", but
>>>>> required
>>>>>    is at least "3.0.0" (found
>>>>>  -L/home/jfm/wx/lib;-pthread;;;-lwx_gtk2u_gl-3.0;-lwx_gtk2u_aui-3.0;-lwx_gtk2u_adv-3.0;-lwx_gtk2u_html-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu_net-3.0;-lwx_baseu-3.0;-lwx_baseu_xml-3.0)
>>>>> 
>>>>> Call Stack (most recent call first):
>>>>>    CMakeModules/FindPackageHandleStandardArgs.cmake:341
>>>>> (_FPHSA_FAILURE_MESSAGE)
>>>>>    CMakeModules/FindwxWidgets.cmake:901
>>>>> (find_package_handle_standard_args)
>>>>>    CMakeLists.txt:376 (find_package)
>>>>> 
>>>>> 
>>>>> -- Configuring incomplete, errors occurred!
>>>>> 
>>>>> This is the error I have been struggling against.  Notice the complaint
>>>>> about  2.8 and 3.0.   That is,  the argument to cmake was pointless.
>>>>> But also notice it did find wxWidgets at ~/wx.   It then corrupted the
>>>>> output to look like it was meant for Windows, not Linux.  Linux would
>>>>> throw up on such drivel.   wx-config --libs gives what I would expect
>>>>> 
>>>>> /home/jfm/wx/bin/wx-config --libs
>>>>> -L/home/jfm/wx/lib -pthread   -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0
>>>>> -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0
>>>>> -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0
>>>>> 
>>>>> That, at least, looks good to me.
>>>>> 
>>>>> 
>>>>> so next I tried
>>>>> 
>>>>> cmake . -DwxWidgets_ROOT_DIR=/home/jfm/wx
>>>>> 
>>>>> but that gives exactly the same error as the previous error.
>>>>> 
>>>>> Finally I tried just this
>>>>> 
>>>>> cmake  .
>>>>> 
>>>>> expecting that to fail, and it did but it gave me the same error as all
>>>>> the rest of these attempts.
>>>>> 
>>>>> So I am out of possibilities that Google gave me.
>>>>> 
>>>>> How does anybody run cmake with wxWidgets not in /usr/local nor in the
>>>>> system dirs?
>>>> There was a bug in the wx/version.h search paths which I believe is
>>>> causing this problem.  I just committed the fix in r5159.  Please see if
>>>> this fixes your problem.
>>>> 
>>>> Thanks,
>>>> 
>>>> Wayne
>>>> 
>>>>> 
>>>>> *
>>>>> *
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On 09/29/2014 10:37 PM, inkblotter wrote:
>>>>>> I have very recently built a new  64-bit linux system, with a new GPU.
>>>>>> Of course, I wanted to build kicad on this new system.
>>>>>> I have installed cuda and built wxWidgets 3.0.1  and I really look
>>>>>> forward to to running the push-and-shove router.
>>>>>> 
>>>>>> But I never make it past  the wxWidgets test in cmake.
>>>>>> My system has wxWidget 2.8.12-9 installed and I get the complaint that
>>>>>> 3.0 is required.
>>>>>> I built wxWigets 3.01 and installed it in $(HOME)/wx and used the flag
>>>>>> -DwxWidgets_ROOT_DIR=$(HOME)/wx with cmake.   I thought this would
>>>>>> work but it does not and fails on the same complaint about finding 2.8
>>>>>> and requiring 3.0 (or better), but it also says that it found my
>>>>>> $(HOME)/wx  wxWidgets.
>>>>>> 
>>>>>> That is, it fails on the version complaint first and then finds  the
>>>>>> wxWidgets 3.0.1 in $(HOME)/wx, or it seems to fail first and then find
>>>>>> newer wxWidgets but cmake fails overall.
>>>>>> 
>>>>>> The system cmake version is 2.8.12.2.
>>>>>> g++  4.8.3
>>>>>> kernel 3.16.3
>>>>>> 
>>>>>> I am not very  familiar with kicad cmake.  Is there some trick others
>>>>>> have found to accomplish building  with wxWidgets not in either
>>>>>> /usr/local nor installed in the system paths?
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>> 
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>> More help   : https://help.launchpad.net/ListHelp
>>>> 
>>> 
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>> 
>> 
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


References