Opened 7 years ago

Closed 7 years ago

#55024 closed defect (fixed)

ghc @7.8.3_6 build error: openBinaryFile: does not exist

Reported by: 1-61803 Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: ghc

Description (last modified by kencu (Ken))

:info:build 6 warnings generated.
:info:build "inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O    -package-name ghc-7.8.3 -hide-all-packages -i -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage2/build -icompiler/stage2/build/autogen -Icompiler/stage2/build -Icompiler/stage2/build/autogen -Icompiler/. -Icompiler/parser -Icompiler/utils -Icompiler/../rts/dist/build -Icompiler/stage2 -I/opt/local/lib/libffi-3.2.1/include  -optP-DGHCI -optP-include -optPcompiler/stage2/build/autogen/cabal_macros.h -package Cabal-1.18.1.3 -package array-0.5.0.0 -package base-4.7.0.1 -package bin-package-db-0.0.0.0 -package bytestring-0.10.4.0 -package containers-0.5.5.1 -package directory-1.2.1.0 -package filepath-1.3.0.2 -package hoopl-3.10.0.1 -package hpc-0.6.0.1 -package process-1.2.0.0 -package template-haskell-2.9.0.0 -package time-1.4.2 -package transformers-0.3.0.0 -package unix-2.7.0.1 -Wall -fno-warn-name-shadowing -XHaskell98 -XCPP -XMagicHash -XUnboxedTuples -XPatternGuards -XForeignFunctionInterface -XEmptyDataDecls -XTypeSynonymInstances -XMultiParamTypeClasses -XFlexibleInstances -XRankNTypes -XScopedTypeVariables -XDeriveDataTypeable -XBangPatterns -XNondecreasingIndentation -optc-DTHREADED_RTS -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -O2  -no-user-package-db -rtsopts      -odir compiler/stage2/build -hidir compiler/stage2/build -stubdir compiler/stage2/build  -dynamic-too -c compiler/types/TypeRep.lhs-boot -o compiler/stage2/build/TypeRep.o-boot -dyno compiler/stage2/build/TypeRep.dyn_o-boot
:info:build "inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O    -package-name ghc-7.8.3 -hide-all-packages -i -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage2/build -icompiler/stage2/build/autogen -Icompiler/stage2/build -Icompiler/stage2/build/autogen -Icompiler/. -Icompiler/parser -Icompiler/utils -Icompiler/../rts/dist/build -Icompiler/stage2 -I/opt/local/lib/libffi-3.2.1/include  -optP-DGHCI -optP-include -optPcompiler/stage2/build/autogen/cabal_macros.h -package Cabal-1.18.1.3 -package array-0.5.0.0 -package base-4.7.0.1 -package bin-package-db-0.0.0.0 -package bytestring-0.10.4.0 -package containers-0.5.5.1 -package directory-1.2.1.0 -package filepath-1.3.0.2 -package hoopl-3.10.0.1 -package hpc-0.6.0.1 -package process-1.2.0.0 -package template-haskell-2.9.0.0 -package time-1.4.2 -package transformers-0.3.0.0 -package unix-2.7.0.1 -Wall -fno-warn-name-shadowing -XHaskell98 -XCPP -XMagicHash -XUnboxedTuples -XPatternGuards -XForeignFunctionInterface -XEmptyDataDecls -XTypeSynonymInstances -XMultiParamTypeClasses -XFlexibleInstances -XRankNTypes -XScopedTypeVariables -XDeriveDataTypeable -XBangPatterns -XNondecreasingIndentation -optc-DTHREADED_RTS -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -O2  -no-user-package-db -rtsopts      -odir compiler/stage2/build -hidir compiler/stage2/build -stubdir compiler/stage2/build  -dynamic-too -c compiler/basicTypes/SrcLoc.lhs -o compiler/stage2/build/SrcLoc.o -dyno compiler/stage2/build/SrcLoc.dyn_o
:info:build "inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O    -package-name ghc-7.8.3 -hide-all-packages -i -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage2/build -icompiler/stage2/build/autogen -Icompiler/stage2/build -Icompiler/stage2/build/autogen -Icompiler/. -Icompiler/parser -Icompiler/utils -Icompiler/../rts/dist/build -Icompiler/stage2 -I/opt/local/lib/libffi-3.2.1/include  -optP-DGHCI -optP-include -optPcompiler/stage2/build/autogen/cabal_macros.h -package Cabal-1.18.1.3 -package array-0.5.0.0 -package base-4.7.0.1 -package bin-package-db-0.0.0.0 -package bytestring-0.10.4.0 -package containers-0.5.5.1 -package directory-1.2.1.0 -package filepath-1.3.0.2 -package hoopl-3.10.0.1 -package hpc-0.6.0.1 -package process-1.2.0.0 -package template-haskell-2.9.0.0 -package time-1.4.2 -package transformers-0.3.0.0 -package unix-2.7.0.1 -Wall -fno-warn-name-shadowing -XHaskell98 -XCPP -XMagicHash -XUnboxedTuples -XPatternGuards -XForeignFunctionInterface -XEmptyDataDecls -XTypeSynonymInstances -XMultiParamTypeClasses -XFlexibleInstances -XRankNTypes -XScopedTypeVariables -XDeriveDataTypeable -XBangPatterns -XNondecreasingIndentation -optc-DTHREADED_RTS -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -O2  -no-user-package-db -rtsopts      -odir compiler/stage2/build -hidir compiler/stage2/build -stubdir compiler/stage2/build  -dynamic-too -c compiler/utils/Bag.lhs -o compiler/stage2/build/Bag.o -dyno compiler/stage2/build/Bag.dyn_o
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_lang_ghc/ghc/work/.tmp/ghc62354_0/ghc62354_1.lpp: openBinaryFile: does not exist (No such file or directory)
:info:build make[1]: *** [compiler/stage2/build/Bag.o] Error 1
:info:build make[1]: *** Waiting for unfinished jobs....

