Re: [GHC] #2469: Linking fails with "multiple definition of `deRefStablePtr'"

2008-09-16 Thread GHC
#2469: Linking fails with "multiple definition of `deRefStablePtr'"
--+-
 Reporter:  meteficha |  Owner:  simonmar
 Type:  bug   | Status:  closed  
 Priority:  high  |  Milestone:  6.10.1  
Component:  Compiler (FFI)|Version:  6.8.2   
 Severity:  normal| Resolution:  fixed   
 Keywords:  linker ffi stableptr  | Difficulty:  Unknown 
 Testcase:|   Architecture:  Unknown 
   Os:  Multiple  |  
--+-
Changes (by simonmar):

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

Comment:

 Fixed:
 {{{
 Tue Sep 16 14:22:22 BST 2008  Simon Marlow <[EMAIL PROTECTED]>
   * FIX #2469: sort out our static/extern inline story
   gcc has changed the meaning of "extern inline" when certain flags are
   on (e.g. --std=gnu99), and this broke our use of it in the header
   files.
 }}}

-- 
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] #2469: Linking fails with "multiple definition of `deRefStablePtr'"

2008-09-02 Thread GHC
#2469: Linking fails with "multiple definition of `deRefStablePtr'"
--+-
 Reporter:  meteficha |  Owner:  simonmar
 Type:  bug   | Status:  new 
 Priority:  high  |  Milestone:  6.10.1  
Component:  Compiler (FFI)|Version:  6.8.2   
 Severity:  normal| Resolution:  
 Keywords:  linker ffi stableptr  | Difficulty:  Unknown 
 Testcase:|   Architecture:  Unknown 
   Os:  Multiple  |  
--+-
Changes (by simonmar):

  * owner:  => simonmar

Comment:

 `deRefStablePtr` is defined like this:

 {{{
 #if defined(__GNUC__)
 # ifndef RTS_STABLE_C
 extern inline
 # endif
 StgPtr deRefStablePtr(StgStablePtr sp)
 {
 ASSERT(stable_ptr_table[(StgWord)sp].ref > 0);
 return stable_ptr_table[(StgWord)sp].addr;
 }
 #else
 /* No support for 'extern inline' */
 extern StgPtr deRefStablePtr(StgStablePtr sp);
 #endif
 }}}

 and `extern inline` is supposed to treat the definition as a macro; that
 is, it never gets emitted into the object file, which is what we want.
 This seems to be working correctly with the various gcc versions I have
 here.

 What gcc versions are installed on the boxes that fail?

-- 
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] #2469: Linking fails with "multiple definition of `deRefStablePtr'"

2008-09-02 Thread GHC
#2469: Linking fails with "multiple definition of `deRefStablePtr'"
--+-
 Reporter:  meteficha |  Owner: 
 Type:  bug   | Status:  new
 Priority:  high  |  Milestone:  6.10.1 
Component:  Compiler (FFI)|Version:  6.8.2  
 Severity:  normal| Resolution: 
 Keywords:  linker ffi stableptr  | Difficulty:  Unknown
 Testcase:|   Architecture:  Unknown
   Os:  Multiple  |  
--+-
Changes (by simonmar):

  * priority:  normal => high

Comment:

 Looks like a show-stopper => high priority

-- 
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] #2469: Linking fails with "multiple definition of `deRefStablePtr'"

2008-08-31 Thread GHC
#2469: Linking fails with "multiple definition of `deRefStablePtr'"
--+-
 Reporter:  meteficha |  Owner: 
 Type:  bug   | Status:  new
 Priority:  normal|  Milestone:  6.10.1 
Component:  Compiler (FFI)|Version:  6.8.2  
 Severity:  normal| Resolution: 
 Keywords:  linker ffi stableptr  | Difficulty:  Unknown
 Testcase:|   Architecture:  Unknown
   Os:  Multiple  |  
--+-
Changes (by igloo):

  * difficulty:  => Unknown
  * milestone:  => 6.10.1

Comment:

 Thanks, we'll take a look.

 Looks like this example depends on GLFW and OpenGL.

-- 
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] #2469: Linking fails with "multiple definition of `deRefStablePtr'"

2008-07-27 Thread GHC
#2469: Linking fails with "multiple definition of `deRefStablePtr'"
-+--
Reporter:  meteficha |Owner:  
Type:  bug   |   Status:  new 
Priority:  normal|Milestone:  
   Component:  Compiler (FFI)|  Version:  6.8.2   
