AOSP Android 12 Beta version build fails - android-source

I've tried to compile AOSP android 12 beta branches with no success.
I cloned the repo using:
repo init -u https://android.googlesource.com/platform/manifest -b refs/tags/android-s-beta-3
repo sync
and then used:
source build/envsetup.sh
lunch aosp_blueline-userdebug
m
now when it starts to run, after a while, it fails because there's duplication at the stub libraries:
[ 95% 86/90] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --out "out/soong" -n "out" -d "out/soong/build.ninja.d" -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
error: build/soong/java/core-libraries/Android.bp:130:1: module "legacy.core.platform.api.stubs" already defined
libcore/mmodules/core_platform_api/Android.bp:182:1 <-- previous definition here
error: build/soong/java/core-libraries/Android.bp:146:1: module "stable.core.platform.api.stubs" already defined
libcore/mmodules/core_platform_api/Android.bp:198:1 <-- previous definition here
error: build/soong/java/core-libraries/Android.bp:164:1: module "legacy-core-platform-api-stubs-system-modules" already defined
libcore/mmodules/core_platform_api/Android.bp:216:1 <-- previous definition here
error: build/soong/java/core-libraries/Android.bp:180:1: module "stable-core-platform-api-stubs-system-modules" already defined
libcore/mmodules/core_platform_api/Android.bp:232:1 <-- previous definition here
error: libcore/JavaLibrary.bp:994:1: module "core.current.stubs" already defined
build/soong/java/core-libraries/Android.bp:27:1 <-- previous definition here
error: libcore/JavaLibrary.bp:1015:1: module "core-current-stubs-for-system-modules" already defined
build/soong/java/core-libraries/Android.bp:48:1 <-- previous definition here
error: libcore/JavaLibrary.bp:1041:1: module "core-current-stubs-system-modules" already defined
build/soong/java/core-libraries/Android.bp:74:1 <-- previous definition here
I've also tried to change the build/soong branch to master and I've got another build faliure.
How do I compile those beta versions? what am I missing??
Moreover, all the Android 12 betas I've tried are broken. For example, another beta 1 question
Thanks!

Ok so finally I've got this beta version compiled.
The thing I've found is that beta branch/ tag is not necessarily compiling.
So what I did is looking at:
https://android.googlesource.com/platform/
and when I ran into errors I've tried to checkout a later commit for this problematic sub-module that fixes this compilation.
Doing this until finding a combination of commits that compiled together did the magic.
If someone would like to know which specific commit I've checkout in order to get Android 12 beta 2 compiled just tell me

Actual problem is that this AOSP 12 Beta 3 is not fully synced and few of the modules were mentioned on different-2 files due to that you are getting these errors. I was also getting the same errors.
To get rid of these errors by commenting these modules in these files.
error: build/soong/java/core-libraries/Android.bp:130:1: module "legacy.core.platform.api.stubs" already defined
libcore/mmodules/core_platform_api/Android.bp:182:1 <-- previous definition here
build/soong/java/core-libraries/Android.bp line 130 you can comment this module.
/*java_library {
name: "legacy.core.platform.api.stubs",
visibility: core_platform_visibility,
hostdex: true,
compile_dex: true,
sdk_version: "none",
system_modules: "none",
static_libs: [
"art.module.public.api.stubs.module_lib",
"conscrypt.module.platform.api.stubs",
"legacy.i18n.module.platform.api.stubs",
],
patch_module: "java.base",
}*/
Same you have to do with other modules too.
https://stackoverflow.com/users/4618429/omribager Have you build AOSP 12 Beta 3 successfully if yes, please mention the process because after these fixes also I am getting other modules issue.
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --out "out/soong" -n "out" -d "out/soong/build.ninja.d" -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
error: external/rust/crates/zip/Android.bp:21:1: "libzip" depends on undefined module "libflate2"
01:00:29 soong bootstrap failed with: exit status 1
failed to build some targets (01:08 (mm:ss))

Related

