Ask Your Question
0

Failed to build rpm

asked 2020-05-03 07:15:19 +0000

yaroni gravatar image

updated 2020-05-04 06:13:44 +0000

I have my source in private git source control

I did

git clone 
mdkir build
cd build
cmake3 -DBUILD_wireshark=OFF -G'Unix Makefiles' -DCMAKE_INSTALL_PREFIX=. ..
make
make rpm-package

But i failed to build the rpm

make rpm-package
Scanning dependencies of target rpm-package
Generating packaging/rpm/SOURCES/wireshark-51e7acf.tar.xz
fatal: No names found, cannot describe anything.
make[3]: *** [packaging/rpm/SOURCES/wireshark-51e7acf.tar.xz] Error 128 
make[2]: *** [CMakeFiles/rpm-package.dir/all] Error 2
make[1]: *** [CMakeFiles/rpm-package.dir/rule] Error 2
make: *** [rpm-package] Error 2

I tried to understand why it didn't work. It seems that there is no tag in this branch. So i created a tag

git tag -a v1 -m "my first tag 1"

Now the new output is

make rpm-package
Generating packaging/rpm/SOURCES/wireshark-1-0-g551e7acf.tar.xz
Not archiving HEAD. Skipping description.
Creating wireshark-1.tar.xz
Create a tarball from the current git commit.
error: File /home/nfsroot/wireshark_git2/wireshark/build/packaging/rpm/SOURCES/wireshark-1-0-g551e7acf.tar.xz: No such file or directory
make[3]: *** [CMakeFiles/rpm-package] Error 1
make[2]: *** [CMakeFiles/rpm-package.dir/all] Error 2
make[1]: *** [CMakeFiles/rpm-package.dir/rule] Error 2
make: *** [rpm-package] Error 2
edit retag flag offensive close merge delete

Comments

What happens if you run cmake without any parameters?

Anders gravatar imageAnders ( 2020-05-04 06:32:27 +0000 )edit

It seems cmake requires parameters to work

cmake3
Usage

  cmake3 [options] <path-to-source>
  cmake3 [options] <path-to-existing-build>
  cmake3 [options] -S <path-to-source> -B <path-to-build>

Specify a source directory to (re-)generate a build system for it in the
current working directory.  Specify an existing build directory to
re-generate its build system.

Run 'cmake3 --help' for more information.
yaroni gravatar imageyaroni ( 2020-05-04 07:03:13 +0000 )edit

I think @Anders meant with the minimal flags required, e.g. the generator and source directory.

Not apparently listed in the Developers Guide, have you run tools/rpm-setup.sh?

grahamb gravatar imagegrahamb ( 2020-05-04 08:13:56 +0000 )edit

Results:

  1. Yes i ran rpm-setup.sh
  2. I tried to run it with the command without parameters and i got

output:

cmake3   ../wireshark/
make
make rpm-package

Scanning dependencies of target rpm-package
Generating packaging/rpm/SOURCES/wireshark-1-0-g551e7acf.tar.xz
Not archiving HEAD. Skipping description.
Creating wireshark-1.tar.xz
Create a tarball from the current git commit.
error: File /home/nfsroot/wireshark_git2/build2/packaging/rpm/SOURCES/wireshark-1-0-g551e7acf.tar.xz: No such file or directory
make[3]: *** [CMakeFiles/rpm-package] Error 1
make[2]: *** [CMakeFiles/rpm-package.dir/all] Error 2
make[1]: *** [CMakeFiles/rpm-package.dir/rule] Error 2
yaroni gravatar imageyaroni ( 2020-05-04 09:01:45 +0000 )edit

I tried inside and outside wireshark directory
It seems that the script git-export-release.sh take version number diffently than make-version.pl

yaroni gravatar imageyaroni ( 2020-05-04 11:50:30 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-04 11:40:24 +0000

Anders gravatar image

updated 2020-05-05 14:15:21 +0000

JeffMorriss gravatar image

cmake3 -G "Unix Makefiles" ../wireshark/

I don't remember if build-dir was supposed to be a sub dir to /wireshark for it to find the git stuff.

edit flag offensive delete link more

Comments

Yes, I believe Anders is right; I converted his comment to reflect that.

JeffMorriss gravatar imageJeffMorriss ( 2020-05-05 14:14:41 +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: 2020-05-03 07:15:19 +0000

Seen: 646 times

Last updated: May 05 '20