Git Product home page Git Product logo

Comments (18)

bblacey avatar bblacey commented on May 18, 2024

@ianrrees, two other observations for this formula that you might want to consider.

  1. Patching configure.ac causes make to regenerate the configure script by invoking automake/aclocal. This results in errors during make unless you have automake installed however brew install automake does not seem to resolve the errors. All of that said, perhaps we don't need to patch configure.ac because we are patching the configure script in the distro with the same changes... That way make would not try to rebuild the patched configure script. Unless I am missing something, I see two options and we should only need one.
    • Retain configure.ac patch, add appropriate :build options to ensure that make can regenerate the configure script. This makes the configure script patch redundant and should be eliminated.
    • Remove configure.ac patch to avoid regeneration. It doesn't work as is and is redundant with the configure script patches.
  2. The opencascade cad_kernal opt_prefix is appended with /include. This results in invalid paths such as OCCFLAGS = -DOCCGEOMETRY -I/usr/local/opt/opencascade/include/include/opencascade -I/usr/local/include/opencascade and OCCLIBS = -L/usr/local/opt/opencascade/include/lib that are invalid/non-existant. A quick test using the following change, corrected the paths. Why this doesn't affect builds on Mavericks and Yosemite is beyond me.
diff --git a/nglib.rb b/nglib.rb
index 80d8667..be07308 100644
--- a/nglib.rb
+++ b/nglib.rb
@@ -34,7 +34,7 @@ class Nglib < Formula
       cad_kernel = Formula[build.with?("opencascade") ? "opencascade" : "oce"]

       if build.with? "opencascade"
-        args << "--with-occ=#{cad_kernel.opt_prefix}/include"
+        args << "--with-occ=#{cad_kernel.opt_prefix}"

       else
         args << "--with-occ=#{cad_kernel.opt_prefix}/include/oce"

from homebrew-freecad.

bblacey avatar bblacey commented on May 18, 2024

Looks like this may be an Apple toolchain problem - https://openradar.appspot.com/27822079

from homebrew-freecad.

bblacey avatar bblacey commented on May 18, 2024

@ianrrees is aware and on this issue - see https://github.com/Homebrew/homebrew-science/issues/3624 and http://www.freecadweb.org/tracker/view.php?id=2500

from homebrew-freecad.

ianrrees avatar ianrrees commented on May 18, 2024

Hey Bruce, sorry I've been super busy for the last couple months and haven't been able to contribute to FreeCAD. I'm going to try to get my machine updated to have a look at that issue 3624 later today.

from homebrew-freecad.

bblacey avatar bblacey commented on May 18, 2024

@ianrrees, good to hear from you! I completely understand being too busy ;) That said, you might want to glance at #33 when you investigate this issue because it seems like the same underlying problem but with different output when built on Sierra... I am hopeful that you can figure it out because I haven't been able to... ;)

from homebrew-freecad.

ianrrees avatar ianrrees commented on May 18, 2024

Yes, I accepted the collaborator invite a few minutes ago, thanks!

from homebrew-freecad.

bblacey avatar bblacey commented on May 18, 2024

Ah, well that explains it. I went to re-send the invite and saw you were a collaborator so I edited my remark above to remove that part ;) Thanks in advance for the help.

from homebrew-freecad.

bblacey avatar bblacey commented on May 18, 2024

@ianrrees, I was reviewing your nglib PR and realize that point 1) in my comment above about patching configure.ac is incorrect. That must have been a patch introduced by @vejmarie, so you can disregard however I believe my point 2) is still valid. Thoughts?

from homebrew-freecad.

ianrrees avatar ianrrees commented on May 18, 2024

Yeah, configure.ac doesn't matter in the current formula since we're not running autoconf during the homebrew build process.

Haven't had a chance to try --with-opencascade against the new version of opencascade, perhaps in the next few days. I'm pretty sure I had it working for the initial commit, so perhaps we'll need to make a condition on the opencascade version.

from homebrew-freecad.

bblacey avatar bblacey commented on May 18, 2024

Ian, are you planning to also upgrade the nglib formula in this freecad-homebrew repo? The one here supports OCCT7 and is used to build a custom bottle with the --with-opencascade option.

