On the Jenkins server the builds for MacOS I’ve looked at are failing, although Jenkins does not realize it. Is this known about?
I was looking because I would like to be able to try out version 5. If I could do that, would it change project files in ways that are not compatible with 4.0.5?
Yes the current nightly build has more features. There is no guarantee that earlier versions are able to open files from newer versions. (sometimes the nightly from yesterday can not open files generated by the nightly of today.)
macOS nightlies have stalled because there is a build issue involving the scripting plugin and a shortage of macOS-familiar developers to fix it. Unfortunately, I can’t really quote you an ETA for the build being back up at the moment
I’m not sure about “Jenkins does not realize it” - this is the top of the build log I see for the server running macOS nightlies:
About the Jenkins realize… when i looked earlier, the logs clearly showed an error, but the build had a green light. Perhaps i was looking at the wrong thing.
macOS build scripts here if you don’t have a build running yet
Failing build log here, errors start at “No rule to make target”
This has to do with the fact that _pcbnew.so (used by Python, not sure if it’s actually .so on macOS) contains the same symbols as _pcbnew.kiface, but was built twice - that commit attempts to resolve this by creating one from the other.
Ok ill have a look. I may need help getting mac buold env set up, unless there is a shortcut. The build docs seemed rather scary… more or less ‘here be dragons’.
I’m not sure why the build docs are so “here be dragons”, it’s pretty simple - and the build script I linked you to does it pretty easily. It’s a bit unpolished, but quick and easy. Make sure you have Homebrew installed.
Building on OSX is challenging at best. It typically requires building dependency libraries that require patching in order to work correctly. For more information on the complexities of building KiCad on OSX, see the OSX bundle build scripts.
Yeah, I know what you mean. I don’t know which build scripts the docs are talking about, I guess some older ones that didn’t handle things like patching wxWidgets. The docs should probably be updated. With Simon’s script linked above, it’s just “install Homebrew, install a couple brew packages, run script”
IMO it should be integrated into the in-tree build system, but I don’t have time to deal with that
Ok, so I think there must be an error in my modified build script, as now (although not when I first tried) it mostly builds ok using the original one. Mostly, because the issue with the _pcbnew dependency shows up.
I can create a usable mac version of kicad (the project exe), eeschema and pcbnew (the main app), though there are a number of compiler warnings.
@kusmi, the nightly builds for mac aren’t building, although I presume 4.0.6 was built from a branch – the master build has moved on a lot more, so this isn’t precisely the reason. Was 4.0.6 created to fix a linux-only issue?
Have had a look at the cmake dependency issue and no obvious solution has presented itself so far, though I am fairly new to cmake. I’ll have another look shortly.
So the question now is: Where is the stable release for mac? Have they simply forgotten to update the download section of the kicad webside? (Does mac have something similar to the package managers in linux? If so can 4.0.6 be gotten this way?)
I looked on the bugtracker. I did not find any indication there that 4.0.6 is not availible for osx. (Only a high priority bug about nightly not building because of some python problem. But i think you already know about that one. If not: https://bugs.launchpad.net/kicad/+bug/1670016)
The problem seems to be that the mac build puts _pcbnew in the ‘app’ folder, so the target that was being looked for wasn’t present, and neither was the file. Fixing the build def with the correct locations seems to make it work properly.
Not sure I like the fix (too much replication), but I didn’t want to disturb more than needed.
Thanks Rivimey for your fix, unfortunately I get another, seemingly related compilation error after applying your patch. Perhaps you could have a look at this one too? There is no “_pcbnew.kiface” file in “kicad/kicad.app/Contents/PlugIns/”.
[ 70%] Copying wxPython into /Users/elijah/Downloads/kicad-app-master-3/build/kicad/kicad.app/Contents/Frameworks/python/site-packages
[ 70%] Built target ScriptingWxpythonCopy
Scanning dependencies of target ScriptingPcbnewPyCopy
[ 70%] Generating pcbnew_wrap.cxx, pcbnew.py
swig_import_helper fixed for /Users/elijah/Downloads/kicad-app-master-3/build/pcbnew/pcbnew.py
[ 70%] Copying pcbnew.py into /Users/elijah/Downloads/kicad-app-master-3/build/kicad/kicad.app/Contents/Frameworks/python/site-packages
[ 70%] Built target ScriptingPcbnewPyCopy
Scanning dependencies of target ScriptingModulesPcbnewSoCopy
make[2]: *** No rule to make target `kicad/kicad.app/Contents/PlugIns/_pcbnew.kiface', needed by `pcbnew/CMakeFiles/ScriptingModulesPcbnewSoCopy'. Stop.
make[1]: *** [pcbnew/CMakeFiles/ScriptingModulesPcbnewSoCopy.dir/all] Error 2
make: *** [all] Error 2
This problem only affects the development branch. It seems the 4.0.6 for OSX was forgotten; it’s being built but no one has moved it to the downloads yet.
There are now two files changed: CMakeLists.txt and pcbnew/CMakeLists.txt. Only the pcbnew CMakeLists.txt change is required to make the build work again. For the previous patch I didn’t get quite the right name: although _pcbnew.kiface is the thing required, cmake cannot figure that out, and building pcbnew_kiface does the trick. I obviously didn’t do a sufficiently clean build last time!
The other change, which can be ignored if you wish, results in fewer build warnings, and so more chance of important warnings being noticed. One part disables the findpackage for OpenMP, which is not found (not present??) on apple clang. While the failure is not apparently important, the build time messages look like something important has gone wrong. The second disables other warnings resulting from the Apple OpenGL library including function declarations marked as deprecated.