Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • kicad kicad
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1,533
    • Issues 1,533
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 48
    • Merge requests 48
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • KiCad
  • KiCad Source Code
  • kicadkicad
  • Issues
  • #3718
Closed
Open
Created Dec 29, 2019 by Adam Wolf@adamwwolfReporter

OCC_LIBRARY_DIR with Homebrew?

Description

Hi folks!

I'm trying to switch kicad-mac-builder over to OCC, rather than OCE. I am also trying to upstream more of the packaging changes. Thirdly, I'm trying to support installing OCC via brew, rather than requiring that people build it as part of kicad-mac-builder.

As part of the macos bundle fixup, we need to give fixup_bundle a directory corresponding to where the OCC libraries are.

I started by giving it OCC_LIBRARY_DIR, which ends up being /usr/local/lib on my Mac. This does contain the libraries like libTKVCAF.7.dylib. However, fixup_bundle chokes, and fails the build. If I give fixup_bundle a "dirs" argument containing the Homebrew directory containing the libraries (/usr/local/Cellar/opencascade/7.4.0/lib/), it's functional.

Here's what my setup looks like.

$ ls -l /usr/local/lib | grep libTKVCAF.7.dylib lrwxr-xr-x 1 wolf admin 49 Dec 9 08:05 libTKVCAF.7.dylib -> ../Cellar/opencascade/7.4.0/lib/libTKVCAF.7.dylib

I am not sure what the right next step is here. I can think of a few different approaches.

  1. We could modify FindOpenCascade to know about Homebrew (and macports, maybe?). It looks like it used to have this, for OCE, but it was removed. It is not clear to me why it was removed. I think I like this one the most, but I want to understand why it went away first before suggesting it in earnest.

  2. I could setup a variable that gets passed as the dirs argument to fixup_bundle, and work around it that way.

  3. I could patch KiCad and require that opencascade be installed by brew for kicad-mac-builder.

  4. OpenCascade could be built as part of kicad-mac-builder, and I can patch/hardcode/work around the issue that way.

  5. I could dig into fixup_bundle and getprerequisites and see if there's an issue there for why /usr/local/lib doesn't work but /usr/local/Cellar/opencascade/*/lib does.

I don't really like 2-4. I bet there are ideas I haven't thought of.

I'm going to tag @sethhillbrand here since I know he wants kicad-mac-builder to switch to OCC :)

Edited Dec 29, 2019 by Adam Wolf
Assignee
Assign to
Time tracking