Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#715 closed bug (fixed)

OpenAL package fails to compile with older headers

Reported by: ayqazi@… Owned by: panne
Priority: high Milestone:
Component: Compiler Version: 6.4.2
Keywords: compile build error Cc: ayqazi@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

Hi,

My architecture:

Gentoo Linux on a Pentium III 500HMz

I perform the following steps:

$ (mkdir ghc-darcs; cd ghc-darcs; \

darcs get --partial http://darcs.haskell.org/ghc)

$ (cd ghc-darcs/ghc; chmod +x darcs-all; ./darcs-all get)

$ mkdir ghc-build

$ lndir $PWD/ghc-darcs/ghc ghc-build

$ cd ghc-build; \

autoreconf; \
./configure --prefix=/usr/local/ghc

I then place the following build.mk file into ghc-build/mk:

#BuildFlavour = devel
BuildFlavour = perf

ifeq "$(BuildFlavour)" "devel"

GhcCompilerWays =

SRC_HC_OPTS = -H32m -O0 $(MyWarningOpts)
GhcHcOpts = -Rghc-timing -DDEBUG
GhcLibHcOpts = -O -dcore-lint $(MyWarningOpts) -keep-hc-files
GhcLibWays =

# profiled RTS
#GhcRtsCcOpts = -pg -g

# Optimised/profiled RTS
#GhcRtsCcOpts = -O2 -pg

#GhcRtsWithFrontPanel = YES
#SRC_HC_OPTS += gtk-config --libs

SplitObjs = NO

NoFibWays =
SRC_RUNTEST_OPTS += +RTS -H10m -RTS
STRIP=:

endif

# -------- 1. A Performance/Distribution build--------------------------------

ifeq "$(BuildFlavour)" "perf"

SRC_HC_OPTS = -H32m -O $(MyWarningOpts)
GhcHcOpts = -Rghc-timing
GhcLibHcOpts =

GhcLibWays = p

# Multiprocessor Haskell
GhcLibWays += s

GhcRtsCcOpts = -O2 -fomit-frame-pointer -mpreferred-stack-boundary=2 -march=pentium3
endif

I then do (from the ghc-build directory):

$ nice make

Here is a snippet of last part of the output I get:


==fptools== make all -wr -f Makefile;

in /home/ayqazi/src/packages/ghc/ghc-build/libraries/OpenAL


../../ghc/compiler/ghc-inplace -H32m -O -W -fno-warn-unused-matches -fwarn-unused-imports -Wall -fffi -Iinclude '-#include "HsOpenAL.h"' -cpp -DCALLCONV=ccall -ignore-package OpenAL -package base -package OpenGL -fgenerics -split-objs -c Sound/OpenAL/ALC/Capture.hs -o Sound/OpenAL/ALC/Capture.o -ohi Sound/OpenAL/ALC/Capture.hi

Sound/OpenAL/ALC/Capture.hs:85:3:

Couldn't match expected type `NumSamples'

against inferred type `Sound.OpenAL.Config.ALCint'

Expected type: GettableStateVar NumSamples
Inferred type: GettableStateVar Sound.OpenAL.Config.ALCint

In the expression:

makeGettableStateVar $ (getInteger (Just device) CaptureSamples)

In the definition of `captureNumSamples':

captureNumSamples device

makeGettableStateVar $ (getInteger (Just device) CaptureSamples)

make[2]: * [Sound/OpenAL/ALC/Capture.o] Error 1
make[1]:
* [all] Error 1
make[1]: Leaving directory `/home/ayqazi/src/packages/ghc/ghc-build/libraries'
make: * [build] Error 1
make: Leaving directory `/home/ayqazi/src/packages/ghc/ghc-build'

Thanks

Change History (6)

comment:1 Changed 9 years ago by ayqazi@…

  • Cc ayqazi@… added
  • Priority changed from normal to high

OK, the formatting got totally screwed up. Here is the output again, hopefully not so screwed up:

------------------------------------------------------------------------
==fptools== make all -wr -f Makefile;
 in /home/ayqazi/src/packages/ghc/ghc-build/libraries/OpenAL
------------------------------------------------------------------------
../../ghc/compiler/ghc-inplace -H32m -O -W -fno-warn-unused-matches -fwarn-unused-imports -Wall -fffi -Iinclude '-#include "HsOpenAL.h"' -cpp -DCALLCONV=ccall -ignore-package OpenAL   -package base  -package OpenGL -fgenerics -split-objs    -c Sound/OpenAL/ALC/Capture.hs -o Sound/OpenAL/ALC/Capture.o  -ohi Sound/OpenAL/ALC/Capture.hi

Sound/OpenAL/ALC/Capture.hs:85:3:
    Couldn't match expected type `NumSamples'
           against inferred type `Sound.OpenAL.Config.ALCint'
      Expected type: GettableStateVar NumSamples
      Inferred type: GettableStateVar Sound.OpenAL.Config.ALCint
    In the expression:
        makeGettableStateVar $ (getInteger (Just device) CaptureSamples)
    In the definition of `captureNumSamples':
        captureNumSamples device
                            = makeGettableStateVar $ (getInteger (Just device) CaptureSamples)
make[2]: *** [Sound/OpenAL/ALC/Capture.o] Error 1
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/ayqazi/src/packages/ghc/ghc-build/libraries'
make: *** [build] Error 1
make: Leaving directory `/home/ayqazi/src/packages/ghc/ghc-build'

Can't I list some text that gets wrapped AND doesn't get screwed up by the formatting engine?

comment:2 Changed 9 years ago by ayqazi@…

And I've realised that the bloody build.mk file also got screwed up in the listing. This is getting silly :-)

#BuildFlavour = devel
BuildFlavour = perf


ifeq "$(BuildFlavour)" "devel"

GhcCompilerWays =

SRC_HC_OPTS   = -H32m -O0 $(MyWarningOpts)
GhcHcOpts     = -Rghc-timing -DDEBUG
GhcLibHcOpts  = -O -dcore-lint $(MyWarningOpts) -keep-hc-files 
GhcLibWays    =

# profiled RTS
#GhcRtsCcOpts =  -pg -g

# Optimised/profiled RTS
#GhcRtsCcOpts = -O2 -pg

#GhcRtsWithFrontPanel = YES
#SRC_HC_OPTS += `gtk-config --libs`

SplitObjs = NO

NoFibWays =
SRC_RUNTEST_OPTS += +RTS -H10m -RTS
STRIP=:

endif

ifeq "$(BuildFlavour)" "perf"

SRC_HC_OPTS   = -H32m -O $(MyWarningOpts)
GhcHcOpts     = -Rghc-timing
GhcLibHcOpts  =

GhcLibWays    = p

# Multiprocessor Haskell
GhcLibWays   += s

GhcRtsCcOpts = -O2 -fomit-frame-pointer -mpreferred-stack-boundary=2 -march=pentium3
endif

comment:3 Changed 9 years ago by panne

  • Architecture changed from x86 to Multiple
  • Milestone 6.6 deleted
  • Operating System changed from Linux to Multiple
  • Owner set to panne
  • Summary changed from Compile fails for ghc HEAD to OpenAL package fails to compile with older headers
  • Version changed from 6.5 to 6.4.2

This bug is very probably platform-independent and caused by OpenAL header versionits. It will happen for GHC 6.4.2, too, because the HEAD and the 6.4.2 release should be identical in this respect.

comment:4 Changed 9 years ago by panne

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed 7 years ago by simonmar

  • Architecture changed from Multiple to Unknown/Multiple

comment:6 Changed 7 years ago by simonmar

  • Operating System changed from Multiple to Unknown/Multiple
Note: See TracTickets for help on using tickets.