CMake error: mingw32-make.exe: *** [cmTryCompileExec3767362122/fast] Error 2

Bug #1422120 reported by Dalibor Smolik
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
kicad-winbuilder
Fix Released
High
Brian Sidebotham

Bug Description

Trying to compile new KiCad, all archives and source files downloaded successfuly, but when compilation starts (build 5421), error is reported:

 Configuring KiCad ( Release )
-- Building Release version of KiCad revision: 5421

-- Installing KiCad locally. Use RunKiCad.bat to run this version
CMake Error at KiCadWinbuilder.cmake:1040 (file):
  file COPY cannot find
  "C:/Temp/kicad-winbuilder-3.4/kicad/bin/pylib/_pcbnew.pyd".

but this is just error about not existing file, because compilation was unsuccessful.

in CMakeError.log can be found error:

CMakeFiles\cmTryCompileExec3767362122.dir\build.make:59: recipe for target 'CMakeFiles/cmTryCompileExec3767362122.dir/CheckSymbolExists.c.obj' failed

mingw32-make.exe[1]: *** [CMakeFiles/cmTryCompileExec3767362122.dir/CheckSymbolExists.c.obj] Error 1

mingw32-make.exe[1]: Leaving directory 'C:/Temp/kicad-winbuilder-3.4/build/Release/CMakeFiles/CMakeTmp'

Makefile:116: recipe for target 'cmTryCompileExec3767362122/fast' failed

mingw32-make.exe: *** [cmTryCompileExec3767362122/fast] Error 2

File C:/Temp/kicad-winbuilder-3.4/build/Release/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <stdio.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef getc_unlocked
  return ((int*)(&getc_unlocked))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Both CMakeError.log and CMakeOutput.log attached.

Revision history for this message
Dalibor Smolik (doma) wrote :
Revision history for this message
Mark Jones (heliosstudios) wrote :

Win7x64, quad-core AMD. From BZR 5404, I get first the _pcbnew.pyd issue again. Copying that file from /kicad/bin to /kicad/bin/pylib and restarting build fixes that. But not all issues are resolved. I bet a clean re-install may work... but frankly, completely rebuilding 5GB of my disk for three "errors" seems ridiculous. Any chance we can see a resolution?

-- KiCad-Winbuilder V3.4
-- Parallel build using 3 Processors
-- Build type: Release
-- Checking for environment problems
-- Checking for installed Bazaar
-- Checking for wxPython
-- Found wxPython
-- Downloading Latest Library Archive...
-- Checking for KiCad Documentation latest source
-- KiCad Documentation is up-to-date.
-- Checking for BZIP2
-- Checking for GLEW
-- Found GLEW
-- Checking for Cairo
-- Found Cairo
-- Checking for KiCad latest source code
-- Updating KiCad source code from bazaar head
-- Cleaning PCBNEW Python files to ensure good build...
-- Using KiCad Options:
-- -DKICAD_SCRIPTING=ON
-- -DKICAD_SCRIPTING_MODULES=ON
-- -DKICAD_SCRIPTING_WXPYTHON=ON
-- -DPYTHON_ROOT_DIR=D:/KiCAD/env/python
-- -DBUILD_GITHUB_PLUGIN=ON
-- Building Release version of KiCad revision: 5421

-- by setting KICAD_USE_WEBKIT ON, you are building a web viewer inside Kicad.
Kicad developers cannot be sure the Web access does no open a security issue,
when running a Web Viewer inside Kicad. The probability is low, but not zero.
You are warned
-- Check for installed OpenGL -- found
-- Found Glew: D:/KiCAD/src/glew-cmake/lib/libglew32.dll.a
-- Check for installed GLEW -- found
-- Check for installed Cairo -- found
-- Check for installed Python Interpreter -- found
-- Python module install path: Lib/site-packages
-- Configuring incomplete, errors occurred!
See also "D:/KiCAD/build/Release/CMakeFiles/CMakeOutput.log".
See also "D:/KiCAD/build/Release/CMakeFiles/CMakeError.log".
Makefile:1007: recipe for target 'cmake_check_build_system' failed
-- Installing KiCad locally. Use RunKiCad.bat to run this version
-- Downloading runtime libraries..
Press any key to continue . . .

CMakeError.log is attached, and shows issues with:
* strtok_r exist failed (undeclared)
* d:/kicad/env/mingw-w64/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lrt collect2.exe: error: ld returned 1 exit status
* getc_unlocked exist failed (undeclared)

Revision history for this message
Fredrik Svensson (fredrik-x) wrote :

I think the errors you see in the CMakeError.log are red herrings. They are results of checks run by cmake and just result in configuration changes in the build scripts. The important message is the one in cmake_Release_stdout.log:
Configuring incomplete, errors occurred!

The problem comes from this commit:
http://bazaar.launchpad.net/~kicad-product-committers/kicad/product/revision/5416

There is a new check implemented to find what version of wxpython is installed but where python checks, there is no wxpython module.

My temporary solution until this is fixed:
Copy all files from the following folder:
kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/wxpython
Into a new folder that you create here:
kicad-winbuilder-3.4/kicad/bin/lib/site-packages

Revision history for this message
Dalibor Smolik (doma) wrote :

Workaround doesn't work, still same error.

Revision history for this message
Mark Jones (heliosstudios) wrote :

