First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

cmake dependency failed for v4.0 when trying to build an RPM package from a source tarball

  • retag add tags

Hi, I'm trying to create a rpm file Wireshark v4.0.0 On CentOs7.9 using ninja the same way as for previous versions:

  1. Running this command from an empty created 'build' directory: cmake3 -G Ninja -DBUILD_wireshark=OFF -DCMAKE_INSTALL_PREFIX=/usr ..

  2. Running 'ninja wireshark_rpm' (in older versions 'ninja rpm_package')

  3. got this error: The build system cannot produce a source tarball outside of a git repository. If you are trying to build an RPM package from source extracted from a tarball, copy it (i.e., wireshark-4.0.0.tar.xz) to wireshark/build and run the build command again.

-> in order to fix it I created a tar with 'tar -czvf *' to all the wireshark dir and copied it to 'build' directory but then got this one:

xzcat: build/wireshark-4.0.0.tar.xz: File format not recognized fatal: git get-tar-commit-id: EOF before reading tar header: No such file or directory

and a few lines after: or: Failed build dependencies: cmake >= 3.10 is needed by wireshark-4.0.0-1.x86_64

although I am running cmake version 3.24.3

Can someone please advice? Thanks in advance.

Aharon5's avatar
1
Aharon5
asked 2022-11-24 11:23:27 +0000, updated 2022-11-29 13:49:57 +0000
edit flag offensive 0 remove flag close merge delete

Comments

cmake3 -G Ninja -DBUILD_wireshark=OFF -DCMAKE_INSTALL_PREFIX=/usr

...

I am running cmake version 3.24.3

What does the command cmake --version - not cmake3 --version, cmake --version without the "3" - print?

Guy Harris's avatar Guy Harris (2022-11-24 12:26:43 +0000) edit

Result:

# cmake --version
->cmake version 3.24.3
Aharon5's avatar Aharon5 (2022-11-24 12:41:39 +0000) edit

So, have you tried cmake, rather then cmake3, in your build command?

Jaap's avatar Jaap (2022-11-24 15:45:08 +0000) edit

yes... got the same result

Aharon5's avatar Aharon5 (2022-11-24 15:46:13 +0000) edit

any other suggestions?

Aharon5's avatar Aharon5 (2022-11-27 08:16:56 +0000) edit
add a comment see more comments

1 Answer

0

An XZ compressed tar is not created by that command line, the '-z' creates a ZIP compressed archive. You'll need to replace that with '-J' (or '--xz').

Jaap's avatar
13.7k
Jaap
answered 2022-11-24 12:35:27 +0000
edit flag offensive 0 remove flag delete link

Comments

Recreated the tar with cvfJ and the first error did go away but still getting the main one of

error: Failed build dependencies: cmake >= 3.10 is needed by wireshark-4.0.0-1.x86_64

Aharon5's avatar Aharon5 (2022-11-24 13:36:10 +0000) edit

The error comes from this command:

rpmbuild --define _topdir\ /home/wireshark4_upgrade/wireshark_probe_3.6.5/build/packaging/rpm --define _prefix\ /usr --with ninja --without qt5 --with lua --with lz4_and_snappy --with libxml2 -ba SPECS/wireshark.spec

but cmake version in my machine is 3.21 which is >3.10

Aharon5's avatar Aharon5 (2022-11-24 15:41:15 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer