[GHC] #10032: --with-system-libffi not working on Solaris

#10032: --with-system-libffi not working on Solaris -------------------------------------+------------------------------------- Reporter: kgardas | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build | Version: 7.11 System | Operating System: Solaris Keywords: | Type of failure: None/Unknown Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Hello, an attempt to configure ghc-7.10.1-rc2 with: {{{ $ ./configure --with-gmp-includes=/usr/include/gmp/ --with-gmp- libraries=/usr/lib/ --with-system-libffi --with-ffi- includes=/usr/lib/libffi-3.0.9/include/ --with-ffi-libraries=/usr/lib/ }}} results in kind of broken distribution, since gmake test_bindist fails with: {{{ bindisttest/"install dir"/bin/runghc bindisttest/HelloWorld > bindisttest/output diff -U 1 bindisttest/output bindisttest/expected_output No differences encountered bindisttest/"install dir"/bin/ghc --make bindisttest/HelloWorld [1 of 1] Compiling Main ( bindisttest/HelloWorld.lhs, bindisttest/HelloWorld.o ) Linking bindisttest/HelloWorld ... bindisttest/HelloWorld > bindisttest/output diff -U 1 bindisttest/output bindisttest/expected_output No differences encountered bindisttest/"install dir"/bin/ghc-pkg check --no-user-package-db There are problems in package rts-1.0: library-dirs: @FFILibDir@ is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. include-dirs: @FFIIncludeDir@ is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. The following packages are broken, either because they have a problem listed above, or because they depend on a broken package. rts-1.0 ghc-7.10.0.20150123 haskeline-0.7.2.0 terminfo-0.4.0.1 xhtml-3000.2.1 transformers-0.4.2.0 hoopl-3.10.0.2 bin-package-db-0.0.0.0 Cabal-1.22.1.0 binary-0.7.3.0 template-haskell-2.10.0.0 pretty-1.1.2.0 hpc-0.6.0.2 process-1.2.2.0 directory-1.2.2.0 unix-2.7.1.0 time-1.5.0.1 containers-0.5.6.2 bytestring-0.10.6.0 deepseq-1.4.0.0 array-0.5.0.1 filepath-1.3.1.0 base-4.8.0.0 integer-gmp-1.0.0.0 ghc-prim-0.3.1.0 gmake[1]: *** [test_bindist] Error 1 gmake: *** [test_bindist] Error 2 }}} Honestly speaking I must add that even gmake binary-dist was not without issue since this expected ffi headers to be located in rts/dist/build directory but they were obviously not there. I've copied them manually and then binary-dist was able to run. I'm not sure if this is Solaris specific issue or if this also affects other Unix(-like) OSes. I mark that for 7.11 (HEAD) since I'm not sure I'll have a time to address this issue for 7.10.1-rc3/fcs. The workaround is easy, just let ghc use its own copy of ffi library and not the system provided one. In the long term however, having ghc using system provided one is better. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10032 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10032: binary distributions not working --with-system-libffi -------------------------------------+------------------------------------- Reporter: kgardas | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by trommler): * os: Solaris => Unknown/Multiple Comment: You are right, this is not a Solaris only issue. Building a binary distribution with system libffi has never worked on Linux either. At the time I implemented system libffi support I tried to support binary distributions too but gave up half way through because it was not important for Linux distribution providers. I don't think it is difficult to do. Give me a shout if you need help. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10032#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10032: binary distributions not working --with-system-libffi -------------------------------------+------------------------------------- Reporter: kgardas | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #5743 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * related: => #5743 Comment: For reference, the configure option `--with-system-libffi` was added in #5743. Using `./configure --with-system-libffi` in a bindist, you should see the following warning: {{{ WARNING: unrecognized options: --with-system-libffi }}} kgardas: do you want to keep this open as a feature request, or is it sufficient for you to be able to build GHC `--with-system-libffi`? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10032#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10032: binary distributions not working --with-system-libffi -------------------------------------+------------------------------------- Reporter: kgardas | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #5743 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by kgardas): thomie: I'm afraid that due to GHC support for shared libraries and due to OSes shipping their own libffi we kind of need support for system libffi also in binary distribution. I've hit this on Solaris, but the situation on OpenBSD is the same (don't know about Linux): sometimes you can end with the target application binary which is linked against both system and ghc supplied libffi -- IMHO very unlucky situation so I would appreciate kept this open if this does not hurt that much. Thanks! Karel -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10032#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC