[GHC] #7879: validate in build tree fails due to problem copying haddock resources to inplace

#7879: validate in build tree fails due to problem copying haddock resources to inplace -----------------------------+---------------------------------------------- Reporter: AndreasVoellmy | Owner: Type: bug | Status: new Priority: normal | Component: Build System Version: | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Other | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- I setup my build tree using the instructions here http://hackage.haskell.org/trac/ghc/wiki/Building/Using . After booting and configuring, I ran "sh validate" which eventually halted on the following command with the following error: "/Users/andreas/repos/temp-ghc-3/ghc-build/inplace/bin/haddock" --odir="libraries/ghc-prim/dist-install/doc/html/ghc-prim" --no-tmp-comp- dir --dump-interface=libraries/ghc-prim/dist-install/doc/html/ghc-prim /ghc-prim.haddock --html --hoogle --title="ghc-prim-0.3.1.0: GHC primitives" --prologue="libraries/ghc-prim/dist-install/haddock- prologue.txt" --optghc=-hisuf --optghc=dyn_hi --optghc=-osuf --optghc=dyn_o --optghc=-hcsuf --optghc=dyn_hc --optghc=-fPIC --optghc=-dynamic --optghc=-H32m --optghc=-O --optghc=-Werror --optghc=-Wall --optghc=-H64m --optghc=-O0 --optghc=-package-name --optghc =ghc-prim-0.3.1.0 --optghc=-hide-all-packages --optghc=-i --optghc=-ilibraries/ghc-prim/. --optghc=-ilibraries/ghc-prim/dist- install/build --optghc=-ilibraries/ghc-prim/dist-install/build/autogen --optghc=-Ilibraries/ghc-prim/dist-install/build --optghc=-Ilibraries/ghc- prim/dist-install/build/autogen --optghc=-Ilibraries/ghc-prim/. --optghc =-optP-include --optghc=-optPlibraries/ghc-prim/dist- install/build/autogen/cabal_macros.h --optghc=-package --optghc=rts-1.0 --optghc=-package-name --optghc=ghc-prim --optghc=-XHaskell98 --optghc=-XCPP --optghc=-XMagicHash --optghc=-XForeignFunctionInterface --optghc=-XUnliftedFFITypes --optghc=-XUnboxedTuples --optghc=-XEmptyDataDecls --optghc=-XNoImplicitPrelude --optghc=-O2 --optghc=-O --optghc=-dcore-lint --optghc=-fno-warn-deprecated-flags --optghc=-no-user-package-db --optghc=-rtsopts --optghc=-odir --optghc=libraries/ghc-prim/dist-install/build --optghc=-hidir --optghc=libraries/ghc-prim/dist-install/build --optghc=-stubdir --optghc=libraries/ghc-prim/dist-install/build libraries/ghc- prim/./GHC/Classes.hs libraries/ghc-prim/./GHC/CString.hs libraries/ghc- prim/./GHC/Debug.hs libraries/ghc-prim/./GHC/Magic.hs libraries/ghc-prim /dist-install/build/GHC/PrimopWrappers.hs libraries/ghc- prim/./GHC/IntWord64.hs libraries/ghc-prim/./GHC/Tuple.hs libraries/ghc- prim/./GHC/Types.hs libraries/ghc-prim/dist- install/build/autogen/GHC/Prim.hs +RTS -tlibraries/ghc-prim/dist- install/doc/html/ghc-prim/ghc-prim.haddock.t --machine-readable Haddock coverage: 78% ( 7 / 9) in 'GHC.Types' 17% ( 1 / 6) in 'GHC.CString' Warning: Couldn't find .haddock for export GHC.Prim.Int64# Warning: Couldn't find .haddock for export GHC.Prim.Word64# 3% ( 1 / 38) in 'GHC.IntWord64' 3% ( 2 / 63) in 'GHC.Tuple' 0% ( 0 / 3) in 'GHC.Debug' 0% ( 0 /342) in 'GHC.PrimopWrappers' 31% (164 /537) in 'GHC.Prim' 100% ( 3 / 3) in 'GHC.Magic' 38% ( 6 / 16) in 'GHC.Classes' haddock: internal error: /Users/andreas/repos/temp-ghc-3/ghc- build/inplace/lib/html/Ocean.std-theme/hslogo-16.png: copyFile: does not exist (No such file or directory) Apparently it can't find /Users/andreas/repos/temp-ghc-3/ghc- build/inplace/lib/html/Ocean.std-theme/hslogo-16.png. That file is in fact there, but it is linked to another file: ls -lh /Users/andreas/repos/temp-ghc-3/ghc-build/inplace/lib/html/Ocean .std-theme total 40 lrwxr-xr-x 1 andreas staff 80B Apr 28 13:13 hslogo-16.png -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/hslogo-16.png lrwxr-xr-x 1 andreas staff 76B Apr 28 13:13 minus.gif -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/minus.gif lrwxr-xr-x 1 andreas staff 76B Apr 28 13:13 ocean.css -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/ocean.css lrwxr-xr-x 1 andreas staff 75B Apr 28 13:13 plus.gif -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/plus.gif lrwxr-xr-x 1 andreas staff 79B Apr 28 13:13 synopsis.png -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/synopsis.png piz-sardona:ghc-build andreas$ cd /Users/andreas/repos/temp-ghc-3/ghc- build/inplace/lib/html/Ocean.std-theme It seems to be trying to link to utils/haddock/resources/html/Ocean.std- theme/hslogo-16.png in my source tree. But the problem is that there is one too many ".." in the links. If there were one fewer ".." in the path, then it would work fine. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7879 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7879: validate in build tree fails due to problem copying haddock resources to inplace -----------------------------+---------------------------------------------- Reporter: AndreasVoellmy | Owner: Type: bug | Status: new Priority: normal | Component: Build System Version: | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Other | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- Comment(by AndreasVoellmy): I think the problem is that the utils/haddock/resources/html directory is copied over to inplace using "cp -R". I verified that using cp -R plays badly with relative links: First make a couple directories and a file: $ mkdir src; cd src; mkdir dir1; cd dir1; mkdir dir2; cd dir2; echo hello
foo.txt; cd ../../.. $ ls src
Now make a target directory whose contents created using lndir with relative path; make sure everything is OK: $ mkdir tgt; cd tgt; lndir ../src; cd .. ../src/dir1: ../../src/dir1/dir2: $ ls src tgt $ ls -l tgt/dir1/dir2 total 8 lrwxr-xr-x 1 andreas staff 30 May 2 09:15 foo.txt -> ../../../src/dir1/dir2/foo.txt $ cat tgt/dir1/dir2/foo.txt hello Now cp -R dir2 up a level in the target; now the file is broken: $ cd tgt $ cp -R dir1/dir2 . $ ls dir1 dir2 $ ls -l dir2 total 8 lrwxr-xr-x 1 andreas staff 30 May 2 09:16 foo.txt -> ../../../src/dir1/dir2/foo.txt $ cat dir2/foo.txt cat: dir2/foo.txt: No such file or directory If we use cp -RL things are OK: $ rm -rf dir2 $ cp -RL dir1/dir2 . $ ls -l dir2 total 8 -rw-r--r-- 1 andreas staff 6 May 2 09:22 foo.txt $ cat dir2/foo.txt hello cp -R is indeed being used on lines 23 and 27 of utils/haddock/ghc.mk. Changing to cp -RL fixes the problem. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7879#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7879: validate in build tree fails due to problem copying haddock resources to inplace -----------------------------+---------------------------------------------- Reporter: AndreasVoellmy | Owner: Type: bug | Status: patch Priority: normal | Component: Build System Version: | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Other | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- Changes (by AndreasVoellmy): * status: new => patch -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7879#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7879: validate in build tree fails due to problem copying haddock resources to inplace ---------------------------------+------------------------------------------ Reporter: AndreasVoellmy | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Build System | Version: Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Other Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by igloo): * difficulty: => Unknown Old description:
I setup my build tree using the instructions here http://hackage.haskell.org/trac/ghc/wiki/Building/Using . After booting and configuring, I ran "sh validate" which eventually halted on the following command with the following error:
"/Users/andreas/repos/temp-ghc-3/ghc-build/inplace/bin/haddock" --odir="libraries/ghc-prim/dist-install/doc/html/ghc-prim" --no-tmp-comp- dir --dump-interface=libraries/ghc-prim/dist-install/doc/html/ghc-prim /ghc-prim.haddock --html --hoogle --title="ghc-prim-0.3.1.0: GHC primitives" --prologue="libraries/ghc-prim/dist-install/haddock- prologue.txt" --optghc=-hisuf --optghc=dyn_hi --optghc=-osuf --optghc=dyn_o --optghc=-hcsuf --optghc=dyn_hc --optghc=-fPIC --optghc=-dynamic --optghc=-H32m --optghc=-O --optghc=-Werror --optghc=-Wall --optghc=-H64m --optghc=-O0 --optghc=-package-name --optghc=ghc-prim-0.3.1.0 --optghc=-hide-all-packages --optghc=-i --optghc=-ilibraries/ghc-prim/. --optghc=-ilibraries/ghc-prim/dist- install/build --optghc=-ilibraries/ghc-prim/dist-install/build/autogen --optghc=-Ilibraries/ghc-prim/dist-install/build --optghc=-Ilibraries /ghc-prim/dist-install/build/autogen --optghc=-Ilibraries/ghc-prim/. --optghc=-optP-include --optghc=-optPlibraries/ghc-prim/dist- install/build/autogen/cabal_macros.h --optghc=-package --optghc=rts-1.0 --optghc=-package-name --optghc=ghc-prim --optghc=-XHaskell98 --optghc=-XCPP --optghc=-XMagicHash --optghc=-XForeignFunctionInterface --optghc=-XUnliftedFFITypes --optghc=-XUnboxedTuples --optghc=-XEmptyDataDecls --optghc=-XNoImplicitPrelude --optghc=-O2 --optghc=-O --optghc=-dcore-lint --optghc=-fno-warn-deprecated-flags --optghc=-no-user-package-db --optghc=-rtsopts --optghc=-odir --optghc=libraries/ghc-prim/dist-install/build --optghc=-hidir --optghc=libraries/ghc-prim/dist-install/build --optghc=-stubdir --optghc=libraries/ghc-prim/dist-install/build libraries/ghc- prim/./GHC/Classes.hs libraries/ghc-prim/./GHC/CString.hs libraries /ghc-prim/./GHC/Debug.hs libraries/ghc-prim/./GHC/Magic.hs libraries /ghc-prim/dist-install/build/GHC/PrimopWrappers.hs libraries/ghc- prim/./GHC/IntWord64.hs libraries/ghc-prim/./GHC/Tuple.hs libraries /ghc-prim/./GHC/Types.hs libraries/ghc-prim/dist- install/build/autogen/GHC/Prim.hs +RTS -tlibraries/ghc-prim/dist- install/doc/html/ghc-prim/ghc-prim.haddock.t --machine-readable Haddock coverage: 78% ( 7 / 9) in 'GHC.Types' 17% ( 1 / 6) in 'GHC.CString' Warning: Couldn't find .haddock for export GHC.Prim.Int64# Warning: Couldn't find .haddock for export GHC.Prim.Word64# 3% ( 1 / 38) in 'GHC.IntWord64' 3% ( 2 / 63) in 'GHC.Tuple' 0% ( 0 / 3) in 'GHC.Debug' 0% ( 0 /342) in 'GHC.PrimopWrappers' 31% (164 /537) in 'GHC.Prim' 100% ( 3 / 3) in 'GHC.Magic' 38% ( 6 / 16) in 'GHC.Classes' haddock: internal error: /Users/andreas/repos/temp-ghc-3/ghc- build/inplace/lib/html/Ocean.std-theme/hslogo-16.png: copyFile: does not exist (No such file or directory)
Apparently it can't find /Users/andreas/repos/temp-ghc-3/ghc- build/inplace/lib/html/Ocean.std-theme/hslogo-16.png. That file is in fact there, but it is linked to another file:
ls -lh /Users/andreas/repos/temp-ghc-3/ghc-build/inplace/lib/html/Ocean .std-theme total 40 lrwxr-xr-x 1 andreas staff 80B Apr 28 13:13 hslogo-16.png -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/hslogo-16.png lrwxr-xr-x 1 andreas staff 76B Apr 28 13:13 minus.gif -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/minus.gif lrwxr-xr-x 1 andreas staff 76B Apr 28 13:13 ocean.css -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/ocean.css lrwxr-xr-x 1 andreas staff 75B Apr 28 13:13 plus.gif -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/plus.gif lrwxr-xr-x 1 andreas staff 79B Apr 28 13:13 synopsis.png -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/synopsis.png piz-sardona:ghc-build andreas$ cd /Users/andreas/repos/temp-ghc-3/ghc- build/inplace/lib/html/Ocean.std-theme
It seems to be trying to link to utils/haddock/resources/html/Ocean.std- theme/hslogo-16.png in my source tree. But the problem is that there is one too many ".." in the links. If there were one fewer ".." in the path, then it would work fine.
New description: I setup my build tree using the instructions here http://hackage.haskell.org/trac/ghc/wiki/Building/Using . After booting and configuring, I ran "sh validate" which eventually halted on the following command with the following error: {{{ "/Users/andreas/repos/temp-ghc-3/ghc-build/inplace/bin/haddock" --odir="libraries/ghc-prim/dist-install/doc/html/ghc-prim" --no-tmp-comp- dir --dump-interface=libraries/ghc-prim/dist-install/doc/html/ghc-prim /ghc-prim.haddock --html --hoogle --title="ghc-prim-0.3.1.0: GHC primitives" --prologue="libraries/ghc-prim/dist-install/haddock- prologue.txt" --optghc=-hisuf --optghc=dyn_hi --optghc=-osuf --optghc=dyn_o --optghc=-hcsuf --optghc=dyn_hc --optghc=-fPIC --optghc=-dynamic --optghc=-H32m --optghc=-O --optghc=-Werror --optghc=-Wall --optghc=-H64m --optghc=-O0 --optghc=-package-name --optghc =ghc-prim-0.3.1.0 --optghc=-hide-all-packages --optghc=-i --optghc=-ilibraries/ghc-prim/. --optghc=-ilibraries/ghc-prim/dist- install/build --optghc=-ilibraries/ghc-prim/dist-install/build/autogen --optghc=-Ilibraries/ghc-prim/dist-install/build --optghc=-Ilibraries/ghc- prim/dist-install/build/autogen --optghc=-Ilibraries/ghc-prim/. --optghc =-optP-include --optghc=-optPlibraries/ghc-prim/dist- install/build/autogen/cabal_macros.h --optghc=-package --optghc=rts-1.0 --optghc=-package-name --optghc=ghc-prim --optghc=-XHaskell98 --optghc=-XCPP --optghc=-XMagicHash --optghc=-XForeignFunctionInterface --optghc=-XUnliftedFFITypes --optghc=-XUnboxedTuples --optghc=-XEmptyDataDecls --optghc=-XNoImplicitPrelude --optghc=-O2 --optghc=-O --optghc=-dcore-lint --optghc=-fno-warn-deprecated-flags --optghc=-no-user-package-db --optghc=-rtsopts --optghc=-odir --optghc=libraries/ghc-prim/dist-install/build --optghc=-hidir --optghc=libraries/ghc-prim/dist-install/build --optghc=-stubdir --optghc=libraries/ghc-prim/dist-install/build libraries/ghc- prim/./GHC/Classes.hs libraries/ghc-prim/./GHC/CString.hs libraries/ghc- prim/./GHC/Debug.hs libraries/ghc-prim/./GHC/Magic.hs libraries/ghc-prim /dist-install/build/GHC/PrimopWrappers.hs libraries/ghc- prim/./GHC/IntWord64.hs libraries/ghc-prim/./GHC/Tuple.hs libraries/ghc- prim/./GHC/Types.hs libraries/ghc-prim/dist- install/build/autogen/GHC/Prim.hs +RTS -tlibraries/ghc-prim/dist- install/doc/html/ghc-prim/ghc-prim.haddock.t --machine-readable Haddock coverage: 78% ( 7 / 9) in 'GHC.Types' 17% ( 1 / 6) in 'GHC.CString' Warning: Couldn't find .haddock for export GHC.Prim.Int64# Warning: Couldn't find .haddock for export GHC.Prim.Word64# 3% ( 1 / 38) in 'GHC.IntWord64' 3% ( 2 / 63) in 'GHC.Tuple' 0% ( 0 / 3) in 'GHC.Debug' 0% ( 0 /342) in 'GHC.PrimopWrappers' 31% (164 /537) in 'GHC.Prim' 100% ( 3 / 3) in 'GHC.Magic' 38% ( 6 / 16) in 'GHC.Classes' haddock: internal error: /Users/andreas/repos/temp-ghc-3/ghc- build/inplace/lib/html/Ocean.std-theme/hslogo-16.png: copyFile: does not exist (No such file or directory) }}} Apparently it can't find /Users/andreas/repos/temp-ghc-3/ghc- build/inplace/lib/html/Ocean.std-theme/hslogo-16.png. That file is in fact there, but it is linked to another file: {{{ ls -lh /Users/andreas/repos/temp-ghc-3/ghc-build/inplace/lib/html/Ocean .std-theme total 40 lrwxr-xr-x 1 andreas staff 80B Apr 28 13:13 hslogo-16.png -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/hslogo-16.png lrwxr-xr-x 1 andreas staff 76B Apr 28 13:13 minus.gif -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/minus.gif lrwxr-xr-x 1 andreas staff 76B Apr 28 13:13 ocean.css -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/ocean.css lrwxr-xr-x 1 andreas staff 75B Apr 28 13:13 plus.gif -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/plus.gif lrwxr-xr-x 1 andreas staff 79B Apr 28 13:13 synopsis.png -> ../../../../../../ghc/utils/haddock/resources/html/Ocean.std- theme/synopsis.png piz-sardona:ghc-build andreas$ cd /Users/andreas/repos/temp-ghc-3/ghc- build/inplace/lib/html/Ocean.std-theme }}} It seems to be trying to link to utils/haddock/resources/html/Ocean.std- theme/hslogo-16.png in my source tree. But the problem is that there is one too many ".." in the links. If there were one fewer ".." in the path, then it would work fine. -- -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7879#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7879: validate in build tree fails due to problem copying haddock resources to inplace ---------------------------------+------------------------------------------ Reporter: AndreasVoellmy | Owner: igloo Type: bug | Status: patch Priority: normal | Milestone: 7.8.1 Component: Build System | Version: Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Other Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by igloo): * owner: => igloo * milestone: => 7.8.1 Comment: Thanks for the patch. I'll look into how portable `cp -L` is. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7879#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7879: validate in build tree fails due to problem copying haddock resources to inplace -------------------------------+-------------------------------------------- Reporter: AndreasVoellmy | Owner: igloo Type: bug | Status: closed Priority: normal | Milestone: 7.8.1 Component: Build System | Version: Resolution: fixed | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Other | Difficulty: Unknown Testcase: | Blockedby: Blocking: | Related: -------------------------------+-------------------------------------------- Changes (by igloo): * status: patch => closed * resolution: => fixed Comment: Looks fine; I've applied the patch. Thanks again! -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7879#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC