[Nexus 4 Q&A, Help & Troubleshooting] panilov7:
OK, so I want to build my own AOSP 6.0.1 ROM from source and I'm getting these errors:

target thumb C++: libloc_eng <= hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_agps.cpp
In file included from hardware/qcom/gps/core/loc_core_log.cpp:33:0:
hardware/qcom/gps/core/loc_core_log.cpp:120:15: error: 'GPS_DELETE_ALMANAC_CORR' was not declared in this scope
NAME_VAL( GPS_DELETE_ALMANAC_CORR ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:121:15: error: 'GPS_DELETE_FREQ_BIAS_EST' was not declared in this scope
NAME_VAL( GPS_DELETE_FREQ_BIAS_EST ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:122:15: error: 'GLO_DELETE_EPHEMERIS' was not declared in this scope
NAME_VAL( GLO_DELETE_EPHEMERIS ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:123:15: error: 'GLO_DELETE_ALMANAC' was not declared in this scope
NAME_VAL( GLO_DELETE_ALMANAC ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:124:15: error: 'GLO_DELETE_SVDIR' was not declared in this scope
NAME_VAL( GLO_DELETE_SVDIR ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:125:15: error: 'GLO_DELETE_SVSTEER' was not declared in this scope
NAME_VAL( GLO_DELETE_SVSTEER ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:126:15: error: 'GLO_DELETE_ALMANAC_CORR' was not declared in this scope
NAME_VAL( GLO_DELETE_ALMANAC_CORR ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:127:15: error: 'GPS_DELETE_TIME_GPS' was not declared in this scope
NAME_VAL( GPS_DELETE_TIME_GPS ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:128:15: error: 'GLO_DELETE_TIME' was not declared in this scope
NAME_VAL( GLO_DELETE_TIME ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:129:15: error: 'BDS_DELETE_SVDIR' was not declared in this scope
NAME_VAL( BDS_DELETE_SVDIR ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:130:15: error: 'BDS_DELETE_SVSTEER' was not declared in this scope
NAME_VAL( BDS_DELETE_SVSTEER ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:131:15: error: 'BDS_DELETE_TIME' was not declared in this scope
NAME_VAL( BDS_DELETE_TIME ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:132:15: error: 'BDS_DELETE_ALMANAC_CORR' was not declared in this scope
NAME_VAL( BDS_DELETE_ALMANAC_CORR ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:133:15: error: 'BDS_DELETE_EPHEMERIS' was not declared in this scope
NAME_VAL( BDS_DELETE_EPHEMERIS ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:134:15: error: 'BDS_DELETE_ALMANAC' was not declared in this scope
NAME_VAL( BDS_DELETE_ALMANAC ),
^
out/target/product/mako/obj/include/gps.utils/loc_log.h:47:32: note: in definition of macro 'NAME_VAL'
#define NAME_VAL(x) {"" #x "", x }
^
hardware/qcom/gps/core/loc_core_log.cpp:140:58: warning: unused parameter 'data' [-Wunused-parameter]
const char* loc_get_aiding_data_mask_names(GpsAidingData data)
^
make: *** [out/target/product/mako/obj/SHARED_LIBRARIES/libloc_core_intermediates/loc_core_log.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from hardware/qcom/gps/core/LocApiBase.cpp:33:0:
hardware/qcom/gps/core/LocApiBase.h:217:43: warning: unused parameter 'inSession' [-Wunused-parameter]
inline virtual void setInSession(bool inSession) {}

I got the device configuration from: android.googlesource.com/device/lge/mako

and the kernel from: android.googlesource.com/device/lge/mako-kernel

I'm compiling on Linux mint 17 64 bit

java version "1.7.0_91"

OpenJDK Runtime Environment (IcedTea 2.6.3) (7u91-2.6.3-0ubuntu0.14.04.1)

OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)

gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1)

I extracted the Nexus 4 binaries for Android 5.1.1 (LMY48T). I'm new to this.

Any help is appreciated! Thanks.