[GHC] #8902: Test for RTLD_NEXT, RTLD_DEFAULT broken on Linux
#8902: Test for RTLD_NEXT, RTLD_DEFAULT broken on Linux ------------------------------------+--------------------------------- Reporter: trommler | Owner: Type: bug | Status: new Priority: low | Milestone: Component: libraries/unix | Version: 7.8.1-rc2 Keywords: | Operating System: Linux Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+--------------------------------- Building 7.8.1RC2 on openSUSE, I see this: {{{ [ 2270s] checking return type of unsetenv... int [ 2270s] checking for RTLD_NEXT from dlfcn.h... no [ 2270s] checking for RTLD_DEFAULT from dlfcn.h... no [ 2270s] checking for RTLD_LOCAL from dlfcn.h... yes }}} The manual says that both RTLD_NEXT and RTLD_DEFAULT exist. Setting priority to low as I don't see any failures because of that. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8902> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8902: Test for RTLD_NEXT, RTLD_DEFAULT broken on Linux -----------------------------------+------------------------------------ Reporter: trommler | Owner: Type: bug | Status: closed Priority: low | Milestone: Component: libraries/unix | Version: 7.8.1-rc2 Resolution: invalid | Keywords: Operating System: Linux | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -----------------------------------+------------------------------------ Changes (by thomie): * status: new => closed * resolution: => invalid Comment: The current behavior is correct. From [http://www.polarhome.com/service/man/generic.php?qf=dlsym&type=2&of=OpenSuSE... man dlsym]: "The symbols RTLD_DEFAULT and RTLD_NEXT are defined by <dlfcn.h> only when _GNU_SOURCE was defined before including it." From System/Posix/DynamicLinker/Prim.hsc: -- On some host (e.g. SuSe Linux 7.2) RTLD_NEXT is not visible -- without setting _GNU_SOURCE. Since we don't want to set this -- flag, here's a different solution: You can use the Haskell -- function 'haveRtldNext' to check wether the flag is available -- to you. Ideally, this will be optimized by the compiler so -- that it should be as efficient as an #ifdef. -- If you fail to test the flag and use it although it is -- undefined, 'packOneModuleFlag' will bomb. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8902#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8902: Test for RTLD_NEXT, RTLD_DEFAULT broken on Linux -------------------------------------+------------------------------------- Reporter: trommler | Owner: Type: bug | Status: closed Priority: low | Milestone: Component: | Version: 7.8.1-rc2 libraries/unix | Keywords: Resolution: invalid | Operating System: Linux Differential Revisions: | Type of failure: None/Unknown Architecture: | Test Case: Unknown/Multiple | Blocking: Difficulty: Unknown | Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Comment (by thomie): Merged: https://github.com/haskell/unix/commit/4c32cd4444270c94249f0f161951c4e9465e7... Add haddock comments on RTLD_NEXT and RTLD_DEFAULT Related ticket: #8902. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8902#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC