Re: [GHC] #648: Problem resolving library paths (missing path in package.conf?)

2006-06-22 Thread GHC
#648: Problem resolving library paths (missing path in package.conf?)
--+-
  Reporter:  [EMAIL PROTECTED]  |  Owner:  simonmar
  Type:  bug  | Status:  closed  
  Priority:  normal   |  Milestone:  
 Component:  Compiler |Version:  6.4.1   
  Severity:  normal   | Resolution:  fixed   
  Keywords:   | Os:  MacOS X 
Difficulty:  Easy (1 hr)  |   Architecture:  powerpc 
--+-
Changes (by simonmar):

  * resolution:  => fixed
  * status:  new => closed

Comment:

 Fixed, I believe.  In HEAD/6.6, there are new options --with-readline-
 includes and --with-readline-libraries to configure, which lets you tell
 the build system about non-standard places for the installed readline
 library.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #648: Problem resolving library paths (missing path in package.conf?)

2006-02-06 Thread GHC
#648: Problem resolving library paths (missing path in package.conf?)
--+-
  Reporter:  [EMAIL PROTECTED]  |  Owner:  simonmar
  Type:  bug  | Status:  new 
  Priority:  normal   |  Milestone:  
 Component:  Compiler |Version:  6.4.1   
  Severity:  normal   | Resolution:  
  Keywords:   | Os:  MacOS X 
Difficulty:  Easy (1 hr)  |   Architecture:  powerpc 
--+-
Changes (by simonpj):

  * owner:  => simonmar

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #648: Problem resolving library paths (missing path in package.conf?)

2006-01-11 Thread GHC
#648: Problem resolving library paths (missing path in package.conf?)
--+-
  Reporter:  [EMAIL PROTECTED]  |  Owner: 
  Type:  bug  | Status:  new
  Priority:  normal   |  Milestone: 
 Component:  Compiler |Version:  6.4.1  
  Severity:  normal   | Resolution: 
  Keywords:   | Os:  MacOS X
Difficulty:  Easy (1 hr)  |   Architecture:  powerpc
--+-
Comment (by [EMAIL PROTECTED]):

 Hi Volker,

 Sorry I misunderstood.  On DP, I get the same effect as ldOptions by using
 a
 custom build.mk, and editing the scripts that invoke ghc and ghci before
 they are installed in their final location.  This is all needed on DP
 because
 we support putting the DP tree anywhere in the file system, to allow non-
 root
 installs.

 On FreeBSD 6, ghci -package readline finds readline without any problem,
 but in this case libreadline is available on the default library path.

 To answer your specific question, on FreeBSD 6,

 {{{
 ivy-mike> ldd /usr/local/lib/ghc-6.4.1/ghc-6.4.1
 /usr/local/lib/ghc-6.4.1/ghc-6.4.1:
 libreadline.so.6 => /lib/libreadline.so.6 (0x28909000)
 libncurses.so.6 => /lib/libncurses.so.6 (0x28936000)
 libm.so.4 => /lib/libm.so.4 (0x28975000)
 libc.so.6 => /lib/libc.so.6 (0x2898b000)
 }}}

 while on OS X,

 {{{
 crossroads-able> otool -L /opt/local/lib/ghc-6.4.1/ghc-6.4.1
 /opt/local/lib/ghc-6.4.1/ghc-6.4.1:
 /opt/local/lib/libreadline.5.0.dylib (compatibility version 5.0.0,
 current version 5.0.0)
 /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0,
 current version 5.4.0)
 /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 88.1.2)
 /opt/local/lib/libgmp.3.dylib (compatibility version 7.0.0,
 current version 7.3.0)
 }}}


 If one sets LD_LIBRARY_PATH, you get the expected behavior on OS X:

 {{{
 crossroads-able> LD_LIBRARY_PATH=/opt/local/lib ghci -package readline
___ ___ _
   / _ \ /\  /\/ __(_)
  / /_\// /_/ / /  | |  GHC Interactive, version 6.4.1, for Haskell 98.
 / /_\\/ __  / /___| |  http://www.haskell.org/ghc/
 \/\/ /_/\/|_|  Type :? for help.

 Loading package base-1.0 ... linking ... done.
 Loading package readline-1.0 ... linking ... done.
 Prelude>
 }}}

 But the user should never have to set LD_LIBRARY_PATH for properly
 packaged software.

 It looks like this is just a buglet that comes from assuming that
 ghc and it dependencies will alway be installed into /usr/local,
 or somewhere else that is on the default library search path. As I noted,
 I can fix this by automatically editing package.conf.  But it really is a
 bug,
 since by setting --prefix= to someplace off the default search path,
 you can break part of ghci.

 -Greg

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #648: Problem resolving library paths (missing path in package.conf?)

2006-01-11 Thread GHC
#648: Problem resolving library paths (missing path in package.conf?)
--+-
  Reporter:  [EMAIL PROTECTED]  |  Owner: 
  Type:  bug  | Status:  new
  Priority:  normal   |  Milestone: 
 Component:  Compiler |Version:  6.4.1  
  Severity:  normal   | Resolution: 
  Keywords:   | Os:  MacOS X
