View Issue Details

IDProjectCategoryView StatusLast Update
0002500FreeCADFeaturepublic2016-05-04 09:42
Reportermkramer Assigned Toian.rees  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionno change required 
PlatformMacOSOS XOS Version10.11.2
Product Version0.15 
Summary0002500: Can't build nglib on Mac OS X
DescriptionIt might be a little unfair to report this as a bug to your project and not on nglib's project - but I did notice that ian.rees was the author of the Homebrew formula for nglib 5.3.1, (http://www.freecadweb.org/tracker/view.php?id=2432) and that ya'll apparently have an interest in keeping FreeCAD building on Macs.

I'm just reporting that the brew formula hasn't been working for me. After a whole lot of chugging that includes 20 gigs of swap, I get a rare linker assertion error which is almost unknown to Google.

The linker error is "ld: Assertion failed: (counter() < 0xffff)", which I think has to do with clang's hard limit of 2^16 linked classes. It's almost as if my build is hitting an infinite recursion of linking.
Steps To ReproduceInstalling nglib with Homebrew does it:

Mon Apr 11 08:54:34:~$ brew install --with-oce nglib
==> Installing nglib from homebrew/science
==> Downloading https://downloads.sourceforge.net/project/netgen-mesher/netgen-mesher/5.3/netgen-5.3.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/nglib-5.3.1.tar.gz
==> Patching
patching file libsrc/occ/Partition_Loop2d.cxx
patching file ng/Makefile.in
Hunk #1 succeeded at 327 with fuzz 1.
==> ./configure --prefix=/usr/local/Cellar/nglib/5.3.1 --disable-gui --enable-nglib --enable-occ --with-occ=/usr/local/opt/oce/inc
==> make install
Last 15 lines from /Users/mkramer/Library/Logs/Homebrew/nglib/02.make:
0 0x10949697e __assert_rtn + 144
1 0x1094dec72 ld::tool::InputFiles::findDylib(char const*, char const*) + 1140
2 0x109478e14 generic::dylib::File<x86_64>::processIndirectLibraries(ld::dylib::File::DylibHandler*, bool) + 82
3 0x1094df87b ld::tool::InputFiles::createIndirectDylibs() + 271
4 0x1094e07f0 ld::tool::InputFiles::forEachInitialAtom(ld::File::AtomHandler&, ld::Internal&) + 504
5 0x1094eadec ld::tool::Resolver::resolve() + 44
6 0x109497787 main + 940
7 0x7fff937205ad start + 1
A linker snapshot was created at:
    /tmp/libocc.0.dylib-2016-03-11-205543.ld-snapshot
ld: Assertion failed: (counter() < 0xffff), function nextCounter, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-264.3.101/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/Homebrew/homebrew-science/issues

Additional InformationMon Apr 11 08:54:34:~$ brew info nglib
homebrew/science/nglib: stable 5.3.1 (bottled)
C++ Library of NETGEN's tetrahedral mesh generator
https://sourceforge.net/projects/netgen-mesher/
Not installed
From: https://github.com/Homebrew/homebrew-science/blob/master/nglib.rb
==> Dependencies
Optional: opencascade ?, oce ?
==> Options
--with-oce
    Build with oce support
--with-opencascade
    Build with opencascade support
Mon Apr 11 09:16:44:~$
TagsNo tags attached.
FreeCAD Information

Activities

ian.rees

2016-04-12 20:38

developer   ~0006958

Thanks for the bug report, though I think we need to move this to the tracker at github: https://github.com/Homebrew/homebrew-science/issues

Would you mind re-posting your bug there, and at-mention me ( @ianrrees )? This sounds like a weird issue, so might benefit from the increased traffic at homebrew-science compared to our issue tracker. Also would be good to know more info:

  * More about your OS and build environment (xcode version, etc).
  * Do you have opencascade or oce installed via Homebrew?
  * Have you tried installing nglib without oce?
  * Do you have any other package managers?

Thanks! -Ian-

Rogermc

2016-05-04 04:13

reporter   ~0007041

Last edited: 2016-05-04 04:14

I have reported this bug today at https://github.com/Homebrew/homebrew-science/issues/3624

ian.rees

2016-05-04 09:42

developer   ~0007042

Not a FreeCAD bug. Was an issue compiling nglib from git sources.

Issue History

Date Modified Username Field Change
2016-04-12 02:23 mkramer New Issue
2016-04-12 16:32 wmayer Assigned To => ian.rees
2016-04-12 16:32 wmayer Status new => assigned
2016-04-12 20:38 ian.rees Note Added: 0006958
2016-05-04 04:13 Rogermc Note Added: 0007041
2016-05-04 04:14 Rogermc Note Edited: 0007041
2016-05-04 09:42 ian.rees Note Added: 0007042
2016-05-04 09:42 ian.rees Status assigned => closed
2016-05-04 09:42 ian.rees Resolution open => no change required