Severity:  normal|   Resolution:  
Keywords:  linker ffi stableptr  | Testcase:  
Architecture:  Unknown   |   Os:  Multiple
-+--
Changes (by guest):

 * cc: [EMAIL PROTECTED] (added)

Comment:

 Upgrading my Mac to 6.8.3 and typeing "cabal install HipmunkPlayround"
 produces the same error, if that's any help.

 -Antoine

-- 
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] #2469: Linking fails with "multiple definition of `deRefStablePtr'"

2008-07-27 Thread GHC
#2469: Linking fails with "multiple definition of `deRefStablePtr'"
-+--
Reporter:  meteficha |   Owner:
Type:  bug   |  Status:  new   
Priority:  normal|   Component:  Compiler (FFI)
 Version:  6.8.2 |Severity:  normal
Keywords:  linker ffi stableptr  |Testcase:
Architecture:  Unknown   |  Os:  Multiple  
-+--
 Package Hipmunk-0.1 in Hackage compiles fine, but when compiling
 !HipmunkPlayground-0.1 it fails with something like (this message from
 Hackage build log)
 {{{
 Building executable: HipmunkPlayground...
 Creating dist/build/HipmunkPlayground (and its parents)
 Creating dist/build/HipmunkPlayground/HipmunkPlayground-tmp (and its
 parents)
 /usr/local/bin/ghc -o dist/build/HipmunkPlayground/HipmunkPlayground
 --make -hide-all-packages -i -idist/build/autogen
 -idist/build/HipmunkPlayground/HipmunkPlayground-tmp -i.
 -Idist/build/HipmunkPlayground/HipmunkPlayground-tmp -odir
 dist/build/HipmunkPlayground/HipmunkPlayground-tmp -hidir
 dist/build/HipmunkPlayground/HipmunkPlayground-tmp -stubdir
 dist/build/HipmunkPlayground/HipmunkPlayground-tmp -package
 containers-0.1.0.1 -package base-3.0.1.0 -package Hipmunk-0.1 -package
 OpenGL-2.2.1.1 -package GLFW-0.3 -O -Wall ./Playground.hs
 [1 of 1] Compiling Main ( ./Playground.hs,
 dist/build/HipmunkPlayground/HipmunkPlayground-tmp/Main.o )
 Linking dist/build/HipmunkPlayground/HipmunkPlayground ...
 /usr/local/lib/ghc-6.8.2/libHSrts.a(Stable.o): In function
 `deRefStablePtr':
 Stable.c:(.text+0x0): multiple definition of `deRefStablePtr'
 
/usr/local/tmp/archive/install/lib/Hipmunk-0.1/ghc-6.8.2/libHSHipmunk-0.1.a(Space_stub.o):Space_stub.c:(.text+0x0):
 first defined here
 collect2: ld returned 1 exit status
 }}}

 This bug has been observed on some configurations, but not on some others:

 || '''Worked''' || '''Box tried''' || '''Arch''' || '''OS''' ||
 '''Version''' ||
 || ''Failed''   || My 2nd box  || x86_32 || Debian Linux || GHC
 6.8.2 ||
 || ''Failed''   || dons' box   || ???|| ??? Linux|| GHC
 6.8.2 ||
 || ''Failed''   || Antoines's box  || x86_?? || Mac OS 10.5  || GHC
 6.8.2 ||
 || ''Failed''   || Hackage || ???|| ???  || GHC
 6.8.2 ||
 || Ok   || My 1st box  || x86_64 || Gentoo Linux || GHC
 6.8.3 ||
 || Ok   || My 3rd box  || x86_32 || Windows XP   || GHC
 6.8.1 ||

 On all cases that failed above, the message was about multiple definition
 of defRefStablePtr (which Hipmunk doesn't use directly). On my 2nd box and
 on dons' one, it was confirmed that configuring the Hipmunk package (not
 HipmunkPlayground where the problem appears) with "--enable-split-objs"
 makes everything work. I think this is a GHC bug because it works on some
 boxes and because there's nothing fancy on Hipmunk (specially about
 StablePtr's).

 Some possibly useful links:
  *
 
http://hackage.haskell.org/packages/archive/HipmunkPlayground/0.1/logs/failure/ghc-6.8
  * http://www.haskell.org/pipermail/haskell-cafe/2008-July/045543.html

 I don't have a clue on what is needed to reproduce this bug, but I'll try
 to give any info as requested. At first I thought about bug 2100 that got
 fixed in 6.8.3, but my 3rd box with 6.8.1 doesn't complain.

-- 
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