Opened 8 months ago

Closed 4 months ago

Last modified 3 months ago

#69566 closed defect (fixed)

ghc @9.6.4: configure error compiling test program for c++ stdlib flavor

Reported by: kippesp (Paul Kippes) Owned by: essandess (Steve Smith)
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), mascguy (Christopher Nielsen), stevehav (Steve Havelka), i0ntempest
Port: ghc

Description

Tested on m1 architecture with Sonoma 14.4. Attempted to workaround using Xcode 15.3 (current), 15.2, 15.1 with respective command line tool versions. Attached log made with 15.3.

ghc required for graphviz-gui dependency requirement.

Point of failure:

:info:configure checking C++ standard library flavour... ./configure: line 12534: /usr/bin/clang++ -std=gnu++11: No such file or directory
:info:configure configure: error: Failed to compile test program
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_ghc/ghc/work/ghc-9.6.4" && ./configure --prefix=/opt/local --with-gmp-includes=/opt/local/include --with-gmp-libraries=/opt/local/lib --with-iconv-includes=/opt/local/include --with-iconv-libraries=/opt/local/lib 
:info:configure Exit code: 1

Attachments (1)

main.log.gz (5.5 KB) - added by kippesp (Paul Kippes) 8 months ago.

Download all attachments as: .zip

Change History (12)

Changed 8 months ago by kippesp (Paul Kippes)

Attachment: main.log.gz added

comment:1 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign mascguy added; essandess removed
Owner: set to essandess
Status: newassigned
Summary: ghc @ 9.6.4: configure error compiling test program for c++ stdlib flavorghc @9.6.4: configure error compiling test program for c++ stdlib flavor

Because graphviz depends on gd2 which depends on libavif which depends on pandoc which depends on ghc.

So two things should happen:

  1. This bug in ghc should be fixed.
  2. graphviz should not depend on ghc because that's ridiculous. This should be accomplished either by having libavif not depend on pandoc anymore (for example by not enabling its +docs variant by default or moving libavif documentation to a subport) or, if that's not possible, having gd2 not depend on libavif anymore (that dependency was only recently added; gd2 obviously worked fine for 20 years without it).

comment:2 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)

This problem came up before in #69332.

comment:3 Changed 8 months ago by AttentionalM (AttentionalM)

Same error on M1 Ventura 13.6.6

Last edited 8 months ago by AttentionalM (AttentionalM) (previous) (diff)

comment:4 Changed 7 months ago by Lord-Kamina (Gregorio Litenstein)

Same issue, macports 2.9.3, Intel on Monterey.

Version 0, edited 7 months ago by Lord-Kamina (Gregorio Litenstein) (next)

comment:5 Changed 7 months ago by mfacorcoran

I'm having this same problem building ghc when trying to upgrade py312-jupyterlab:

:info:configure checking whether /usr/bin/clang supports --target... yes
:info:configure checking C++ standard library flavour... ./configure: line 12534: /usr/bin/clang++ -std=gnu++11: No such file or directory
:info:configure configure: error: Failed to compile test program
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_lang_ghc/ghc/work/ghc-9.6.4" && ./configure --prefix=/opt/local --with-gmp-includes=/opt/local/include --with-gmp-libraries=/opt/local/lib --with-iconv-includes=/opt/local/include --with-iconv-libraries=/opt/local/lib
:info:configure Exit code: 1

any workaround?

comment:6 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: stevehav added

Has duplicate #69896.

comment:7 Changed 5 months ago by mcmara (Jack McMara)

Same issue. Intel on Sonoma 14.5:

:info:configure checking C++ standard library flavour... ./configure: line 12534: /usr/bin/clang++ -std=gnu++11: No such file or directory
:info:configure configure: error: Failed to compile test program
:info:configure Command failed:  cd "/Users/gmarani/dev/install/macports/var/macports/build/_Users_gmarani_dev_install_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_ghc/ghc/work/ghc-9.6.4" && ./configure --prefix=/Users/gmarani/dev/install/macports --with-gmp-includes=/Users/gmarani/dev/install/macports/include --with-gmp-libraries=/Users/gmarani/dev/install/macports/lib --with-iconv-includes=/Users/gmarani/dev/install/macports/include --with-iconv-libraries=/Users/gmarani/dev/install/macports/lib 
:info:configure Exit code: 1
:error:configure Failed to configure ghc: consult /Users/xxxxxx/dev/install/macports/var/macports/build/_Users_xxxxxx_dev_install_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_ghc/ghc/work/ghc-9.6.4/config.log
:error:configure Failed to configure ghc: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
:debug:configure     while executing
:debug:configure "$procedure $targetname"

Prevents the installation of gnuplot.

comment:8 Changed 5 months ago by mcmara (Jack McMara)

Confirmed that also for me (installing gnuplot on Intel/Sonoma 14.5/Macports v2.9.3), I was able to get around the issue by installing libavif -docs as @ryandesign mentioned

comment:9 Changed 4 months ago by i0ntempest

I was able to fix (or at least get around) this by editing the configure script, changing two "$CXX" to $CXX. Then the build would start... but fails later with other errors.

comment:10 Changed 4 months ago by i0ntempest

Resolution: fixed
Status: assignedclosed

In 8508e80bb071542db4fcd736fb9671bf7588fbd1/macports-ports (master):

ghc: explictly set -std=gnu++11

increase log verbosity
Closes: #69566

comment:11 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: i0ntempest added

That only solved issue 1 from comment:1; it didn't solve issue 2 which has now been filed again as #70546.

Note: See TracTickets for help on using tickets.