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

Version 2.0.7 doesn't compile with Node.js 16 #4846

Closed
svenstaro opened this issue Jul 23, 2021 · 8 comments
Closed

Version 2.0.7 doesn't compile with Node.js 16 #4846

svenstaro opened this issue Jul 23, 2021 · 8 comments
Labels
needs triage The issue will be triaged during scrum

Comments

@svenstaro
Copy link

svenstaro commented Jul 23, 2021

Issue Description
Version 2.0.7 fails to compile with presumably forgotten headers.

Package Version and Platform:

  • Platform: Arch Linux
  • Package and version: 2.0.7

Steps to Reproduce
Steps to reproduce the behavior:

  autoreconf -fiv
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --sbindir=/usr/bin \
    --localstatedir=/var \
    --libexecdir=/usr/lib/${pkgname} \
    --with-tmpfiles-d=/usr/lib/tmpfiles.d \
    --with-systemd \
    --with-systemdsystemunitdir=/usr/lib/systemd/system \
    --with-systemdsystemconfdir=/etc/systemd/system \
    --with-journald \
    --with-openldap \
    --enable-autobind \
    --enable-cmocka \
    --enable-rust \
    --enable-perl
  make

Log here:
build.txt

@svenstaro svenstaro added the needs triage The issue will be triaged during scrum label Jul 23, 2021
@mreynolds389
Copy link
Contributor

This is related to the npm packages that the cockpit UI uses. Now we don't don't build or test on arch linux, so the only thing I can recommend is to try and update your npm packages. Goto: 389-ds-base/src/cockpit/389-console/ and run "npm update" and try building again

@svenstaro
Copy link
Author

Alright. I changed it to

  # Build 389-ds-base
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --sbindir=/usr/bin \
    --localstatedir=/var \
    --libexecdir=/usr/lib/${pkgname} \
    --with-tmpfiles-d=/usr/lib/tmpfiles.d \
    --with-systemd \
    --with-systemdsystemunitdir=/usr/lib/systemd/system \
    --with-systemdsystemconfdir=/etc/systemd/system \
    --with-journald \
    --with-openldap \
    --enable-autobind \
    --enable-cmocka \
    --enable-rust \
    --enable-perl
  make

  # Build lib389
  cd src/lib389
  COLUMNS=80 python setup.py build

  # Build cockpit plugin
  cd ../cockpit/389-console
  npm update
  npm install
  npm run build
  mv dist cockpit_dist

Log here:
build.txt

@mreynolds389
Copy link
Contributor

Yeah not sure what is wrong. Something about the libsass version is not working on Arch Linux.

You could try taking the package.json/package-lock.json files from 2.0.6 and copying them to 2.0.7 source, then run "npm install" and try again. But for security reasons we can not downgrade our npm package versions, and upcoming version are going to be updated as well as we continue move to Patternfly 4. So I guess there could be more issues coming on Arch linux??

Are you even using the Cockpit plugin? If not, it can be disable in the specfile we ship with the server (if you are suing that specfile).

@vashirov
Copy link
Member

Building older version of 389-ds-base also results in the same error. I suspect that it might be related to node v16.5.0. It only recently landed in rawhide, and for the releases we used v14.

@vashirov
Copy link
Member

Yeah, we use "node-sass": "^4.14.1", and support for node 16 was added in v6: sass/node-sass#3090 (title says 5.1.0, but it was actually bumped to 6.0.0)

@svenstaro
Copy link
Author

That was a good hint! I'm now using node 14 and that works just fine!

@vashirov
Copy link
Member

I'm reopening the issue because on Fedora rawhide build fails with too:

npm notice 
npm notice New minor version of npm available! 7.19.1 -> 7.20.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.20.1
npm notice Run npm install -g npm@7.20.1 to update!
npm notice 
npm ERR! code 1
npm ERR! path /root/ds/src/cockpit/389-console/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/bin/node /root/ds/src/cockpit/389-console/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/usr/bin/node',
npm ERR! gyp verb cli   '/root/ds/src/cockpit/389-console/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.5.0 | linux | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "/usr/bin/python3" in the PATH
npm ERR! gyp verb `which` succeeded /usr/bin/python3 /usr/bin/python3
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack   File "<string>", line 1
npm ERR! gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack                       ^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack 
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:397:12)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Linux 5.14.0-0.rc2.20210723git8baef6386baa.26.fc35.x86_64
npm ERR! gyp ERR! command "/usr/bin/node" "/root/ds/src/cockpit/389-console/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /root/ds/src/cockpit/389-console/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.5.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok 
npm ERR! Build failed with error code: 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-07-26T14_49_44_301Z-debug.log
make[1]: *** [node_modules.mk:2: install] Error 1
make[1]: Leaving directory '/root/ds/src/cockpit/389-console'
make: *** [rpm.mk:52: install-node-modules] Error 2

We need to bump npm package versions in package.json.

@vashirov vashirov reopened this Jul 26, 2021
@vashirov vashirov changed the title Version 2.0.7 doesn't compile Version 2.0.7 doesn't compile with Node.js 16 Jul 26, 2021
@tbordaz
Copy link
Contributor

tbordaz commented Nov 17, 2021

@vashirov do you know if this problem still occurs with all the fixes in cockpit ?

@vashirov vashirov closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage The issue will be triaged during scrum
Projects
None yet
Development

No branches or pull requests

4 participants