Giter Site home page Giter Site logo

homebrew-freecad's Introduction

homebrew-freecad


FreeCAD is a Free (as in Libre) multiplatform Open Source Parametric 3D CAD software.
Homebrew is a MacOSX Package Manager.

Overview

The primary and frequent use case for this formula is for developers to conveniently install all the required FreeCAD dependencies to support FreeCAD development.

NOTE: If you are looking for the current macOS builds, please download the latest build from GitHub

Alternatively there are versions of FreeCAD & friends built using conda, there are a weekly releases published here

Prerequisites

Install homebrew

Installing FreeCAD dependencies (FreeCAD developers)

Developers may find it convenient to simply install the pre-requisites prior to cloning the FreeCAD repo for development builds.

brew tap freecad/freecad
brew install --only-dependencies freecad

Install flags

By default, freecad is installed as a binary to be launched from a CLI. To also create a .app bundle use --with-macos-app.

Building The Current Release Version of FreeCAD

brew tap freecad/freecad
brew install freecad -v

Building HEAD Version of FreeCAD

brew install --HEAD freecad

Continuous Integration Support

The Travis CI system uses this freecad formula to build and test FreeCAD every time a change is made to the FreeCAD/FreeCAD repo meaning that the formula is very well tested itself.

Contributing 🤝

Submitting PR's for this repo can go along way, that's not to say it's an easy task. Following the below guidelines will help all that use this repo.

  1. when submitting a PR, rebase all commits into a single commit

homebrew test-bot currently will fail ❌ to publish a bottle if a PR contains more than one commit. A quick solution is to rebase, and squash all unneeded commits thus making the brew test-bot happy. learn more

  1. when submitting a PR that is updating or adding a new formula file, only add or change one formula file in a PR.

brew test-bot will fail if a PR contains two distinct formula files being edited and will be unable to publish the bottles for the edited formula.

  • looking at how upstream homebrew-core manages PRs, each PR only edits one formula file at a time.

Not all PR's require running through the CI, one example would be updating this README file. If a PR does not update a formula file within this repo then within the PR description, and in the commit message add the following [no ci] allowing the PR to be merged into the repo without running CI checks.

Maintenance 🧹

For maintainers of this repo, I have setup this repo using self-hosted runners for macOS Mojave, Catalina, and Big Sur (Intel only) versions of macOS. These self-hosted runners all run on a late macbook pro 2013 model that runs archlinux allowing the virtual machines to be started and stopped thanks to qemu+kvm.

Self-hosted runners will disappear from a repo on GitHub if they are not used within 30 days. However, a new self-hosted runner can be readded to this repo using github's web based UI. After the runner is added and labeled properly than the runner can pick up the job, and the status of the job can be viewed from the actions tab at the top of the repo.

I've had to readd macos vm's several times due to inactivity, but isn't an issue as the self-hosted runner picks up where it left off. More information about this nuance can be provided upon request.

Recently a CI action has been created to check the online status of the self-hosted runners. An email will be sent to the maintainer designated in the github action.

A great resource for learning how other Operating Systems (GNU+Linux distros) assemble the dependencies for freecad can be seen at repology.org

Maintenance / creating patch files for formula

Creating patch files for formula contained within this repo can be a difficult task, so the below steps aim to aid in the creation of patch files.

.. / .. / example

When freecad 0.20.1 was released it did not have support for python 3.11 however a consolidated commit has been made that should allow the 0.20.1 release to build and run against python 3.11

the below video demonstrates how I created a patch file for python 3.11 support

make.patch.file.mp4

TODOs

  • publish bottles for older versions of macos ie. mojave & high sierra, there is an active discussion about the topic here

Open Issues

See GitHub Issues

Recognition

Sam Nelson originally developed the freecad homebrew recipe repo circa April 2014 and transferred it to the FreeCAD organization in October 2016.

homebrew-freecad's People

Contributors

ageeye avatar bblacey avatar brainstorm avatar dansrogers avatar dirkolbrich avatar hiaselhans avatar ianrrees avatar ipatch avatar jimhigson avatar kkremitzki avatar luzpaz avatar peterlama avatar plaes avatar realthunder avatar sanelson avatar shmishleniy avatar vejmarie avatar zenz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebrew-freecad's Issues

OSX High Sierra build fails

==> ./configure -verbose -prefix /usr/local/Cellar/[email protected]/5.6.2 -release -opensource -confirm-license -system-zlib -qt-libpng -qt-libj
==> make
Last 15 lines from /Users/malt/Library/Logs/Homebrew/[email protected]/02.make:
require_action(inImage != NULL, InvalidImage, err = paramErr);
^
3 errors generated.
make[5]: *** [.obj/qcocoahelpers.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [sub-cocoa-make_first] Error 2
make[3]: *** [sub-platforms-make_first] Error 2
make[3]: *** Waiting for unfinished jobs....
2 warnings generated.
rm -f libqsqlite.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -single_module -dynamiclib -o libqsqlite.dylib .obj/smain.o .obj/qsql_sqlite.o .obj/sqlite3.o .obj/moc_qsql_sqlite_p.o -F/private/tmp/[email protected]/qt-everywhere-opensource-src-5.6.2/qtbase/lib -framework QtSql -framework QtCore -framework DiskArbitration -framework IOKit
mv -f libqsqlite.dylib ../../../../plugins/sqldrivers/
make[2]: *** [sub-plugins-make_first] Error 2
make[1]: *** [sub-src-make_first] Error 2
make: *** [module-qtbase-make_first] Error 2

Support legacy QT 4.x

The homebrew folks have completely deprecated QT4 in favor of QT5. While this makes sense for the broader ports ecosystem, FreeCAD QT5 support is still in its infancy. The scope of this issue is to add legacy QT4 support until such time that QT5 support in FreeCAD matures.

Documentation

Hello, thanks for your effort with this project.

I have been fighting with compiling Freecad, but I had some problems with the python versions.

I followed your steps but every time I do: brew install --HEAD sanelson/freecad/freecad
This happens:

==> Installing freecad dependency: python
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/python-2.7.8.
Already downloaded: /Library/Caches/Homebrew/python-2.7.8.mavericks.bottle.tar.gz
==> Pouring python-2.7.8.mavericks.bottle.tar.gz

So, the first thing the son of a b*ch does is looking at the cache of the Python version that I uninstalled because it is not patched and installs it!! And overwrites the pathed version.

Please, could you add this to the README section so other people don't lose so much time like I did?.

Is as simple as if you have already done a brew install python(very normal), then you uninstall it for installing the patched version, then you try to compile freecad. It does not work and you believe you did everything ok so it is very frustrating.

Upgrade homebrew/science/nglib to OCCT7

OCCT7 requires additional patches in order to build against OCCT7. The scope of this issue is to make the required changes and host the formula with the associated bottle until @ianrrees has the time to review/revise the changes and the homebrew/science team accepts his yet-to-be-filed pull-request.

@ianrrees, we should consider changing the default options in nglib to ensure the homebrew bottles meet FreeCAD's requirements (i.e. default to building with OCCT7). That way, we can avoid hosting a custom nglib bottle.

Switch to official coin available in homebrew/core

Coin3D is available in homebrew/core but we have customized it to build as a library versus a framework because cmake has trouble finding the includes when packaged as a framework. If we can resolve the include search failure during compile, we can eliminate the customized formula and companion bottle in favor of homebrew's default bottle

Empty installation error

Hi, I try to install on osx10.11.6, but it fails.

Normal install
The normal install option created this error:
🍺 /usr/local/Cellar/orocos-kdl/1.3.0: 95 files, 900.3K, built in 28 seconds
Error: /usr/local/Cellar/pivy/0.5.0 is not a directory

I uninstalled pivy and reinstalled it (rev 0.5.0) and the following error comes up (both normal and HEAD installation) :

--HEAD Installation
test:usr markusenberg$ brew install --HEAD sanelson/freecad/freecad
==> Installing freecad from sanelson/freecad
==> Installing dependencies for sanelson/freecad/freecad: pivy
==> Installing sanelson/freecad/freecad dependency: pivy
==> Cloning https://bitbucket.org/Coin3D/pivy
Updating /Users/markusenberg/Library/Caches/Homebrew/pivy--hg
==> python setup.py install --prefix=/usr/local/Cellar/pivy/HEAD-8eab90908f2a
Error: Empty installation

building opencamlib failed

Tried to install opencamlib according to this forum post: https://forum.freecadweb.org/viewtopic.php?f=15&t=21267.
I get the following errors. The mentioned directories and files in the /tmp directory do not exist.
`
maccb:tmp cb$ brew install opencamlib
==> Installing opencamlib from freecad/freecad
==> Cloning https://github.com/aewallin/opencamlib.git
Updating /Users/cb/Library/Caches/Homebrew/opencamlib--git
==> Checking out revision 398f7c7fac60169fda067ea0f5ebc15083361f5c
==> cmake -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/usr/l
Last 15 lines from /Users/cb/Library/Logs/Homebrew/opencamlib/01.cmake:
-- called with version = 11.10.83
-- architecture is:
-- architecture is:
-- CPACK_DEBIAN_DISTRIBUTION_RELEASES : lucid;maverick;natty;oneiric;precise;quantal
-- CMAKE_SOURCE_DIR is = /tmp/opencamlib-20171209-33252-n24h8m/src
-- descr file = /tmp/opencamlib-20171209-33252-n24h8m/src/deb/debian_package_description.txt
-- type:
-- 'make' for a normal build
-- 'make -j8' to build faster (if you have many cpus)
-- 'make install' to install
-- 'make package' to build a binary deb-packate
-- 'make spackage' to build debian source-packages
-- 'make test' to run the tests
-- Configuring incomplete, errors occurred!
See also "/tmp/opencamlib-20171209-33252-n24h8m/build/CMakeFiles/CMakeOutput.log".

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/freecad/homebrew-freecad/issues

These open issues may also help:
Reminder: update opencamlib #43
maccb:tmp cb$`

Build & deploy bottles tailored to FreeCAD build requirements

To reduce Travis CI build times, especially in the case where a suitable Ports Cache is not available, we should deploy bottles to this repo (i.e. keg in homebrew speak) that are tailored to FreeCAD's build requirements. There are two cases where this is appropriate.

  1. Formula developed specifically for FreeCAD (i.e. pivy)
  2. Customizing formula that avoid building from source while still satisfying FreeCAD's specific requirements

For example, due to a flaw in the vtk formula, it references the system python interpreter when built with python support, the default for homebrew-science/vtk.rb. Defining the vtk dependency as --without-python causes vtk to be built from source. A reasonable work-around to these types of tailored dependencies is to host a copy of the formula modified to reference this repo as the keg for the bottles until the issues are resolved in the parent formula.

FreeCAD brew failed at "Build target FreeCADGui"

Attempted both:
brew install sanelson/freecad/freecad
brew install --HEAD sanelson/freecad/freecad

Running Mac OS X 10.11.2

Each failed at:

...ct.cpp.o CMakeFiles/FreeCADGui.dir/Selection.cpp.o CMakeFiles/FreeCADGui.dir/SelectionFilter.cpp.o CMakeFiles/FreeCADGui.dir/PreCompiled.cpp.o -F/usr/local/Cellar/qt/4.8.7_2/lib ../../lib/libFreeCADApp.dylib /usr/local/lib/libCoin.dylib -framework QtOpenGL -framework QtSvg /usr/local/Cellar/qt/4.8.7_2/lib/libQtUiTools.a -framework QtWebKit -framework QtGui -framework QtXml -framework QtNetwork -framework QtCore /usr/local/lib/libboost_filesystem-mt.dylib /usr/local/lib/libboost_program_options-mt.dylib /usr/local/lib/libboost_regex-mt.dylib /usr/local/lib/libboost_signals-mt.dylib /usr/local/lib/libboost_system-mt.dylib /usr/local/lib/libboost_thread-mt.dylib -framework OpenGL /usr/local/Cellar/shiboken/1.2.2/lib/libshiboken-python2.7.dylib /usr/local/Cellar/pyside/1.2.2_1/lib/libpyside-python2.7.dylib ../../lib/libFreeCADBase.dylib /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Python /usr/local/lib/libxerces-c.dylib /usr/lib/libz.dylib -lutil -ldl -framework QtCore /usr/local/lib/libboost_filesystem-mt.dylib /usr/local/lib/libboost_program_options-mt.dylib /usr/local/lib/libboost_regex-mt.dylib /usr/local/lib/libboost_signals-mt.dylib /usr/local/lib/libboost_system-mt.dylib /usr/local/lib/libboost_thread-mt.dylib
[ 64%] Built target FreeCADGui
make: *** [all] Error 2

Upgrade to Coin 4.0.0a

Recently, @wmayer asked why the version of Coin in the macOS builds was "so old". It was relatively hard to answer because no one really new where to download 4.0.0a that is used in the distributions for other platforms.

I found, what I believe to be, the original 4.0.0a Coin source and companion source packages on Emergent's ftp server - https://grey.colorado.edu/emergent_ftp/?C=M;O=A. This seems to be the last version before Emergent turned Coin, and the companion packages, over to the community for continued development on https://bitbucket.org/Coin3D/coin/wiki/Home

For the macOS builds, we will use the latest tip from the Coin Mercurial repository but pinned to commit 035e53e, made on 15-JUL-16, to avoid build surprises if/when someone updates the Coin tip. The coin formula will also support a —HEAD option for the adventurous who would like to build and install the absolute latest version of coin.

The Coin developers have moved, or should I say, are in the process of moving, to cmake and the macOS formula will take advantage of the new build configuration. However, pivy relies upon coin-config and an associated configuration file that are not installed by default by the CMake rules. The Coin formula will take extra steps to create and install the coin-default.cfg file.

nglib fails to brew on El Capitan when --with-opencascade option is used

The nglib formula fails to build on El Capitan using Xcode 7.3.1 when the --with-opencascade option is used.

  • The same formula, builds fine on Mavericks and Yosemite using --with-opencascade against OCCT7
  • The same formula builds on El Capitan if the user does not specify --with-opencascade

More details in this forum post

Note: to commit this formula without corrupting the patches specified after END, you will need to set core.autocrlf=false on your git repo config to override your global setting if it is different.

Refining README

Making a few refinements to the README.

Adding some images as well:
img_0039

img_0040

Build fails on Sierra

With a fully updated brew on Sierra I get this:

patching file libsrc/occ/vsocc.cpp
patching file ng/ngpkg.cpp
==> ./configure --prefix=/usr/local/Cellar/nglib/5.3.1 --disable-gui --enable-nglib --enable-occ --with-occ=/usr/local/o
==> make install
Last 15 lines from /Users/jimhigson/Library/Logs/Homebrew/nglib/02.make:
0  0x10f1905cc  __assert_rtn + 144
1  0x10f1dd7c8  ld::tool::InputFiles::findDylib(char const*, ld::dylib::File const*, bool) + 882
2  0x10f17232b  generic::dylib::File<x86_64>::processIndirectLibraries(ld::dylib::File::DylibHandler*, bool) + 83
3  0x10f1deab9  ld::tool::InputFiles::createIndirectDylibs() + 271
4  0x10f1dfcff  ld::tool::InputFiles::forEachInitialAtom(ld::File::AtomHandler&, ld::Internal&) + 513
5  0x10f1eb318  ld::tool::Resolver::resolve() + 44
6  0x10f19152b  main + 1050
7  0x7fffe8b7b255  start + 1
A linker snapshot was created at:
    /tmp/libocc.0.dylib-2016-09-13-173230.ld-snapshot
ld: Assertion failed: (counter() < 0xffff), function nextCounter, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-274.1/src/ld/ld.hpp, line 108.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libocc.la] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/freecad/homebrew-freecad/issues

These open issues may also help:
Promote nglib formula for OCCT7 to homebrew/science as pull request https://github.com/FreeCAD/homebrew-freecad/issues/30
nglib fails to brew on El Capitan when --with-opencascade option is used https://github.com/FreeCAD/homebrew-freecad/issues/26

Salome MED file formula should be submitted to homebrew/science

To reduce maintenance and give-back to the community, the MED file formula should be refined to meet the homebrew "acceptable formula" guidelines and submitted as a pull-request to homebrew/science. This should be relatively a straight-forward effort (e.g. add test cases and peer review) will ensure that bottles are available for all homebrew-support operating systems and will eliminate the need for the FreeCAD community.

Opencascade 7.2

For the 0.17 release, we will use opencascade 7.2 because homebrew-science was deprecated and during the import to homebrew-core, I rewrote the formula for the latest version 7.2. OCCT 7.2 break nglib.

Refactor freecad.rb for FreeCAD 0.16+, Travis-CI and FreeCAD-ports-cache

Some of the changes necessary:

  • Now hosted on github (not sourceforge), so url resource needs to be updated accordingly
  • 0.16 has since been released
  • Opencascade 7 is preferred over OCE (OCE is languishing and is somewhat obviated by OCCT 7)
  • FreeCAD is supported on Mavericks and later
  • Formula logic can be simplified because CMake configs are more sophisticated (i.e. better dependency location)
  • New dependencies (vtk, nglib, med-file)
  • Tailored bottles
  • New cmake build defines

pivy failed to build on 10.9.5

When building pivy clang fails to create the shared library _soqt.so, because it is unable to find QtGui and QtCore:

clang++ -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk build/temp.macosx-10.9-x86_64-2.7/pivy/gui/soqt_wrap.o -o build/lib/pivy/gui/_soqt.so -L/usr/local/opt/coin/lib -Wl,-framework,OpenGL -Wl,-multiply_defined,suppress -lSoQt -F/usr/local/Cellar/qt/4.8.6/lib -framework QtOpenGL QtGui QtCore -lCoin -lpthread
clang: error: no such file or directory: 'QtGui'
clang: error: no such file or directory: 'QtCore'
error: command 'clang++' failed with exit status 1

https://gist.github.com/69514e7589573bf83656

Newb Plz Help. Configuring incomplete, errors occurred!

$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 335407e58f4d1195f383b4fcee9f77cd180944a4
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.9.2-x86_64
CLT: 5.1.0.0.1.1396320587
Clang: 5.1 build 503
X11: N/A
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby

(I thought my dependancies were fine. But when i go to build it fails every time.)

$ brew install --HEAD freecad
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Cloning git://git.code.sf.net/p/free-cad/code
Updating /Library/Caches/Homebrew/freecad--git
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/freecad/HEAD -DCMAKE_BUILD_TY
linked by target "FreeCADGui" in directory /tmp/freecad-rfcN/src/Gui

-- Configuring incomplete, errors occurred!
See also "/tmp/freecad-rfcN/CMakeFiles/CMakeOutput.log".
See also "/tmp/freecad-rfcN/CMakeFiles/CMakeError.log".

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/sanelson/homebrew-freecad/issues

Sorry for the Cmd+C cmd+v dump, but i can't figure this out. Im very unfamiliar with OSX already.

Im worried this is one of the problems you talked about with fortran :S ?

If you need anymore info from me, to understand my problem and help me in any tiny way please ask, ill do my best to tell you what I've done :p

Thanks a lot.

Formula factory deprecated

NOt sure this is the right place to issue this but here it goes:

Warning: Calling Formula.factory is deprecated!
Use Formulary.factory instead.
/usr/local/Library/Taps/sanelson/homebrew-freecad/freecad.rb:93:in `install'
Please report this to the sanelson/freecad tap!

pivy failed to build on 10.9.5

When building pivy clang fails to create the shared library _soqt.so, because it is unable to find QtGui and QtCore:

clang++ -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk build/temp.macosx-10.9-x86_64-2.7/pivy/gui/soqt_wrap.o -o build/lib/pivy/gui/_soqt.so -L/usr/local/opt/coin/lib -Wl,-framework,OpenGL -Wl,-multiply_defined,suppress -lSoQt -F/usr/local/Cellar/qt/4.8.6/lib -framework QtOpenGL QtGui QtCore -lCoin -lpthread
clang: error: no such file or directory: 'QtGui'
clang: error: no such file or directory: 'QtCore'
error: command 'clang++' failed with exit status 1

https://gist.github.com/69514e7589573bf83656

command 'clang' failed on 10.10.2

When setting Homebrew Dependencies: brew install --HEAD pivy
I get:
==> Installing pivy from sanelson/homebrew-freecad
==> Cloning https://bitbucket.org/Coin3D/pivy
Updating /Library/Caches/Homebrew/pivy--hg
==> python setup.py install --prefix=/usr/local/Cellar/pivy/HEAD
/usr/local/Cellar/coin/3.1.3/Frameworks/Inventor.framework/Headers/Qt/devices/SoQtDevice.h:39:10: fatal error: 'qevent.h' file not found

include <qevent.h>

     ^

1 error generated.
error: command 'clang' failed with exit status 1

not working for me


x-MacBook-Pro:_demo apple$ brew install freecad
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (caskroom/cask, homebrew/core).
==> Updated Formulae
cimg                          dpkg                          folly                         libxml2                       mosquitto                     qbs                           sfcgal                        tnef                          wget

Error: No available formula with the name "freecad" 
==> Searching for a previously deleted formula...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
x-MacBook-Pro:_demo apple$ 

inreplace in freecad.rb fails

in freecad.rb the two inreplace lines after

# Clang support for main CMakeLists.txt, credit to peterl94 and mrlukeparry

don't replace properly anymore - maybe because CMakeLists.txt has changed?

In each instance I changed

if(CMAKE_COMPILER_IS_GNUCXX …

to

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX …

to correspond with what is actually in CMakeLists.txt, and that fixed it. Maybe these replacements are not necessary anymore though because of the change in CMakeLists.txt? I'm not an expert.

Undefined method for nil error

I ran into the following error when trying this formula on OS X 10.8:

Error: undefined method `/' for nil:NilClass
Please report this bug:
    https://github.com/Homebrew/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/os/mac/xquartz.rb:117:in `bin'
/usr/local/Library/Homebrew/extend/ENV/super.rb:123:in `determine_path'
/usr/local/Library/Homebrew/extend/ENV/super.rb:69:in `setup_build_environment'
/usr/local/Library/Homebrew/build.rb:130:in `install'
/usr/local/Library/Homebrew/build.rb:45:in `main'
/usr/local/Library/Homebrew/build.rb:12
/usr/local/Library/Taps/sanelson/homebrew-freecad/freecad.rb:48

Homebrew info:

HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 1d04b7747f04f4763738fa3972979077a73b7975
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.8.5-x86_64
CLT: 5.0.1.0.1.1377666378
Clang: 5.0 build 500
X11: N/A
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

Incorporate Qt4 rename from qt4 to qt@4

Cartr renamed the Qt4 formulae today to comply with the recent Home-brew versioned naming scheme. The freecad dependencies need to be upgraded accordingly.

tbb does not support 10.6.8 build

Hello,

Thanks for putting the work into making the FreeCAD recipe. It helped me quite a bit.

I encountered an issue with the current "tbb" formula while attempting to build FreeCAD from source on a 10.6.8 machine. Specifics about the issue and the associated fix are located here: http://forum.freecadweb.org/viewtopic.php?f=4&t=7710&start=50. The problem has more to do with Homebrew and my OSX version than with your recipe but I figured I'd pass on how I made your recipe work with a legacy OSX.

In the end I managed to successfully build FreeCAD from source using your materials and method. Couldn't have done it without your work.

Regards,
Jake

Problem finding qt5 cmake files

[/Users/fca] brew install --only-dependencies freecad
==> Installing freecad from freecad/freecad
All dependencies for freecad/freecad/freecad are satisfied.

[...r/local/FreeCAD/build] cd .. ; rm -rf build ; mkdir build; cd build ; cmake -DBUILD_QT5=1 -DFREECAD_USE_EXTERNAL_KDL=1 -DBUILD_FEM_NETGEN=1 -DFREECAD_CREATE_MAC_APP=1 -DCMAKE_BUILD_TYPE="Release" ../FreeCAD-git/
[...]
-- Found Eigen3: /sw/include/eigen3 (Required is at least version "2.91.0")
CMake Warning at CMakeLists.txt:772 (find_package):
By not providing "FindQt5Network.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Network", but CMake did not find one.

Could not find a package configuration file provided by "Qt5Network" with
any of the following names:

Qt5NetworkConfig.cmake
qt5network-config.cmake

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

[... the same for all the cmake files of QT5 ...]

CMake Error at CMakeLists.txt:789 (MESSAGE):

Qt5 libraries not found.

========================

-- Configuring incomplete, errors occurred!
See also "/usr/local/FreeCAD/build/CMakeFiles/CMakeOutput.log".
See also "/usr/local/FreeCAD/build/CMakeFiles/CMakeError.log".

I can make it work by the following configuration for CMAKE

cmake -DBUILD_QT5=1 -DFREECAD_USE_EXTERNAL_KDL=1 -DBUILD_FEM_NETGEN=1 -DFREECAD_CREATE_MAC_APP=1 -DCMAKE_BUILD_TYPE="Release" -DCMAKE_PREFIX_PATH=/usr/local/Cellar/[email protected]/5.6.2/ ../FreeCAD-git/

But I believe it should be automatic.

Promote nglib formula for OCCT7 to homebrew/science as pull request

nglib is available in homebrew/science (thanks @ian.rees) but we have modified it to be compatible with OCCT7 and host a custom bottle built with —open-cascade. We can eliminate this once we resolve #26 and if we change the opencascade to :recommended and submit a pull-request to homebrew-science with the OCCT7 changes.

Exume pyside, pyside-tools and shiboken from homebrew/boneyard

Per homebrew-core issues Homebrew/homebrew-core#5724, Homebrew/homebrew-core#5725 and Homebrew/homebrew-core#5726, pyside-tools, pyside and shiboken have been relegated to homebrew-boneyard from homebrew-core. By design, Hombrew boneyard formulas are not bottled so boneyard formulas build from source.

While we could simply update freecad.rb to qualify these ports with homebrew/boneyard but they would build from source so we would be better served to move the formulae to our repo and package in custom bottles (micro-caches) to keep our Travis build times manageable.

At some point, we should rebuild the FreeCAD ports-cache with these changes.

Switch to official vtk 7 available in hombrew/science

vtk is available in homebrew-science but packaged with python bindings that use hard coded paths to the macOS python interpreter resulting in segfault exceptions. We host the formula and companion bottle built with —without-python. Once the vtk team eliminates their hard-coded path problem, we should be able to eliminate this custom formula to reduce maintenance.

The homebrew team made some progress here - https://github.com/Homebrew/homebrew-science/pull/4342 but including the python bindings still causes references to the system python interpreter to be included in the Salome dylibs. Additional context from the homebrew community https://github.com/Homebrew/homebrew-science/issues/3401

Transfer repo ownership to FreeCAD Github account?

Hey Sam @sanelson,

For about a year, we have enjoyed continuous integration builds for FreeCAD that rely upon the pivy and coin formula that you originally created. However, some of these formula are becoming outdated as the world around them changes. In addition, to improve the speed of our CI builds, we also have a developed a FreeCAD-ports-cache that employs a custom homebrew caching scheme and custom bottles. I would like make some changes to your formulae to improve them a bit but also to reference a keg for pre-built bottles to improve build times. I plan to fork your repo but it seems that these FreeCAD-specific formula should be hosted on the FreeCAD web-site, especially pre-built bottles. Are you open to the idea of transferring your repo to the FreeCAD website? I can add you as a collaborator once the transfer is complete.

This seems like the best approach for the FreeCAD community, your prior art, and the best way to ensure we retain an accurate record of your original work (also, any forks will follow the transfer).

Thanks,
Bruce

Homebrew/python has been deprecated

Homebrew/python has been deprecated and some formulae, such as matplotlib, have been moved to homebrew/science. Need to updated formula to specify new dependencies.

missing step for installing orocos-kdl in readMe?

hi,

trying to install FreeCAD with homebrew using this recipe. I'm new to homebrew, but it appears you may have left a step out of the readme for installing orocos-kdl. In order to start the build of freecad without getting an error asking for orocos-kdl, I did

brew install --HEAD sanelson/freecad/orocos-kdl

is this correct? Because freeCad still won't build for me. It stops, spews out a bunch of paths to .o files and .dylib files (the last file listed is

/usr/local/lib/libboost_thread-mt.dylib

) followed by

/usr/local/Cellar/cmake/2.8.12.2/bin/cmake -E cmake_progress_report /tmp/freecad-uJ7L/CMakeFiles  21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
[ 44%] Built target FreeCADGui
make: *** [all] Error 2

with no other explanation. Thanks!

I've run brew doctor and fixed everything except the presence of some libraries that were installed by other tools that I don't think should have anything to do with FreeCAD.

Homebrew/science will be deprecated at the end of the year

@peterlama and @ianrrees, It looks like the Homebrew team is deprecating homebrew/science and moving select (i.e. popular) formula from science to core. I discovered this while submitting a pull request to upgrade the opencascade formula from 7.1 to 7.2.

Freecad has the following dependencies that we need to ensure are migrated from science to core.

depends_on "homebrew/science/orocos-kdl"
depends_on "homebrew/science/matplotlib"
depends_on "homebrew/science/med-file"
depends_on "homebrew/science/nglib"

Looks like matplotlib is in work leaving orocos-kdl, med-file and nglib, most likely to our team. I have started the opencascade port to core but am currently traveling so I don't know if I will be able to tackle any of the others in the near term.

Pertinent Homebrew issues:

Homebrew/homebrew-science/issues/6365
Homebrew/homebrew-science/issues/6331
Homebrew/homebrew-core/issues/15619

Post explaining why it is being deprecated.

Confirmed by MikeMcQuaid of Homebrew-core that the minimum requirements for a formula to be imported from homebrew-science to homebrew-core are (see this post):

a volunteer plus brew audit --online as the initial gating >requirements? The volunteer must also increase the Formula quality/maintainability to pass brew audit --ilovezfs before it is accepted to core? Is my understanding correct?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.