KiCad / kicad-winbuilder

Windows builder for the KiCad project based on the MSYS2 MinGW system [moved to https://gitlab.com/kicad]
51 stars 24 forks source link

During build OCE not downloaded #44

Closed gusber closed 6 years ago

gusber commented 8 years ago

running make_all.bat gave an error that OCE is not downloaded as part of the winbuilder.

After downloading the packages and build-checks are in progress I get this error output: CMake Error at CMakeLists.txt:548 (find_package): By not providing "FindOCE.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OCE", but CMake did not find one.

Could not find a package configuration file provided by "OCE" (requested version 0.16) with any of the following names:

OCEConfig.cmake
oce-config.cmake

Add the installation prefix of "OCE" to CMAKE_PREFIX_PATH or set "OCE_DIR" to a directory containing one of the above files. If "OCE" provides a separate development package or SDK, be sure it has been installed.

nickoe commented 8 years ago

Did you install the oce packages with pacman manually?

gusber commented 8 years ago

no, just cloned the kicad-winbuilder and ran make_all.bat

nickoe commented 8 years ago

So please try to pull and rerun. I added oce as a depends on the PKGBUILD, so it should install that now.

gusber commented 8 years ago

Just a slight typo in PKGBUILD line 20: "${MINGW_PACKAGE_PREFIX}-libxslt") "${MINGW_PACKAGE_PREFIX}-oce")

Should be:

     "${MINGW_PACKAGE_PREFIX}-libxslt"
     "${MINGW_PACKAGE_PREFIX}-oce")
nickoe commented 8 years ago

Ahh yeah, that was stupid of me. I have pushed a fixed version.

gusber commented 8 years ago

It builds now, thank you. will try with a fresh clone tomorrow.

gusber commented 8 years ago

The initial build works. This problem might be a kicad problem though but, during the build the MINGW-packages\mingw-w64-kicad-git\src\build-x86_64-w64-mingw32\plugins\3d\oce\CMakeFiles\s3d_plugin_oce.dir\build.make refers to C:/building/msys64/mingw64/lib/libfreetype.dll.a

I added the oce-win-bundle libraries to the kicad winbuilder script "${MINGW_PACKAGE_PREFIX}-libxslt" "${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-freeimage" "${MINGW_PACKAGE_PREFIX}-gl2ps" "${MINGW_PACKAGE_PREFIX}-oce")

and then modified the MINGW-packages\mingw-w64-kicad-git\src\build-x86_64-w64-mingw32\plugins\3d\oce\CMakeFiles\s3d_plugin_oce.dir\build.make to point to the correct location of libfreetype.dll.a

Then kicad builds OK.

nickoe commented 8 years ago

What is the "oce-win-bundle libraries"?

What is the "correct" location of libfreetype.dll.a?

gusber commented 8 years ago

if you build oce under windows you should also build oce-win-bundle which is just gl2ps, freetype and freeimage.

the 'correct' location i pointed the makefile to find libfreetype.dll.a is kicad-winbuilder\msys64\mingw64\lib

nickoe commented 8 years ago

No, gl2ps, freetype and freeimage should be provided by msys2.

I should not be necessary to change the path in the build.make.

gusber commented 8 years ago

ok, this is odd. is there any easy way to enable debugging messages using the kicad-winbuilder? (not build debug version of kicad :). i have tried but failed with and without "${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-freeimage" "${MINGW_PACKAGE_PREFIX}-gl2ps" )

nickoe commented 8 years ago

Those packages are supposed to be installed with oce if they are a runtime dependency.

Can you check if they are actually installed in the msys2 environment inside the kicad-winbuilder directory? Really only freetype is a dependency because I have not built OCE with gl2ps or freeimage.

So you should be able to check that it is installed with: pacman -Qs freeimage

And by your earlier comments it does indeed sugges that it is installed, because you say that it is in kicad-winbuilder\msys64\mingw64\lib. What I don't understand is that it originally reffered to C:/building/msys64/mingw64/lib/libfreetype.dll.a. Where does that "building" dir come from?

There should be log files in the .log folder.

gusber commented 8 years ago

I have no idea where building comes from. This is why i would like to have a debug output from the script. The logs in the .log folder only have stdout not stderr.

i get to [ 45%] Built target common then make: *** [Makefile:128: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting...

pacman -Qs freeimage return 1 libfreetype.dll.a is installed. Will continue tomorrow.

nickoe commented 8 years ago

I think the logs also have stderr, but in tat case I think the error is further up in the log.

gusber commented 8 years ago

a text search through all logs on 'error' and 'warning' only gives me information about p5-error packages and compiling warning.cpp. and from pacman update to say that msys should be started with the -mingw64 flag. WARNING: the shell starting scripts have been unified. ... MSYS2_ROOT\msys2_shell.cmd -mingw64

gusber commented 8 years ago

I can't figure out why CMake cannot find the correct path to freetype.dll.a while building kicad's oce plugin. This seems to be the problem though. As i mentioned before, running make_x86_64.bat i get to 45% and then make: *** [Makefile:128: all] Error 2 without no further clues.

launching msys and running the PKGBUILD script manually step by step i found out that the plugins/3d/oce/CMakeFiles/s3d_plugin_oce.dir/build.make have :/building/msys64/mingw64/lib/libfreetype.dll.a as a dependancy.

Editing build.make to point to libfreetype.dll.a to the kicad-winbuilder mingw bin directory fixes the build. (i.e. kicad is built with make and then i can run the make DESTDIR=.. install )

Finally, trying to launch pcbnew there's an error with not being able to read the _pcbnew.kiface library. After playing around with the dll-files in the mingw/bin directory i found that libpcre dlls were necessary.

Now the _pcbnew.kiface is loaded ok (I think) and a new error occurs:

Mismatch between the program and library build versions detected. The library used 3.0 (wchar_t, compiler with C++ ABI 1010, wx containers, compatible with 2.8), and wxPython used 3.0 (wchar_t, compiler C++ ABI 1009, wx containers, compatible with 2.8)

So i supposed wxPython need to be rebuilt too.

nickoe commented 8 years ago

Could you try to share the complete build log?

When you install anywhere thant to not a standard location you need to make sure the exes can fild the kifcace, for example by setting the LD_LIBRARY_PATH to point at them. Or as we do in the installer copy everything to the same dir as the exe's.

I have not yet found the wx ABI mismatch to cause any problems with KiCad yet, it is just a warning after all.

gusber commented 8 years ago

I will share all the logs. In progress with a fresh clone now.

regarding the ABI problem the pop-up says Fatal Error, not warning and then kicad crashes. https://ibin.co/2vGlQsZmTtcI.jpg https://ibin.co/2vGlkrSPpBpR.jpg

will share logs in a bit..

gusber commented 8 years ago

cmd.exe output log: cmd.exe log makepkg log: makepkg pacman_bash log: pacman_bash pacman_bash2 log: there is nothing to do pacman_initial log: pacman_initial' pacman_required_packages log: pacman_required_packages pacman_required_packages_update log: pacman_required_packages_update pacman_update log: pacman_update

I cannot verify that this error seen in cmd.exe output is due to the fact that Cmake finds the wrong path to libfreetype but i would suspect so.

gusber commented 8 years ago

I did make DESTDIR=/home/gusber/out install and then ran the copydll.sh but just the copystuff() part. All dlls were copied but libnghttp and the libpcre

Having had a look with a dependency viewer i found that libgraphite2.dll libicudt57.dll libicuin57.dll libicuio57.dll libicule57.dll libiculx57.dll libicutest57.dll libicutu57.dll libicuuc57.dll libpcre-1.dll libpcre16-0.dll libpcre32-0.dll libpcrecpp-0.dll libpcreposix-0.dll

were missing from the out/bin/ directory

nickoe commented 8 years ago

Ok, I guess this is the reason that the ABI check is not fatal for me.

https://git.archlinux.org/svntogit/packages.git/tree/trunk/make-abicheck-non-fatal.patch?h=packages/wxgtk

nickoe commented 6 years ago

This issue has been silent for a long time, and it works with latest version of kicad-winbuilder.