Skip to main content

Linux build error with cablecard_MMI()

5 replies [Last post]
howardteece
Offline
Joined: 2010-06-17
Points: 0

When compiling the 1.1.4 Rel E Platform on Linux we get a build error:

cc1: warnings being treated as errors
     [exec] cablecard.c: In function 'cablecard_MMI':
     [exec] cablecard.c:311: error: implicit declaration of function 'min'

This seems to be because cablecard.c includes <glib.h> that includes <gmacro.h> from the RI_Platform\install\Linux\debug\include\glib-2.0\glib directory.
In gmacro.h there is the standard function MIN(a,b) that perhaps should be used.
In other areas of the Platform [and Stack] there are uses of min() but normally it is defined at the start of each source file that uses it. For cablecard.c this isn't the case.
So the question is, why does my build fail, when it's using the same include directive as [presumably] the daily CC build.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
smaynard
Offline
Joined: 2009-01-27
Points: 0

min(a,b) is also defined in ual.h (if not previously defined) which is included by cablecard.c

greg80303
Offline
Joined: 2008-07-03
Points: 0

Can you please also provide the following information:

  1. Linux distro
  2. GCC version
  3. Complete GCC command line for compiling cablecard.c as it was printed in your terminal just before this error

G

mkorzen
Offline
Joined: 2008-03-05
Points: 0

I just performed a clean check-out and build of the RI_I1_1_4_REL_E tag on a Fedora 12 distro - everything compiled cleanly. The QA team uses machines based on Fedora 10 distribution, so those should work as well.

howardteece
Offline
Joined: 2010-06-17
Points: 0

We missed ual.h from our merge of 1.1.4 E.
Sorry for wasting your time.

greg80303
Offline
Joined: 2008-07-03
Points: 0

No big deal. We're glad you found the problem!