Opened 5 months ago

Last modified 5 months ago

#61220 assigned defect

ghc @8.10.1: error renaming ".../testsuite": no such file or directory

Reported by: ryandesign (Ryan Schmidt) Owned by: essandess (Steve Smith)
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: Cc:
Port: ghc

Description

Building ghc failed for reasons specific to my system. I fixed the problem and tried continuing the ghc build, but then it failed for a different reason:

Error: Failed to build ghc: error renaming "/opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-ryandesign-fork_lang_ghc/ghc/work/ghc-8.10.1/testsuite": no such file or directory

This is happening because the ghc portfile contains this block:

    pre-build {
        # test: move extracted testsuite directory to src
        xinstall -m 0755 -d ${srcpath}/${distname}
        move        ${test.dir} ${srcpath}/${distname}/testsuite
        test.dir    ${srcpath}/${distname}/testsuite
    }

Logically, this block can only succeed the first time it is executed and will fail if the build phase is interrupted for any reason and later resumed, which is something that the port should allow to happen.

Can this block be changed to a post-extract block? That way, assuming it succeeds, the extract phase will be marked completed and the block won't be run again.

There is no use to setting test.dir in this block, since this block is not for the test phase. There is a later test.dir setting in the portfile anyway; hopefully that is the correct one.

Change History (3)

comment:1 in reply to:  description Changed 5 months ago by ryandesign (Ryan Schmidt)

Summary: ghc: error renaming ".../testsuite": no such file or directoryghc @8.10.1: error renaming ".../testsuite": no such file or directory

Replying to ryandesign:

There is no use to setting test.dir in this block, since this block is not for the test phase. There is a later test.dir setting in the portfile anyway; hopefully that is the correct one.

In fact no, the test.dir set globally is not correct, which is what causes #61221.

comment:3 Changed 5 months ago by essandess (Steve Smith)

In ab891551d4693be90aa6492b0f4e5b8d98cebf29/macports-ports (master):

ghc: Bugfixes for test and iconv linking

Fixes:

Note: See TracTickets for help on using tickets.