Compilation failure since upgrading to Ubuntu 18.04
Issue #1
new
We just upgraded the Stackage build image to Ubuntu 18.04, and I'm seeing the following build failure when trying to compile h2c
:
Preprocessing library for h2c-1.0.0..
In file included from dist/build/System/IO/I2C_hsc_make.c:1:0:
I2C.hsc: In function ‘main’:
I2C.hsc:117:56: error: ‘I2C_M_TEN’ undeclared (first use in this function); did you mean ‘I2C_PEC’?
/opt/ghc/8.6.3/lib/ghc-8.6.3/template-hsc.h:105:10: note: in definition of macro ‘hsc_enum’
if ((x) < 0) \
^
I2C.hsc:117:56: note: each undeclared identifier is reported only once for each function it appears in
/opt/ghc/8.6.3/lib/ghc-8.6.3/template-hsc.h:105:10: note: in definition of macro ‘hsc_enum’
if ((x) < 0) \
^
I2C.hsc:118:55: error: ‘I2C_M_RD’ undeclared (first use in this function); did you mean ‘I2C_M_TEN’?
/opt/ghc/8.6.3/lib/ghc-8.6.3/template-hsc.h:105:10: note: in definition of macro ‘hsc_enum’
if ((x) < 0) \
^
I2C.hsc:119:60: error: ‘I2C_M_NOSTART’ undeclared (first use in this function); did you mean ‘I2C_M_RD’?
/opt/ghc/8.6.3/lib/ghc-8.6.3/template-hsc.h:105:10: note: in definition of macro ‘hsc_enum’
if ((x) < 0) \
^
I2C.hsc:120:65: error: ‘I2C_M_REV_DIR_ADDR’ undeclared (first use in this function)
/opt/ghc/8.6.3/lib/ghc-8.6.3/template-hsc.h:105:10: note: in definition of macro ‘hsc_enum’
if ((x) < 0) \
^
I2C.hsc:121:63: error: ‘I2C_M_IGNORE_NAK’ undeclared (first use in this function); did you mean ‘I2C_M_NOSTART’?
/opt/ghc/8.6.3/lib/ghc-8.6.3/template-hsc.h:105:10: note: in definition of macro ‘hsc_enum’
if ((x) < 0) \
^
I2C.hsc:122:63: error: ‘I2C_M_NO_RD_ACK’ undeclared (first use in this function); did you mean ‘I2C_M_IGNORE_NAK’?
/opt/ghc/8.6.3/lib/ghc-8.6.3/template-hsc.h:105:10: note: in definition of macro ‘hsc_enum’
if ((x) < 0) \
^
I2C.hsc:120:75: error: ‘I2C_FUNC_10BIT_ADDR’ undeclared (first use in this function); did you mean ‘I2C_M_REV_DIR_ADDR’?
/opt/ghc/8.6.3/lib/ghc-8.6.3/template-hsc.h:105:10: note: in definition of macro ‘hsc_enum’
if ((x) < 0) \
And a bunch more. Any thoughts on what could be going on here?
Comments (1)
-
repo owner - Log in to comment
Hi Michael,
I'll try to take a look at this next weekend. At first glance it looks like the Linux I2C API changed significantly, but it could be something else.