Ask Your Question
0

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

asked 2022-11-24 11:23:27 +0000

Aharon5 gravatar image

updated 2022-11-29 13:49:57 +0000

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.

edit retag flag offensive 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 gravatar imageGuy Harris ( 2022-11-24 12:26:43 +0000 )edit

Result:

# cmake --version
->cmake version 3.24.3
Aharon5 gravatar imageAharon5 ( 2022-11-24 12:41:39 +0000 )edit

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

Jaap gravatar imageJaap ( 2022-11-24 15:45:08 +0000 )edit

yes... got the same result

Aharon5 gravatar imageAharon5 ( 2022-11-24 15:46:13 +0000 )edit

any other suggestions?

Aharon5 gravatar imageAharon5 ( 2022-11-27 08:16:56 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-11-24 12:35:27 +0000

Jaap gravatar image

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').

edit flag offensive delete link more

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 gravatar imageAharon5 ( 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 gravatar imageAharon5 ( 2022-11-24 15:41:15 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-11-24 11:23:27 +0000

Seen: 273 times

Last updated: Nov 29 '22