Attachments (2)

main.log.zip (311.0 KB) - added by 1-61803 7 years ago.
main.log.2.zip (218.7 KB) - added by 1-61803 7 years ago.

Download all attachments as: .zip

Change History (13)

Changed 7 years ago by 1-61803

Attachment: main.log.zip added

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

might be a race condition on your machine. It built on all the buildbots, and builds for me locally.

What happens if you just retry the build without cleaning?

And if that doesn't work, try adding use_parallel_build no to the portfile, clean and reinstall and see if that fixes it.

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

Cc: neverpanic removed
Owner: set to neverpanic
Status: newassigned
Summary: ghc @7.8.3_6 fails to buildghc @7.8.3_6 build error: openBinaryFile: does not exist

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

Description: modified (diff)

comment:4 in reply to:  1 Changed 7 years ago by 1-61803

Replying to kencu:

might be a race condition on your machine. It built on all the buildbots, and builds for me locally.

I tried reinstalling without cleaning and then cleaning the port. I now get in both cases

:info:build ld: file not found: libraries/unix/dist-install/build/System/Posix/Resource_o_split/Resource__26.o

I attached the log.

Changed 7 years ago by 1-61803

Attachment: main.log.2.zip added

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

and disabling parallel building?

comment:6 in reply to:  5 Changed 7 years ago by 1-61803

Replying to kencu:

and disabling parallel building?

It does indeed after a couple of hours — but why so in my setup?

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

It's a weird thing that happens when building big projects like compilers. With the right combination of processors, number of cores, amount and speed of memory, and type of disc, some required parts are not finished when another thread needs them, so it errors out with weird errors.

I saw this occasionally at times while fixing ghc for various systems, never reproducibly. We could just set use_parallel_build no permanently to solve issues like yours - but then the 99% of people who don't see this error would take hours longer to build it.

I guess I'd set it in the portfile to minimize headaches, and let the buildbots build it for most everyone, but we'll leave it to the macports admins to decide.

comment:8 in reply to:  7 Changed 7 years ago by 1-61803

Replying to kencu:

It's a weird thing that happens when building big projects like compilers. With the right combination of processors, number of cores, amount and speed of memory, and type of disc, some required parts are not finished when another thread needs them, so it errors out with weird errors.

Thanks, Ken. It actually only happened when going from 7.8.3_5 to 7.8.3_6.
I'll keep the port locally set to use_parallel_build no for the time being.

comment:9 Changed 7 years ago by neverpanic (Clemens Lang)

@kencu: I'd say go ahead and deactivate parallel builds if they don't work reliably. GHC is distributable, so most people will get the binary archive anyway.

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

will do.

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

Resolution: fixed
Status: assignedclosed

In d743f3690941c7f531926f07ec7f4142795bb22a/macports-ports:

ghc: disable parallel building

closes #55024

Note: See TracTickets for help on using tickets.