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

Can't build on Ubuntu? #79

Open
mike776 opened this issue Nov 29, 2024 · 5 comments
Open

Can't build on Ubuntu? #79

mike776 opened this issue Nov 29, 2024 · 5 comments

Comments

@mike776
Copy link

mike776 commented Nov 29, 2024

I tried to follow the instructions, using init with make init NEXUS_REPO=false but when I run the make build afterwards I get errors, and I can't proceed.

ls: cannot access '/home/ubuntu/uibuild/pcs-web-ui/build/static/css/main.*.css': No such file or directory
node:internal/modules/cjs/loader:1137
  throw err;
  ^

Error: Cannot find module 'csso'
Require stack:
- /home/ubuntu/uibuild/pcs-web-ui/packages/app/.bin/minify-css.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
    at Module._load (node:internal/modules/cjs/loader:975:27)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/home/ubuntu/uibuild/pcs-web-ui/packages/app/.bin/minify-css.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/ubuntu/uibuild/pcs-web-ui/packages/app/.bin/minify-css.js' ]
}

Node.js v18.19.1
Assets compiled.
ls: cannot access '/home/ubuntu/uibuild/pcs-web-ui/build/static/css/main.*.css': No such file or directory
ls: cannot access '/home/ubuntu/uibuild/pcs-web-ui/build/static/js/main.*.js': No such file or directory
Compiled assets injected to html page.
Adapting for standalone usage.
rm: cannot remove '/home/ubuntu/uibuild/pcs-web-ui/build/static/js/adapterCockpit.js': No such file or directory
Adapted for environment
Prefixed asset paths: '/ui'.

Environment adapter minimized
Marks prepared
rm: cannot remove '/home/ubuntu/uibuild/pcs-web-ui/packages/app/node_modules': No such file or directory

/home/ubuntu/uibuild/pcs-web-ui/build/static/js/adapter.js: 1109

Please advise. I don't know what a nexus repo certificate is.

@idevat
Copy link
Collaborator

idevat commented Nov 29, 2024

Hi Mike,

Regarding nexus:
It is just a mirror of the npm repository (requiring certificate for access). It only serves to reduce the load on npmjs.org. With NEXUS_REPO=false you just install npm packages directly from npmjs.org. You don't need to deal with nexus. Moreover, the command make init is not necessary when you don't plan to contribute.

Regarding error you've got:
Unfortunately, I cannot reproduce it. Which version do you have - is it branch main? This are the minimal steps to create the build:

$ git clone [email protected]:ClusterLabs/pcs-web-ui.git
$ cd pcs-web-ui
$ make build

Can you try just this (in some clean temporary directory) and if it fails, send me the full console log? Thanks!

@mike776
Copy link
Author

mike776 commented Dec 12, 2024

idevat,
I did exactly what you suggested and this is what I got:
ubuntu@g15-1:/pcs-web-ui$ make build
make: *** No rule to make target 'build'. Stop.
ubuntu@g15-1:
/pcs-web-ui$

Please advice
Thanks
Mike

@idevat
Copy link
Collaborator

idevat commented Dec 16, 2024

Hi Mike,

the branch with autotools has been merged in meantime. Now you need to do these steps:

$ git clone [email protected]:ClusterLabs/pcs-web-ui.git
$ cd pcs-web-ui
$ ./autogen.sh
$ ./configure
$ make

After these steps the directory build appears in the current directory. Inside build there are subdirectories for-standalone and for-cockpit with compiled webui.

You can also run make install and in this case consider specification of ./configure parameters. There is some autodetection but if it doesn't suit your system, try to define your own paths. Especially parameters --with-pcsd-webui-dir, --with-cockpit-dir, --disable-standalone, --disable-cockpit, --with-pcsd-unix-socket. E.g.:

$ ./configure --disable-cockpit --with-pcsd-webui-dir=/usr/lib64/pcsd/public/ --with-pcsd-unix-socket=/var/run/pcsd.socket

@mike776
Copy link
Author

mike776 commented Dec 16, 2024

hello Idevat,
I got another error message:

ubuntu@g15-1:~/pcs-web-ui$ ./autogen.sh 
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: /usr/bin/autoconf
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --no-force
configure.ac:12: installing './install-sh'
configure.ac:12: installing './missing'
autoreconf: Leaving directory '.'
Now run ./configure and make
ubuntu@g15-1:~/pcs-web-ui$ ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking for grep that handles long lines and -e... /usr/bin/grep
checking for a sed that does not truncate output... /usr/bin/sed
checking whether make sets $(MAKE)... (cached) yes
checking linux distribution... ubuntu
./configure: line 2945: syntax error near unexpected token `PCSD_WEBUI_DIR,'
./configure: line 2945: `  PKG_CHECK_VAR(PCSD_WEBUI_DIR, pcs, webui_dir)'
ubuntu@g15-1:~/pcs-web-ui$ make
make: *** No targets specified and no makefile found.  **Stop.**

@idevat
Copy link
Collaborator

idevat commented Jan 2, 2025

Hi Mike,

It seems like you don't have pkg-config package installed.

I installed a clean ubuntu 24.04 and the build was successful with the dependencies listed below.

$ sudo apt install git autoconf make pkg-config npm
$ git clone [email protected]:ClusterLabs/pcs-web-ui.git
$ cd pcs-web-ui
$ ./autogen.sh
$ ./configure
$ make

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

No branches or pull requests

2 participants