NixOS - Issue packaging neovim plugin from github

I'm trying to add a neovim plugin that doesn't exist in nixpkgs yet (modes.nvim), but having trouble getting it to work.
I'm using NixOS 22.05, and Home Manager, and I am using the following to build this plugin:
pkgs.vimUtils.buildVimPlugin {
name = "modes-nvim";
src = pkgs.fetchFromGitHub {
owner = "mvllow";
repo = "modes.nvim";
rev = "3188692abf02a8838ec75e59d68c2ce3e4323f5c";
sha256 = "sha256-2QDpwQ9+F5t5gTR1KLVzRrvriwo5JUHatZEJnc0ojV8=";
};
}
Initially, I used lib.pkgs.fakeSha256 to get a "mismatched hash" error, and copy/pasted the has from that error message, so I think it's correct, though other things I've seen on the internet seem to have the SHA256 as a hex string, so not sure what's going on there.
When I run home-manager switch, I get the following error:
these 12 derivations will be built:
/nix/store/pna2lzjc3q56z59b2kfazzxi8m6swp8d-vimplugin-modes-nvim.drv
/nix/store/mnj1d881d8s57yj3y8wjy7i9nl3m089f-vimplugin-modes-nvim.drv
/nix/store/5l8vqvx2bbawkkj92s8qd0p5hw16pcmq-vim-pack-dir.drv
/nix/store/jgqf68sd50s79pydzs9154p509l5109v-hm_nviminit.vim.drv
/nix/store/rq8f75qr9ahrfr0hvp51inn19088bz5p-manifest.vim.drv
/nix/store/hbzm2xr6nv8mr2l9nrlf742fqdmw9nv3-neovim-0.7.2.drv
/nix/store/zks47ifk7njz1s8y7hvq357ac8z6azkd-neovim-0.7.2-fish-completions.drv
/nix/store/rkaa094vvyjcyy4v1zkh4f8xz64vqxas-cameron-fish-completions.drv
/nix/store/0073403x9b4wv13gm7a6bqy4765pi8g5-home-manager-files.drv
/nix/store/lxwpbhb6ryhwrff4cjyniff11843cf9x-home-manager-path.drv
/nix/store/xbbn44253wjh90md4hqrrc2wfpafkc55-activation-script.drv
/nix/store/ijwmv897xc2wlr1ij4a30vk4z154ikbf-home-manager-generation.drv
building '/nix/store/pna2lzjc3q56z59b2kfazzxi8m6swp8d-vimplugin-modes-nvim.drv'...
Sourcing vim-command-check-hook.sh
Using vimCommandCheckHook
Sourcing vim-gen-doc-hook
unpacking sources
unpacking source archive /nix/store/fcxyif8piqar9w9ynmi6ym71hw6zsy7a-source
source root is source
patching sources
configuring
no configure script, doing nothing
building
build flags: SHELL=/nix/store/iffl6dlplhv22i2xy7n1w51a5r631kmi-bash-5.1-p16/bin/bash
test -r dependencies/pack/vendor/start/plenary.nvim || git clone --depth=1 https://github.com/nvim-lua/plenary.nvim.git dependencies/pack/vendor/start/plenary.nvim
/nix/store/iffl6dlplhv22i2xy7n1w51a5r631kmi-bash-5.1-p16/bin/bash: line 1: git: command not found
make: *** [Makefile:7: install_dependencies] Error 127
error: builder for '/nix/store/pna2lzjc3q56z59b2kfazzxi8m6swp8d-vimplugin-modes-nvim.drv' failed with exit code 2;
last 10 log lines:
> unpacking source archive /nix/store/fcxyif8piqar9w9ynmi6ym71hw6zsy7a-source
> source root is source
> patching sources
> configuring
> no configure script, doing nothing
> building
> build flags: SHELL=/nix/store/iffl6dlplhv22i2xy7n1w51a5r631kmi-bash-5.1-p16/bin/bash
> test -r dependencies/pack/vendor/start/plenary.nvim || git clone --depth=1 https://github.com/nvim-lua/plenary.nvim.git dependencies/pack/vendor/start/plenary.nvim
> /nix/store/iffl6dlplhv22i2xy7n1w51a5r631kmi-bash-5.1-p16/bin/bash: line 1: git: command not found
> make: *** [Makefile:7: install_dependencies] Error 127
For full logs, run 'nix log /nix/store/pna2lzjc3q56z59b2kfazzxi8m6swp8d-vimplugin-modes-nvim.drv'.
error: 1 dependencies of derivation '/nix/store/mnj1d881d8s57yj3y8wjy7i9nl3m089f-vimplugin-modes-nvim.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5l8vqvx2bbawkkj92s8qd0p5hw16pcmq-vim-pack-dir.drv' failed to build
error: 1 dependencies of derivation '/nix/store/jgqf68sd50s79pydzs9154p509l5109v-hm_nviminit.vim.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rq8f75qr9ahrfr0hvp51inn19088bz5p-manifest.vim.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0073403x9b4wv13gm7a6bqy4765pi8g5-home-manager-files.drv' failed to build
error: 1 dependencies of derivation '/nix/store/hbzm2xr6nv8mr2l9nrlf742fqdmw9nv3-neovim-0.7.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ijwmv897xc2wlr1ij4a30vk4z154ikbf-home-manager-generation.drv' failed to build
It appears to be failing due to git not being found. Of course, I have git installed for me, but perhaps this command is being run in an environment that doesn't have access to my installed packages.
I'm very new to Nix and NixOS, so I'm not really sure how to begin fixing this issue. I've searched online for answers, but haven't found anything about this issue. Any advice is much appreciated.

AWS CodeBuild S3 cache for swift lambda

So I have some aws swift lambdas that I deployed via sam deploy. That works fine.
The swift lambda looks like this: aws-samples
I am currently in the middle of building a CI/CD pipeline using Codepipeline and Codebuild. My Codebuild project executes the following buildspec.yml and is configured to cache to S3:
version: 0.2
phases:
build:
commands:
- sam build
- sam package -t template.yml --s3-bucket bucketName --output-template-file packaged.yaml
artifacts:
files:
- packaged.yaml
cache:
paths:
- ".aws-sam/**/*"
To build the swift lambdas sam buildexecuted the following makefile as the function in template.yml is set to: BuildMethod: makefile
Makefile:
### Add functions here and link them to builder-bot format MUST BE "build-FunctionResourceName in template.yaml"
build-ExpiredMediaItemProcessorLambda: builder-bot
builder-bot:
$(eval $#PRODUCT = $(subst build-,,$(MAKECMDGOALS)))
$(eval $#BUILD_DIR = $(PWD)/.aws-sam/build-$($#PRODUCT))
$(eval $#STAGE = $($#BUILD_DIR)/lambda)
$(eval $#ARTIFACTS_DIR = $(PWD)/.aws-sam/build/$($#PRODUCT))
# prep directories
mkdir -p $($#BUILD_DIR)/lambda $($#ARTIFACTS_DIR)
# Compile application
swift build --product $($#PRODUCT) -c release --build-path $($#BUILD_DIR)
# copy deps
ldd '/$($#BUILD_DIR)/release/$($#PRODUCT)' | grep swift | cut -d' ' -f3 | xargs cp -Lv -t /$($#BUILD_DIR)/lambda
# copy binary to stage
cp $($#BUILD_DIR)/release/$($#PRODUCT) $($#BUILD_DIR)/lambda/bootstrap
# copy app from stage to artifacts dir
cp $($#STAGE)/* $($#ARTIFACTS_DIR)
I got the makefile from the linked aws-samples project above which I modified slightly to work on codebuild.
Now to my question: How do I get codebuild S3 cache to work with swift lambdas?
when I cache the .aws-sam/**/* folder swift cannot compile because the build paths are different due to the different build machines. The error looks like so:
swift build --product LambdaName -c release --build-path /codebuild/output/src409372700/src/.swift-build/build-LambdaName
33 [1/863] Compiling CSotoExpat xmltok_impl.c
34 [2/863] Compiling CSotoExpat xmltok_ns.c
35 [3/865] Compiling INIParser INIParser.swift
36 <unknown>:0: error: PCH was compiled with module cache path '.aws-sam/build-LambdaName/x86_64-unknown-linux-gnu/release/ModuleCache/1LD7OVICEM9JB', but the path is currently '/codebuild/output/src409372700/src/.aws-sam/build-LambdaName/x86_64-unknown-linux-gnu/release/ModuleCache/1LD7OVICEM9JB'
37 <unknown>:0: error: missing required module 'SwiftShims'
38 [4/865] Compiling Logging Locks.swift
39 <unknown>:0: error: PCH was compiled with module cache path '.aws-sam/build-LambdaName/x86_64-unknown-linux-gnu/release/ModuleCache/1LD7OVICEM9JB', but the path is currently '/codebuild/output/src409372700/src/.aws-sam/build-LambdaName/x86_64-unknown-linux-gnu/release/ModuleCache/1LD7OVICEM9JB'
40 <unknown>:0: error: missing required module 'SwiftShims'
As far as I understand this is due to the fact that swift build cannot cope with a changing or relative path.
After some digging I found this stack overflow post which has a similar problem. I tried there solution and the swift compile error is gone but after a rebuild swift compiles the entire project again even if no code was changed.
Any help is much appreciated!
Thanks!

Failed do_rootfs for agl-demo-platform

I am building Yocto for AGL image (for more details: automotivelinux.org).
The below error occurred during the build progress (do_rootfs).
In packagegroup-agl-demo-platform.bb, declared packagegroup-agl-image-ivi as a runtime dependent package.
RDEPENDS_${PN} += "\
packagegroup-agl-image-ivi \
"
I can build successfully the packagegroup-agl-image-ivi separately. But when building the whole agl-demo-platform image, happened as follows:
ERROR: agl-demo-platform-1.0-r0 do_rootfs: Unable to install packages. Command '/LTSI4.9/LTSI4.4/build/tmp/work/m3ulcb-agl-linux/agl-demo-platform/1.0-r0/opkg.conf -t /LTSI4.9/build/tmp/work/m3ulcb-agl-linux/agl-demo-platform/1.0-r0/temp/ipktemp/ -o /LTSI4.9/build/tmp/work/m3ulcb-agl-linux/agl-demo-platform/1.0-r0/rootfs --force_postinstall --prefer-arch-to-version install
run-postinsts
screen
kernel-modules
packagegroup-agl-devel
packagegroup-core-eclipse-debug
mc packagegroup-core-tools-profile
kernel-module-vsp2 kernel-module-pvrsrvkm
kernel-module-vspm-if
opkg packagegroup-core-tools-debug
psplash kernel-module-vspm
packagegroup-core-ssh-openssh
packagegroup-agl-demo-platform
omx-user-module kernel-devicetree'
returned 1:
Solver encountered 1 problem(s):
Problem 1/1:
- package packagegroup-agl-demo-platform-1.0-r0.all requires packagegroup-agl-image-ivi, but none of the providers can be installed
Solution 1:
- do not ask to install a package providing packagegroup-agl-demo-platform
ERROR: agl-demo-platform-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /LTSI4.9/build/tmp/work/m3ulcb-agl-linux/agl-demo-platform/1.0-r0/temp/log.do_rootfs.14498
ERROR: Task (/LTSI4.9/meta-agl-demo/recipes-platform/images/agl-demo-platform.bb:do_rootfs) failed with exit code '1'
Can anyone help me out in this case ?
I tried 02 ways as follows. They did work.
First method, I cleaned all relative packages and rebuild the whole image.
$ bitbake -c cleanall -c cleansstate <recipes>
recipes consisted of all dependent & runtime dependent packages. But it was a little bit confused to inexperienced users to determine which ones.
Second method, I wiped out the build/tmp/, cache/, sstate-cache/ folders, and re-build all Yocto packages.
There were nothing happening any more. It was really a bad idea if be in critical period of time, but if have free time, be helpful.

Error on building Openembedded for Intel Quark

Trying to build Linux for Advantech UBC-221 that has Intel Quark processor.
The system is Debian 9, running on VMware. Was able to build poky succefully before.
Let me summarize what I was doing:
mkdir quark
cd quark
git clone git://git.yoctoproject.org/meta-intel-quark
git clone git://git.openembedded.org/openembedded-core
git clone git://git.yoctoproject.org/poky
cp -r poky/bitbake .
cd openembedded-core
source oe-init-build-env
bitbake-layers add-layer ~/quark/meta-intel-quark/
bitbake core-image-base
Error code I get:
WARNING: Layer quark-bsp should set LAYERSERIES_COMPAT_quark-bsp in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer quark-bsp should set LAYERSERIES_COMPAT_quark-bsp in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: /home/bgabor/quark/meta-intel-quark/recipes-kernel/linux/linux-yocto-quark_3.8.bb: Variable key RDEPENDS_${KERNEL_PACKAGE_NAME}-base (${KERNEL_PACKAGE_NAME}-image) replaces original key RDEPENDS_kernel-base ().
WARNING: /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb: Exception during build_dependencies for CFLAGS
WARNING: /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb: Error during finalise of /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb
ERROR: ExpansionError during parsing /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb
Traceback (most recent call last):
bb.data_smart.ExpansionError: Failure expanding variable CFLAGS, expression was -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/bgabor/quark/openembedded-core/build/tmp-glibc/work/i586-oe-linux/grub/0.97+gitAUTOINC+5775f32a62-r0=/usr/src/debug/grub/0.97+gitAUTOINC+5775f32a62-r0 -fdebug-prefix-map=/home/bgabor/quark/openembedded-core/build/tmp-glibc/work/i586-oe-linux/grub/0.97+gitAUTOINC+5775f32a62-r0/recipe-sysroot= -fdebug-prefix-map=/home/bgabor/quark/openembedded-core/build/tmp-glibc/work/i586-oe-linux/grub/0.97+gitAUTOINC+5775f32a62-r0/recipe-sysroot-native= -Os -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused -Wno-pointer-sign -DINTEL_QUARK_TEST=${#base_contains('PACKAGECONFIG', 'grub_test', '1', '0', d)} which triggered exception NameError: name 'base_contains' is not defined
Summary: There were 5 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
I'm pretty much stuck here. Some help would be greatly appreciated!
Edit:
Tried to build on Debian 7.11 32 bit system. It went better however another error came:
bgabor#debian:~/quark/dizzy/build$ bitbake core-image-base
WARNING: Host distribution "Debian-7.11" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |####################################################################################################################################################| ETA: 00:00:00
Loaded 1292 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.24.0"
BUILD_SYS = "i686-linux"
NATIVELSBSTRING = "Debian-7.11"
TARGET_SYS = "i586-poky-linux"
MACHINE = "quark"
DISTRO = "poky"
DISTRO_VERSION = "1.7.3"
TUNE_FEATURES = "m32 i586"
TARGET_FPU = ""
meta
meta-yocto
meta-yocto-bsp = "dizzy:58863ad092c9a279e305c841dbb4353de2ecfae8"
meta-intel-quark = "master:a314f0ceea986fde42d5d9b0ea449f7a563e9351"
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Unable to install packages. Command '/home/bgabor/quark/dizzy/build/tmp/sysroots/i686-linux/usr/bin/smart --quiet --data-dir=/home/bgabor/quark/dizzy/build/tmp/work/quark-poky-linux/core-image-minimal-initramfs/1.0-r0/rootfs/var/lib/smart install -y busybox#i586 initramfs-live-install-efi#i586 run-postinsts#all initramfs-live-install#i586 udev#i586 initramfs-live-boot#quark base-passwd#i586' returned 1:
error: Can't install initramfs-live-install-1.0-r9#i586: no package provides grub
ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/bgabor/quark/dizzy/build/tmp/work/quark-poky-linux/core-image-minimal-initramfs/1.0-r0/temp/log.do_rootfs.29435
ERROR: Task 240 (/home/bgabor/quark/dizzy/meta/recipes-core/images/core-image-minimal-initramfs.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2529 tasks of which 2527 didn't need to be rerun and 1 failed.
No currently running tasks (2435 of 2531)
Summary: 1 task failed:
/home/bgabor/quark/dizzy/meta/recipes-core/images/core-image-minimal-initramfs.bb, do_rootfs
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
It does not find grub package, however I can see there are two in the recipes:
bgabor#debian:~/quark/dizzy/build$ bitbake-layers show-recipes | grep "grub" -A 3
Parsing recipes..done.
grub:
meta-intel-quark 0.97+gitAUTOINC+5775f32a62
meta 0.97
meta 2.00
--
grub-conf:
meta-intel-quark 1.0
grub-efi:
meta 2.00
gsettings-desktop-schemas:
meta 3.10.1
Tried to clean and then bitbake again but no result.
What might be the problem here?
First, Poky includes OpenEmbedded Core so you don't need to clone both, just clone Poky.
Second, the meta-intel-iot layer is pretty dead and only formally supports the Daisy release of Poky (see the README). You may have luck using newer releases, but obviously not git master (aka Thud).
https://wiki.yoctoproject.org/wiki/Releases lists the releases. Instead of checking out master of Poky, check out the relevant release branch. I suggest starting with daisy but trying something a little newer such as jethro would be a good idea.

How to set node path for nodejs (Ubuntu)

I'm trying to setup nodejs to access a postgres database. What I've done so far is the following (https://gist.github.com/579814):
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
then
git clone git://github.com/isaacs/npm.git
make
make install
so far, so good. However, when I try to install the postgres driver
npm install pg
I get the following:
node-waf configure build || true
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for program pg_config : /usr/bin/pg_config
'configure' finished successfully (0.066s)
Waf: Entering directory `/home/christian/node_modules/pg/build'
[1/2] cxx: src/binding.cc -> build/default/src/binding_1.o
../src/binding.cc:3:25: fatal error: node_events.h: No such file or directory
compilation terminated.
Waf: Leaving directory `/home/christian/node_modules/pg/build'
Build failed: -> task failed (err #1):
{task: cxx binding.cc -> binding_1.o}
I've been looking around for setting the node path, although haven't found anything of help so far - probably also because I'm totally new to nodejs, so I'd be happy about any hint.
Now, you have NodeJS installed in your Ubuntu. You should set /etc/environment and load nodeJS path that can be executed by another users. For example:
NODE="/home/ubuntu/local/node"
NODE_PATH="/usr/local/lib/node_modules"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$NODE/bin:$NODE/lib/node_modules"
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
Do this in bash:
echo 'export NODE_PATH=~/local/:~/local/node_modules' >> ~/.bashrc
before things are fixed you must use node 0.5.1 (you can use gitk to revert the tree to this version)
Auteur: Ryan Dahl <ry#tinyclouds.org> 2011-07-19 10:46:38
Auteur du commit: Ryan Dahl <ry#tinyclouds.org> 2011-07-19 10:46:38
Parent: 0a3fc1d9c8becc32c63ae736ca2b3719a3d03c5b (Remove StatWatcher's dep on C++ EventEmitter)
Enfant: 061ce7b0ac370c8a5ae93d95ab7da171cbd488f0 (net_uv: Fix simple/test-http-expect-continue.js)
Branche: master, remotes/origin/master
Suit: v0.5.1
Précède: v0.5.2
Finally remove node::EventEmitter
I had the same problem.
The issue was that I was specifying a old version of PG in my package.js
After I removed the old version dependancy I was able to install PG without issue.