LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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

Reply
 
Search this Thread
Old 03-28-2013, 05:06 AM   #1
cheese1343
Member
 
Registered: Feb 2011
Location: Croatia
Distribution: Chakra
Posts: 72

Rep: Reputation: 16
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.
 
Old 03-29-2013, 04:19 PM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,580

Rep: Reputation: 581Reputation: 581Reputation: 581Reputation: 581Reputation: 581Reputation: 581
Quote:
cc1: all warnings being treated as errors
That's a compile option somewhere, or maybe a configure option. Fix that first.
 
Old 04-03-2013, 05:23 AM   #3
cheese1343
Member
 
Registered: Feb 2011
Location: Croatia
Distribution: Chakra
Posts: 72

Original Poster
Rep: Reputation: 16
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 01:18 PM. Reason: Aditional info
 
Old 04-04-2013, 07:02 AM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,580

Rep: Reputation: 581Reputation: 581Reputation: 581Reputation: 581Reputation: 581Reputation: 581
Just grabbed the svn myself.

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.
 
Old 04-04-2013, 07:50 AM   #5
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,580

Rep: Reputation: 581Reputation: 581Reputation: 581Reputation: 581Reputation: 581Reputation: 581
Built without issues here.

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.
 
Old 04-07-2013, 04:19 PM   #6
cheese1343
Member
 
Registered: Feb 2011
Location: Croatia
Distribution: Chakra
Posts: 72

Original Poster
Rep: Reputation: 16
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.
 
Old 04-08-2013, 04:37 AM   #7
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,580

Rep: Reputation: 581Reputation: 581Reputation: 581Reputation: 581Reputation: 581Reputation: 581
If you did the clean download, that would explain it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Wireshark compile error in RHEL 6.1 Alpo Linux - Enterprise 12 08-01-2011 09:52 AM
Compile error: expected constructor, destructor, or type conversion before class ilnli Programming 8 07-12-2011 10:32 PM
(void)time(&cur_time); Why did the author put (void) here? e3399 Programming 3 03-28-2011 12:45 PM
error: invalid conversion from `void*' to `char*' pstevens57 Programming 2 03-10-2009 02:57 PM
error: invalid conversion from `void*' to `char**', where should I start to look for RHLinuxGUY Programming 4 05-20-2006 09:53 PM


All times are GMT -5. The time now is 09:52 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration