Openwrt 19.07 based Gargoyle

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

pythonic
Posts: 230
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Openwrt 19.07 based Gargoyle

Post by pythonic »

Lantis wrote:
Thu Oct 08, 2020 5:01 pm
Ubuntu 20.04.1, python3, no other major config changes.
Thanks, I appear to have been able to build ipq40xx successfully with a Ubuntu 20.04.1 VM, though I'm not sure I understand what you mean by the "python3" note - do you mean adding the package "python-is-python3" rather than "python-is-python2" (which is what I used)?

I tried upgrading the Debian 9 VM to Debian 10 without changing the build failure. I also tried my preferred (X)Ubuntu derivative (Lite 5 based on 20.04) with the same result so there's a very subtle difference in the build environment between these 2 and Ubuntu that so far is beyond me to identify :(.

Also, how have you dealt with getting usable versions of node/npm installed? The nodesource_setup.sh script bails out with "unsupported distribution" and the local checkout & build of node fails for me in all 3 environments but this doesn't appear to stop the builds progressing to completion (e.g. for ipq806x which I can build on all 3). I've not yet tested such a generated image to confirm the functional impact.

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Openwrt 19.07 based Gargoyle

Post by Lantis »

Yes i was referring to python-is-python3.
I'll need to check the node issue. I haven't spotted it to be honest, it looks like it has worked for me each time, but i'll check more closely.

If it doesn't build, the only impact should be larger images due to lack of compressed JS/CSS.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

pythonic
Posts: 230
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Openwrt 19.07 based Gargoyle

Post by pythonic »

Lantis wrote:
Sat Oct 24, 2020 11:45 pm
I'll need to check the node issue. I haven't spotted it to be honest, it looks like it has worked for me each time, but i'll check more closely.
It appears to be a compile error with a mismatch in argument counts between header definition and source implementation in deps/v8/src/heap/heap.cc (I can get you log snippets if needed).
Lantis wrote:
Sat Oct 24, 2020 11:45 pm
If it doesn't build, the only impact should be larger images due to lack of compressed JS/CSS.
Ah.. not a major problem on the targets I'm building for. Thanks.

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Openwrt 19.07 based Gargoyle

Post by Lantis »

I pushed a few commits recently but I wouldn't bother building them yet. Seems there's an issue with the ath10k firmware downloads are all corrupted so you'll just get a failed build.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Openwrt 19.07 based Gargoyle

Post by Lantis »

Appears to be working again
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

pythonic
Posts: 230
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Openwrt 19.07 based Gargoyle

Post by pythonic »

Haven't been able to attempt a build in a while, but now that I can I just wanted to note that nodejs is now building but the npm install is failing with the following output in the build log (master checked out yesterday):

Code: Select all

Cloning into '/home/andymac/Dev/Gargoyle/gargoyle-9744f8a8/npm'...
Note: switching to 'v6.14.4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at cf7da1e1a 6.14.4
npm WARN using --force I sure hope you know what you are doing.
npm WARN checkPermissions Missing write access to /usr/lib
npm ERR! code ENOENT
npm ERR! syscall symlink
npm ERR! path ../../../home/andymac/Dev/Gargoyle/gargoyle-9744f8a8/npm
npm ERR! dest /usr/lib/node_modules/npm
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, symlink '../../../home/andymac/Dev/Gargoyle/gargoyle-9744f8a8/npm' -> '/usr/lib/>
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/andymac/.npm/_logs/2021-01-01T13_15_42_255Z-debug.log
:( I can get you the npm debug log noted above if that helps.

The architecture for this run was ipq806x and the build completed normally.

Looking at the nodejs & npm versions you've updated to I see that they're the same as those in the Ubuntu 20.04 repos so I'll install npm (nodejs was already installed though I don't remember doing so manually) to avoid the problem for the moment.

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Openwrt 19.07 based Gargoyle

Post by Lantis »

pythonic wrote:
Sun Jan 03, 2021 2:42 am
Haven't been able to attempt a build in a while, but now that I can I just wanted to note that nodejs is now building but the npm install is failing with the following output in the build log (master checked out yesterday):

Code: Select all

Cloning into '/home/andymac/Dev/Gargoyle/gargoyle-9744f8a8/npm'...
Note: switching to 'v6.14.4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at cf7da1e1a 6.14.4
npm WARN using --force I sure hope you know what you are doing.
npm WARN checkPermissions Missing write access to /usr/lib
npm ERR! code ENOENT
npm ERR! syscall symlink
npm ERR! path ../../../home/andymac/Dev/Gargoyle/gargoyle-9744f8a8/npm
npm ERR! dest /usr/lib/node_modules/npm
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, symlink '../../../home/andymac/Dev/Gargoyle/gargoyle-9744f8a8/npm' -> '/usr/lib/>
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/andymac/.npm/_logs/2021-01-01T13_15_42_255Z-debug.log
:( I can get you the npm debug log noted above if that helps.

The architecture for this run was ipq806x and the build completed normally.

Looking at the nodejs & npm versions you've updated to I see that they're the same as those in the Ubuntu 20.04 repos so I'll install npm (nodejs was already installed though I don't remember doing so manually) to avoid the problem for the moment.
Thanks, can you try this patch please?
Note that you should remove the globally installed versions of node and npm first and start a new shell session to make sure they're completely gone from PATH etc.
This change should remove the need to try to install to a privileged location, it seems we can just run npm as it is without anything fancy. Syntax is uglier, but that's ok if it is scripted.

Code: Select all

diff --git a/build.sh b/build.sh
index af93a888..39e60e25 100755
--- a/build.sh
+++ b/build.sh
@@ -327,7 +327,8 @@ if [ "$js_compress" = "true" ] || [ "$js_compress" = "TRUE" ] || [ "$js_compress
 
 	cd "$top_dir/minifiers/node_modules/.bin" 2>/dev/null
 
-	npm_test=$( npm -v 2>/dev/null )
+	npm_binary="npm"
+	npm_test=$( "$npm_binary" -v 2>/dev/null )
 	nodeglobal=$npm_test
 	node_binary="node"
 	node_version=$( "$node_binary" -v 2>/dev/null)
@@ -373,10 +374,10 @@ if [ "$js_compress" = "true" ] || [ "$js_compress" = "TRUE" ] || [ "$js_compress
 			git clone git://github.com/npm/cli.git "$top_dir/npm"
 			cd npm
 			git checkout "$npm_version_tag"
-			node bin/npm-cli.js install -gf
+			npm_binary="$node_binary $top_dir/npm/bin/npm-cli.js"
 		fi
 
-		npm_test=$( npm -v 2>/dev/null )
+		npm_test=$( "$npm_binary" -v 2>/dev/null )
 
 
 	else
@@ -404,7 +405,7 @@ if [ "$js_compress" = "true" ] || [ "$js_compress" = "TRUE" ] || [ "$js_compress
 			mkdir -p "$top_dir/minifiers/node_modules/.bin"
 
 			cd "$top_dir"
-			npm install terser --prefix minifiers > /dev/null 2>&1
+			${npm_binary} install terser --prefix minifiers > /dev/null 2>&1
 		else
 			echo "terser ok!"
 		fi
@@ -431,7 +432,7 @@ if [ "$js_compress" = "true" ] || [ "$js_compress" = "TRUE" ] || [ "$js_compress
 				echo ""
 	
 				cd "$top_dir"
-				npm install uglifycss -q --prefix minifiers > /dev/null 2>&1
+				${npm_binary} install uglifycss -q --prefix minifiers > /dev/null 2>&1
 			else
 				echo "uglifycss ok!"
 			fi
diff --git a/rebuild.sh b/rebuild.sh
index cd54bde6..4dba7cd6 100755
--- a/rebuild.sh
+++ b/rebuild.sh
@@ -320,7 +320,8 @@ if [ "$js_compress" = "true" ] || [ "$js_compress" = "TRUE" ] || [ "$js_compress
 
 	cd "$top_dir/minifiers/node_modules/.bin" 2>/dev/null
 
-	npm_test=$( npm -v 2>/dev/null )
+	npm_binary="npm"
+	npm_test=$( "$npm_binary" -v 2>/dev/null )
 	nodeglobal=$npm_test
 	node_binary="node"
 	node_version=$( "$node_binary" -v 2>/dev/null)
@@ -365,7 +366,7 @@ if [ "$js_compress" = "true" ] || [ "$js_compress" = "TRUE" ] || [ "$js_compress
 			git clone git://github.com/npm/cli.git "$top_dir/npm"
 			cd npm
 			git checkout "$npm_version_tag"
-			node bin/npm-cli.js install -gf
+			npm_binary="$node_binary $top_dir/npm/bin/npm-cli.js"
 		fi
 
 		npm_test=$( npm -v 2>/dev/null )
@@ -395,7 +396,7 @@ if [ "$js_compress" = "true" ] || [ "$js_compress" = "TRUE" ] || [ "$js_compress
 			mkdir -p "$top_dir/minifiers/node_modules/.bin"
 	
 			cd "$top_dir"
-			npm install terser --prefix minifiers > /dev/null 2>&1
+			${npm_binary} install terser --prefix minifiers > /dev/null 2>&1
 		else
 			echo "terser ok!"
 		fi
@@ -422,7 +423,7 @@ if [ "$js_compress" = "true" ] || [ "$js_compress" = "TRUE" ] || [ "$js_compress
 				echo ""
 	
 				cd "$top_dir"
-				npm install uglifycss -q --prefix minifiers > /dev/null 2>&1
+				${npm_binary} install uglifycss -q --prefix minifiers > /dev/null 2>&1
 			else
 				echo "uglifycss ok!"
 			fi
On github here: https://github.com/ericpaulbishop/gargoyle/pull/910
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

pythonic
Posts: 230
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Openwrt 19.07 based Gargoyle

Post by pythonic »

Lantis wrote:
Wed Jan 06, 2021 5:04 am
On github here: https://github.com/ericpaulbishop/gargoyle/pull/910
This patch works for me on Ubuntu 20.04.1:

Code: Select all

Cloning into '/home/andymac/Dev/Gargoyle/gargoyle-9744f8a8/npm'...
Note: switching to 'v6.14.4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at cf7da1e1a 6.14.4
terser ok!
Compressing/Mangling JavaScript files (4 threads)...
Done!
uglifycss ok!
Compressing CSS files (4 threads)...
Done!
Many thanks!

Post Reply