Comments (47)
My docker build using an specific tag. (Ubuntu 14.04 Docker from Ubuntu 14.04 installation).
I'll tell you how it goes in about 10 hours time.
- Install Ubuntu 14.04 minimal in a virtual machine
- Add some required packages to build (I know that when doing this step with docker I could just install git package and that's it):
apt-get update
apt install \
nodejs \
npm \
wget \
build-essential \
libcurl4-gnutls-dev \
libglib2.0-dev \
libgdk-pixbuf2.0-dev \
libgtkglext1-dev \
libatk1.0-dev \
libcairo2-dev \
libxml2-dev \
libxss-dev \
libgconf2-dev \
default-jre \
qt5-qmake \
qt5-default \
p7zip-full \
git \
subversion
sudo -i
# Enter user password
apt-get update
apt-get -y install docker.io
ln -sf /usr/bin/docker.io /usr/local/bin/docker
sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker
service docker status
# docker.io start/running, process 14394
git clone \
--depth=1 \
--recursive \
--branch v6.3.1.37 \
https://github.com/ONLYOFFICE/build_tools.git \
/build_tools
cd /build_tools
mkdir out
docker build --tag onlyoffice-document-editors-builder .
docker run -v $(pwd)/out:/build_tools/out onlyoffice-document-editors-builder
from build_tools.
I think it's a permission issue, could you run build process from root? Usually I've using Docker to check building process and it's always use root
user to build
from build_tools.
I think it's a permission issue, could you run build process from root? Usually I've using Docker to check building process and it's always use
root
user to build
/home/user/build_oo/web-apps/build/node_modules/phantomjs-prebuilt/
directory does not exist and that's why it fails.
Why wouldn't that directory exist in the first place?
I already run this command as root
user thanks to sudo
so I don't think that's the problem.
-
Nevertheless I'll try to build this as root again from scratch. I'll have some feedback 10 hours later.
-
Is there any documentation on how to build this from Docker from an Ubuntu 14.04 installation (or a newer Ubuntu LTS installation)?
Thank you very much!
from build_tools.
Why wouldn't that directory exist in the first place?
I think some of web-apps
dependencies install it
Is there any documentation on how to build this from Docker from an Ubuntu 14.04 installation (or a newer Ubuntu LTS installation)?
mkdir out
docker build --tag onlyoffice-document-editors-builder .
docker run -v $(pwd)/out:/build_tools/out onlyoffice-document-editors-builder
Rather straight forward
If you want use another ubuntu or debian version - simply change this line
This will build master stable version - 6.3.1.37 - so no hussle with tags
from build_tools.
Why wouldn't that directory exist in the first place?
I think some of
web-apps
dependencies install it
Shouldn't automate.py
install them in the first place without me having to install them manually?
Anyways... How should I install those dependencies?
Thank you.
from build_tools.
Shouldn't automate.py install them in the first place without me having to install them manually?
Try to run docker as I described - all things are installed automatically
from build_tools.
Is there any documentation on how to build this from Docker from an Ubuntu 14.04 installation (or a newer Ubuntu LTS installation)?
mkdir out docker build --tag onlyoffice-document-editors-builder . docker run -v $(pwd)/out:/build_tools/out onlyoffice-document-editors-builder
Rather straight forward
If you want use another ubuntu or debian version - simply change this line
This will build master stable version - 6.3.1.37 - so no hussle with tags
Taking a look at https://github.com/ONLYOFFICE/build_tools/blob/master/Dockerfile#L1 I see that both python2
and python3
packages are installed. Then python links to python2 while python3 is used to run automate.py.
My own build using Ubuntu 14.04 uses ./automate.py which uses default python which happens to be python2
(instead of python3
!!! ).
I had read about using ./automate.py
at https://helpcenter.onlyoffice.com/installation/docs-community-compile.aspx which I think it needs to be updated if using python3 is something compulsory.
from build_tools.
Then python links to python2 while python3 is used to run automate.py.
This is because google build tools which we use for our core
dependencies require python2
from build_tools.
Shouldn't automate.py install them in the first place without me having to install them manually?
Try to run docker as I described - all things are installed automatically
I am reluctant to use docker because I prefer a manual approach so that I can later rebase the build with my own repos (with custom changes).
I am also a bit lost with docker. I guess that the onlyoffice-document-editors-builder
tag is something that you pushed manually to a public Docker repo and nothing that build_tools in its own has.
I'll see what I can do.
Thank you for your feedback so far.
from build_tools.
I am reluctant to use docker because I prefer a manual approach so that I can later rebase the build with my own repos (with custom changes).
This is just an example, you can use it any way you can but I can gurantee that Dockerfile in compilable and usable condition
I guess that the onlyoffice-document-editors-builder tag is something that you pushed manually to a public Docker repo and nothing that build_tools in its own has.
It's just a temporal local tag, our build infrastructure is more complicated, than just simple Dockerfile, so only part of our build scripts that used in our production Docker images are present here, but it's enough to compile fully working version
from build_tools.
From what I have learnt from Dockerfile this is my current approach (I might give you feedback in 10 hours time but I am quite confident this time it will build ok) after installing an Ubuntu 14.04 64bit minimal:
sudo -i
# Enter username password
apt-get update
apt install \
nodejs \
npm \
wget \
build-essential \
libcurl4-gnutls-dev \
libglib2.0-dev \
libgdk-pixbuf2.0-dev \
libgtkglext1-dev \
libatk1.0-dev \
libcairo2-dev \
libxml2-dev \
libxss-dev \
libgconf2-dev \
default-jre \
qt5-qmake \
qt5-default \
p7zip-full \
git \
subversion
git clone \
--depth=1 \
--recursive \
--branch v6.3.1.37 \
https://github.com/ONLYOFFICE/build_tools.git \
/build_tools
export TZ='Etc/UTC'
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
apt-get -y update && \
apt-get -y install python \
python3 \
sudo
rm /usr/bin/python && ln -s /usr/bin/python2 /usr/bin/python
cd /build_tools/tools/linux
python3 ./automate.py
from build_tools.
Seems good to me, but if it fails - I think you should consider comparing dependencies version inside docker image and your native installtion, especially things like default gcc
version and installed nodejs
, it was quite for some time I checked building on virtualbox, but I checked building on Docker around week ago
from build_tools.
Seems good to me, but if it fails - I think you should consider comparing dependencies version inside docker image and your native installtion, especially things like default
gcc
version and installednodejs
, it was quite for some time I checked building on virtualbox, but I checked building on Docker around week ago
Well, it just failed again with the same error:
Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623778909625/p
hantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom']
errno: -13,
code: 'EACCES',
syscall: 'link',
path:
'/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623778909625/phantomjs-2.1.1-linux-x86_64',
dest:
'/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x8
6_64.tar.bz2-extract-1623778909625/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-06-15T17_41_58_171Z-debug.log
Error (npm): 1
Error (./make.py): 1
The only thing that I do manually is select Java8 (instead of the default Java7) when I am asked for.
For reference in this Ubuntu 14.04 installation I have:
# dpkg -l | grep -E 'java|gcc|nodejs'
ii ca-certificates-java 20130815ubuntu1 all Common CA certificates (JKS keystore)
ii gcc 4:4.8.2-1ubuntu6 amd64 GNU C compiler
ii gcc-4.8 4.8.4-2ubuntu1~14.04.4 amd64 GNU C compiler
ii gcc-4.8-base:amd64 4.8.4-2ubuntu1~14.04.4 amd64 GCC, the GNU Compiler Collection (base package)
ii gcc-4.9-base:amd64 4.9.3-0ubuntu4 amd64 GCC, the GNU Compiler Collection (base package)
ii java-common 0.51 all Base of all Java packages
ii javascript-common 11 all Base support for JavaScript library packages
ii libatk-wrapper-java 0.30.4-4 all ATK implementation for Java using JNI
ii libatk-wrapper-java-jni:amd64 0.30.4-4 amd64 ATK implementation for Java using JNI (JNI bindings)
ii libgcc-4.8-dev:amd64 4.8.4-2ubuntu1~14.04.4 amd64 GCC support library (development files)
ii libgcc1:amd64 1:4.9.3-0ubuntu4 amd64 GCC support library
ii nodejs 10.14.0-1nodesource1 amd64 Node.js event-based server-side javascript engine
ii tzdata-java 2019a-0ubuntu0.14.04 all time zone and daylight-saving time data for use by java runtimes
I guess I will have to test the docker build after all.
from build_tools.
Error: EACCES: permission denied
I think this error is root case of problem, seems there is several solutions
I guess I will have to test the docker build after all.
Yeah, I'm almost 100% sure this should work without any errors
from build_tools.
Error: EACCES: permission denied
I think this error is root case of problem, seems there is several solutions
These solutions assume a permission error. That's not the case. The problem is that /web-apps/build/node_modules/phantomjs-prebuilt/
directory does not exist so there is no way (even having all the permissions) to link to a non existant folder under the former path /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
.
I guess I will have to test the docker build after all.
Yeah, I'm almost 100% sure this should work without any errors
Hopefully you are right.
from build_tools.
In meantime - we are not fully localized problem with phantomjs
, but we found out this is a dependency of depenency named grunt-mocha
and this is only dev
dependency and should not be used on installed in build like yours
So our dev team working on removing dev dependency in default compilation config
from build_tools.
In meantime - we are not fully localized problem with
phantomjs
, but we found out this is a dependency of dependency namedgrunt-mocha
and this is onlydev
dependency and should not be used on installed in build like yoursSo our dev team working on removing dev dependency in default compilation config
Thank you very much!
Waiting for the commit, branch or even better tag that would fix this build problem.
from build_tools.
@adriangibanelbtactic I think this will be on release/v6.4.0 but currently this version in very early stage of testing so there is may be a lot of problems
I'll report about commit as soon as our dev team commit those changes
from build_tools.
@adriangibanelbtactic I think this will be on release/v6.4.0 but currently this version in very early stage of testing so there is may be a lot of problems
If it's needed I might cherry-pick the phantomjs workaround commit(s) in a custom branch and hopefully being able to finally build onlyoffice.
I'll report about commit as soon as our dev team commit those changes
Thank you very much!
from build_tools.
My docker build using an specific tag. (Ubuntu 14.04 Docker from Ubuntu 14.04 installation).
I'll tell you how it goes in about 10 hours time.
- Install Ubuntu 14.04 minimal in a virtual machine
- Add some required packages to build (I know that when doing this step with docker I could just install git package and that's it):
apt-get update apt install \ nodejs \ npm \ wget \ build-essential \ libcurl4-gnutls-dev \ libglib2.0-dev \ libgdk-pixbuf2.0-dev \ libgtkglext1-dev \ libatk1.0-dev \ libcairo2-dev \ libxml2-dev \ libxss-dev \ libgconf2-dev \ default-jre \ qt5-qmake \ qt5-default \ p7zip-full \ git \ subversion
sudo -i # Enter user password apt-get update apt-get -y install docker.io ln -sf /usr/bin/docker.io /usr/local/bin/docker sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker service docker status # docker.io start/running, process 14394
git clone \ --depth=1 \ --recursive \ --branch v6.3.1.37 \ https://github.com/ONLYOFFICE/build_tools.git \ /build_tools
cd /build_tools mkdir out docker build --tag onlyoffice-document-editors-builder . docker run -v $(pwd)/out:/build_tools/out onlyoffice-document-editors-builder
This has built ok.
I am suspecting the reason why the traditional Ubuntu 14.04 installation is not building properly is because it uses a custom repo: ubuntu.mirrors.ovh.net
and docker uses archive.ubuntu.com
repo.
I'll give more feedback about this.
from build_tools.
Going to my Ubuntu 14.04 installation and trying to update the packages after using updating repos on sources.list to match the docker ones is not a solution. apt-get update
says there are no more packages to update.
In addition to this comparing packages does not show anything obvious (at least to me).
I attach here the packages from Docker and from my installation and quick-and-dirty comparison.
- onlyoffice-docker-packages.txt
- ubuntu1404-packages.txt
- ubuntu1404-versus-docker-packages-comparison.txt
So I have five suspicions:
- Something has been fixed in a repo different to the build_tools one since the last time I built.
- ubuntu-advantage-tools in docker for whatever the reason is not using
19.6~ubuntu14.04.4
version but19.6~ubuntu14.04.3
. - Something on how docker works. Later on (after the build was succesful) when I wanted to inspect installed packages I decided to do
docker start name-of-container
and cc1 command was being run. - I should not install nodejs, npm and so on manually (as I describe in #335 (comment) ) before running the build_tools script. I should only install git.
- Do not insist in selecting Java 8 as default package but the default package (which it's Java 7).
from build_tools.
ubuntu.mirrors.ovh.net and docker uses archive.ubuntu.com repo.
I don't think this is a reason
Something has been fixed in a repo different to the build_tools one since the last time I built.
If you built from tag - source code stays the same
I should not install nodejs, npm and so on manually (as I describe in #335 (comment) ) before running the build_tools script. I should only install git.
I think this may be a reason
Do not insist in selecting Java 8 as default package but the default package (which it's Java 7).
May be, but not sure
P.S. we commited changes to not to build dev dependencies - 0a41abd
But currently I have no time to check it, I'll do as soon as I'll be able
from build_tools.
ubuntu.mirrors.ovh.net and docker uses archive.ubuntu.com repo.
I don't think this is a reason
Yeah, I agree with you now.
Something has been fixed in a repo different to the build_tools one since the last time I built.
If you built from tag - source code stays the same
I'm not sure about this. According to https://github.com/ONLYOFFICE/build_tools/blob/master/scripts/base.py#L387-L416 when the specified branch does not exist in one of the git submodules then the branch is defaulted to master. So, that master branch in a given git submodule might have been updated.
I should not install nodejs, npm and so on manually (as I describe in #335 (comment) ) before running the build_tools script. I should only install git.
I think this may be a reason
Yeah, I think the problem is that default-jre package installs Java 7 and even if Java 8 is installed later as the default option it might cause problems.
Do not insist in selecting Java 8 as default package but the default package (which it's Java 7).
May be, but not sure
Once you don't install default-jre no question about which java to install is asked.
P.S. we commited changes to not to build dev dependencies - 0a41abd
But currently I have no time to check it, I'll do as soon as I'll be able
Ok, I'll to add this change later in my builds. Hopefully my build times can be lowered from 10 hours to something smaller.
from build_tools.
Java 7 and even if Java 8
Java used only for Google Closure Compiler on later stage, after npm install
But if you use some other nodejs, not 10 as we currently support - this may cause trouble
Hopefully my build times can be lowered from 10 hours
What specs are you using? I got i7 7700 with 16gb ram and build in docker takes around 2-3 hour
from build_tools.
Java 7 and even if Java 8
Java used only for Google Closure Compiler on later stage, after npm install
Ok.
But if you use some other nodejs, not 10 as we currently support - this may cause trouble
I don't use other nodejs as you can see in the packages comparison.
Hopefully my build times can be lowered from 10 hours
What specs are you using? I got i7 7700 with 16gb ram and build in docker takes around 2-3 hour
Well, it's an VPS with a single 2.1 Ghz, 10 GiB of RAM and a quite slow SATA disk.
My complain is more about you having to build everything compared to linking dynamically to already built packages from the distro. As it's made with other packages in Debian, Ubuntu and other distros. I suspect the build time will be lowered a lot if this was the case.
E.g. I'm amazed to see how Qt 5.9 needs to be built from source code.
But, yeah, that's more of an offtopic that you have already talked about in #311 (comment) . You simplify your release thanks to a single linux exe and that has some pros and some cons.
from build_tools.
Well, it's an VPS with a single 2.1 Ghz, 10 GiB of RAM and a quite slow SATA disk.
Yeah, in your case I'm almost sure your CPU is bottleneck
I don't use other nodejs as you can see in the packages comparison.
Yeah, you're right, but maybe installation location of your nodejs and which we installing by our script are different and maybe there is some permissions differences, not sure about it still
You simplify your release thanks to a single linux exe and that has some pros and some cons.
Yeah, generally speaking we do it to be compatible with most OS versions as possible, but still provide single executable file version
from build_tools.
My last attempt to build from an Ubuntu 14.04 64bit minimal (without Docker):
sudo -i
# Enter username password
apt-get update
apt install git
git clone \
--depth=1 \
--recursive \
--branch v6.3.1.37 \
https://github.com/ONLYOFFICE/build_tools.git \
/build_tools
export TZ='Etc/UTC'
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
apt-get -y update && \
apt-get -y install python \
python3 \
sudo
rm /usr/bin/python && ln -s /usr/bin/python2 /usr/bin/python
cd /build_tools/tools/linux
python3 ./automate.py
fails with:
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: this package is now deprecated
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: Datauri 2.0 released. See more in https://github.com/data-uri/datauri/releases/tag/v2.0.0
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
> [email protected] install /web-apps/build/node_modules/phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
[----------------------------------------] 0%
Received 22866K total.
Extracting tar contents (via spawned process)
Removing /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623943409956/phantomjs-2.1.1-linux-x86_64 -> /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623943409956/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom']
errno: -13,
code: 'EACCES',
syscall: 'link',
path:
'/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623943409956/phantomjs-2.1.1-linux-x86_64',
dest:
'/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623943409956/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-06-17T15_23_37_567Z-debug.log
Error (npm): 1
Error (./make.py): 1
I'm running out of ideas.
These are the docker packages and the new 14.04 VPS packages:
I'll try to compare them in a minute and see if there's something obvious.
from build_tools.
Maybe this stackoverflow can help in some way
from build_tools.
Maybe this stackoverflow can help in some way
As I said before this is not a permissions problem. The directory does not exist in the first place:
root@onlyoffice004:/build_tools/tools/linux# ls -ld /web-apps
drwxr-xr-x 10 root root 4096 jun 17 11:47 /web-apps
root@onlyoffice004:/build_tools/tools/linux# ls -ld /web-apps/build
drwxr-xr-x 4 root root 4096 jun 17 15:23 /web-apps/build
root@onlyoffice004:/build_tools/tools/linux# ls -ld /web-apps/build/node_modules
drwxr-xr-x 593 root root 20480 jun 17 15:23 /web-apps/build/node_modules
root@onlyoffice004:/build_tools/tools/linux# ls -ld /web-apps/build/node_modules/phantomjs-prebuilt
ls: no se puede acceder a /web-apps/build/node_modules/phantomjs-prebuilt: No existe el archivo o el directorio
from build_tools.
@adriangibanelbtactic In that case I'm out of ideas
I'll test changes 0a41abd or you can try to apply them and see if them are working
from build_tools.
Why is this directory
Removing /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
deleted in the first place if it's going to be linked next?
Is this something that you developed or is this npm specific stuff?
from build_tools.
@adriangibanelbtactic In that case I'm out of ideas
I'll test changes 0a41abd or you can try to apply them and see if them are working
Yes, I almost forgot about that. I'll try those changes.
Thank you.
from build_tools.
Is this something that you developed or is this npm specific stuff?
Since it's in node_modules
- this is definitely npm
related
from build_tools.
Is this something that you developed or is this npm specific stuff?
Since it's in
node_modules
- this is definitelynpm
related
So the question would be why those node_modules work well under docker but not outside of it.
I'll keep digging a bit and probably resort to using docker but this is weird.
from build_tools.
@adriangibanelbtactic Could you try to
cd web-apps/build
npm install
on real non-docker machine and see if this fails
If this fails - it's a npm issue )
I'm not sayting it's only issue on npm side, maybe we forgot to change some permissions in our build script, but I think it's somehow related
from build_tools.
@adriangibanelbtactic Could you try to
cd web-apps/build npm install
on real non-docker machine and see if this fails
If this fails - it's a npm issue )
I'm not sayting it's only issue on npm side, maybe we forgot to change some permissions in our build script, but I think it's somehow related
This is what I get:
npm WARN deprecated [email protected]: this package is now deprecated
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
> [email protected] install /web-apps/build/node_modules/phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623948379615/phantomjs-2.1.1-linux-x86_64 -> /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623948379615/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom']
errno: -13,
code: 'EACCES',
syscall: 'link',
path:
'/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623948379615/phantomjs-2.1.1-linux-x86_64',
dest:
'/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623948379615/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-06-17T16_46_27_038Z-debug.log
Let's try something else:
mkdir -p /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
Wait... I now have an slightly different output:
npm WARN deprecated [email protected]: this package is now deprecated
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
> [email protected] install /web-apps/build/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /web-apps/build/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623948743905/phantomjs-2.1.1-linux-x86_64 -> /web-apps/build/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/lib/phantom
Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623948743905/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/lib/phantom']
errno: -13,
code: 'EACCES',
syscall: 'link',
path:
'/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623948743905/phantomjs-2.1.1-linux-x86_64',
dest:
'/web-apps/build/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623948743905/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/lib/phantom'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-06-17T16_52_32_411Z-debug.log
It seems as the modules are built twice! Might it be?
Anyways... let's do:
mkdir -p /web-apps/build/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/lib/phantom
and see what happens.
Well, now I have the original error which talked about /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
.
from build_tools.
Maybe key in
Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623948743905/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/lib/phantom']
this error
As far I understand npm install download temp file to /tmp/phantomjs
and fails to copy it to /web-apps/build/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/lib/phantom
Maybe problem is that /web-apps folder is located in root of filesystem?
Do you have build tools installed at /build_tools
?
If so I think /root/build_tools
is better location
from build_tools.
This is even more weird.
If I do:
mkdir -p /web-apps/build/node_modules/phantomjs-prebuilt/lib
mkdir -p /web-apps/build/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/lib
before running npm install
now I get:
npm WARN deprecated [email protected]: this package is now deprecated
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
> [email protected] install /web-apps/build/node_modules/grunt-mocha/node_modules/phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /web-apps/build/node_modules/grunt-mocha/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623949730429/phantomjs-2.1.1-linux-x86_64 -> /web-apps/build/node_modules/grunt-mocha/node_modules/phantomjs-prebuilt/lib/phantom
Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623949730429/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/grunt-mocha/node_modules/phantomjs-prebuilt/lib/phantom']
errno: -13,
code: 'EACCES',
syscall: 'link',
path:
'/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623949730429/phantomjs-2.1.1-linux-x86_64',
dest:
'/web-apps/build/node_modules/grunt-mocha/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623949730429/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/grunt-mocha/node_modules/phantomjs-prebuilt/lib/phantom'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-06-17T17_08_59_100Z-debug.log
from build_tools.
Maybe key in
Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623948743905/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/lib/phantom']
this error
As far I understand npm install download temp file to
/tmp/phantomjs
and fails to copy it to/web-apps/build/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/lib/phantom
Maybe problem is that /web-apps folder is located in root of filesystem?
Do you have build tools installed at/build_tools
?If so I think
/root/build_tools
is better location
Yes, I have /build_tools
because if I'm not mistaken that's where you have it inside your docker container/image.
from build_tools.
Yes, I have /build_tools because if I'm not mistaken that's where you have it inside your docker container/image.
I think you're right
Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623949730429/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/grunt-mocha/node_modules/phantomjs-prebuilt/lib/phantom']
This is a very dirty hack but try
cd /web-apps
chmod -R 777 /web-apps/build/node_modules
npm install
from build_tools.
Note that I have corrected your command to cd to build directory
cd /web-apps/build
chmod -R 777 /web-apps/build/node_modules
npm install
fails with the same problem:
npm WARN deprecated [email protected]: this package is now deprecated
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
> [email protected] install /web-apps/build/node_modules/phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623950169356/phantomjs-2.1.1-linux-x86_64 -> /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623950169356/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom']
errno: -13,
code: 'EACCES',
syscall: 'link',
path:
'/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623950169356/phantomjs-2.1.1-linux-x86_64',
dest:
'/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623950169356/phantomjs-2.1.1-linux-x86_64' -> '/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-06-17T17_16_18_168Z-debug.log
from build_tools.
npm install -g phantomjs-prebuilt
npm install
?
P.S. I'm personally not very good at npm
but trying several known variants for solving similar problems
from build_tools.
npm install -g phantomjs-prebuilt npm install
?
P.S. I'm personally not very good at
npm
but trying several known variants for solving similar problems
It seems what seems to work is:
npm install --unsafe-perm
which outputs:
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: this package is now deprecated
> [email protected] install /web-apps/build/node_modules/phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1623950387953/phantomjs-2.1.1-linux-x86_64 -> /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
npm notice created a lockfile as package-lock.json. You should commit this file.
added 26 packages from 444 contributors in 14.705s
48 packages are looking for funding
run `npm fund` for details
.
Why?
Isn't npm run as root user inside the docker container?
Or is it maybe because container root user... is a non-root user under the hood and somehow npm detects the fact?
from build_tools.
Or is it maybe because container root user... is a non-root user under the hood and somehow npm detects the fact?
Have no idea )
Especially why root
in Docker is different from root
on host
Maybe different npm
versions?
I think we can make this issue reproducible, and file an issue at npm
, but personally I think npm guys are not very good at handling issues and our time will not very rewarding with it
from build_tools.
Or is it maybe because container root user... is a non-root user under the hood and somehow npm detects the fact?
Have no idea )
Especially why
root
in Docker is different fromroot
on hostMaybe different
npm
versions?I think we can make this issue reproducible, and file an issue at
npm
, but personally I think npm guys are not very good at handling issues and our time will not very rewarding with it
It seems it has been already reported here: Medium/phantomjs#707 but that repo is archived.
Anyways that's enough for me, now I can hack the code for adding that specific switch, play with users inside the docker container or just use docker as intended.
from build_tools.
That's funny.
I just found: #139 where it's the opposite thing.
It is built as a normal user and some commands are run as root. You told him a workaround so that an specific command was run as root but that workaround is not in the code yet.
from build_tools.
It seems it has been already reported here: Medium/phantomjs#707 but that repo is archived.
Yeah, there is note in README that development stopped, so I think no use reporting this issue
Anyways that's enough for me
In that case I'll close this issue
You told him a workaround so that an specific command was run as root but that workaround is not in the code yet.
I rememeber something about this issue, but I'm not sure they actually related. And I don't think we will be adding workaround as I mention - do not installing phantomjs is better idea
from build_tools.
Related Issues (20)
- [build fail] RPC failed transiently HOT 4
- Ubuntu16.04 Compile completed,the welcome page didn't show up
- ERROR: The OpenGL functionality tests failed! HOT 2
- How do I build the specified version? HOT 6
- Using build_ Tools are built and executed locally/ Automate.py encountered an exception. Please help me solve it, thank you HOT 2
- SVG-icon file contents erased by 'svnmin' task while building DocumentServer on Linux OS HOT 3
- compile error fatal: Couldn't find remote ref remotes/branch-heads/8.9 HOT 1
- Error: Invalid protocol HOT 1
- Build Failure: Missing runConfigureICU Script on Ubuntu 16.04 HOT 1
- build desktop module in window 11 HOT 2
- onlyoffice local build HOT 1
- Docker build failed and stopped at grunt-google-closure-compiler HOT 1
- Failed to build server submodule
- How do you compile individual modules separately
- depot_tools executes the . /cipd script and cannot find the cipd_client_version.digests file. HOT 7
- Using build_ Tools are built and executed locally/ Automate.py encountered an exception. Please help me solve it, thank you HOT 2
- build faild in Windows10 HOT 1
- cannot build : java.io.IOException: No space left on device HOT 3
- Is still Ubuntu 16.04 the suggested distro to build ? HOT 4
- fatal error: ../../Common/3dParty/hyphen/hyphen/hnjalloc.h: No such file or directory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from build_tools.