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

Build failure with mpfr-4.1.1 and cgal-5.5 #4479

Closed
dwightkelly opened this issue Dec 29, 2022 · 5 comments · Fixed by #4496
Closed

Build failure with mpfr-4.1.1 and cgal-5.5 #4479

dwightkelly opened this issue Dec 29, 2022 · 5 comments · Fixed by #4496
Labels
Ext: CGAL Related to upstream CGAL bug/issue Waiting for upstream fix

Comments

@dwightkelly
Copy link

dwightkelly commented Dec 29, 2022

OpenSCAD fails to build against mpfr-4.1.1 and cgal-5.5.
This is most likely an upstream bug in MPFR:

Looks like it will be fixed in mpfr-4.2

Was:

Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin21.6.0
OS: macOS 12.6.1 Intel
openscad @2015.03-3_9 (installed using macport)

:info:build In file included from src/LibraryInfo.cc:15:
:info:build In file included from src/cgal.h:24:
:info:build In file included from /opt/local/include/CGAL/Gmpq.h:26:
:info:build In file included from /opt/local/include/CGAL/Gmpz.h:34:
:info:build In file included from /opt/local/include/CGAL/Gmp_coercion_traits.h:33:
:info:build /opt/local/include/CGAL/GMP/Gmpfr_type.h:208:25: error: cannot initialize a variable of type 'mpfr_ptr' (aka '__mpfr_struct *') with an lvalue of type 'mpfr_srcptr' (aka 'const __mpfr_struct *')
:info:build                         mpfr_custom_get_kind(f),
:info:build                         ^~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/mpfr.h:1030:14: note: expanded from macro 'mpfr_custom_get_kind'
:info:build     mpfr_ptr _x = (x);                                                  \
:info:build              ^
:info:build /opt/local/include/mpfr.h:1010:9: note: expanded from macro 'mpfr_custom_init_set'
:info:build   _k = (k);                                                    \
:info:build         ^
@kintel kintel added the Wontfix label Dec 29, 2022
@kintel
Copy link
Member

kintel commented Dec 29, 2022

"openscad@2015.03-3_9" - this is an ancient version of OpenSCAD. If you really want to get this working on MacPorts, I would suggest either upgrading the MacPorts build or work with the MacPorts maintainer (if they're still active), or report a bug against MacPorts: https://ports.macports.org/port/openscad/

For an easier path, we do offer pre-compiled binaries at https://openscad.org/downloads.html

@dwightkelly
Copy link
Author

I would recommend deleting the macport listing on your website.

Screen Shot 2022-12-29 at 2 26 09 PM

@t-paul
Copy link
Member

t-paul commented Dec 31, 2022

CGAL issue mentions this is actually a MPFR-4.1.1 bug - CGAL/cgal#7064

@kintel
Copy link
Member

kintel commented Dec 31, 2022

Good find @t-paul - I've verified that building against mpfr-4.1.1 and cgal-5.5 fails on master as well.
Reopening and renaming for tracking.

@kintel kintel reopened this Dec 31, 2022
@kintel kintel changed the title error compiling on macOS Build failure with mpfr-4.1.1 and cgal-5.5 Dec 31, 2022
@kintel kintel added Ext: CGAL Related to upstream CGAL bug/issue Waiting for upstream fix and removed OS: macOS Wontfix labels Dec 31, 2022
@kintel
Copy link
Member

kintel commented Dec 31, 2022

..but since neither MacPorts or Homebrew packages are maintained, we should perhaps not recommend them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ext: CGAL Related to upstream CGAL bug/issue Waiting for upstream fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants