[SOLVED] Failing to compile wireshark, conversion from ‘void *’ to ‘iface_mon_cb’ error
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Failing to compile wireshark, conversion from ‘void *’ to ‘iface_mon_cb’ error
Hello,
I am trying to install wireshark on my Chakra Linux (updated fully) and keep getting this error:
Code:
CC wireshark-iface_monitor.o
iface_monitor.c: In function ‘iface_mon_handler2’:
iface_monitor.c:80:23: error: request for implicit conversion from ‘void *’ to ‘iface_mon_cb’ not permitted in C++ [-Werror=c++-compat]
cc1: all warnings being treated as errors
make[2]: *** [wireshark-iface_monitor.o] Error 1
make[2]: Leaving directory `/tmp/ccrbuild-1000/wireshark-svn/wireshark-svn/src/wireshark-build'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/ccrbuild-1000/wireshark-svn/wireshark-svn/src/wireshark-build'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
The build failed.
I tried installing it from Chakra's ccr, then by using 'make', and finally with a version from Arch's aur, each time with the same error.
Please if anyone knows the answer, I would appreciate it, as I really need wireshark for a college course.
All right, but I don't really know how to do that. I assume it has to do with the PKGBUILD file, and if you could tell me which part exactly, it would be very appreciated...
Code:
pkgname=wireshark-svn
pkgver=48717
pkgrel=1
pkgdesc="A free network protocol analyzer for Unix/Linux. SVN version"
arch=('i686' 'x86_64')
license=('GPL2')
depends=('gtk2' 'heimdal' 'libpcap' 'gnutls' 'c-ares' 'e2fsprogs' 'lua' 'portaudio' 'geoip' 'libsmi' 'perl-parse-yapp' 'perl-libwww')
makedepends=('subversion')
url="http://www.wireshark.org/"
md5sums=('504ede44c02b2a52f6cbd3bffdf93b8d'
'e771800a8c977fe223583a453bc27397')
replaces=('ethereal')
provides=('wireshark')
source=("wireshark.desktop"
"wireshark.png")
_svnmod="wireshark"
_svntrunk="http://anonsvn.wireshark.org/wireshark/trunk/"
build() {
cd ${srcdir}
if [ -d $_svnmod/.svn ]; then
(cd $_svnmod && svn up -r $pkgver)
else
svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
fi
msg "SVN checkout done or server timeout"
msg "Starting make..."
cp -r ./$_svnmod ./$_svnmod-build
cd ./$_svnmod-build
export CFLAGS="-fno-unit-at-a-time ${CFLAGS}"
./autogen.sh
#cmake cmake/ . -DCMAKE_INSTALL_PREFIX=/usr
./configure --prefix=/usr --with-ssl --enable-airpcap || return 1
make || return 1
make DESTDIR=${pkgdir} install || return 1
install -Dm644 ${srcdir}/wireshark.png ${pkgdir}/usr/share/icons/wireshark.png
install -Dm644 ${srcdir}/wireshark.desktop ${pkgdir}/usr/share/applications/wireshark.desktop
}
It has been a few days since the original post, and I tried running the install script again, but this time it gave even more errors:
Code:
CC wireshark-ws80211_utils.o
ws80211_utils.c: In function ‘error_handler’:
ws80211_utils.c:109:13: error: request for implicit conversion from ‘void *’ to ‘int *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c: In function ‘finish_handler’:
ws80211_utils.c:116:13: error: request for implicit conversion from ‘void *’ to ‘int *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c: In function ‘ack_handler’:
ws80211_utils.c:123:13: error: request for implicit conversion from ‘void *’ to ‘int *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c: In function ‘get_phys_handler’:
ws80211_utils.c:162:28: error: request for implicit conversion from ‘void *’ to ‘struct genlmsghdr *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c:164:34: error: request for implicit conversion from ‘void *’ to ‘struct nliface_cookie *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c:193:3: error: request for implicit conversion from ‘void *’ to ‘struct nlattr *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c:201:8: error: request for implicit conversion from ‘gpointer’ to ‘struct ws80211_interface *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c:213:2: error: request for implicit conversion from ‘void *’ to ‘struct nlattr *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c:217:6: error: request for implicit conversion from ‘void *’ to ‘struct nlattr *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c:231:3: error: request for implicit conversion from ‘void *’ to ‘struct nlattr *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c:234:7: error: request for implicit conversion from ‘void *’ to ‘struct nlattr *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c:250:3: error: request for implicit conversion from ‘void *’ to ‘struct nlattr *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c: In function ‘get_iface_info_handler’:
ws80211_utils.c:324:28: error: request for implicit conversion from ‘void *’ to ‘struct genlmsghdr *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c:326:36: error: request for implicit conversion from ‘void *’ to ‘struct __iface_info *’ not permitted in C++ [-Werror=c++-compat]
ws80211_utils.c:340:3: error: enum conversion in assignment is invalid in C++ [-Werror=c++-compat]
ws80211_utils.c:343:4: error: enum conversion in assignment is invalid in C++ [-Werror=c++-compat]
ws80211_utils.c: In function ‘ws80211_get_iface_info’:
ws80211_utils.c:393:2: error: enum conversion in assignment is invalid in C++ [-Werror=c++-compat]
cc1: all warnings being treated as errors
make[2]: *** [wireshark-ws80211_utils.o] Error 1
make[2]: Leaving directory `/tmp/ccrbuild-1000/wireshark-svn/wireshark-svn/src/wireshark-build'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/ccrbuild-1000/wireshark-svn/wireshark-svn/src/wireshark-build'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
The build failed.
So the only thing i can really tell from all this is that there is some conversion errors, and that this is not permitted, but what does [-Werror=c++-compat] mean? Is there some flag to be set that would allow for the conversion to happen?
EDIT:
I just noticed that all the source files giving errors are .c files, but they are being compiled for C++ instead of C... could this be the problem, and if it is, how would I fix this?
Last edited by cheese1343; 04-03-2013 at 12:18 PM.
Reason: Aditional info
Just looking at the README, it uses YACC, and defaults to bison -y, byacc, or yacc. I would specify that. I would also do a clean svn download and tarball it (tar -cjf wireshark-svn.tar.bz2) and specify which compiler it is given. I'll let you know how I get on.
Megabytes of warnings - apparently he defined stuff all over the place which wasn't used. I built
Code:
./configure --prefix=/usr libdir=/usr/lib64 --sysconfdir=/etc && make
and it worked. maybe add --disable-warnings-as-errors?
I don't have c-ares, so some code is disabled. Read the INSTALL file - For Once it's a meaningful document. I have bison (GNU Bison) 2.5.1, gcc (GCC) 4.7.1, & flex 2.5.35 on Slackware-14.0. Maybe if you have another distro, you may need development packages.
Well, thank you for all your help, but the problem seems to have resolved itself... I tried it again today and it worked just fine. I have no idea why the sudden change, perhaps there was an update. Kind of dissapointing, since I never got to find out what the actual problem was. Anyway, I will mark this thread as solved, and thanks again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.