Skip to content
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

Update README.md #3

Merged
merged 1 commit into from
Dec 8, 2023
Merged

Update README.md #3

merged 1 commit into from
Dec 8, 2023

Conversation

superfloh247
Copy link
Contributor

git submodule update --init

for OndselSolver

git submodule update --init 

for OndselSolver
@oursland
Copy link
Owner

oursland commented Dec 8, 2023

Good call.

I'm awaiting FreeCAD/FreeCAD#11599 to be merged and I will then re-write these notes for the recent changes as well as re-record the videos for macOS, Linux, and Windows.

@oursland oursland merged commit 937283e into oursland:main Dec 8, 2023
@superfloh247
Copy link
Contributor Author

that would be great, really looking forward to it.
currently I'm not able to compile it in VSCode.
On the command line it compiles, but does not build a complete bundle: an empty Freecad start w/o workbenches and icons.

@oursland
Copy link
Owner

oursland commented Dec 9, 2023

The current guide does not build a bundle, just the binaries for the primary purpose of development. However, I do believe there is utility in adding in the packaging component.

Currently, we just landed CMakePreset.json with configuration presets and have intent on adding in testing presets. I would like to see the different packaging mechanisms get unified under CPack as well, but that's for a future date.

@oursland
Copy link
Owner

@superfloh247 I have performed a rudimentary write-up on the building of FreeCAD's current main branch here.

Again, it's not a .app bundle, but it surprises me that running FreeCAD starts without workbenches and icons; it should be a complete build. I wonder if you're encountering the same issue that @bdlabbitt is with the python interpreter failing, causing FreeCAD to wait forever for the python debugger to attach.

@superfloh247
Copy link
Contributor Author

I followed the instructions in #4 and still get the same build error