from homebrew-freecad.

ianrrees avatar ianrrees commented on May 18, 2024

Not immediately, feel free to adapt those changes here if you have a minute. I think it would be best if we can get to a point where the homebrew-science formula for nglib does what we need for FreeCAD, so was going to work towards that goal.

from homebrew-freecad.

bblacey avatar bblacey commented on May 18, 2024

Ok, OCCT7 support falls into "nglib does what we need for FreeCAD" hence my question... Maybe that is already part of your goal because hombrew-science/opencascade switched to OCCT7 a couple months ago.

from homebrew-freecad.

bblacey avatar bblacey commented on May 18, 2024

@ianrrees - I am working on patching the occt7 nglib formula here to incorporate your recent changes in homebrew/science however the Makefile.in patch does not exist in the Makefile.in if I simply download the netgen 5.3.1 source usingcurl -L -o - "https://downloads.sourceforge.net/project/netgen-mesher/netgen-mesher/5.3/netgen-5.3.1.tar.gz" | tar xvz. It doesn't seem to be a showstopper because it is resolved with a fuzzy merge but I'm wondering if your intended change is now absent.

$ brew install --interactive freecad/freecad/nglib
==> Installing nglib from freecad/freecad
==> Downloading https://downloads.sourceforge.net/project/netgen-mesher/netgen-mesher/5.3/netgen-5.3.1.tar.gz
Already downloaded: /Users/blacey/Library/Caches/Homebrew/nglib-5.3.1.tar.gz
==> Patching
patching file configure
patching file libsrc/occ/Partition_Loop2d.cxx
patching file ng/Makefile.in
Hunk #1 succeeded at 327 with fuzz 1.
patching file libsrc/meshing/improve2.hpp
patching file libsrc/meshing/meshclass.hpp
patching file libsrc/meshing/meshtype.hpp
patching file libsrc/occ/Partition_Inter2d.hxx
patching file libsrc/occ/Partition_Inter3d.hxx
patching file libsrc/occ/Partition_Loop.hxx
patching file libsrc/occ/Partition_Loop2d.hxx
patching file libsrc/occ/Partition_Loop3d.hxx
patching file libsrc/occ/Partition_Spliter.hxx
patching file libsrc/occ/occgeom.cpp
patching file libsrc/occ/occgeom.hpp
patching file libsrc/occ/occmeshsurf.hpp
patching file libsrc/occ/vsocc.cpp
patching file ng/ngpkg.cpp
==> Entering interactive mode
Type `exit' to return and finalize the installation
Install to this prefix: /usr/local/Cellar/nglib/5.3.1

bash-3.2$ diff Makefile.in /tmp/netgen-5.3.1/Makefile.in 

from homebrew-freecad.

bblacey avatar bblacey commented on May 18, 2024

cc: @jimhigson because this is the same root cause as #33 that I closed as a duplicate of this issue.

from homebrew-freecad.

ianrrees avatar ianrrees commented on May 18, 2024

Hi @bblacey, sorry for the slow response (and lack of work on my part...)

The recent "fix" for building nglib is, I think, more to do with the new XCode rather than the new MacOS. It was just to cut out the -lTK* from the configure script - see https://github.com/Homebrew/homebrew-science/pull/4587/files . Very hacky; my guess is that there's a bug in ld where it goes in to an infinite loop in that situation (several non-existent libraries specified), but I haven't yet gotten around to making a simpler test case.

I think there are some OCCT7-related changes that aren't my work, can't remember. Hope this helps?

from homebrew-freecad.

bblacey avatar bblacey commented on May 18, 2024

@ianrrees - thanks. I will include the Makefile.in patch even though it is benign in its current form.

from homebrew-freecad.

bblacey avatar bblacey commented on May 18, 2024

@ianrrees - the homebrew patch regresses opencascade. Re-opening to resolve. You will need to include the same change to the Homebrew-science nglib patch.

from homebrew-freecad.

peterlama avatar peterlama commented on May 18, 2024

@bblacey, thank you for taking care of this! Works fine with macOS 10.12/xcode 8.2.1. Haven't had time for FreeCAD these past couple of weeks.

from homebrew-freecad.

Related Issues (20)

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.