#4973: building ghc7.0.1.20110217 under x86 solaris fails
----------------------------------+-----------------------------------------
  Reporter:  maeder               |          Owner:  igloo  
      Type:  bug                  |         Status:  patch  
  Priority:  highest              |      Milestone:  7.2.1  
 Component:  Compiler             |        Version:  7.0.2  
Resolution:                       |       Keywords:         
  Testcase:                       |      Blockedby:         
Difficulty:                       |             Os:  Solaris
  Blocking:                       |   Architecture:  x86    
   Failure:  Building GHC failed  |  
----------------------------------+-----------------------------------------

Comment(by simonmar):

 Replying to [comment:45 kgardas]:

 > Text relocation remains                         referenced
 >     against symbol                  offset      in file
 > threadPaused                        0x4f5
 rts/dist/build/Schedule.dyn_o
 > threadPaused                        0x1eb
 rts/dist/build/Interpreter.dyn_o
 > threadPaused                        0x27a
 rts/dist/build/Interpreter.dyn_o
 > threadPaused                        0x4ab
 rts/dist/build/Interpreter.dyn_o
 > threadPaused                        0x532
 rts/dist/build/Interpreter.dyn_o
 > threadPaused                        0x5f0
 rts/dist/build/Interpreter.dyn_o
 > threadPaused                        0x691
 rts/dist/build/Interpreter.dyn_o
 > threadPaused                        0x1123
 rts/dist/build/Interpreter.dyn_o
 > threadPaused                        0x1198
 rts/dist/build/Interpreter.dyn_o
 > initTimer                           0x43b
 rts/dist/build/Schedule.dyn_o
 > initTimer                           0x155
 rts/dist/build/RtsStartup.dyn_o
 > awaitEvent                          0xa01
 rts/dist/build/Schedule.dyn_o
 > StgRun                              0xb2e
 rts/dist/build/Schedule.dyn_o
 > StgRun                              0x210
 rts/dist/build/RtsStartup.dyn_o
 > interpretBCO                        0xf5f
 rts/dist/build/Schedule.dyn_o
 > exitTimer                           0x311
 rts/dist/build/RtsStartup.dyn_o
 > initGlobalStore                     0x146
 rts/dist/build/RtsStartup.dyn_o
 > exitGlobalStore                     0x334
 rts/dist/build/RtsStartup.dyn_o
 > initFileLocking                     0x14b
 rts/dist/build/RtsStartup.dyn_o
 > resetTerminalSettings               0x316
 rts/dist/build/RtsStartup.dyn_o
 > freeFileLocking                     0x33e
 rts/dist/build/RtsStartup.dyn_o
 > newArena                            0x195
 rts/dist/build/ProfHeap.dyn_o
 > newArena                            0x77e
 rts/dist/build/ProfHeap.dyn_o
 > arenaAlloc                          0x5e6
 rts/dist/build/ProfHeap.dyn_o
 > arenaFree                           0x3ef
 rts/dist/build/ProfHeap.dyn_o
 > sweep                               0x175b
 rts/dist/build/sm/GC.dyn_o
 > getourtimeofday                     0x191
 rts/dist/build/posix/Select.dyn_o
 > getourtimeofday                     0x370
 rts/dist/build/posix/Select.dyn_o
 > getourtimeofday                     0x1c9
 rts/dist/build/posix/Itimer.dyn_o

 Interesting - these are all the symbols declared with `RTS_PRIVATE` in
 their header files.  RTS_PRIVATE is defined like this:

 {{{
 // Symbols that are extern, but private to the RTS, are declared
 // with visibility "hidden" to hide them outside the RTS shared
 // library.
 #if defined(HAS_VISIBILITY_HIDDEN)
 #define RTS_PRIVATE  GNUC3_ATTRIBUTE(visibility("hidden"))
 #else
 #define RTS_PRIVATE  /* disabled: RTS_PRIVATE */
 #endif
 }}}

 So the errors at least partly make sense: a hidden symbol is supposed to
 be resolved when the library is linked, so the relocation would be in the
 text section.  Maybe the linker is not correctly resolving the symbol at
 link time, and leaving a dynamic relocation.

 There seems to be a similar bug on FreeBSD, looking at
 `rts/BeginPrivate.h`:

 {{{
 /* We don't use symbol visibility pragmas on FreeBSD, because it causes
    "undefined reference" errors at link-time.  The true reasons are
    unknown, however FreeBSD 8.x includes GCC 4.2.1 in the base system,
    which might be buggy. */
 /* On Windows, with gcc 4.5.0-1, using visibility hidden gives:
        error: visibility attribute not supported in this configuration;
 ignored
    */
 #if defined(HAS_VISIBILITY_HIDDEN) && !defined(freebsd_HOST_OS)
 #pragma GCC visibility push(hidden)
 #endif
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4973#comment:46>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to