[main] Ordner wird erstellt: FreeCAD 
[build] Build wird gestartet.
[proc] Befehl wird ausgeführt: /Users/lindner/VSCode/FreeCAD/conda/cmake.sh --build /Users/lindner/VSCode/FreeCAD/build/debug --parallel 12 --target all
[build] [1/61] Generating version_check
[build] git
[build] /Users/lindner/VSCode/FreeCAD/build/debug/src/Build/Version.h.out written
[build] [2/3] Linking CXX executable tests/Part_tests_run
[build] FAILED: tests/Part_tests_run 
[build] : && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Wall -Wextra -Wpedantic -Wno-write-strings  -Wno-undefined-var-template -g -DFC_DEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names  tests/CMakeFiles/Part_tests_run.dir/Part_tests_run_autogen/mocs_compilation.cpp.o tests/CMakeFiles/Part_tests_run.dir/src/Mod/Part/App/TopoShape.cpp.o -o tests/Part_tests_run  -Wl,-rpath,/Users/lindner/VSCode/FreeCAD/build/debug/Mod/Part -Wl,-rpath,/Users/lindner/VSCode/FreeCAD/build/debug/lib -Wl,-rpath,/Users/lindner/VSCode/FreeCAD/.conda/freecad/lib  lib/libgtest_main.a  Mod/Part/Part.so  lib/libgtest.a  -lTKFillet  -lTKMesh  -lTKernel  -lTKG2d  -lTKG3d  -lTKMath  -lTKIGES  -lTKSTL  -lTKShHealing  -lTKXSBase  -lTKBool  -lTKBO  -lTKBRep  -lTKTopAlgo  -lTKGeomAlgo  -lTKGeomBase  -lTKOffset  -lTKPrim  -lTKSTEPBase  -lTKSTEPAttr  -lTKSTEP209  -lTKSTEP  -lTKHLR  -lTKFeat  lib/libFreeCADApp.dylib  lib/libFreeCADBase.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libxerces-c.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libz.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libpython3.11.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_filesystem.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_program_options.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_regex.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_system.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_thread.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_date_time.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_chrono.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_atomic.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libfmt.9.1.0.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libQt5Xml.5.15.8.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libQt5Core.5.15.8.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libfreetype.dylib && :
[build] ld: library 'TKFillet' not found
[build] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[build] [3/3] Linking CXX executable tests/Sketcher_tests_run
[build] FAILED: tests/Sketcher_tests_run 
[build] : && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Wall -Wextra -Wpedantic -Wno-write-strings  -Wno-undefined-var-template -g -DFC_DEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names  tests/CMakeFiles/Sketcher_tests_run.dir/Sketcher_tests_run_autogen/mocs_compilation.cpp.o tests/CMakeFiles/Sketcher_tests_run.dir/src/Mod/Sketcher/App/SketchObject.cpp.o tests/CMakeFiles/Sketcher_tests_run.dir/src/Mod/Sketcher/App/planegcs/GCS.cpp.o -o tests/Sketcher_tests_run  -Wl,-rpath,/Users/lindner/VSCode/FreeCAD/build/debug/Mod/Sketcher -Wl,-rpath,/Users/lindner/VSCode/FreeCAD/build/debug/Mod/Part -Wl,-rpath,/Users/lindner/VSCode/FreeCAD/.conda/freecad/lib -Wl,-rpath,/Users/lindner/VSCode/FreeCAD/build/debug/lib  lib/libgtest_main.a  Mod/Sketcher/Sketcher.so  lib/libgtest.a  Mod/Part/Part.so  -lTKFillet  -lTKMesh  -lTKernel  -lTKG2d  -lTKG3d  -lTKMath  -lTKIGES  -lTKSTL  -lTKShHealing  -lTKXSBase  -lTKBool  -lTKBO  -lTKBRep  -lTKTopAlgo  -lTKGeomAlgo  -lTKGeomBase  -lTKOffset  -lTKPrim  -lTKSTEPBase  -lTKSTEPAttr  -lTKSTEP209  -lTKSTEP  -lTKHLR  -lTKFeat  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libfreetype.dylib  lib/libFreeCADApp.dylib  lib/libFreeCADBase.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libxerces-c.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libz.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libpython3.11.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_filesystem.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_program_options.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_regex.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_system.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_thread.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_date_time.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_chrono.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libboost_atomic.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libfmt.9.1.0.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libQt5Xml.5.15.8.dylib  /Users/lindner/VSCode/FreeCAD/.conda/freecad/lib/libQt5Core.5.15.8.dylib && :
[build] ld: library 'TKFillet' not found
[build] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[build] ninja: build stopped: subcommand failed.
[build] ERROR conda.cli.main_run:execute(47): `conda run cmake --build /Users/lindner/VSCode/FreeCAD/build/debug --parallel 12 --target all` failed. (See above for error)
[proc] Der Befehl "/Users/lindner/VSCode/FreeCAD/conda/cmake.sh --build /Users/lindner/VSCode/FreeCAD/build/debug --parallel 12 --target all" wurde mit dem Code "1" beendet.
[driver] Build abgeschlossen: 00:00:03.101
[build] Der Build wurde mit dem Exitcode 1 abgeschlossen.

@superfloh247
Copy link
Contributor Author

this works

/Users/lindner/VSCode/FreeCAD/conda/cmake.sh --build /Users/lindner/VSCode/FreeCAD/build/debug --parallel 12 --target FreeCADMain

and the resulting build/debug/bin/FreeCAD starts and looks ok, but is buggy and unusable, I guess this will change with the next commits over time

@oursland
Copy link
Owner

oursland commented Dec 11, 2023

I see your problem, first the build/debug/ path was created by CMake outside of the conda environment, which permanently locks the compiler. In your case it selected the Xcode compiler, which has different link paths, and worse yet, links against a different and incompatible libc++, which is the source of the instability. Re-running cmake will not correct the compiler.

You'll need to delete the build/ directory and re-run CMake: Configure which should configure to the Conda Debug preset. You should be able to confirm that your configuration should have the line similar to:

[cmake] -- Compiler:                    /Users/jso/code/FreeCAD/FreeCAD/.conda/freecad/bin/arm64-apple-darwin20.0.0-clang++ (15.0.7)

The clang++ needs to be the one installed by conda.

After confirming that, you can build with CMake: Build and the build should be successful and launch correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants