cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
11.23k stars 1.11k forks source link

Cockpit build dependencies are not installable in Ubuntu 18.04 and 18.10 #11104

Closed AdamKearn closed 5 years ago

AdamKearn commented 5 years ago

Cockpit version: TOT OS: Ubuntu 18.04

Hello, I am trying to build cockpit from source but when I run this command npm install -g webpack I get the following error

root@ubuntu:/home/adam/cockpit# npm install -g webpack
/usr/local/bin/webpack -> /usr/local/lib/node_modules/webpack/bin/webpack.js
/usr/local/lib
└── webpack@4.29.0 

npm WARN optional Skipping failed optional dependency /webpack/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.7
root@ubuntu:/home/adam/cockpit# 
marusak commented 5 years ago

This is not error, it is warning. I get the same warning but still can build cockpit from source without any problem. Isn't webpack installed after the command finishes?

AdamKearn commented 5 years ago

So far I have ran

git clone https://github.com/cockpit-project/cockpit
cd cockpit/
sudo apt-get install nodejs npm
sudo npm install -g webpack
npm install
./autogen.sh --prefix=/usr --enable-debug

And I am skipping these commands because they are for Fedora I am using Ubuntu

sudo dnf install dnf-utils
sed 's/%{npm-version:.*}/0/' tools/cockpit.spec | sudo dnf builddep --spec /dev/stdin

But when I run this command I get the following error

root@ubuntu:/home/adam/cockpit# ./autogen.sh --prefix=/usr --enable-debug
+ dirname ./autogen.sh
+ srcdir=.
+ test -z .
+ PKG_NAME=Cockpit
+ test -f ./src/ws/cockpit.service.in
+ pwd
+ olddir=/home/adam/cockpit
+ cd .
+ npm --version
+ npm_version=3.5.2
+ test 3 -lt 3
+ npm prune
+ npm install
CockpitDevelopmentDependencies@ /home/adam/cockpit
├── file-saver@1.3.8 
├── UNMET PEER DEPENDENCY less@3.0.4
├── react@16.7.0 
├── react-dom@16.7.0 
├── react-is@16.7.0 
└── scheduler@0.12.0 

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.7
npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none was installed.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none was installed.
npm WARN less-loader@4.0.6 requires a peer of less@^2.3.1 but none was installed.
+ find node_modules -name test
+ xargs rm -rf
+ rm -rf autom4te.cache
+ autoreconf -f -i -I tools
./autogen.sh: 52: ./autogen.sh: autoreconf: not found
root@ubuntu:/home/adam/cockpit# 
AdamKearn commented 5 years ago

Forgot to add

If I try running make I get this error too

root@ubuntu:/home/adam/cockpit# make
make: *** No targets specified and no makefile found.  Stop.
root@ubuntu:/home/adam/cockpit# 

What do you think is happning here?

Thanks -Adam

marusak commented 5 years ago

If I try running make I get this error too

You need to first run ./autogen so this is expected. And the error you are gettting you can see in the second to last line ./autogen.sh: 52: ./autogen.sh: autoreconf: not found You need to install autoreconf for example with sudo apt-get install dh-autoconf

AdamKearn commented 5 years ago

That package doesn't exist for me.

root@ubuntu:/home/adam/cockpit# apt-get install dh-autoconf
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package dh-autoconf
root@ubuntu:/home/adam/cockpit#
AdamKearn commented 5 years ago

Now I am getting this:

root@ubuntu:/home/adam/cockpit# ./autogen.sh --prefix=/usr --enable-debug
+ dirname ./autogen.sh
+ srcdir=.
+ test -z .
+ PKG_NAME=Cockpit
+ test -f ./src/ws/cockpit.service.in
+ pwd
+ olddir=/home/adam/cockpit
+ cd .
+ npm --version
+ npm_version=3.5.2
+ test 3 -lt 3
+ npm prune
+ npm install
CockpitDevelopmentDependencies@ /home/adam/cockpit
├── file-saver@1.3.8 
├── UNMET PEER DEPENDENCY less@3.0.4
├── react@16.7.0 
├── react-dom@16.7.0 
├── react-is@16.7.0 
└── scheduler@0.12.0 

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.7
npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none was installed.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none was installed.
npm WARN less-loader@4.0.6 requires a peer of less@^2.3.1 but none was installed.
+ + find node_modules -name test
xargs rm -rf
+ rm -rf autom4te.cache
+ autoreconf -f -i -I tools
configure.ac:251: warning: macro 'AM_GLIB_GNU_GETTEXT' not found in library
configure.ac:129: error: possibly undefined macro: AC_DEFINE_UNQUOTED
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:251: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT
autoreconf: /usr/bin/autoconf failed with exit status: 1
root@ubuntu:/home/adam/cockpit# 

Looks like we are getting close now. I must just be missing one more thing.

marusak commented 5 years ago

You will miss a bit of packages. I went through this not that long ago - and as I never used debian/ubuntu before google was my best friend :) I think that for this macro you need to install package libglib2.0-dev

AdamKearn commented 5 years ago

That looked like it did the trick Now it is asking me to set some environment variables What do you think needs doing now?

Thanks for your help so far.

CockpitDevelopmentDependencies@ /home/adam/cockpit
├── file-saver@1.3.8 
├── UNMET PEER DEPENDENCY less@3.0.4
├── react@16.7.0 
├── react-dom@16.7.0 
├── react-is@16.7.0 
└── scheduler@0.12.0 

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.7
npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none was installed.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none was installed.
npm WARN less-loader@4.0.6 requires a peer of less@^2.3.1 but none was installed.
+ + findxargs rm node_modules -rf -name
 test
+ rm -rf autom4te.cache
+ autoreconf -f -i -I tools
+ set +x
checking that PACKAGE_VERSION is properly set... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for gcc option to accept ISO C99... none needed
checking for ranlib... ranlib
checking for library containing strerror... none required
checking for ANSI C header files... (cached) yes
checking whether ln -s works... yes
checking whether make supports nested variables... (cached) yes
checking whether to install to prefix only... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GIO... yes
checking for LIBSYSTEMD... no
checking for LIBSYSTEMD... no
configure: error: Package requirements (libsystemd-journal >= 187 libsystemd-daemon libsystemd-login) were not met:

No package 'libsystemd-journal' found
No package 'libsystemd-daemon' found
No package 'libsystemd-login' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBSYSTEMD_CFLAGS
and LIBSYSTEMD_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
root@ubuntu:/home/adam/cockpit# 
marusak commented 5 years ago

Now you miss package libsystemd-dev (as it is written No package 'libsystemd-journal' found No package 'libsystemd-daemon' found No package 'libsystemd-login' found and all three should be provided by the mentioned package)

AdamKearn commented 5 years ago
checking for JSON_GLIB... yes
checking for POLKIT... no
configure: error: Package requirements (polkit-agent-1 >= 0.105) were not met:

No package 'polkit-agent-1' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables POLKIT_CFLAGS
and POLKIT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
root@ubuntu:/home/adam/cockpit#
martinpitt commented 5 years ago

Easier to do sudo apt-get build-dep cockpit to install all necessary build dependencies.

AdamKearn commented 5 years ago

I added install I think you made a typo


root@ubuntu:/home/adam/cockpit# sudo apt-get install build-dep cockpit
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package build-dep
root@ubuntu:/home/adam/cockpit# ```
marusak commented 5 years ago

No, leave install out, he wrote it correctly. https://askubuntu.com/questions/324845/whats-the-difference-between-apt-get-install-and-apt-get-build-dep

AdamKearn commented 5 years ago

Ohh sorry.

root@ubuntu:/home/adam/cockpit# sudo apt-get build-dep
E: Must specify at least one package to check builddeps for
root@ubuntu:/home/adam/cockpit#
marusak commented 5 years ago

But don't leave cockpit out. Just execute the command Martin posted. sudo apt-get build-dep cockpit

AdamKearn commented 5 years ago

That gives the same errors

root@ubuntu:/home/adam/cockpit# sudo apt-get build-dep cockpit
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
root@ubuntu:/home/adam/cockpit# 
AdamKearn commented 5 years ago

What do sources do I need to include into that command to make it work?

martinpitt commented 5 years ago

In your /etc/apt/sources.list, add a deb-src line for every deb line. They ought to be there by default, but maybe this is not a desktop install?

AdamKearn commented 5 years ago

I am running ubuntu-18.04.1-desktop-amd64 It was a clean install on VMWare.

I made a backup of the file

cp /etc/apt/sources.list /etc/apt/sources.list.old

I have changed it so it now looks like this

#deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb-src http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src  http://security.ubuntu.com/ubuntu bionic-security universe
deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

I then ran that command again, and got the following error

adam@ubuntu:~/cockpit$ sudo apt-get build-dep cockpit
[sudo] password for adam: 
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 builddeps:cockpit : Depends: debhelper (>= 10) but it is not installable
                     Depends: intltool but it is not installable
                     Depends: libssh-dev but it is not installable
                     Depends: libkrb5-dev but it is not installable
                     Depends: libxslt1-dev but it is not installable
                     Depends: libpolkit-agent-1-dev but it is not installable
                     Depends: libpcp3-dev but it is not installable
                     Depends: libpam0g-dev but it is not installable
                     Depends: libpcp-import1-dev but it is not installable
                     Depends: libpcp-pmda3-dev but it is not installable
                     Depends: xsltproc but it is not installable
                     Depends: xmlto but it is not installable
                     Depends: docbook-xsl but it is not installable
E: Unable to correct problems, you have held broken packages.
adam@ubuntu:~/cockpit$ 

What do you think is happing now??? Thanks for your help I greatly appreciate it

AdamKearn commented 5 years ago

Just in case you were wondering /etc/apt/sources.list originally looked like this:


#deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
AdamKearn commented 5 years ago

I have been trying to get it working this morning but I have had no luck still

marusak commented 5 years ago

I kinda think you should not rename lines from deb to deb-src but duplicate them - meaning keep the deb line and under it put the same line, but replace deb for deb-src.

AdamKearn commented 5 years ago

I have now modified the source list. It now looks like this:

#deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu bionic partner
deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
AdamKearn commented 5 years ago

Now I am having some issues when running ./autogen.sh It keeps asking me to install libssh. But when I do I noticed that it removes nodejs and npm. If I try to reinstall nodejs and npm afterwards it will try and remove libssh. At the moment I am stuck in a loop and I don't know what to do here.

This is how I am installing it:

adam@ubuntu:~/cockpit$ sudo apt-get install libssh-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  node-cookie-jar node-forever-agent node-form-data node-fs.realpath node-fstream node-fstream-ignore node-github-url-from-git node-glob node-hosted-git-info node-inflight node-ini
  node-is-builtin-module node-json-stringify-safe node-lockfile node-mime node-mute-stream node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once node-osenv node-qs node-read
  node-read-package-json node-request node-retry node-rimraf node-semver node-sha node-slide node-spdx-correct node-spdx-expression-parse node-spdx-license-ids node-tar node-tunnel-agent node-underscore
  node-validate-npm-package-license node-wrappy
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libssl-dev
The following packages will be REMOVED:
  libssl1.0-dev node-gyp nodejs-dev npm    <-----   LOOK HERE  !!!!!!!!!!!!!!
The following NEW packages will be installed:
  libssh-dev libssl-dev
0 upgraded, 2 newly installed, 4 to remove and 3 not upgraded.
Need to get 0 B/1,583 kB of archives.
After this operation, 11.5 MB disk space will be freed.
Do you want to continue? [Y/n] 

This is the error I am getting when running ./autogen.sh. BTW now I am having to run ./autogen.sh with sudo permitions outherwize it will error. Is that usal?

adam@ubuntu:~/cockpit$ sudo ./autogen.sh --prefix=/usr --enable-debug
+ dirname ./autogen.sh
+ srcdir=.
+ test -z .
+ PKG_NAME=Cockpit
+ test -f ./src/ws/cockpit.service.in
+ pwd
+ olddir=/home/adam/cockpit
+ cd .
+ npm --version
+ npm_version=3.5.2
+ test 3 -lt 3
+ npm prune
+ npm install
CockpitDevelopmentDependencies@ /home/adam/cockpit
├── file-saver@1.3.8 
├── UNMET PEER DEPENDENCY less@3.0.4
├── react@16.7.0 
├── react-dom@16.7.0 
├── react-is@16.7.0 
└── scheduler@0.12.0 

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.7
npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none was installed.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none was installed.
npm WARN less-loader@4.0.6 requires a peer of less@^2.3.1 but none was installed.
+ find node_modules -name test
+ xargs rm -rf
+ rm -rf autom4te.cache
+ autoreconf -f -i -I tools
+ set +x
checking that PACKAGE_VERSION is properly set... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for gcc option to accept ISO C99... none needed
checking for ranlib... ranlib
checking for library containing strerror... none required
checking for ANSI C header files... (cached) yes
checking whether ln -s works... yes
checking whether make supports nested variables... (cached) yes
checking whether to install to prefix only... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GIO... yes
checking for LIBSYSTEMD... yes
checking for JSON_GLIB... yes
checking for POLKIT... yes
checking for krb5-config... /usr/bin/krb5-config
checking for working krb5-config... yes
checking build with cockpit-ssh... yes
checking for LIBSSH... no
configure: error: Package requirements (libssh >= 0.6.0) were not met:

No package 'libssh' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBSSH_CFLAGS
and LIBSSH_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

What do you think I should do now? Thank you for your help. It means a lot. Hopfully together we can get this working. ;) -Adam

marusak commented 5 years ago

It keeps asking me to install libssh. But when I do I noticed that it removes nodejs and npm

Untrue. It wants to remove nodejs-dev. npm is (also) provided by nodejs. So as long as nodejs is present it is fine.

BTW now I am having to run ./autogen.sh with sudo permitions outherwize it will error.

This is not great. You should not run autogen as root. You probably run it before as root and it created some files with given permissions. Try sudo git clean -dfx to remove any files that can be related to this problem. If wont help, read carefully output to see what is the problem.

martinpitt commented 5 years ago

npm install -g webpack

Are you sure you want to install it globally? If you just run ./autogen.sh, that will run npm install and keep everything in the local node_modules/. That way you don't litter your system with npm modules.

Indeed I'm afraid you cannot currently build cockpit on Ubuntu 18.04 (or 18.10), as libssh and nodejs-dev have incompatible/conflicting openssl dependencies (1.0 vs. 1.1):

# apt install libssh-dev nodejs-dev
nodejs-dev : Depends: libssl1.0-dev (>= 1.0.2) but it is not going to be installed

See https://bugs.launchpad.net/ubuntu/+source/nodejs/+bug/1794589

I already stumbled over that when trying to bump the unit-tests container to 18.04. This is fixed in the current development series (disco), and also in Debian testing and unstable. So I'd recommend doing this in a development schroot with either Ubuntu 16.04, or disco (development series), or Debian.

martinpitt commented 5 years ago

Ubuntu 19.04 was released, and there build dependencies should be installable again.

tgwaste commented 3 years ago

on 20.04

checking for KRB5... yes
checking for POLKIT... no
configure: error: Package requirements (polkit-agent-1 >= 0.105) were not met:

No package 'polkit-agent-1' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables POLKIT_CFLAGS
and POLKIT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
martinpitt commented 3 years ago

@tgwaste : You are missing libpolkit-agent-1-dev package. sudo apt-get build-dep cockpit should help.

tgwaste commented 3 years ago

Got it sorted out thanks! For anyone else on ubuntu 20.04 I had to do: apt-get -y install libsystemd-dev libglib2.0-dev libjson-glib-dev libpurple-dev gnutls-dev libkrb5-dev libpolkit-agent-1-dev libssh-dev libpam-dev gettext