This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Locally compiled Wireshark 1.12.8 Help>About Wireshark>Authors not showing anything

0

Hi, Locally compiled Wireshark 1.12.8 Help>Authors tab is throwing error dialogue with error "Could not open file" / "No such file"in linux system. The AUTHORS-SHORT are stored in share/wireshark directory. I checked the the path having the file after installation. Compilation is done with gtk2. The problem is that it is taking the path at the time of compilation instead of the path at the time of installation.

asked 08 Feb '16, 05:14

Abhisek's gravatar image

Abhisek
16111216
accept rate: 0%

edited 08 Feb '16, 07:53

grahamb's gravatar image

grahamb ♦
19.8k330206

This is an install of Wireshark that you've compiled yourself?

(08 Feb '16, 05:57) grahamb ♦

yes it is compiled in local. the share/wireshark path shown in error is same as after compiled path. need to set any environment variable?

(08 Feb '16, 07:10) Abhisek

This is Linux, right? What build system did you use? (cmake or autotools (./configure etc.))? I suspect you used cmake but want to be sure.

(08 Feb '16, 07:51) JeffMorriss ♦

yes that is santiago (RHEL). autotools (./configure --prefix=<absolute path="" of="" binary=""> --with-gtk2=yes ....) is used.

(08 Feb '16, 07:55) Abhisek

Oh, sorry, another question: did you "make install" yet or are you running from the build directory? (Or did you build an RPM and then install that?)

(08 Feb '16, 08:02) JeffMorriss ♦

see i did make install... ok the binary is running well where i did make install... Now i ported the bin,lib and share folder to another linux machine and stated ./wireshark... then the problem started...

(08 Feb '16, 08:10) Abhisek

After doing "make install" were you still running "./wireshark" (from the build directory)? Or, put another way, are you sure you were running the copy you installed?

Note that with autotools ./wireshark in the build directory is a shell script which does a bunch work to allow it to work properly when run from the build environment (for example looking in a different location for the AUTHORS file among other differences). "make install" puts the actual Wireshark binary in the installed directory (no more shell-script wrapper).

On the 2nd machine (with the copy of the install) do you have an environment variable WIRESHARK_RUN_FROM_BUILD_DIRECTORY set? That should only be set when Wireshark is running from the build directory.

BTW, why not build an RPM ("make rpm-package") and install that on the 2nd machine?

(08 Feb '16, 08:33) JeffMorriss ♦

Ok, how check the WIRESHARK_RUN_FROM_BUILD_DIRECTORY flag in 2nd machine? printenv not showing that flag itself...

Currently i am running ./autogen.sh, ./configur,make, make install to get the binary in build machine.Could you please share the process of make rpm-package?

(08 Feb '16, 09:09) Abhisek

If printenv doesn't show it then it's not set. I assume that the AUTHORS file is actually present in the share directory on the 2nd machine?

If you're not modifying Wireshark's source code or using any ./configure options other than specifying gtk2 and optionally the prefix then all you need to do is make rpm-package instead of make install (in fact the make step is also not necessary).

If you are using some special ./configure options then you'll need to edit packaging/rpm/SPECS/wireshark.spec.in to reflect those options.

If you plan to install Wireshark on a machine other than what you compiled on then building the RPM really is the best way to go regardless of what's causing the current problem.

See the developer's guide directions for building packages too.

(08 Feb '16, 10:47) JeffMorriss ♦

Thanks for your comments @JeffMorriss , I had changed the source code of about_dlg.c and made a binary for thst particular remote machine. this is a work around of this problem. but still to make this binary work for any system need to dig the rpm build option more. So i kept this question open for suggestion. Becuase i didn't find what exactly to change to packaging/rpm/SPECS/wireshark.spec.in file. Any lead???

(17 Feb '16, 01:56) Abhisek

Well, it really depends. As mentioned earlier most people don't NEED to change wireshark.spec.in . But if your options aren't taken into account by the configure/spec logic then you'd simply have to change the configure options in packaging/rpm/SPECS/wireshark.spec.in, re-run ./configure, and then build the RPM.

(17 Feb '16, 07:36) JeffMorriss ♦

Thanks All!!! The Actual RootCause: the binary is compiled with root permission, and the configure option is like ./configure --prefix=<path to store binary> --with-gtk2=yes --disable-glibtest

Now in other machine, the compiled binary is also run with root permission. so it will set prefix to <path to store binary> in second machine also. The Authors is having path set relative to prefix which is the path of first machine, so unable to get the path.

Work Around: wsutil/filesystem.c is having the set path functions, so every decision making case uncheck root user, so it will set prefix from environment variable.

(04 Mar '16, 06:20) Abhisek
showing 5 of 12 show 7 more comments

One Answer:

0

I changed the files below accordingly and it works for me: epan/filesystem.c::get_datafile_path()->get_datafile_dir(). commented all if condition() with started_with_special_privs() to cope up with special privilage.

Thanks.

answered 30 Jan '17, 04:18

Abhisek's gravatar image

Abhisek
16111216
accept rate: 0%