Difficulty:  Easy (1 hr)  |   Architecture:  powerpc
--+-
Comment (by [EMAIL PROTECTED]):

 Just a clarification: GHCi doesn't use paths from ldOptions at all. The
 flag is only for invoking the linker on compilation. My comment was rather
 "It's easier to fix it in the Darwin-framework than in fptools. Take a
 look at what's FreeBSD doing for a related (although different) issue".
 But you're right, for some obscure instances FreeBSD might also need the
 additional path as well for readline in GHCi. Maybe
 ghc::compiler::ghci::Linker.lhs::linkPackage should grep ldOptions for
 "-L", like it is currently doing for "-l". IIRC, libraryDirs is supposed
 to point to Haskell-land only. Simon?

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #648: Problem resolving library paths (missing path in package.conf?)

2006-01-10 Thread GHC
#648: Problem resolving library paths (missing path in package.conf?)
--+-
  Reporter:  [EMAIL PROTECTED]  |  Owner: 
  Type:  bug  | Status:  new
  Priority:  normal   |  Milestone: 
 Component:  Compiler |Version:  6.4.1  
  Severity:  normal   | Resolution: 
  Keywords:   | Os:  MacOS X
Difficulty:  Easy (1 hr)  |   Architecture:  powerpc
--+-
Comment (by guest):

 I tried the FreeBSD solution (adding "-L${prefix}/lib" to the end of the
 ld-options field in package.conf.in. It does not work.  (Same behavior
 as noted in my original bug report.) I suspect that the patch doesn't
 actually
 do anything on FreeBSD either these days; it may have been required by
 an earlier version of ghc.  On FreeBSD, ghci seems to find the readline
 library
 because it is on the standard library search path.

 Darwinports allows its directory tree to be anywhere (and particularly
 allows it to be in a place where one can install software without root
 privilege).  So it looks like I have to edit package.conf after it is
 installed
 to add the extra library directory.

 It would be helpful if there were an config.mk variable which could be set
 in build.mk, to add the extra directory to the generated package.conf.

 -Greg

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #648: Problem resolving library paths (missing path in package.conf?)

2006-01-09 Thread GHC
#648: Problem resolving library paths (missing path in package.conf?)
--+-
  Reporter:  [EMAIL PROTECTED]  |  Owner: 
  Type:  bug  | Status:  new
  Priority:  normal   |  Milestone: 
 Component:  Compiler |Version:  6.4.1  
  Severity:  normal   | Resolution: 
  Keywords:   | Os:  MacOS X
Difficulty:  Easy (1 hr)  |   Architecture:  powerpc
--+-
Comment (by [EMAIL PROTECTED]):

 FWIW, the FreeBSD-port adds the required directory to package.conf, too
 (since this is a site-specific problem and not worth sorting out in the
 fptools-autoconf magic, IMO: There are some intricasies between linking
 with a library and finding out where it is comming from).

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #648: Problem resolving library paths (missing path in package.conf?)

2006-01-08 Thread GHC
#648: Problem resolving library paths (missing path in package.conf?)
+---
Reporter:  [EMAIL PROTECTED]  |Owner: 
Type:  bug  |   Status:  new
Priority:  normal   |Milestone: 
   Component:  Compiler |  Version:  6.4.1  
Severity:  normal   | Keywords: 
  Os:  MacOS X  |   Difficulty:  Easy (1 hr)
Architecture:  powerpc  |  
+---
Hi,

 When I run ghci and try to load the readline package, I get an error:

 {{{
 crossroads-able> ghci -package readline
___ ___ _
   / _ \ /\  /\/ __(_)
  / /_\// /_/ / /  | |  GHC Interactive, version 6.4.1, for Haskell 98.
 / /_\\/ __  / /___| |  http://www.haskell.org/ghc/
 \/\/ /_/\/|_|  Type :? for help.

 Loading package base-1.0 ... linking ... done.
 Loading package readline-1.0 ... ghc-6.4.1: can't load .so/.DLL for:
 readline.5 (dlopen(libreadline.5.dylib, 10): image not found)
 crossroads-able>
 }}}

 The reason for this is that in package.conf, under the
 InstalledPackageInfo
 for readline, the libraryDirs entry is

 {{{
 libraryDirs = ["/opt/local/lib/ghc-6.4.1"]
 }}}

 However, the readline library is in /opt/local/lib.  If I manually edit
 the
 package.conf so that the above is

 {{{
 libraryDirs = ["/opt/local/lib/ghc-6.4.1","/opt/local/lib"]
 }}}

 the above problem is fixed.

 I can tweak the darwinports installation procedure to do this editing
 automatically, but it shouldn't be necessary. Is this a bug in the build
 or configuration system, or is there something else I have overlooked?
 My ghci has readline support so certainly the configuration system has
 found the library.

 In case it helps, the build.mk file used was

 {{{
 #
 # Local configuration overrides for DarwinPorts
 #
 ReadlineIncludePath=/opt/local/include
 SRC_CC_OPTS += -I/opt/local/include
 SRC_HC_OPTS += -I/usr/include -I/opt/local/include -L/usr/lib
 -L/opt/local/lib
 EXTRA_HSC2HS_OPTS += -I/opt/local/include
 EXTRA_LD_OPTS += -L/usr/lib
 EXTRA_LD_OPTS += -L/opt/local/lib
 }}}

 Thanks,
 Greg Wright

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs