-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Freecad build fails on Big Sur during Install #163
Comments
Can you execute the resulting binaries ? It seems to fail when it build the App package. You shall still be able to use FreeCAD (even if this needs to be fixed) |
Sorry can you try to use the tap instead of the cask ? |
Are there any news on this? I have the same problem on my Mac with MacOS Big Sur 11.2.3: `CMake Error at src/MacAppBundle/cmake_install.cmake:74 (file): make: *** [install] Error 1 |
Can you test the upcoming PR ? It is fixing the issue (normally) |
Thanks for your quick reply.
Compilation went fine, but when it comes to the final install step it still says: CMake Error at src/MacAppBundle/cmake_install.cmake:74 (file): make: *** [install] Error 1 |
What is your cmake command ? Because it look like that you are not building with hombrew (which is fine). The import site issue can be fixed by using an export PKG_CONFIG_PATH = "/usr/local/opt/[email protected]/lib/pkgconfig//lib/pkgconfig" and remove default icu4c from your system (brew remove icu4c) If that still doesn't work, I need your full cmake command. I have met your error yesterday while debugging, it was coming from a conflict. Can you also give me your src/MacAppBundle/cmake_install.cmake from your build directory. I can remember easily which package was causing the error. |
Correct, I am not building with homebrew, I follow the steps on the documentation page. brew remove --ignore-dependencies icu4c This is my shell script to compile FreeCAD: export PREFIX_PATH="/usr/local/Cellar/qt5152/5.15.2/lib/cmake;/usr/local/Cellar/nglib/v6.2.2007/Contents/Resources;/usr/local/Cellar/[email protected]/8.2.0_1/lib/cmake/vtk-8.2;/usr/local/opt/[email protected]/lib/cmake" cd ./build cmake I need to set the PYTHON_INCLUDE_DIR here because I am also a victim of this newline character at the end of the path. But still no change in the result: CMake Error at src/MacAppBundle/cmake_install.cmake:74 (file): make: *** [install] Error 1 |
ok I think you do have sip installed on your machine (the default one). Just do This step shall fix your initial error into cmake (remove it before rebuilding otherwise it keeps it into the cache) Be sure that all the package from freecad are properly linked on your syste, |
Ok, I have followed all the steps. The PKG_CONFIG_PATH should be "/usr/local/opt/[email protected]/lib/pkgconfig" right? (I assume you have a type in your comment above). Did all the link steps you mentioned. ...still the exact same result... Sorry, I'm a long time developer veteran but I'm completely lost here. EDIT: brew link -f [email protected] |
Yes got a typo sorry. Can you post src/MacAppBundle/cmake_install.cmake from your build directory. I can have a look to the error. The file is not properly generated during the cmake phase by one of imported module which is probably not linked as it shall on your machine. On mine the error was coming from the SIP package. No worries to be lost, debugging freecad installation is not a complex task, but it involve so many dependencies that it could be frustrating. I am on discord or slack, it could be easier to have a look to if you want. Also on gitter. |
Here is my build/src/MacAppBundle/cmake_install.cmake file:Install script for directory: /Users/mario/FreeCAD/source/src/MacAppBundleSet the install prefixif(NOT DEFINED CMAKE_INSTALL_PREFIX) Set the install configuration name.if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) Set the component getting installed.if(NOT CMAKE_INSTALL_COMPONENT) Is this installation the result of a crosscompile?if(NOT DEFINED CMAKE_CROSSCOMPILING) Set default install directory permissions.if(NOT DEFINED CMAKE_OBJDUMP) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) |
Look like your issue is coming from protobuf /usr/local/Cellar/protobuf/3.15.8 Can you remove it from your machine ? I do not have it installed |
That was as success. Installation completes without error now. "FreeCAD.app cannot be opened due to an error" (I get this message in german). I have completely emptied the build folder, but there must be some cached files somewhere else. The compilation was finished after a few minutes. What do I have to remove to force a complete rebuild? EDIT: -- Making bundle relocatable... |
hey we are progressing. Weird message. Can you send me through email, or put the output of your compilation as an attachement into this issue. I can have a look if everything is ok. That might be an issue with the fact that your Mac is prohibiting the execution of non-signed app. You can open the app by rick clicking on the App and then open. It will force to remove the protection during the first run and your O/S will learn about it You can remove your ccache from your home directory. Normally it is here ~/.ccache or $HOME/.ccache |
Will try, this will take much longer of course. Please see my EDIT above |
Ok, do not recompile. I know from where this error comes git clone https://github.com/vejmarie/freecad then checkout macbundle. It will fix this issue. Other option cherry pick the modifcations from this branch, that is a very small one. If you pick up the branch, the error might comes from the fact that you need to fully clean your build environment and that the cmake has not been regenerated properly. |
Hmmm, no, that's where I started (cloned your repo, branch macbundle). There is no .ccache folder in my HOME. Run cmake again, then build. Here are the last lines of the build process: -- Making bundle relocatable... Giving up for today, will continue tomorrow, if you have any more hints. |
I think your cmake is lacking a lot of entries. Let me give them to you You need the llvm cmake path and the other remaining one's. It shall work with that now. |
This gives me a bunch of compilation errors. Thank you again! |
Last attempt for today :-) After adding /usr/local/opt/llvm/lib/cmake to the PREFIX_PATH I now get -- Making bundle relocatable... |
Did you recompiled any other dependencies ? Look like that /usr/local/opt/icu4c/lib/libicuuc.68.dylib is one of your dependency. So what you can try is to re-install the regular icu4c through brew and see where the next error will be. (brew install icu4c) |
brew install icu4 this (re)installed a bunch of other packages as dependencies, i.e. freecad/freecad/[email protected] I just ran YOU ARE MY HERO!! :-) Thank you so much for your efforts! This stuff drives me nuts. How can the documentation be updated to make this work for other developers out of the box? Thank you again!! |
I think that when both of my PR will be merged, that will work transparently from homebrew (brew install --HEAD) and you will be able to rebuild nightly freecad on Mac. Good to see it working. Enjoy FreeCAD ! I have wiki access to update the documentation. I will try to do it, but their are so many different potential errors which could happen that it is tough. Many people are recompiling freecad with a lot of different initial system state which could lead to different kind issues. |
i've been bottling up the freecad dependencies for macos mojave, and have been building and installing freecad using the formula file and also manually building from the git source using cmake from a cli. I have installed all freecad dependencies from this tap, and when i tried to build freecad manually (not using the formula file) i ran into linking errors related to either way i am able to resolve linking issues when defining a export LIBRARY_PATH="/usr/local/opt/icu4c/lib" i know you resolved your issue but if something pops up in the future this could be something to experiment with down the road. and glad you got your issue resolved. |
Thank you for your hints. I now a have a configuration which compiles and links fine: export PREFIX_PATH="/usr/local/opt/llvm/lib/cmake;/usr/local/Cellar/qt5152/5.15.2/lib/cmake;/usr/local/Cellar/nglib/v6.2.2007/Contents/Resources;/usr/local/Cellar/[email protected]/8.2.0_1/lib/cmake/vtk-8.2;/usr/local/opt/[email protected]/lib/cmake" cd ./build cmake Now, when I run FreeCAD, create a new document and open the Draft workbench, FreeCAD crashes. Terminal output: Persistent toolbars: Snapper toolbar not managed. [1] 91404 segmentation fault /Users/mario/FreeCAD/build/bin/FreeCAD This is all very frustating. |
presently i don't have a big sur box setup, but i plan to have one going sooner than latter to hopefully test these things. that said are you building freecad on an m1 mac? also something i've been meaning to do is update some of my documentation related to building freecad, and something i learned from a few posts on the freecad forum was how to setup the build and source directories. and looking at your response, it looks like your doing an in source build which is something that has presented issues to me in the past. i'd recommend setting up your folder/directory structure as follows,
with following directory structure you keep your build directory as a peer folder of the source directory and not within the source directory itself. so you'd end with something like,
|
Yes, that is exactly what I'm doing. This is my directory structure:
I'm running a MacBook Pro 16" (2019), Intel Core I9 |
can you tell me which git commit you are compiling. I will try to reproduce your issue on my machine. Can you also display into freecad the python console and tell me which python interpreter version is displayed. |
I have forced a
and this seemed to solve the problem. No crashes anymore so far. Python console in freecad says:
My git commit is master from https://github.com/FreeCAD/FreeCAD The dependencies with brew are a nightmare. I really don't know what steps I've tried, just followed what you told me to do. But if I have to setup a new environment I probably cannot reproduce it. |
Ok, it probably means that you needed to link python before the build ;). Good to see it working now |
The FreeCAD.app is only runnable in the folder in which it was built. As soon as I move it to another folder (i.e. /Applications) it quits with an error message. The report says:
Seems that the libs are linked dynamically. Is there any setting to link them statically into the app? |
this issue should be resolved now, a simple |
Everything complies but I get the following error during installation phase
brew reinstall freecad
Warning: Treating freecad as a formula. For the cask, use homebrew/cask/freecad
==> Cloning https://github.com/freecad/freecad.git
Updating /Users/dingram/Library/Caches/Homebrew/freecad--git
==> Checking out revision f35d30bc58cc2000754d4f30cf29d063416cfb9e
HEAD is now at f35d30bc5 Fix travis build for MacOS
HEAD is now at f35d30bc5 Fix travis build for MacOS
==> Reinstalling freecad/freecad/freecad --with-macs-app
==> cmake -DBUILD_QT5=ON -DUSE_PYTHON3=1 -DPYTHON_EXECUTABLE=/usr/local/opt/pyth
==> make -j8 install
-- Installing: /usr/local/Cellar/freecad/0.19pre/FreeCAD.app/Contents/share/Gui/Stylesheets/images_dark-light/up_arrow_lighter.svg
CMake Error at src/MacAppBundle/cmake_install.cmake:55 (file):
file INSTALL cannot find
"/tmp/freecad-20210312-96801-9rbsq9/src/MacAppBundle/import site": No such
file or directory.
Call Stack (most recent call first):
src/cmake_install.cmake:51 (include)
cmake_install.cmake:68 (include)
The text was updated successfully, but these errors were encountered: