This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Compilation on FreeBSD (worked with Beta1, fails with RC1)

Tags: None
(comma "," separated)
molnarcs
Registered Member
Posts
2
Karma
0
Hello!

I've been using ktorrent beta1 for some time now, and today I tried to upgrade to RC1, but compilation failed. I'm not the official port maintainer, I just used the original port as a template to create a new port for the beta, and it worked fine. Now I get this error message:

Code: Select all
       depfile='.deps/upnpdescriptionparser.Plo' tmpdepfile='.deps/upnpdescriptionparser.TPlo' \
        depmode=gcc3 /bin/sh ../../admin/depcomp \
        /bin/sh /usr/local/bin/libtool --silent --mode=compile --tag=CXX c++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/include -I/usr/X11R6/include  -I/usr/local/include -I./../../libktorrent  -D_THREAD_SAFE -pthread -DQT_THREAD_SUPPORT   -I/usr/local/include -I/usr/local/include  -I/usr/X11R6/include -D_GETOPT_H -D_THREAD_SAFE   -Wno-long-long -Wundef -Wall -W -Wpointer-arith -O -pipe -fno-strict-aliasing -march=pentiumpro -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -fexceptions  -c -o upnpdescriptionparser.lo `test -f 'upnpdescriptionparser.cpp' || echo './'`upnpdescriptionparser.cpp
/usr/X11R6/bin/moc ./upnpmcastsocket.h -o upnpmcastsocket.moc
source='upnpmcastsocket.cpp' object='upnpmcastsocket.lo' libtool=yes \
        depfile='.deps/upnpmcastsocket.Plo' tmpdepfile='.deps/upnpmcastsocket.TPlo' \
        depmode=gcc3 /bin/sh ../../admin/depcomp \
        /bin/sh /usr/local/bin/libtool --silent --mode=compile --tag=CXX c++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/include -I/usr/X11R6/include  -I/usr/local/include -I./../../libktorrent  -D_THREAD_SAFE -pthread -DQT_THREAD_SUPPORT   -I/usr/local/include -I/usr/local/include  -I/usr/X11R6/include -D_GETOPT_H -D_THREAD_SAFE   -Wno-long-long -Wundef -Wall -W -Wpointer-arith -O -pipe -fno-strict-aliasing -march=pentiumpro -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -fexceptions  -c -o upnpmcastsocket.lo `test -f 'upnpmcastsocket.cpp' || echo './'`upnpmcastsocket.cpp
In file included from upnpmcastsocket.cpp:25:
/usr/include/netinet/ip.h:160: error: `n_long' does not name a type
/usr/include/netinet/ip.h:163: error: `n_long' does not name a type
gmake[3]: *** [upnpmcastsocket.lo] Error 1
gmake[3]: Leaving directory `/usr/ports/net-p2p/ktorrent-devel/work/ktorrent-2.1rc1/plugins/upnp'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/ports/net-p2p/ktorrent-devel/work/ktorrent-2.1rc1/plugins'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/net-p2p/ktorrent-devel/work/ktorrent-2.1rc1'
gmake: *** [all] Error 2
*** Error code 2

Stop in /usr/ports/net-p2p/ktorrent-devel.


The lines in question that the error message refers to in /usr/include/netinet/ip.h are these:
Code: Select all
   union ipt_timestamp {
      n_long   ipt_time[1];
      struct   ipt_ta {
         struct in_addr ipt_addr;
         n_long ipt_time;
      } ipt_ta[1];
   } ipt_timestamp;
};



I'm not a programmer, so I don't understand what these all mean :( I'm not impatient either, for I can wait until the port is updated (and beta1 works fine for me), I just thought I'd let you know.
George
Moderator
Posts
5421
Karma
1

Mon Jan 08, 2007 6:21 pm
This n_long must be defined in another system header file, now we need to figure out which one. Lets see if google turns something up.
George
Moderator
Posts
5421
Karma
1

Mon Jan 08, 2007 6:28 pm
OK, google was quite helpfull, in upnpmcastsocket.cpp, there should be a line at the top of the file which looks like this :

...
#include <netinet/ip.h>
...

What you need to do is put the following line in front of it :
...
#include <netinet/in_systm.h>
#include <netinet/ip.h>
...

I will modify the latest code so it should compile again.
molnarcs
Registered Member
Posts
2
Karma
0

Sat Feb 03, 2007 2:13 pm
Thank you very much for your reply!

I thought I had "send an email if there are replies to my post" set somewhere, and didn't check back for I thought it went unreplied.

I very much appreciate your answer and your help! Thank you again (for googling up this issue and all your work)!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]