Error compiling with gralloc_priv.h file
<p>New to programming so be easy on me. I'm receiving an error while compiling for an AOSP rom. I'm doing all of this on Ubuntu 12.04 kernel 3.2.0.29 if that helps any. </p>

<p>This is the error I'm receiving:</p>

<blockquote>
  <p>device/lge/c800/include/gralloc_priv.h: In member function 'T&amp; Queue::getHeadValue()\     > const':
  device/lge/c800/include/gralloc_priv.h:169:55: error: there are no arguments to 'LOGE' that > depend on a template parameter, so a declaration of 'LOGE' must be available [-fpermissive]
  device/lge/c800/include/gralloc_priv.h:169:55: note: (if you use '-fpermissive', G++ will   > accept your code, but allowing the use of an undeclared name is deprecated) </p>
</blockquote>

<p>This is the section of code that it relates to in the header file:</p>

<pre><code>/*
 * Copyright (C) 2008 The Android Open Source Project
 * Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef GRALLOC_PRIV_H_
#define GRALLOC_PRIV_H_

#include &lt;stdint.h&gt;
#include &lt;limits.h&gt;
#include &lt;sys/cdefs.h&gt;
#include &lt;hardware/gralloc.h&gt;
#include &lt;pthread.h&gt;
#include &lt;errno.h&gt;
#include &lt;unistd.h&gt;

#include &lt;cutils/native_handle.h&gt;

#include &lt;linux/fb.h&gt;

#if defined(__cplusplus) &amp;&amp; defined(HDMI_DUAL_DISPLAY)
#include "overlayLib.h"
using namespace overlay;
#endif

enum {
    /* gralloc usage bits indicating the type
     * of allocation that should be used */

    /* ADSP heap is deprecated, use only if using pmem */
    GRALLOC_USAGE_PRIVATE_ADSP_HEAP       =       GRALLOC_USAGE_PRIVATE_0,
    /* SF heap is used for application buffers, is not secured */
    GRALLOC_USAGE_PRIVATE_UI_CONTIG_HEAP  =       GRALLOC_USAGE_PRIVATE_1,
    /* SMI heap is deprecated, use only if using pmem */
    GRALLOC_USAGE_PRIVATE_SMI_HEAP        =       GRALLOC_USAGE_PRIVATE_2,
    /* SYSTEM heap comes from kernel vmalloc,
     * can never be uncached, is not secured*/
    GRALLOC_USAGE_PRIVATE_SYSTEM_HEAP     =       GRALLOC_USAGE_PRIVATE_3,
    /* IOMMU heap comes from manually allocated pages,
     * can be cached/uncached, is not secured */
    GRALLOC_USAGE_PRIVATE_IOMMU_HEAP      =       0x01000000,
    /* MM heap is a carveout heap for video, can be secured*/
    GRALLOC_USAGE_PRIVATE_MM_HEAP         =       0x02000000,
    /* WRITEBACK heap is a carveout heap for writeback, can be secured*/
    GRALLOC_USAGE_PRIVATE_WRITEBACK_HEAP  =       0x04000000,
    /* CAMERA heap is a carveout heap for camera, is not secured*/
    GRALLOC_USAGE_PRIVATE_CAMERA_HEAP     =       0x08000000,

    /* Set this for allocating uncached memory (using O_DSYNC)
     * cannot be used with noncontiguous heaps */
    GRALLOC_USAGE_PRIVATE_UNCACHED        =       0x00100000,

    /* This flag needs to be set when using a non-contiguous heap from ION.
     * If not set, the system heap is assumed to be coming from ashmem
     */
    GRALLOC_USAGE_PRIVATE_ION             =       0x00200000,

    /* This flag can be set to disable genlock synchronization
     * for the gralloc buffer. If this flag is set the caller
     * is required to perform explicit synchronization.
     * WARNING - flag is outside the standard PRIVATE region
     * and may need to be moved if the gralloc API changes
     */
    GRALLOC_USAGE_PRIVATE_UNSYNCHRONIZED  =       0X00400000,

    /* Set this flag when you need to avoid mapping the memory in userspace */
    GRALLOC_USAGE_PRIVATE_DO_NOT_MAP      =       0X00800000,

    /* Buffer content should be displayed on an external display only */
    GRALLOC_USAGE_EXTERNAL_ONLY           =       0x00010000,

    /* Only this buffer content should be displayed on external, even if
     * other EXTERNAL_ONLY buffers are available. Used during suspend.
     */
    GRALLOC_USAGE_EXTERNAL_BLOCK          =       0x00020000,
};

enum {
    /* Gralloc perform enums
    */
    GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER = 0x080000001,
};


enum {
    GPU_COMPOSITION,
    C2D_COMPOSITION,
    MDP_COMPOSITION,
    CPU_COMPOSITION,
};

/* numbers of max buffers for page flipping */
#define NUM_FRAMEBUFFERS_MIN 2
#define NUM_FRAMEBUFFERS_MAX 3

/* number of default bufers for page flipping */
#define NUM_DEF_FRAME_BUFFERS 2
#define NO_SURFACEFLINGER_SWAPINTERVAL
#define INTERLACE_MASK 0x80
#define S3D_FORMAT_MASK 0xFF000
#define COLOR_FORMAT(x) (x &amp; 0xFFF) // Max range for colorFormats is 0 - FFF
#define DEVICE_PMEM "/dev/pmem"
#define DEVICE_PMEM_ADSP "/dev/pmem_adsp"
#define DEVICE_PMEM_SMIPOOL "/dev/pmem_smipool"
/*****************************************************************************/
#ifdef __cplusplus

//XXX: Remove framebuffer specific classes and defines to a different header
template &lt;class T&gt;
struct Node
{
    T data;
    Node&lt;T&gt; *next;
};


template &lt;class T&gt;
struct Node
{
    T data;
    Node&lt;T&gt; *next;
};

template &lt;class T&gt;
class Queue
{
public:
    Queue(): front(NULL), back(NULL), len(0) {dummy = new T;}
    ~Queue()
    {
        clear();
        delete dummy;
    }
    void push(const T&amp; item)   //add an item to the back of the queue
    {
        if(len != 0) {         //if the queue is not empty
            back-&gt;next = new Node&lt;T&gt;; //create a new node
            back = back-&gt;next; //set the new node as the back node
            back-&gt;data = item;
            back-&gt;next = NULL;
        } else {
            back = new Node&lt;T&gt;;
            back-&gt;data = item;
            back-&gt;next = NULL;
            front = back;
       }
       len++;
    }
    void pop()                 //remove the first item from the queue
    {
        if (isEmpty())
            return;            //if the queue is empty, no node to dequeue
        T item = front-&gt;data;
        Node&lt;T&gt; *tmp = front;
        front = front-&gt;next;
        delete tmp;
        if(front == NULL)      //if the queue is empty, update the back pointer
            back = NULL;
        len--;
        return;
    }
    T&amp; getHeadValue() const    //return the value of the first item in the queue
    {                          //without modification to the structure
        if (isEmpty()) {
            LOGE("Error can't get head of empty queue");
            return *dummy;
        }
        return front-&gt;data;
    }

    bool isEmpty() const       //returns true if no elements are in the queue
    {
        return (front == NULL);
    }

    size_t size() const        //returns the amount of elements in the queue
    {
        return len;
    }
</code></pre>

<p>If anyone can help with this error and explain it to me would be very helpful. If more info is needed I will post whatever is needed. I will probably be posting a few more errors here but wanted to see how I do with this first post. Thanks to all in advance. </p>
