Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to v3.7.0 (trouble with pangocairo lib) #2034

Merged
merged 5 commits into from
Jan 14, 2022
Merged

Conversation

jywarren
Copy link
Member

@jywarren jywarren commented Jan 11, 2022

https://github.blog/2021-09-01-improving-git-protocol-security-github/

This has already been done and released on the stable branch as v3.6.1 but we're doing it here too and completing #1751 to release v3.7.0.

We are stuck on running npm install due to pangocairo dependency. But we're working through this list of checkboxes:

#1751 (comment)


Release notes

Added

Fixed

Changed

@jywarren jywarren requested a review from a team as a code owner January 11, 2022 22:09
@gitpod-io
Copy link

gitpod-io bot commented Jan 11, 2022

@jywarren
Copy link
Member Author

Can't seem to run npm install and it's due to a Jan 19 2021 (year ago) pinning of canvas to v2.6.1 which isn't working. I'm wondering how #1778 resulted in canvas getting called out at that specific version?

0d7ab2b#diff-51e4f558fae534656963876761c95b83b6ef5da5103c4adef6768219ed76c2deR2048-R2056

@harshkhandeparkar i hope you're well, can you see how this happened and if we could figure out how to revert that part of it? I can't see how lint-staged has anything to do with canvas to be honest. Looking deeper.

@jywarren
Copy link
Member Author

I'll try running yarn install instead.

@jywarren
Copy link
Member Author

yarn install yields:

error [email protected]: The engine "node" is incompatible with this module. Expected version "0.8.x". Got "16.13.0"
error Found incompatible module.

@jywarren
Copy link
Member Author

https://www.npmjs.com/package/canvas offers 2.8.0 - let's try that.

@jywarren
Copy link
Member Author

ok pinning canvas in package.json to 2.8.0. But i see:

npm ERR! Package pangocairo was not found in the pkg-config search path.
npm ERR! Perhaps you should add the directory containing `pangocairo.pc'
npm ERR! to the PKG_CONFIG_PATH environment variable
npm ERR! No package 'pangocairo' found
npm ERR! gyp: Call to 'pkg-config pangocairo --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1

Will look at recent docs of canvas to see if linux deps have changed for compiling it.

@jywarren jywarren requested review from a team as code owners January 11, 2022 23:04
@jywarren
Copy link
Member Author

Added these for canvas compiling prereqs:

sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

@jywarren
Copy link
Member Author

#5 7.888 E: Unable to locate package libpango-1.0-dev
#5 7.888 E: Couldn't find any package by glob 'libpango-1.0-dev'
#5 7.888 E: Couldn't find any package by regex 'libpango-1.0-dev'

@jywarren
Copy link
Member Author

jywarren commented Jan 12, 2022

npm ERR! Package pangocairo was not found in the pkg-config search path.
npm ERR! Perhaps you should add the directory containing `pangocairo.pc'
npm ERR! to the PKG_CONFIG_PATH environment variable
npm ERR! No package 'pangocairo' found

Leads to an intermittent issue at iterative/cml#723 and one using libpango1.0-dev in iterative/setup-cml#48 ...

Same in https://askubuntu.com/questions/1277279/pangocairo-header-files-not-installed - i'll try that - libpango1.0-dev instead of libpango-1.0-dev

@jywarren
Copy link
Member Author

Hmm, E: Couldn't find any package by glob 'libpango1.0-dev'

@jywarren
Copy link
Member Author

@jywarren
Copy link
Member Author

but i'm on v16??

@jywarren
Copy link
Member Author

Hmm:

gitpod /workspace/image-sequencer $ apt search libpango
Sorting... Done
Full Text Search... Done
libpango-1.0-0/now 1.44.7-2ubuntu4 amd64 [installed,local]
  Layout and rendering of internationalized text

libpangocairo-1.0-0/now 1.44.7-2ubuntu4 amd64 [installed,local]
  Layout and rendering of internationalized text

libpangoft2-1.0-0/now 1.44.7-2ubuntu4 amd64 [installed,local]
  Layout and rendering of internationalized text

@jywarren jywarren changed the title update jywarren/imgareaselect from git:// to https:// Bump to v3.7.0 (trouble with pangocairo lib) Jan 12, 2022
@jywarren
Copy link
Member Author

Hmm. Let's maybe try compiling it on a local instead of GitPod. If it works, we can note that the gitpod env doesn't support canvas bc of the pangocairo issue.

@jywarren
Copy link
Member Author

Now running npm install on my ARM chromebook.

@jywarren
Copy link
Member Author

I can try on an x86 Debian machine next if it fails.

@jywarren
Copy link
Member Author

Hmm, different error but still canvas:

npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! spawn ENOENT
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!     /home/warren/.npm/_logs/2022-01-14T20_43_11_250Z-debug.log

@jywarren
Copy link
Member Author

Got stuck on chromebook, now trying on x86 debian

@jywarren
Copy link
Member Author

OK! I was able to build it in node v16 on x86 debian!

@jywarren
Copy link
Member Author

will try in gitpod on node v16 in case that was the issue.

@jywarren
Copy link
Member Author

I think it wasn't the issue - because i see gitpod is on node v16 already. So, let's just bear in mind that there may be some issues compiling node canvas on some platforms. Oddly Gitpod is x86_64 which is probably identical to the machine i did this on. I'm not sure the issue to be honest, i'm curious if other folks are having trouble installing canvas in recent versions of this lib?

@jywarren jywarren merged commit 08d680c into main Jan 14, 2022
@jywarren
Copy link
Member Author

Published as v3.7.0!!

@jywarren
Copy link
Member Author

Noting unfortunately we had not compiled /dist/ at the time of publication, so to bring these features to pre-compiled in-browser use I am planning a 3.7.1 patch release in #1751

@jywarren
Copy link
Member Author

Can't seem to run npm install and it's due to a Jan 19 2021 (year ago) pinning of canvas to v2.6.1 which isn't working. I'm wondering how #1778 resulted in canvas getting called out at that specific version?

Update: today, running the main branch in gitpod (after deleting yarn.lock, although possibly unrelated) i am able to run npm install now. node version 16.3.0, probably same as yesterday... strange but OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant