Opened 4 years ago

Closed 3 years ago

#60571 closed defect (fixed)

ghc and ports that use ghc: ghc: could not execute: ccache /usr/bin/clang

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: essandess (Steve Smith)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc: iEFdev, judaew (Vadym-Valdis Yudaiev)
Port: ghc, stack, pandoc

Description

pandoc fails to compile. This might not be a pandoc-specific problem but might be general to any port using stack or the haskell_stack portgroup when configureccache yes is set in macports.conf. (The problem doesn't happen if I remove configureccache yes from macports.conf.)

The GHC located at /opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-svn-trunk-new_textproc_pandoc/pandoc/work/.stack/programs/x86_64-osx/ghc-8.6.5/bin/ghc-8.6.5 failed to compile a sanity check. Please see:

    http://docs.haskellstack.org/en/stable/install_and_upgrade/

for more information. Exception was:
Received ExitFailure 1 when running
Raw command: /opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-svn-trunk-new_textproc_pandoc/pandoc/work/.stack/programs/x86_64-osx/ghc-8.6.5/bin/ghc-8.6.5 /opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-svn-trunk-new_textproc_pandoc/pandoc/work/.tmp/stack-sanity-check-77926e2ed3692749/Main.hs -no-user-package-db
Run from: /opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-svn-trunk-new_textproc_pandoc/pandoc/work/.tmp/stack-sanity-check-77926e2ed3692749/
Standard output:

[1 of 1] Compiling Main             ( /opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-svn-trunk-new_textproc_pandoc/pandoc/work/.tmp/stack-sanity-check-77926e2ed3692749/Main.hs, /opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-svn-trunk-new_textproc_pandoc/pandoc/work/.tmp/stack-sanity-check-77926e2ed3692749/Main.o )
Standard error:


<no location info>: error:
    Warning: Couldn't figure out C compiler information!
             Make sure you're using GNU gcc, or clang
ghc: could not execute: ccache /usr/bin/clang

Attachments (1)

shellcheck_trac63787.log (65.0 KB) - added by judaew (Vadym-Valdis Yudaiev) 3 years ago.

Download all attachments as: .zip

Change History (18)

comment:1 Changed 4 years ago by iEFdev

There's an update for pandoc:

pandoc seems to have been updated (port version: 2.9.2.1, new version: 2.10.1)

I also mentioned that in #61043

comment:2 Changed 4 years ago by iEFdev

Cc: iEFdev added

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: essandess removed
Owner: set to essandess
Port: ghc added
Status: newassigned
Summary: pandoc: ghc: could not execute: ccache /usr/bin/clangghc and ports that use ghc: ghc: could not execute: ccache /usr/bin/clang

I see the same problem with ghc itself when configureccache yes is set in macports.conf; the problem disappears when that setting is removed.

comment:4 Changed 4 years ago by essandess (Steve Smith)

I see a working compile of pandoc version 2.10.1 with the latest stack. I'll post a PR.

BTW this is without modifying the default settings for ccache in macports.conf.

comment:5 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Yes, I know that it works fine when not using ccache. This bug report is that it does not work when using ccache.

comment:6 Changed 4 years ago by essandess (Steve Smith)

Resolution: fixed
Status: assignedclosed

In e76db5997f0446f778ccb524ca1de64e52707d7c/macports-ports (master):

pandoc: Update to version 2.10.1

comment:7 Changed 4 years ago by kencu (Ken)

Resolution: fixed
Status: closedreopened

comment:8 Changed 4 years ago by kencu (Ken)

not fixed by that commit

comment:9 Changed 4 years ago by Ionic (Mihai Moldovan)

Working around this is as easy as adding

configure.ccache no

to the Portfile. Both stack and ghc need this, probably more ports, too.

Properly fixing this is another issue.

comment:10 Changed 3 years ago by szhorvat (Szabolcs Horvát)

I just ran into this. Shouldn't this be fixed in the haskell_stack portgroup, possibly with configure.ccache no?

comment:11 Changed 3 years ago by essandess (Steve Smith)

Re: https://github.com/macports/macports-ports/pull/11441

I do not see this issue on macOS 11—pandoc version 2.14.0.3 builds successfully with ccache.

macOS 11.4 20F71 x86_64 Xcode 12.5.1 12E507

I see that @cjones051073 disabled ccache in port stack: https://github.com/macports/macports-ports/commit/ceab9e1424be3914f784d3d0eba53cd4d3a917db#diff-cf93ab709a7a1e022a95a8b2fb855770e3bc2586c0b27dffbf982f668402fc9a

I honestly don't have enough background knowledge of ccache or MacPorts to recommend whether

configure.ccache    no

be included in the portgroup haskell_stack for all such builds.

I'll defer to however @cjones051073, @neverpanic, @ryandesign wish to address this.

comment:12 Changed 3 years ago by judaew (Vadym-Valdis Yudaiev)

Cc: judaew added

Changed 3 years ago by judaew (Vadym-Valdis Yudaiev)

Attachment: shellcheck_trac63787.log added

comment:13 Changed 3 years ago by essandess (Steve Smith)

I propose to simply add

configure.ccache no

to https://github.com/macports/macports-ports/blob/master/_resources/port1.0/group/haskell_stack-1.0.tcl

and hope that it resolves this issue and doesn’t break anything.

Any comment before I issue a PR?

comment:14 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Fine.

comment:15 Changed 3 years ago by judaew (Vadym-Valdis Yudaiev)

Thanks!

comment:17 Changed 3 years ago by essandess (Steve Smith)

Resolution: fixed
Status: reopenedclosed

In 0ec889adef6778635edfed52d0f9ef1fbc800926/macports-ports (master):

haskell_stack: Disable ccache

Note: See TracTickets for help on using tickets.