gem install pg error, Mac Lion - postgresql

I'm on Mac OS 10.7.4, and I have the latest version of Xcode and the Command Line Tools installed.
I'm getting an error (shown below) when I try to "gem install pg":
gem install pg
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/Users/rdp/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/rdp/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
/Users/rdp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/rdp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from /Users/rdp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:970:in `block in find_header'
from /Users/rdp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/rdp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/rdp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/rdp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/rdp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/rdp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/rdp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/rdp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:969:in `find_header'
from extconf.rb:41:in `<main>'
Gem files will remain installed in /Users/rdp/.rvm/gems/ruby-1.9.3-p125/gems/pg-0.14.0 for inspection.
Results logged to /Users/rdp/.rvm/gems/ruby-1.9.3-p125/gems/pg-0.14.0/ext/gem_make.out
Here's the content of my mkmf.log file:
find_executable: checking for pg_config... -------------------- yes
--------------------
"/usr/bin/gcc-4.2 -o conftest -I/Users/rdp/.rvm/rubies/ruby-1.9.3-p125/include/ruby-1.9.1/x86_64-darwin11.3.0 -I/Users/rdp/.rvm/rubies/ruby-1.9.3-p125/include/ruby-1.9.1/ruby/backward -I/Us\
ers/rdp/.rvm/rubies/ruby-1.9.3-p125/include/ruby-1.9.1 -I. -I/Users/rdp/.rvm/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/include -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-pa\
rentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -fno-common -pipe \
conftest.c -L. -L/Users/rdp/.rvm/rubies/ruby-1.9.3-p125/lib -L/Users/rdp/.rvm/usr/lib -L. -L/usr/lib -lruby.1.9.1 -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */

Start XCode, go to the preferences, go to Download and install the Command line tools

Related

Error Building Lineage OS on macOS;unknown type name 'StringPiece'

When I was trying to build my first custom rom based on 7.1.1 (lineage os) the following error occurred.
SPECS ARE :
Macbook pro 2015 retina
Ram:8GB
Storage:512
Processor Name: Intel Core i5
Processor Speed: 2.9 GHz
OS: MacOs Sierra 10.12.2
Xcode:8.2.1(8C1002)
Full Command text is given below:
vibhoothis-MacBook-Pro:los vibhoothiiaanand$ brunch oneplus2
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:268: *** No matches for product "lineage_oneplus2". Stop.
** Warning: 'oneplus2' is using CM-based makefiles. This will be deprecated in the next major release.
Looking for dependencies in device/oneplus/oneplus2
Looking for dependencies in device/oppo/common
Looking for dependencies in device/qcom/common
Dependencies file not found, bailing out.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.1
LINEAGE_VERSION=14.1-20170129-UNOFFICIAL-oneplus2
TARGET_PRODUCT=cm_oneplus2
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-16.3.0-x86_64-i386-64bit
HOST_CROSS_OS=
HOST_CROSS_ARCH=
HOST_CROSS_2ND_ARCH=
HOST_BUILD_TYPE=release
BUILD_ID=NMF26V
OUT_DIR=/Users/vibhoothiiaanand/Desktop/los/out
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.1
LINEAGE_VERSION=14.1-20170129-UNOFFICIAL-oneplus2
TARGET_PRODUCT=cm_oneplus2
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-16.3.0-x86_64-i386-64bit
HOST_CROSS_OS=
HOST_CROSS_ARCH=
HOST_CROSS_2ND_ARCH=
HOST_BUILD_TYPE=release
BUILD_ID=NMF26V
OUT_DIR=/Users/vibhoothiiaanand/Desktop/los/out
============================================
Running kati to generate build-cm_oneplus2.ninja...
/Users/vibhoothiiaanand/Desktop/los/out/build-cm_oneplus2.ninja is missing, regenerating...
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.1
LINEAGE_VERSION=14.1-20170129-UNOFFICIAL-oneplus2
TARGET_PRODUCT=cm_oneplus2
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-16.3.0-x86_64-i386-64bit
HOST_CROSS_OS=
HOST_CROSS_ARCH=
HOST_CROSS_2ND_ARCH=
HOST_BUILD_TYPE=release
BUILD_ID=NMF26V
OUT_DIR=/Users/vibhoothiiaanand/Desktop/los/out
============================================
art/build/Android.common.mk:51: unsupported HOST_ARCH=x86_64
build/core/binary.mk:1253: external/deqp/Android.mk: libdeqp: Unused source files: \
build/core/binary.mk:1253: external/deqp/Android.mk: libdeqp: Unused source files: \
build/core/binary.mk:1253: external/pdfium/third_party/pdfiumbigint.mk: libpdfiumbigint: Unused source files: bigint/BigInteger.cc bigint/BigIntegerUtils.cc bigint/BigUnsigned.cc bigint/BigUnsignedInABase.cc
build/core/binary.mk:1253: external/pdfium/third_party/pdfiumbigint.mk: libpdfiumbigint: Unused source files: bigint/BigInteger.cc bigint/BigIntegerUtils.cc bigint/BigUnsigned.cc bigint/BigUnsignedInABase.cc
./external/speex/Android.mk:56: TODOArm64: enable neon in libspeex
frameworks/av/camera/cameraserver/Android.mk:18: Target has integrated cameraserver into mediaserver. This is weakening security measures introduced in 7.0
build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets
find: /Users/vibhoothiiaanand/Desktop/los/out/target/common/obj/SHARED_LIBRARIES/libwifi-hal-mock_intermediates: No such file or directory
build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets
build/core/Makefile:53: Duplicate header copy: /Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/obj/include/qcom/display/copybit.h
build/core/Makefile:53: Defined in: hardware/qcom/display-caf/msm8994/libcopybit/Android.mk hardware/qcom/display-caf/msm8994/libcopybit/Android.mk
build/core/Makefile:53: Duplicate header copy: /Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/obj/include/qcom/display/copybit_priv.h
build/core/Makefile:53: Defined in: hardware/qcom/display-caf/msm8994/libcopybit/Android.mk hardware/qcom/display-caf/msm8994/libcopybit/Android.mk
build/core/Makefile:53: Duplicate header copy: /Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/obj/include/qcom/display/c2d2.h
build/core/Makefile:53: Defined in: hardware/qcom/display-caf/msm8994/libcopybit/Android.mk hardware/qcom/display-caf/msm8994/libcopybit/Android.mk
No private recovery resources for TARGET_DEVICE oneplus2
build/core/dex_preopt.mk:74: warning: overriding commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/dex_bootjars/system/framework/telephony-ext_nodex.jar'
build/core/dex_preopt.mk:74: warning: ignoring old commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/dex_bootjars/system/framework/telephony-ext_nodex.jar'
build/core/dex_preopt_libart_boot.mk:49: warning: overriding commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/system/framework/arm64/boot-telephony-ext.art'
build/core/dex_preopt_libart_boot.mk:49: warning: ignoring old commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/system/framework/arm64/boot-telephony-ext.art'
build/core/dex_preopt_libart_boot.mk:49: warning: overriding commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/system/framework/arm64/boot-telephony-ext.oat'
build/core/dex_preopt_libart_boot.mk:49: warning: ignoring old commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/system/framework/arm64/boot-telephony-ext.oat'
build/core/dex_preopt_libart_boot.mk:49: warning: overriding commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/system/framework/arm/boot-telephony-ext.art'
build/core/dex_preopt_libart_boot.mk:49: warning: ignoring old commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/system/framework/arm/boot-telephony-ext.art'
build/core/dex_preopt_libart_boot.mk:49: warning: overriding commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/system/framework/arm/boot-telephony-ext.oat'
build/core/dex_preopt_libart_boot.mk:49: warning: ignoring old commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/system/framework/arm/boot-telephony-ext.oat'
build/core/java.mk:334: warning: overriding commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/common/obj/APPS/Dialer_intermediates/src/src/org/codeaurora/presenceserv/IPresenceService.java'
build/core/java.mk:334: warning: ignoring old commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/common/obj/APPS/Dialer_intermediates/src/src/org/codeaurora/presenceserv/IPresenceService.java'
build/core/java.mk:334: warning: overriding commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/common/obj/APPS/Dialer_intermediates/src/src/org/codeaurora/presenceserv/IPresenceServiceCB.java'
build/core/java.mk:334: warning: ignoring old commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/common/obj/APPS/Dialer_intermediates/src/src/org/codeaurora/presenceserv/IPresenceServiceCB.java'
build/core/base_rules.mk:316: warning: overriding commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:316: warning: ignoring old commands for target `/Users/vibhoothiiaanand/Desktop/los/out/target/product/oneplus2/root/res/images/charger/battery_fail.png'
Starting build with ninja
ninja: Entering directory `.'
[ 0% 80/46297] host C++: libaapt2 <= ...se/tools/aapt2/filter/ConfigFilter.cpp
FAILED: /bin/bash -c "(prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -I device/oneplus/oneplus2/include -I /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates -I external/protobuf/src -I /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates/proto -I frameworks/base/tools/aapt2 -I /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates -I /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates -I libnativehelper/include/nativehelper \$(cat /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem tools/include -isystem /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/include -c -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /applications/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -DMACOSX_DEPLOYMENT_TARGET=10.12 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /applications/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -Wall -Werror -Wno-unused-parameter -UNDEBUG -fPIC -D_DARWIN_UNLIMITED_STREAMS -Wno-deprecated-declarations -D_USING_LIBCXX -DGOOGLE_PROTOBUF_NO_RTTI -std=gnu++14 -std=c++11 -Wno-missing-field-initializers -fno-exceptions -fno-rtti -nostdinc++ -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/filter/ConfigFilter.d -o /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/filter/ConfigFilter.o frameworks/base/tools/aapt2/filter/ConfigFilter.cpp ) && (cp /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/filter/ConfigFilter.d /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/filter/ConfigFilter.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/filter/ConfigFilter.d >> /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/filter/ConfigFilter.P; rm -f /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/filter/ConfigFilter.d )"
In file included from frameworks/base/tools/aapt2/filter/ConfigFilter.cpp:17:
In file included from frameworks/base/tools/aapt2/ConfigDescription.h:20:
In file included from frameworks/base/tools/aapt2/util/StringPiece.h:20:
In file included from external/libcxx/include/ostream:138:
In file included from external/libcxx/include/ios:216:
In file included from external/libcxx/include/__locale:21:
frameworks/base/tools/aapt2/locale.h:42:37: error: unknown type name 'StringPiece'
bool initFromFilterString(const StringPiece& config);
^
1 error generated.
[ 0% 80/46297] host C++: libaapt2 <= ...tools/aapt2/compile/XmlIdCollector.cpp
FAILED: /bin/bash -c "(prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -I device/oneplus/oneplus2/include -I /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates -I external/protobuf/src -I /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates/proto -I frameworks/base/tools/aapt2 -I /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates -I /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates -I libnativehelper/include/nativehelper \$(cat /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem tools/include -isystem /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/include -c -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /applications/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -DMACOSX_DEPLOYMENT_TARGET=10.12 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /applications/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -Wall -Werror -Wno-unused-parameter -UNDEBUG -fPIC -D_DARWIN_UNLIMITED_STREAMS -Wno-deprecated-declarations -D_USING_LIBCXX -DGOOGLE_PROTOBUF_NO_RTTI -std=gnu++14 -std=c++11 -Wno-missing-field-initializers -fno-exceptions -fno-rtti -nostdinc++ -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/compile/XmlIdCollector.d -o /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/compile/XmlIdCollector.o frameworks/base/tools/aapt2/compile/XmlIdCollector.cpp ) && (cp /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/compile/XmlIdCollector.d /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/compile/XmlIdCollector.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/compile/XmlIdCollector.d >> /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/compile/XmlIdCollector.P; rm -f /Users/vibhoothiiaanand/Desktop/los/out/host/darwin-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/compile/XmlIdCollector.d )"
In file included from frameworks/base/tools/aapt2/compile/XmlIdCollector.cpp:17:
In file included from frameworks/base/tools/aapt2/ResourceUtils.h:20:
In file included from frameworks/base/tools/aapt2/NameMangler.h:20:
In file included from frameworks/base/tools/aapt2/Resource.h:20:
In file included from frameworks/base/tools/aapt2/ConfigDescription.h:20:
In file included from frameworks/base/tools/aapt2/util/StringPiece.h:20:
In file included from external/libcxx/include/ostream:138:
In file included from external/libcxx/include/ios:216:
In file included from external/libcxx/include/__locale:21:
frameworks/base/tools/aapt2/locale.h:42:37: error: unknown type name 'StringPiece'
bool initFromFilterString(const StringPiece& config);
^
1 error generated.
[ 0% 80/46297] host Java: jarjar (/Us...IBRARIES/jarjar_intermediates/classes)
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1
#### make failed to build some targets (49 seconds) ####
Output is quite informative - there is an unknown type name 'StringPiece' at
frameworks/base/tools/aapt2/locale.h:42:37
Check whether include directive is present in file locale.h
#include "util/StringPiece.h"
and correct upon need.
If error persist, sync repos with force option
repo sync -j1 --force-sync

GTK build missing include file gdk-pixbuf/gdk-pixbuf.h

I have installed GTK, following the instructions here: http://www.gtk.org/download/win32_tutorial.php
Now I am trying to build a GTK hello world program from here: https://developer.gnome.org/gtk-tutorial/stable/c39.html#SEC-HELLOWORLD
I hit this error:
In file included from C:/gtk/include/gtk-3.0/gdk/gdkcairo.h:28:0,
from C:/gtk/include/gtk-3.0/gdk/gdk.h:33,
from C:/gtk/include/gtk-3.0/gtk/gtk.h:30,
from gtk_hello_world.c:1:
C:/gtk/include/gtk-3.0/gdk/gdkpixbuf.h:34:35: fatal error: gdk-pixbuf/gdk-pixbuf
.h: No such file or directory
#include <gdk-pixbuf/gdk-pixbuf.h>
^
This seems to be the same problem as How to repair "error: gdk-pixbuf/gdk-pixdata.h: No such file or directory?" but I do not understand the answer to that question.
Here is the command line to the compiler
C:\Users\James\code\smartone>gcc -o hello.exe gtk_hello_world.c -m32 -mms-bitfie
lds -IC:/gtk/include/gtk-3.0 -IC:/gtk/include/cairo -IC:/gtk/include/pango-1.0 -
IC:/tk/include/atk-1.0 -IC:/gtk/include/cairo -IC:/gtk/include/pixman-1 -IC:/gtk
/inlude -IC:/gtk/include/freetype2 -IC:/gtk/include -IC:/gtk/include/libpng15 -I
C:/gtk/include/libpng15 -IC:/gtk/include/glib-2.0 -IC:/gtk/lib/glib-2.0/include
-LC:/gtk/lib -lgtk-3 -lgdk-3 -lgdi32 -limm32 -lshel32 -lole32 -Wl,-luuid -lpango
cairo-1.0 -lpangoft2-1.0 -lfreetype -lfontconfig -lpangowin32-1.0 -lgdi32 -lpang
o-1.0 -lm -latk-1.0 -lcairo-gobject -lcairo -lgdkpixbuf-2.0 -lgio-2.0 -lgobject-
2.0 -lglib-2.0
This was mostly generated using
pkg-config --cflags --libs gtk+-3.0
-mms-bitfields -IC:/gtk/include/gtk-3.0 -IC:/gtk/include/cairo -IC:/gtk/include/
pango-1.0 -IC:/gtk/include/atk-1.0 -IC:/gtk/include/cairo -IC:/gtk/include/pixma
n-1 -IC:/gtk/include -IC:/gtk/include/freetype2 -IC:/gtk/include -IC:/gtk/includ
e/libpng15 -IC:/gtk/include/gdk-pixbuf-2.0 -IC:/gtk/include/libpng15 -IC:/gtk/in
clude/glib-2.0 -IC:/gtk/lib/glib-2.0/include -LC:/gtk/lib -lgtk-3 -lgdk-3 -lgdi3
2 -limm32 -lshell32 -lole32 -Wl,-luuid -lpangocairo-1.0 -lpangoft2-1.0 -lfreetyp
e -lfontconfig -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lm -latk-1.0 -lcairo-gobjec
t -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl
I know this question is extremely old, but I ran into this error while compiling xscreensaver from source on Debian Stretch and found that the missing package was libglade2-dev, despite all intuition that might suggest it is libgdk-pixbuf2.0-dev
Hope this might help the next guy looking for an answer to this one.
We need the exact gcc command line that caused the error. If the file is not found, it's because pkg-config couldn't pass to gcc the right location of your gdk-pixbuf installation.
First run pkg-config --list-all | grep gdk-pixbuf to get the exact name of the gdk-pixbuf module on you machine (for me it's gdk-pixbuf-2.0). The use that name, to check what directory pkg-config thinks gdk-pixbuf is installed:
pkg-config --cflags gdk-pixbuf-2.0
returns for me:
-pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng15 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
The -I tells here to gcc to include directory /usr/include/gdk-pixbuf-2.0. And this is where your file are not.

Installing Event::Lib in CitrusPerl install on Mac OS X 10.7

I'm working on a Perl project that requires Event::Lib. I'm on MacOS 10.7, and am running Citrus Perl instead of the system Perl. I installed libevent from source and it compiled fine. But, when I go to install Event::Lib, I run into some errors:
cp Lib/Event/Lib.pm blib/lib/Event/Lib.pm
Skip blib/lib/Event/Lib.pm (unchanged)
/Users/username/code/CitrusPerl/bin/perl /Users/username/code/CitrusPerl/lib/ExtUtils/xsubpp -typemap /Users/username/code/CitrusPerl/lib/ExtUtils/typemap -typemap typemap Lib.xs > Lib.xsc && mv Lib.xsc Lib.c
gcc -c -I/usr/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -arch i386 -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/gcc -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/gcc -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks -mmacosx-version-min=10.6 -DUSE_SITECUSTOMIZE -Duselargefiles -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing -pipe -fstack-protector -O3 -DVERSION=\"1.03\" -DXS_VERSION=\"1.03\" "-I/Users/username/code/CitrusPerl/lib/CORE" -DHAVE_CONFIG_H Lib.c
Lib.xs: In function ‘boot_Event__Lib’:
Lib.xs:275: error: ‘LOG_LEVEL’ undeclared (first use in this function)
Lib.xs:275: error: (Each undeclared identifier is reported only once
Lib.xs:275: error: for each function it appears in.)
make: *** [Lib.o] Error 1
Does anyone have any ideas on what to try next?
EDIT: After attempting some 'o conf' options:
cpan[1]> o conf makepl_arg "INC=-I/usr/local/include LIBS=-L/usr/local/lib -levent"
makepl_arg [INC=-I/usr/local/include LIBS=-L/usr/local/lib -levent]
Your /Users/username/code/CitrusPerl/vendor/lib/CPAN/Config.pm file
is not writable. I will attempt to write your configuration to
/Users/username/.cpan/CPAN/MyConfig.pm instead.
Old configuration file /Users/username/.cpan/CPAN/MyConfig.pm
moved to /Users/username/.cpan/CPAN/MyConfig.pm.bak
commit: wrote '/Users/username/.cpan/CPAN/MyConfig.pm'
cpan[2]> install Event::Lib
Reading '/Users/username/code/CitrusPerl/cpan/Metadata'
Database was generated on Thu, 07 Feb 2013 21:53:02 GMT
Fetching with LWP:
http://www.perl.org/CPAN/authors/01mailrc.txt.gz
Reading '/Users/username/code/CitrusPerl/cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://www.perl.org/CPAN/modules/02packages.details.txt.gz
Reading '/Users/username/code/CitrusPerl/cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Thu, 14 Feb 2013 15:41:03 GMT
............................................................................DONE
Fetching with LWP:
http://www.perl.org/CPAN/modules/03modlist.data.gz
Reading '/Users/username/code/CitrusPerl/cpan/sources/modules/03modlist.data.gz'
............................................................................DONE
Writing /Users/username/code/CitrusPerl/cpan/Metadata
Running install for module 'Event::Lib'
Running make for V/VP/VPARSEVAL/Event-Lib-1.03.tar.gz
Fetching with LWP:
http://www.perl.org/CPAN/authors/id/V/VP/VPARSEVAL/Event-Lib-1.03.tar.gz
Checksum for /Users/username/code/CitrusPerl/cpan/sources/authors/id/V/VP/VPARSEVAL/Event-Lib-1.03.tar.gz ok
Scanning cache /Users/username/code/CitrusPerl/cpan/build for sizes
............................................................................DONE
CPAN.pm: Building V/VP/VPARSEVAL/Event-Lib-1.03.tar.gz
Checking existance of libevent...ld: warning: directory not found for option '-L/sw/lib'
ld: warning: directory not found for option '-L/opt/local/lib'
yes
Checking capabilities...
event_set_log_callback...no
event_priority_init...no
Additional defines:
Checking if your kit is complete...
Looks good
Writing Makefile for Event::Lib
Writing MYMETA.yml and MYMETA.json
cp Lib/Event/Lib.pm blib/lib/Event/Lib.pm
Skip blib/lib/Event/Lib.pm (unchanged)
/Users/username/code/CitrusPerl/bin/perl /Users/username/code/CitrusPerl/lib/ExtUtils/xsubpp -typemap /Users/username/code/CitrusPerl/lib/ExtUtils/typemap -typemap typemap Lib.xs > Lib.xsc && mv Lib.xsc Lib.c
gcc -c -I/usr/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -arch i386 -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/gcc -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/gcc -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks -mmacosx-version-min=10.6 -DUSE_SITECUSTOMIZE -Duselargefiles -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing -pipe -fstack-protector -O3 -DVERSION=\"1.03\" -DXS_VERSION=\"1.03\" "-I/Users/username/code/CitrusPerl/lib/CORE" -DHAVE_CONFIG_H Lib.c
Lib.xs: In function ‘boot_Event__Lib’:
Lib.xs:275: error: ‘LOG_LEVEL’ undeclared (first use in this function)
Lib.xs:275: error: (Each undeclared identifier is reported only once
Lib.xs:275: error: for each function it appears in.)
make: *** [Lib.o] Error 1
VPARSEVAL/Event-Lib-1.03.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
VPARSEVAL/Event-Lib-1.03.tar.gz : make NO
I was able to get this to work in about 10 minutes time.
Use Perlbrew
Use Homebrew
Then:
brew install libevent
perlbrew install perl-5.16.0
perlbrew switch perl-5.16.0
perl -MCPAN -e 'install Event::Lib'
I think the above are the best utilities to provide a proper development environment that you can switch up; IE you can switch Perl versions of the fly. Additionally they wont impact your native system. Anyways if you decide not to use the aforementioned, your particular error looks to be about a missing header file. I would assert that the libevent headers are indeed in /usr/local/include.
Good luck.

bdw-gc install failed on lion with brew

i am install w3m with brew on lion. when i use the origin formula the installation is filed.
then i following the issues 7068 of homebrew update the bdw-gc.rb formula script
require 'formula'
class BdwGc < Formula
# url 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.1.tar.gz'
url 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2alpha6.tar.gz'
homepage 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/'
# 7.1
# md5 '2ff9924c7249ef7f736ecfe6f08f3f9b'
# 7.2alpha6
md5 '319d0b18cc4eb735c8038ece9df055e4'
fails_with_llvm "LLVM gives an unsupported inline asm error", :build => 2335
def install
# ucontext has been deprecated in 10.6
# use this flag to force the header to compile
# ENV.append 'CPPFLAGS', "-D_XOPEN_SOURCE" if MacOS.snow_leopard?
ENV.append 'CPPFLAGS', "-D_XOPEN_SOURCE"# if MacOS.snow_leopard?
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
end
end
and reinstall it, but it's still failed. here is the install log
brew install bdw-gc
==> Downloading http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2alp
File already downloaded in /Users/akira/Library/Caches/Homebrew
==> ./configure --disable-debug --prefix=/usr/local/Cellar/bdw-gc/6
==> make install
........
libtool: compile: /usr/bin/llvm-gcc -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -D_XOPEN_SOURCE -fexceptions -O3 -march=core2 -w -pipe -c obj_map.c -o obj_map.o >/dev/null 2>&1
/bin/sh ./libtool --tag=CC --mode=compile /usr/bin/llvm-gcc -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -D_XOPEN_SOURCE -fexceptions -O3 -march=core2 -w -pipe -c -o pcr_interface.lo pcr_interface.c
./libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h: In function 'AO_test_and_set_full':
./libatomic_ops/src/ato==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/bdw-gc.rb#L22
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: bc90bd554da6bd1199bdec92a830edbca24fa34e
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: quad-core 64-bit sandybridge
OS X: 10.7.2
Kernel Architecture: x86_64
Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.2
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2336
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/llvm-g++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
LD: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -O3 -march=core2 -w -pipe
CXXFLAGS: -O3 -march=core2 -w -pipe
CPPFLAGS: -D_XOPEN_SOURCE
MAKEFLAGS: -j4
Error: Failed executing: make install
These existing issues may help you:
https://github.com/mxcl/homebrew/issues/7068
Otherwise, please report the bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
any suggestion?
this problem was fixed by Jack Nagel at Nov 15, 2011.
see the detail
bdw-gc: add 7.2alpha6 as the '--devel' version
but this batch still got a problem. the "make check" step does not works,so you can just skip this step and "make install".

Cross Compile perl for ARM

I'm attempting to cross compile the perl interpreter for an ARM architecture (FriendlyARM Micro2440). I'm using the ARM-Linux GCC 4.4.3 cross-compiler provided by the manufacturer. The board is running Linux 2.6.
I was able to cross-compile a basic "Hello World" application successfully, and it ran on the target machine.
I've downloaded the perl v5.12.3 source. I was able to do a normal compilation of perl for Ubuntu. I'm now attempting to do a cross-compilation for the ARM board. I'm working out of the perl-5.12.3/Cross folder in the source download.
make patch succeeded, but when I run make perl it fails with this
LD_LIBRARY_PATH=/home/reed022/.local/share/Trash/files/perl-5.2.12.3 arm-linux-gcc -o miniperl \
gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o \
miniperlmain.o opmini.o perlmini.o -lnsl -ldl -lm -lcrypt -lutil -lc
LD_LIBRARY_PATH=/home/reed022/.local/share/Trash/files/perl-5.2.12.3 ./miniperl -w -Ilib -MExporter -e '<?>' || make minitest
./miniperl: 1: Syntax error: word unexpected (expecting ")")
I think the relevant part of the output is the ./miniperl -w -Ilib -MExporter -e '<?>' || make minitest part. Though I'm not sure. It seems confusing to me that the cross-compilation environment would try to run tests, since it's targeting a different system than the one it's being built on.
I'm completely lost as where to go from here. The people I've talked to haven't had much experience with cross-compiling programs.
UPDATE
I decided to delete the perl source folder and re-extract it, thinking that the previous compilation of perl for the Ubuntu host machine might have been messing with the current cross-compilation. I'm now getting a different but similar error.
`sh cflags "optimize='-O2'" generate_uudmap.o` -fexpensive-optimizations -fomit-frame-pointer -O2 -march=armv4 -mtune=strongarm1100 generate_uudmap.c
CCCMD = arm-linux-gcc -DPERL_CORE -c -fexpensive-optimizations -fomit-frame-pointer -O2 -march=armv4 -mtune=strongarm1100 -O2 -Wall
arm-linux-gcc -o generate_uudmap generate_uudmap.o -lnsl -ldl -lm -lcrypt -lutil -lc
./generate_uudmap uudmap.h bitcount.h
./generate_uudmap: 1: Syntax error: word unexpected (expecting ")")
make[1]: *** [bitcount.h] Error 2
make[1]: Leaving directory `/home/reed022/Downloads/perl-5.12.3'
make[1]: Entering directory `/home/reed022/Downloads/perl-5.12.3'
make[1]: *** No rule to make target `more'. Stop.
make[1]: Leaving directory `/home/reed022/Downloads/perl-5.12.3'
make: *** [perl] Error 2
Apparently the way to cross compile perl is not to do it under the Cross directory. I needed to pass flags to Configure to set it up. I also needed to setup the ARM computer with an SSH server (I used dropbear). The flags I used are
sh ./Configure
-Dusecrosscompile
-Dtargethost=<IP of ARM computer>
-Dtargetuser=<user name>
-Dtargetarch=arm-linux
-Dcc=arm-linux-gcc
-Dusrinc=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/include/
-Dincpth=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/include/
-Dlibpth=/opt/FriendlyARM/toolschain/4.4.3/lib
-Dtargetdir=/sdcard/perl
The easiest way to cross-compile perl for arm is to use perl-cross.
Alex Suykov developed a set of patches for perl that works around the requirement to have a target machine available. Part of the solution is avoiding make test since the host can't run cross-compiled code anyway.
I used arm-unknown-linux-uclibcgnueabi as my target (to match my buildroot toolchain), but otherwise the directions for perl 5.18.0 worked just fine.
Alex last updated the github repository on April 23, 2014, so this project is still relatively active.