Fredrik, this seems to do little here. Copying _pcbnew.pyd again, copying wxpython into site-packages, and clearing the logs, the relevant output is the same:

make_Release.log:
-- by setting KICAD_USE_WEBKIT ON, you are building a web viewer inside Kicad.
Kicad developers cannot be sure the Web access does no open a security issue,
when running a Web Viewer inside Kicad. The probability is low, but not zero.
You are warned
-- Check for installed OpenGL -- found
-- Found Glew: D:/KiCAD/src/glew-cmake/lib/libglew32.dll.a
-- Check for installed GLEW -- found
-- Check for installed Cairo -- found
-- Check for installed Python Interpreter -- found
-- Python module install path: Lib/site-packages
-- Configuring incomplete, errors occurred!
See also "D:/KiCAD/build/Release/CMakeFiles/CMakeOutput.log".
See also "D:/KiCAD/build/Release/CMakeFiles/CMakeError.log".
Makefile:1007: recipe for target 'cmake_check_build_system' failed

make_Release_stderr.log:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named wxversion
CMake Error at CMakeLists.txt:680 (message):
  wxPython does not appear to be installed on the system.
mingw32-make: *** [cmake_check_build_system] Error 1

CMakeError.log is attached, and seems to indicate the previous undeclared elements (strtok_r, -lrt, getc_unlocked.)

Is a fresh rebuild in order?

Revision history for this message
Brian Sidebotham (brian-sidebotham) wrote : Re: [Bug 1422120] Re: CMake error: mingw32-make.exe: *** [cmTryCompileExec3767362122/fast] Error 2
Download full text (4.0 KiB)

Hi Guys,

KiCad-Winbuilder is currently broken because of a change in the KiCad
source. I'll issue an updated version soon. However to quickly bodge
things to make it work, edit setenv.bat and change line 57 to read:

SET PYTHONPATH=%PYTHONHOME%;%CD%\build\wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32\wxpython

Best Regards,

Brian.

On 16 February 2015 at 13:18, Mark Jones <email address hidden> wrote:
> Fredrik, this seems to do little here. Copying _pcbnew.pyd again,
> copying wxpython into site-packages, and clearing the logs, the relevant
> output is the same:
>
> make_Release.log:
> -- by setting KICAD_USE_WEBKIT ON, you are building a web viewer inside Kicad.
> Kicad developers cannot be sure the Web access does no open a security issue,
> when running a Web Viewer inside Kicad. The probability is low, but not zero.
> You are warned
> -- Check for installed OpenGL -- found
> -- Found Glew: D:/KiCAD/src/glew-cmake/lib/libglew32.dll.a
> -- Check for installed GLEW -- found
> -- Check for installed Cairo -- found
> -- Check for installed Python Interpreter -- found
> -- Python module install path: Lib/site-packages
> -- Configuring incomplete, errors occurred!
> See also "D:/KiCAD/build/Release/CMakeFiles/CMakeOutput.log".
> See also "D:/KiCAD/build/Release/CMakeFiles/CMakeError.log".
> Makefile:1007: recipe for target 'cmake_check_build_system' failed
>
> make_Release_stderr.log:
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> ImportError: No module named wxversion
> CMake Error at CMakeLists.txt:680 (message):
> wxPython does not appear to be installed on the system.
> mingw32-make: *** [cmake_check_build_system] Error 1
>
> CMakeError.log is attached, and seems to indicate the previous
> undeclared elements (strtok_r, -lrt, getc_unlocked.)
>
> Is a fresh rebuild in order?
>
> ** Attachment added: "CMakeError.log"
> https://bugs.launchpad.net/kicad-winbuilder/+bug/1422120/+attachment/4320441/+files/CMakeError.log
>
> --
> You received this bug notification because you are a member of Valvers
> GCode Committers, which is subscribed to kicad-winbuilder.
> Matching subscriptions: winbuilder-bugs
> https://bugs.launchpad.net/bugs/1422120
>
> Title:
> CMake error: mingw32-make.exe: *** [cmTryCompileExec3767362122/fast]
> Error 2
>
> Status in KiCad Windows Builder:
> New
>
> Bug description:
> Trying to compile new KiCad, all archives and source files downloaded
> successfuly, but when compilation starts (build 5421), error is
> reported:
>
> Configuring KiCad ( Release )
> -- Building Release version of KiCad revision: 5421
>
> -- Installing KiCad locally. Use RunKiCad.bat to run this version
> CMake Error at KiCadWinbuilder.cmake:1040 (file):
> file COPY cannot find
> "C:/Temp/kicad-winbuilder-3.4/kicad/bin/pylib/_pcbnew.pyd".
>
> but this is just error about not existing file, because compilation
> was unsuccessful.
>
> in CMakeError.log can be found error:
>
> CMakeFiles\cmTryCompileExec3767362122.dir\build.make:59: recipe for
> target
> 'CMakeFiles/cmTryCompileExec3767362122.dir/CheckSymbolExists.c.obj'
> failed
>
> mingw32-make.exe[1]: ***
> [CMakeF...

Read more...

Revision history for this message
Dalibor Smolik (doma) wrote :

Great job, Brian, now it works :)

Revision history for this message
Rob Gilliom (rgilliom) wrote :

Thank you Brian. I was struggling with this, too.

Rob

Changed in kicad-winbuilder:
importance: Undecided → High
assignee: nobody → Brian Sidebotham (brian-sidebotham)
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.