#8481: Builing HEAD fails under OSX 10.9/Xcode5/clang at OSMem.c
----------------------------------+----------------------------------------
Reporter: jloos | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Operating System: MacOS X
Architecture: | Type of failure: Building GHC failed
Unknown/Multiple | Test Case:
Difficulty: Unknown | Blocking:
Blocked By: |
Related Tickets: |
----------------------------------+----------------------------------------
Recent changes to OSMem.c brings a build failure on OS X 10.9
{{{
/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen
-O2 -c rts/posix/OSMem.c -o rts/dist/build/posix/OSMem.o
rts/posix/OSMem.c:274:23:
error: use of undeclared identifier '_SC_PHYS_PAGES'
ret = sysconf(_SC_PHYS_PAGES);
^
1 error generated.
make[1]: *** [rts/dist/build/posix/OSMem.o] Error 1
make: *** [all] Error 2
}}}
looking at man sysconf:
{{{
These values also exist, but may not be standard:
_SC_PHYS_PAGES
The number of pages of physical memory. Note that it is
possible that the product of this value and the value of _SC_PAGESIZE
will overflow a long in some configurations on a 32bit
machine.
}}}
I bootstrapped with a homebrew ghc compiled with a homebrew gcc 4.8
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8481>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#6084: Add stg_ap_pnnv and related call patterns
-------------------------------------+------------------------------------
Reporter: SimonMeier | Owner: simonmar
Type: feature request | Status: new
Priority: high | Milestone: 7.8.1
Component: Runtime System | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: 8313 | Related Tickets:
-------------------------------------+------------------------------------
Changes (by simonmar):
* priority: highest => high
Comment:
Thanks - I vaguely remember fixing those problems, so I probably committed
the wrong version of the patch. It's not a showstopper if we don't get
this in, so I'm dropping the prio.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6084#comment:23>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#6084: Add stg_ap_pnnv and related call patterns
-------------------------------------+------------------------------------
Reporter: SimonMeier | Owner: simonmar
Type: feature request | Status: new
Priority: highest | Milestone: 7.8.1
Component: Runtime System | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: 8313 | Related Tickets:
-------------------------------------+------------------------------------
Changes (by thoughtpolice):
* owner: => simonmar
* priority: normal => highest
* version: 7.4.1 => 7.7
Comment:
Simon, I've gone ahead and reverted your commit (in
d34f1c851d6ef01aef109dd3515db1b795056aa) since it's causing failures. Mind
taking a look?
Also, perhaps there should be a flag for the PAP fastcall optimization
like there are for most of the other optimizations only happening at -O2.
Or not. I'll let you decide.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6084#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#6084: Add stg_ap_pnnv and related call patterns
-------------------------------------+------------------------------------
Reporter: SimonMeier | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.8.1
Component: Runtime System | Version: 7.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: 8313 | Related Tickets:
-------------------------------------+------------------------------------
Comment (by int-e):
PS. There is also a stray {{{pprTrace}}} call in the {{{slowCall}}} code.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6084#comment:20>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#6084: Add stg_ap_pnnv and related call patterns
-------------------------------------+------------------------------------
Reporter: SimonMeier | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.8.1
Component: Runtime System | Version: 7.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: 8313 | Related Tickets:
-------------------------------------+------------------------------------
Changes (by int-e):
* status: closed => new
* resolution: fixed =>
Comment:
This needs more work--currently the stage 2 compiler crashes occasionally.
The obvious problem is that the new fast path in the code generated by
{{{StgCmmLayout.slowCall}}} does not untag the pointer to the closure
(this affects the arity test as well which makes it hard to trigger). I
tried to fix this as follows:
{{{
--- a/compiler/codeGen/StgCmmLayout.hs
+++ b/compiler/codeGen/StgCmmLayout.hs
@@ -192,9 +192,12 @@ slowCall fun stg_args
let n_args = length stg_args
if n_args > arity && optLevel dflags >= 2
then do
+ funv <- (CmmReg . CmmLocal) `fmap` assignTemp fun
+ let untaggedFunv = cmmOffset dflags funv (-1) -- is the tag
always 1?
+
fast_code <- getCode $
emitCall (NativeNodeCall, NativeReturn)
- (entryCode dflags (closureInfoPtr dflags fun))
+ (entryCode dflags (closureInfoPtr dflags untaggedFunv))
(nonVArgs ((P,Just fun):argsreps))
slow_lbl <- newLabelC
@@ -202,10 +205,9 @@ slowCall fun stg_args
is_tagged_lbl <- newLabelC
end_lbl <- newLabelC
- funv <- (CmmReg . CmmLocal) `fmap` assignTemp fun
-
- let correct_arity = cmmEqWord dflags (funInfoArity dflags
funv)
- (mkIntExpr dflags
n_args)
+ let correct_arity = cmmEqWord dflags
+ (funInfoArity dflags untaggedFunv)
+ (mkIntExpr dflags n_args)
pprTrace "fast call" (int n_args) $ return ()
}}}
But now I get
{{{
ghc-stage2: internal error: PAP object entered!
}}}
and indeed PAPs are treated specially in the {{{stg_ap_*}}} functions, and
the fast path does not mirror that special treatment.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6084#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#8466: Aggregate “ambiguous import” errors for the same name
------------------------------------+-------------------------------------
Reporter: nomeata | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
When porting legacy code, such an error happens frequently. But instead of
{{{
[5 of 5] Compiling Main ( src/main.hs, dist/build/DAG-
Tournament/DAG-Tournament-tmp/Main.o )
src/main.hs:302:23:
Ambiguous occurrence `eventButton'
It could refer to either `Graphics.UI.Gtk.eventButton',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventButton',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
src/main.hs:302:54:
Ambiguous occurrence `eventClick'
It could refer to either `Graphics.UI.Gtk.eventClick',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventClick',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
src/main.hs:305:23:
Ambiguous occurrence `eventButton'
It could refer to either `Graphics.UI.Gtk.eventButton',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventButton',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
src/main.hs:305:54:
Ambiguous occurrence `eventClick'
It could refer to either `Graphics.UI.Gtk.eventClick',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventClick',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
src/main.hs:330:23:
Ambiguous occurrence `eventModifier'
It could refer to either `Graphics.UI.Gtk.eventModifier',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventModifier',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
src/main.hs:332:23:
Ambiguous occurrence `eventModifier'
It could refer to either `Graphics.UI.Gtk.eventModifier',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventModifier',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
src/main.hs:334:23:
Ambiguous occurrence `eventKeyName'
It could refer to either `Graphics.UI.Gtk.eventKeyName',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventKeyName',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
src/main.hs:338:23:
Ambiguous occurrence `eventKeyName'
It could refer to either `Graphics.UI.Gtk.eventKeyName',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventKeyName',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
src/main.hs:345:23:
Ambiguous occurrence `eventKeyName'
It could refer to either `Graphics.UI.Gtk.eventKeyName',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventKeyName',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
}}}
I’d really prefer to read
{{{
[5 of 5] Compiling Main ( src/main.hs, dist/build/DAG-
Tournament/DAG-Tournament-tmp/Main.o )
src/main.hs:302:23:
Ambiguous occurrence `eventButton'
It could refer to either `Graphics.UI.Gtk.eventButton',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventButton',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
(also at src/main.hs:305:23,
src/main.hs:302:54:
Ambiguous occurrence `eventClick'
It could refer to either `Graphics.UI.Gtk.eventClick',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventClick',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
(also at src/main.hs:305:54)
src/main.hs:330:23:
Ambiguous occurrence `eventModifier'
It could refer to either `Graphics.UI.Gtk.eventModifier',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventModifier',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
(also at src/main.hs:332:23)
src/main.hs:334:23:
Ambiguous occurrence `eventKeyName'
It could refer to either `Graphics.UI.Gtk.eventKeyName',
imported from `Graphics.UI.Gtk' at
src/main.hs:10:1-22
(and originally defined in
`Graphics.UI.Gtk.Gdk.EventM')
or `Graphics.UI.Gtk.Gdk.Events.eventKeyName',
imported from `Graphics.UI.Gtk.Gdk.Events' at
src/main.hs:12:1-33
(also at src/main.hs:338:23 and src/main.hs:345:23)
}}}
or some other kind of aggregation of the information.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8466>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler