Opened 19 years ago
Closed 19 years ago
#4448 closed defect (fixed)
ghc fails to build with DP not installed in /opt/local
Reported by: | kpreid (Kevin Reid) | Owned by: | gwright@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.0 |
Keywords: | Cc: | ||
Port: |
Description
Previously reported and discussed on the maiiling list:
http://www.opendarwin.org/pipermail/darwinports/2005-August/027192.html http://www.opendarwin.org/pipermail/darwinports/2005-August/027197.html http://www.opendarwin.org/pipermail/darwinports/2005-August/027262.html
Installing ghc results in this error:
file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/
ghc-bootstrap/lib/ghc-6.4/ghc-6.4 can't open library: /opt/local/lib/libreadline.5.0.dylib (No such file or directory, errno = 2)
If symlinks are added to the true locations of libreadline.5.0.dylib and libgmp.3.dylib, the result is:
---> Building ghc with target all Error: Target com.apple.build returned: shell command "cd "/Stuff/dp/var/db/dports/build/ file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ ghc-6.4" && gmake all" returned error 2 Command output: PWD = /Stuff/dp/var/db/dports/build/ file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ ghc-6.4/ghc/driver
...similar build messages omitted...
===fptools== Finished making `boot' in mangler split ghc ghci ... PWD = /Stuff/dp/var/db/dports/build/ file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ ghc-6.4/ghc/driver
/Stuff/dp/var/db/dports/build/ file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ ghc-bootstrap/bin/ghc -M -optdep-f -optdep.depend -osuf o -H16m -O -I/usr/include -I/Stuff/ dp/include -L/usr/lib -L/Stuff/dp/lib -cpp -fglasgow-exts -O AbsSyn.lhs First.lhs GenUtils.lhs GetOpt.lhs Grammar.lhs Info.lhs LALR.lhs Lexer.lhs Main.lhs ParseMonad.lhs Parser.hs ProduceCode.lhs ProduceGLRCode.lhs Set.lhs Target.lhs Version.hs Could not find module `Array':
use -v to see a list of the files searched for (imported from GenUtils.lhs)
...recursive gmake exit messages omitted...
Change History (10)
comment:1 Changed 19 years ago by gwright@…
Status: | new → assigned |
---|
comment:2 Changed 19 years ago by gwright@…
Hi Kevin,
The test build was successful on the ghc-6.4.1 snapshot; the changes are backported to 6.4 and the test build is running now. I should have the changes committed later today. I would appreciate if you would test it. The bootstrap compiler may still have some hardcoded path dependencies that need fixing. (And I have too much work going on to wipe my machine and test from a fresh installation.)
Thanks, Greg
comment:3 Changed 19 years ago by gwright@…
Kevin,
I just checked in revision 9 of the ghc portfile. It set DYLD_FALLBACK_LIBRARY_PATH automatically and edits scripts in the bootstrap compiler to account for the nonstandard installation location.
Let me know how it works.
-Greg
comment:4 Changed 19 years ago by kpreid (Kevin Reid)
Fails, but differently.
Before this I did 'port selfupdate' and 'port clean --all ghc'.
This is the log of two attempts, the second of which was with -d. They failed differently. I did a third 'port -d install ghc' and it produced similar output to the second, so I assume the different error is a result of the partial build.
Magpie:/Users/kpreid darwinports_install$ port install ghc ---> Fetching ghc ---> Attempting to fetch ghc-6.4-src.tar.bz2 from http://www.haskell.org/ghc//dist/6.4/ ---> Attempting to fetch happy-1.15-src.tar.gz from http://www.haskell.org/happy/dist/1.15 ---> Attempting to fetch ghc-6.4-darwin-bootstrap-v01.tar.bz2 from http://www.haskell.org/ghc// dist/6.4/MacOSX/ ---> Verifying checksum(s) for ghc ---> Extracting ghc ---> Applying patches to ghc ---> Configuring ghc ---> Building ghc with target all Error: Target com.apple.build returned: shell command "DYLD_FALLBACK_LIBRARY_PATH=/Stuff/dp/lib gmake all" returned error 2 Command output: ==fptools== gmake boot -wr;
in /Stuff/dp/var/db/dports/build/
file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ ghc-6.4/ghc/includes
../../glafp-utils/mkdependC/mkdependC -f .depend -- -O -I/Stuff/dp/include -- mkDerivedConstants.c
==fptools== gmake boot -wr;
in /Stuff/dp/var/db/dports/build/
file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ ghc-6.4/ghc/lib
===fptools== Recursively making `boot' in compat ... PWD = /Stuff/dp/var/db/dports/build/ file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ ghc-6.4/ghc/lib
==fptools== gmake boot - --no-print-directory -r;
in /Stuff/dp/var/db/dports/build/
file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ ghc-6.4/ghc/lib/compat
../../../glafp-utils/mkdependC/mkdependC -f .depend -I../../includes -- -O -I/Stuff/dp/include -- cbits/directory.c cbits/rawSystem.c /Stuff/dp/var/db/dports/build/ file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ ghc-bootstrap/bin/ghc -M -optdep-f -optdep.depend -osuf o -H16m -O -I/usr/include -I/Stuff/ dp/include -L/usr/lib -L/Stuff/dp/lib -I. -Rghc-timing -I../../../libraries -fglasgow-exts -no-recomp Compat/Directory.hs Compat/RawSystem.hs <<ghc: 20071540 bytes, 3 GCs, 91536/91536 avg/max bytes residency (1 samples), 15M in use, 0.02 INIT (0.01 elapsed), 0.08 MUT (0.21 elapsed), 0.03 GC (0.04 elapsed) :ghc>> gmake all rm -f Compat/Directory.o; if [ ! -d Compat/Directory_split ]; then mkdir Compat/Directory_split; else / usr/bin/find Compat/Directory_split -name '*.o' -print | xargs rm -f rm_food; fi; /Stuff/dp/var/db/dports/build/ file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ ghc-bootstrap/bin/ghc -H16m -O -I/usr/include -I/Stuff/dp/include -L/usr/lib -L/Stuff/dp/lib -I. -Rghc-timing -I../../../libraries -fglasgow-exts -no-recomp -split-objs -c Compat/Directory.hs -o Compat/Directory.o -ohi Compat/Directory.hi ghc-6.4: could not execute: /Stuff/dp/var/db/dports/build/ file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ ghc-bootstrap/lib/ghc-6.4/ghc-split <<ghc: 62329424 bytes, 12 GCs, 2744088/5761720 avg/max bytes residency (3 samples), 19M in use, 0.01 INIT (0.02 elapsed), 0.53 MUT (1.51 elapsed), 0.34 GC (0.38 elapsed) :ghc>> gmake[4]: * [Compat/Directory.o] Error 1 gmake[3]: * [boot] Error 2 gmake[2]: * [boot] Error 1 gmake[1]: * [boot] Error 1 gmake[1]: Leaving directory `/Stuff/dp/var/db/dports/build/ file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ ghc-6.4/ghc' gmake: * [build] Error 1
Magpie:/Users/kpreid darwinports_install$ port -d install ghc DEBUG: Found port in file:///Stuff/dp/var/db/dports/sources/ rsync.rsync.opendarwin.org_dpupdate_dports/lang/ghc DEBUG: Changing to port directory: /Stuff/dp/var/db/dports/sources/ rsync.rsync.opendarwin.org_dpupdate_dports/lang/ghc DEBUG: Requested variant powerpc is not provided by port ghc. DEBUG: Requested variant darwin is not provided by port ghc. DEBUG: Requested variant macosx is not provided by port ghc. DEBUG: Executing variant darwin_7 provides darwin_7 DEBUG: Found port in file:///Stuff/dp/var/db/dports/sources/ rsync.rsync.opendarwin.org_dpupdate_dports/lang/perl5.8 DEBUG: Changing to port directory: /Stuff/dp/var/db/dports/sources/ rsync.rsync.opendarwin.org_dpupdate_dports/lang/perl5.8 DEBUG: Searching for dependency: perl5.8 DEBUG: Found Dependency: receipt exists for perl5.8 DEBUG: Found port in file:///Stuff/dp/var/db/dports/sources/ rsync.rsync.opendarwin.org_dpupdate_dports/devel/readline DEBUG: Changing to port directory: /Stuff/dp/var/db/dports/sources/ rsync.rsync.opendarwin.org_dpupdate_dports/devel/readline DEBUG: Searching for dependency: readline DEBUG: Found Dependency: receipt exists for readline DEBUG: Found port in file:///Stuff/dp/var/db/dports/sources/ rsync.rsync.opendarwin.org_dpupdate_dports/devel/gmp DEBUG: Changing to port directory: /Stuff/dp/var/db/dports/sources/ rsync.rsync.opendarwin.org_dpupdate_dports/devel/gmp DEBUG: Searching for dependency: gmp DEBUG: Found Dependency: receipt exists for gmp DEBUG: Found port in file:///Stuff/dp/var/db/dports/sources/ rsync.rsync.opendarwin.org_dpupdate_dports/devel/gmake DEBUG: Changing to port directory: /Stuff/dp/var/db/dports/sources/ rsync.rsync.opendarwin.org_dpupdate_dports/devel/gmake DEBUG: Searching for dependency: gmake DEBUG: Found Dependency: receipt exists for gmake DEBUG: Skipping completed com.apple.main (ghc) DEBUG: Skipping completed com.apple.unarchive (ghc) DEBUG: Skipping completed com.apple.fetch (ghc) DEBUG: Skipping completed com.apple.checksum (ghc) DEBUG: setting option extract.cmd to /Stuff/dp/bin/bzip2 DEBUG: Skipping completed com.apple.extract (ghc) DEBUG: Skipping completed com.apple.patch (ghc) DEBUG: Skipping completed com.apple.configure (ghc) ---> Building ghc with target all DEBUG: Executing com.apple.build (ghc) gmake: * No rule to make target `all'. Stop. Error: Target com.apple.build returned: shell command "DYLD_FALLBACK_LIBRARY_PATH=/Stuff/dp/lib gmake all" returned error 2 Command output: gmake: * No rule to make target `all'. Stop.
Warning: the following items did not execute (for ghc): com.apple.activate com.apple.build com.apple.destroot com.apple.archive com.apple.install Magpie:/Users/kpreid darwinports_install$
comment:5 Changed 19 years ago by gwright@…
Hi Kevin,
One path correction was missed in the previous revision. The ghc-split bug should be fixed. I just checked in a new portfile.
You should use "sudo port clean" between builds because DP has no mechanism for detecting the failure of a build. Something that should be added, I guess.
Thanks, Greg
comment:6 Changed 19 years ago by kpreid (Kevin Reid)
It appears that there is one more set of paths to be fixed up.
The build and install had finished, but when I ran ghci, it tried to use paths containing 'destroot'.
By 'grep -r dports_lang_ghc /Stuff/dp/lib/ghc-6.4/', I found the file '/Stuff/dp/lib/ghc-6.4/ package.conf'. After removing occurrences of '/Stuff/dp/var/db/.../work/destroot/' from that file, ghc appears to work for trivial test cases.
Before editing package.conf:
[Magpie:~ kpreid]$ ghci -v
_ _ _
/ _ \ /\ /\/ (_)
/ /_\ /_/ / / | | GHC Interactive, version 6.4, for Haskell 98.
/ /_
/ / /_| | http://www.haskell.org/ghc/
\/\/ /_/\/|_| Type :? for help.
Using package config file: /Stuff/dp/lib/ghc-6.4/package.conf Hsc static flags: -static * Parser:
<interactive>:1:22:
Failed to load interface for `System.IO':
Could not find module `System.IO':
locations searched:
/Stuff/dp/var/db/dports/build/
file._Stuff_dp_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_lang_ghc/work/ destrootStuff/dp/lib/ghc-6.4/imports/System/IO.hi * Deleting temp files Deleting: ghc-6.4: panic! (the `impossible' happened, GHC version 6.4):
interactiveUI:setBuffering
Please report it as a compiler bug to glasgow-haskell-bugs@…, or http://sourceforge.net/projects/ghc/.
After:
[Magpie:~ kpreid]$ ghci -v
_ _ _
/ _ \ /\ /\/ (_)
/ /_\ /_/ / / | | GHC Interactive, version 6.4, for Haskell 98.
/ /_
/ / /_| | http://www.haskell.org/ghc/
\/\/ /_/\/|_| Type :? for help.
Using package config file: /Stuff/dp/lib/ghc-6.4/package.conf Hsc static flags: -static * Parser: * Desugar: * Simplify: * CorePrep: * ByteCodeGen: Loading package base-1.0 ... linking ... done. * Parser: * Desugar: * Simplify: * CorePrep: * ByteCodeGen: Prelude>
comment:7 Changed 19 years ago by gwright@…
Hi Kevin,
There is actually already a command to edit package.conf to remove the ${destroot} from the paths. The pattern match must be failing. Do you have the original (nonworking) package.conf still? If so, send it to me and I can test the replacement script against it. If not, I'll do another build.
Thanks, Greg
comment:8 Changed 19 years ago by gwright@…
Kevin,
I just checked in a new portfile that fixes the package.conf problem you noted this morning. (It affected both default and non-default install locations.)
Could you give the whole shebang one more build? If it works for you we can close out this bug.
Thanks, Greg
comment:9 Changed 19 years ago by kpreid (Kevin Reid)
Seems to work. ghci runs, ghc compiled a simple program, 'port install darcs' succeeded.
comment:10 Changed 19 years ago by gwright@…
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Kevin,
Thanks for testing it!
Best Wishes, Greg
hi Kevin,
I have a fix for his and will check it in as soon as the test finishes building. (For installations not in /opt/local, the environment variable DYLD_LIBRARY_FALLBACK_PATH has to be set in the portfile. This allows the bootstrap compiler to find libreadline and libgmp in the nonstandard places.)
-Greg