Opened 2 years ago

Closed 2 years ago

#9876 closed bug (fixed)

mkdir errors when running `make sdist`

Reported by: joehillen Owned by: joehillen
Priority: normal Milestone: 7.10.1
Component: Compiler Version: 7.9
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D566
Wiki Page:

Description (last modified by joehillen)

Hi. Newcomer here. I was taking a look at #9095 and I get the following errors when running make sdist.

"rm" -f sdistprep/ghc-7.9.20141208-windows-extra-src.tar.bz2  
mkdir sdistprep
mkdir: cannot create directory ‘sdistprep’: File exists
make[1]: [sdist-windows-tarballs-prep] Error 1 (ignored)
mkdir sdistprep/windows-tarballs
mkdir sdistprep/windows-tarballs/ghc-7.9.20141208
mkdir sdistprep/windows-tarballs/ghc-7.9.20141208/ghc-tarballs
cd sdistprep/windows-tarballs/ghc-7.9.20141208/ghc-tarballs && lndir /home/joe/src/ghc/ghc-tarballs
"rm" -rf sdistprep/windows-tarballs/ghc-7.9.20141208/ghc-tarballs/.git  
cd sdistprep/windows-tarballs && "/bin/tar" chf - ghc-7.9.20141208 2> windows_extra_src_ghc_log | bzip2 -c > /home/joe/src/ghc/sdistprep/ghc-7.9.20141208-windows-extra-src.tar.bz2
"rm" -rf sdistprep/testsuite-ghc  
"rm" -f sdistprep/ghc-7.9.20141208-testsuite.tar.bz2  
mkdir sdistprep
mkdir: cannot create directory ‘sdistprep’: File exists
make[1]: [sdist-testsuite-prep] Error 1 (ignored)

Generally when using mkdir in a Makefile I've found it best to always use mkdir -p just like how you should always use rm -f.

It's a simple fix. I'm submitting a patch for it.

Change History (7)

comment:1 Changed 2 years ago by joehillen

Description: modified (diff)

comment:2 Changed 2 years ago by joehillen

Owner: set to joehillen

comment:3 Changed 2 years ago by joehillen

Differential Rev(s): Phab:D566
Status: newpatch

comment:4 Changed 2 years ago by joehillen

Description: modified (diff)

comment:5 Changed 2 years ago by joehillen

Description: modified (diff)

comment:6 Changed 2 years ago by Austin Seipp <austin@…>

In 9fc3aebd0920561d9d3c747e6b78591d332bed08/ghc:

always use 'mkdir -p' and fix missing dir (fixes #9876)

Summary: Signed-off-by: Joe Hillenbrand <joehillen@gmail.com>

Reviewers: thomie, austin

Reviewed By: thomie, austin

Subscribers: carter, thomie

Differential Revision: https://phabricator.haskell.org/D566

GHC Trac Issues: #9876

comment:7 Changed 2 years ago by thoughtpolice

Milestone: 7.10.1
Resolution: fixed
Status: patchclosed

Merged to 7.10, thanks!

Note: See TracTickets for help on using tickets.