From: John <st...@un...> - 2004-04-12 05:18:11
|
i'm trying to compile the snapshot http://iaxclient.sourceforge.net/snapshots/iaxclient.tar.gz seems to be from 11-Apr-2004 22:05 This is the error i'm getting. > make (cd ../../lib; make libiaxclient.a) make[1]: Entering directory `/home/strgout/iaxclient/lib' make[1]: `libiaxclient.a' is up to date. make[1]: Leaving directory `/home/strgout/iaxclient/lib' g++ -I../../lib -g -Wall `wx-config --cflags` `gtk-config --cflags` -c -o main.o main.cc g++ -I../../lib -g -Wall `wx-config --cflags` `gtk-config --cflags` -c -o prefs.o prefs.cc g++ -I../../lib -g -Wall `wx-config --cflags` `gtk-config --cflags` -c -o calls.o calls.cc calls.cc: In member function `void CallList::OnSelect(wxListEvent&)': calls.cc:125: error: `iaxc_unquelch' undeclared (first use this function) calls.cc:125: error: (Each undeclared identifier is reported only once for each function it appears in.) calls.cc: In member function `int CallList::HandleStateEvent(iaxc_ev_call_state)': calls.cc:244: error: `iaxc_unquelch' undeclared (first use this function) make: *** [calls.o] Error 1 The end result i'd like to work towards is a staticly link iaxcomm binary so that i can dump this onto my freebsd box. or if someone has a patch set for freebsd .. :) |
From: Steve K. <st...@st...> - 2004-04-12 14:08:19
|
John wrote: >i'm trying to compile the snapshot >http://iaxclient.sourceforge.net/snapshots/iaxclient.tar.gz >seems to be from 11-Apr-2004 22:05 > >This is the error i'm getting. > > Sorry about that. I think Michael committed his iaxcomm code before some associated changes to the library, including the iaxc_unquelch API. You'll probably need to use CVS to get a slightly earlier version of iaxcomm sources in order to make things work, until this is resolved. [you could still use the latest lib/* sources, though]. >make > > >(cd ../../lib; make libiaxclient.a) >make[1]: Entering directory `/home/strgout/iaxclient/lib' >make[1]: `libiaxclient.a' is up to date. >make[1]: Leaving directory `/home/strgout/iaxclient/lib' >g++ -I../../lib -g -Wall `wx-config --cflags` `gtk-config --cflags` -c -o main.o main.cc >g++ -I../../lib -g -Wall `wx-config --cflags` `gtk-config --cflags` -c -o prefs.o prefs.cc >g++ -I../../lib -g -Wall `wx-config --cflags` `gtk-config --cflags` -c -o calls.o calls.cc >calls.cc: In member function `void CallList::OnSelect(wxListEvent&)': >calls.cc:125: error: `iaxc_unquelch' undeclared (first use this function) >calls.cc:125: error: (Each undeclared identifier is reported only once for each > function it appears in.) >calls.cc: In member function `int > CallList::HandleStateEvent(iaxc_ev_call_state)': >calls.cc:244: error: `iaxc_unquelch' undeclared (first use this function) >make: *** [calls.o] Error 1 > > >The end result i'd like to work towards is a staticly link iaxcomm binary >so that i can dump this onto my freebsd box. > > Do you need _everything_ linked statically? The binaries on the sourceforge pages should be linked against wxwindows statically, and dynamically to the standard system libs. It is my understanding that linking glibc statically these days is pretty impossible. [the library itself uses dynamic loading for parts of itself, I think]. >or if someone has a patch set for freebsd .. :) > Someone early on contributed, and we merged, patches for the library to compile on FreeBSD. Everything also works with MacOSX, which is based on FreeBSD, so it might not be hard to compile on FreeBSD itself. -SteveK |
From: Michael V. D. <mv...@va...> - 2004-04-12 16:55:54
|
I just posted the changes to CVS |
From: John <st...@un...> - 2004-04-12 17:26:55
|
On Mon, Apr 12, 2004 at 10:08:17AM -0400, Steve Kann wrote: > John wrote: > > >i'm trying to compile the snapshot > >http://iaxclient.sourceforge.net/snapshots/iaxclient.tar.gz > >seems to be from 11-Apr-2004 22:05 > > > >This is the error i'm getting. > > > > > > Sorry about that. I think Michael committed his iaxcomm code before > some associated changes to the library, including the iaxc_unquelch > API. You'll probably need to use CVS to get a slightly earlier version > of iaxcomm sources in order to make things work, until this is > resolved. [you could still use the latest lib/* sources, though]. > > > >make > > > > > >(cd ../../lib; make libiaxclient.a) > >make[1]: Entering directory `/home/strgout/iaxclient/lib' > >make[1]: `libiaxclient.a' is up to date. > >make[1]: Leaving directory `/home/strgout/iaxclient/lib' > >g++ -I../../lib -g -Wall `wx-config --cflags` `gtk-config --cflags` -c > >-o main.o main.cc > >g++ -I../../lib -g -Wall `wx-config --cflags` `gtk-config --cflags` -c > >-o prefs.o prefs.cc > >g++ -I../../lib -g -Wall `wx-config --cflags` `gtk-config --cflags` -c > >-o calls.o calls.cc > >calls.cc: In member function `void CallList::OnSelect(wxListEvent&)': > >calls.cc:125: error: `iaxc_unquelch' undeclared (first use this function) > >calls.cc:125: error: (Each undeclared identifier is reported only once for > >each > > function it appears in.) > >calls.cc: In member function `int > > CallList::HandleStateEvent(iaxc_ev_call_state)': > >calls.cc:244: error: `iaxc_unquelch' undeclared (first use this function) > >make: *** [calls.o] Error 1 > > > > > >The end result i'd like to work towards is a staticly link iaxcomm binary > >so that i can dump this onto my freebsd box. > > > > > Do you need _everything_ linked statically? The binaries on the > sourceforge pages should be linked against wxwindows statically, and > dynamically to the standard system libs. It is my understanding that > linking glibc statically these days is pretty impossible. [the library > itself uses dynamic loading for parts of itself, I think]. > > >or if someone has a patch set for freebsd .. :) > > > Someone early on contributed, and we merged, patches for the library to > compile on FreeBSD. Everything also works with MacOSX, which is based > on FreeBSD, so it might not be hard to compile on FreeBSD itself. > > -SteveK > > Ok... i checked out the src and here is what needs to be done to compile on freebsd (so far..) Well after some hacking i'm at the same error on my freebsd box. I'll checkout cvs (head?) and see if that fixes my problems. BTW some things i've had to do to get to this point... replace make with gmake in all the make files. iaxclient/lib/libiax2/src/md5.c there is a FreeBSD ifdef, however no FreeBSD OSTYPE in the Makefile. iaxclient/lib/libiax2/src/iax.c Seems to want to use MAXOSX + LINUX include lines FreeBSD doesn't have a error.h and stdlib.h replaces malloc.h at least from the thats what the warning said. FreeBSD also wants #include <sys/types.h> include before #include <sys/socket.h> #define IAX_SOCKOPTS MSG_DONTWAIT | MSG_NOSIGNAL <- no idea what MSG_NOSIGNAL is or should be in freebsd but removing the | MSG_NOSIGNAL is the last step. at this point the lib compiles clean. even though it thinks this is Linux ;) ok so next... i installed wxgtk (wxgtk-2.4.2_7) wxgtk-common (wxgtk-common-2.4.2_1) from the ports/x11-toolkits dir.. and that got me to the " Makefile:27: OSTYPE cannot be detected, assuming Linux (cd ../../lib; gmake libiaxclient.a) gmake[1]: Entering directory `/home/strgout/iaxclient/lib' Makefile:92: OSTYPE cannot be detected, assuming Linux gmake[1]: `libiaxclient.a' is up to date. gmake[1]: Leaving directory `/home/strgout/iaxclient/lib' g++ -I../../lib -g -Wall `wx-config --cflags` `gtk-config --cflags` -c -o calls.o calls.cc calls.cc: In method `void CallList::OnSelect(wxListEvent &)': calls.cc:125: implicit declaration of function `int iaxc_unquelch(...)' gmake: *** [calls.o] Error 1 " under FreeBSD. who needs linulation anyways ;) i also just noticed the cvs commit message, so i'll check out and try again. |
From: Steve K. <st...@st...> - 2004-04-12 20:36:09
|
John wrote: > >Ok... i checked out the src and here is what needs to be done to compile on >freebsd (so far..) > > >Well after some hacking i'm at the same error on my freebsd box. >I'll checkout cvs (head?) and see if that fixes my problems. > >BTW some things i've had to do to get to this point... > >replace make with gmake in all the make files. > >iaxclient/lib/libiax2/src/md5.c > there is a FreeBSD ifdef, however no FreeBSD OSTYPE in the Makefile. > >iaxclient/lib/libiax2/src/iax.c > Seems to want to use MAXOSX + LINUX include lines > FreeBSD doesn't have a error.h and stdlib.h replaces malloc.h > at least from the thats what the warning said. > FreeBSD also wants > #include <sys/types.h> > include before > #include <sys/socket.h> > #define IAX_SOCKOPTS MSG_DONTWAIT | MSG_NOSIGNAL <- no idea > what MSG_NOSIGNAL is or should be in freebsd but > removing the | MSG_NOSIGNAL is the last step. > >at this point the lib compiles clean. >even though it thinks this is Linux ;) > >ok so next... >i installed >wxgtk (wxgtk-2.4.2_7) >wxgtk-common (wxgtk-common-2.4.2_1) >from the ports/x11-toolkits dir.. > >and that got me to the >" >Makefile:27: OSTYPE cannot be detected, assuming Linux >(cd ../../lib; gmake libiaxclient.a) >gmake[1]: Entering directory `/home/strgout/iaxclient/lib' >Makefile:92: OSTYPE cannot be detected, assuming Linux >gmake[1]: `libiaxclient.a' is up to date. >gmake[1]: Leaving directory `/home/strgout/iaxclient/lib' >g++ -I../../lib -g -Wall `wx-config --cflags` `gtk-config --cflags` -c -o calls.o calls.cc >calls.cc: In method `void CallList::OnSelect(wxListEvent &)': >calls.cc:125: implicit declaration of function `int iaxc_unquelch(...)' >gmake: *** [calls.o] Error 1 >" >under FreeBSD. > >who needs linulation anyways ;) > >i also just noticed the cvs commit message, so i'll check out and try again. > > Yeah, the iaxc_unquelch thing you need to deal with first, obviously :) After that, if you want to help us make things work under FreeBSD, I'd be glad to take patches. If they're outside of libiax2, things are simpler (the Makefile, for example); if they're inside libiax2, Mark might want you to disclaim the changes (just sending a fax is sufficient), but this might not be necessary for the small things you're writing. -SteveK |
From: John <st...@un...> - 2004-04-13 00:41:51
|
On Mon, Apr 12, 2004 at 07:41:45PM -0400, Steve Kann wrote: > > CC: Micheal w.r.t. iaxcomm questions. > > > John wrote: > > >>Yeah, the iaxc_unquelch thing you need to deal with first, obviously :) > >> > >>After that, if you want to help us make things work under FreeBSD, I'd > >>be glad to take patches. If they're outside of libiax2, things are > >>simpler (the Makefile, for example); if they're inside libiax2, Mark > >>might want you to disclaim the changes (just sending a fax is > >>sufficient), but this might not be necessary for the small things you're > >>writing. > >> > >>-SteveK > >> > >> > > > >fax? why is iax2 under some odd license? Not that i really care, i'll send > >in what ever you want to get patches pushed up the chain. > > > > > Mark likes to keep his libraries under his copyright, so that he can > license it under licenses different than the GPL (or in this case, > LGPL). One reason is to sell commercial licenses. Another is to do > things like make exceptions for proprietary codecs, etc. Basically, he > won't accept stuff that isn't disclaimed, and I'd prefer to try to keep > our copy of libiax2 in sync with his. Since it's no big deal (we're > really just contributing bugfixes), we disclaim. Richard Stallman > wouldn't approve [although, the FSF required the same disclaimers for > GNU software). > > >in the mean time i did download the new snapshot. Next problem.. > > > >I don't know a thing about wxgtk so maybe you can explain.. > >what is wxrc and why do i need it? for whatever reason it isn't compiled > >by default from freebsd's port. I'll take this up with those folks, but > >i'd like to know what i'm talking about (or at least enought to fake it:) ) > > > > > > I'm sure there's a FAQ on the wxWindows (or wxWidgets now) site. It's > basically an XML UI representation. It will be standard in the next > release of wxwindows 2.5, but for now it's optional. > > >also i think the `wx-config --static --libs` maybe a problem also. Is > >there some > >config option i need to pass when compiling wxgtk in order to support that? > > > > > > You might want to compile with --disable-shared (and > --enable-optimize). If you're just making binaries for yourself, you > can probably do dynamic linking if you want. > > >Oh sorry btw the snapshot did fix calls.cc problem. > > > > > > > Great. > > -SteveK > > 19:38:03: Deleted stale lock file '/home/strgout/iaxcomm.lock'. 19:38:03: XRC resource 'AddAccount' (class 'wxDialog') not found! That mean anything to you? i've got it to compile on freebsd without errors (no --static). |
From: Michael V. D. <mv...@va...> - 2004-04-13 01:30:45
|
On Mon, 12 Apr 2004 19:44:30 -0500, John <st...@un...> wrote: >On Mon, Apr 12, 2004 at 07:41:45PM -0400, Steve Kann wrote: >>=20 >> CC: Micheal w.r.t. iaxcomm questions. >>=20 >>=20 >> John wrote: >>=20 >> >>Yeah, the iaxc_unquelch thing you need to deal with first, obviously= :) >> >> >> >>After that, if you want to help us make things work under FreeBSD, = I'd=20 >> >>be glad to take patches. If they're outside of libiax2, things are=20 >> >>simpler (the Makefile, for example); if they're inside libiax2, Mark= =20 >> >>might want you to disclaim the changes (just sending a fax is=20 >> >>sufficient), but this might not be necessary for the small things = you're=20 >> >>writing. >> >> >> >>-SteveK >> >> =20 >> >> >> > >> >fax? why is iax2 under some odd license? Not that i really care, i'll= send >> >in what ever you want to get patches pushed up the chain. >> >=20 >> > >> Mark likes to keep his libraries under his copyright, so that he can=20 >> license it under licenses different than the GPL (or in this case,=20 >> LGPL). One reason is to sell commercial licenses. Another is to do=20 >> things like make exceptions for proprietary codecs, etc. Basically, = he=20 >> won't accept stuff that isn't disclaimed, and I'd prefer to try to = keep=20 >> our copy of libiax2 in sync with his. Since it's no big deal (we're=20 >> really just contributing bugfixes), we disclaim. Richard Stallman=20 >> wouldn't approve [although, the FSF required the same disclaimers for=20 >> GNU software). >>=20 >> >in the mean time i did download the new snapshot. Next problem.. >> > >> >I don't know a thing about wxgtk so maybe you can explain.. >> >what is wxrc and why do i need it? for whatever reason it isn't = compiled >> >by default from freebsd's port. I'll take this up with those folks, = but >> >i'd like to know what i'm talking about (or at least enought to fake = it:) ) >> >=20 >> > >>=20 >> I'm sure there's a FAQ on the wxWindows (or wxWidgets now) site. It's= =20 >> basically an XML UI representation. It will be standard in the next=20 >> release of wxwindows 2.5, but for now it's optional. >>=20 >> >also i think the `wx-config --static --libs` maybe a problem also. Is= =20 >> >there some >> >config option i need to pass when compiling wxgtk in order to support= that? >> >=20 >> > >>=20 >> You might want to compile with --disable-shared (and=20 >> --enable-optimize). If you're just making binaries for yourself, you=20 >> can probably do dynamic linking if you want.=20 >>=20 >> >Oh sorry btw the snapshot did fix calls.cc problem. >> > >> >=20 >> > >> Great. >>=20 >> -SteveK >>=20 >>=20 >19:38:03: Deleted stale lock file '/home/strgout/iaxcomm.lock'. This is the lockfile that iacomm makes to insure that only one instnce = runs. >19:38:03: XRC resource 'AddAccount' (class 'wxDialog') not found! Did you compile xrc support? I just sent you a mail about this, so you = probably haven't. PEEVE: wxWidgets distros should start incuding xrc support built in. > >That mean anything to you? i've got it to compile on freebsd without = errors >(no --static). > > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials >Free Linux tutorial presented by Daniel Robbins, President and CEO of >GenToo technologies. Learn everything from fundamentals to system >administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcl= ick >_______________________________________________ >Iaxclient-devel mailing list >Iax...@li... >https://lists.sourceforge.net/lists/listinfo/iaxclient-devel |
From: John <st...@un...> - 2004-04-13 20:55:38
|
> Yes, it looks like you do. I don't know what is causing the error. kinf of sounds like you just gave up. ;) Anyone know how to debug this? i played around with ktracing (strace like) the lib but didn't see anything useful. |
From: John <st...@un...> - 2004-04-15 01:51:31
|
On Tue, Apr 13, 2004 at 03:58:24PM -0500, John wrote: > > Yes, it looks like you do. I don't know what is causing the error. > kind of sounds like you just gave up. ;) > > Anyone know how to debug this? i played around with ktracing (strace like) > the ->bin<- but didn't see anything useful. > Oooh, i see how it is.. put suse (linux) in the subject and everything is coo. Sure we'll help, no problem! But change the subject to FreeBSD and all the OS bigots come out of the woodwork! ... oh wait that's me (OS bigot) ... never mind :) Sooo... anyone have any simple code i could compile to test xrc support? |
From: Steve K. <st...@st...> - 2004-04-15 13:22:32
|
John wrote: >On Tue, Apr 13, 2004 at 03:58:24PM -0500, John wrote: > > >>>Yes, it looks like you do. I don't know what is causing the error. >>> >>> >>kind of sounds like you just gave up. ;) >> >>Anyone know how to debug this? i played around with ktracing (strace like) >>the ->bin<- but didn't see anything useful. >> >> >> > >Oooh, i see how it is.. put suse (linux) in the subject and everything is coo. >Sure we'll help, no problem! But change the subject to FreeBSD and all >the OS bigots come out of the woodwork! > >... oh wait that's me (OS bigot) ... never mind :) > > I think that we (a) don't quite understand what you're asking, and (b) don't have FreeBSD machines around to test things out. >Sooo... anyone have any simple code i could compile to test xrc support? > > wxWidgets comes with samples. I believe there are xrc samples in with the xrc stuff. -SteveK |
From: John <st...@un...> - 2004-04-15 15:21:34
|
> >Oooh, i see how it is.. put suse (linux) in the subject and everything is > >coo. > >Sure we'll help, no problem! But change the subject to FreeBSD and all > >the OS bigots come out of the woodwork! > > > >... oh wait that's me (OS bigot) ... never mind :) > > > > > I think that we (a) don't quite understand what you're asking, and (b) > don't have FreeBSD machines around to test things out. A) That wouldn't be the first time someone has said that to me :). Well i have access to many freebsd boxes, and if need be i could even give access to someone who wanted to test something on FreeBSD. Keep in mind i'm completely willing to do all the testing under FreeBSD. B) Well after getting things to compile cleanly i get the following error. 19:38:03: Deleted stale lock file '/home/strgout/iaxcomm.lock'. 19:38:03: XRC resource 'AddAccount' (class 'wxDialog') not found! I sent this a few emails ago to the list. >$ uname -a >FreeBSD unicron.unixjunkie.com 4.9-RELEASE-p3 FreeBSD 4.9-RELEASE-p3 #4: Thu Apr 8 17:21:40 CDT 2004 st...@un...:/usr/obj/usr/src/sys/NVIDIA +i386 > >$/usr/bin/wxrc >Usage: wxrc [-h] [-v] [-c] [-p] [-g] [-n <str>] [-o <str>] input file(s)... > -h, --help show help message > -v, --verbose be verbose > -c, --cpp-code output C++ source rather than .rsc file > -p, --python-code output wxPython source rather than .rsc file > -g, --gettext output list of translatable strings (to stdout or file if -o used) > -n, --function=<str> C++/Python function name (with -c or -p) [InitXmlResource] > -o, --output=<str> output file [resource.xrs/cpp] > >$ ldd /usr/bin/wxrc >/usr/bin/wxrc: > libwx_gtk_xrc-2.4.so => /usr/X11R6/lib/libwx_gtk_xrc-2.4.so (0x28070000) > libwx_gtk-2.4.so => /usr/X11R6/lib/libwx_gtk-2.4.so (0x280ed000) > libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x285e1000) > libgtk12.so.2 => /usr/X11R6/lib/libgtk12.so.2 (0x286cf000) > libgdk12.so.2 => /usr/X11R6/lib/libgdk12.so.2 (0x287f7000) > libgmodule12.so.3 => /usr/local/lib/libgmodule12.so.3 (0x2882b000) > libgthread12.so.3 => /usr/local/lib/libgthread12.so.3 (0x2882e000) > libglib12.so.3 => /usr/local/lib/libglib12.so.3 (0x28831000) > libintl.so.6 => /usr/local/lib/libintl.so.6 (0x28853000) > libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x2885c000) > libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x28864000) > libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x28872000) > libpng.so.5 => /usr/local/lib/libpng.so.5 (0x2892e000) > libjpeg.so.9 => /usr/local/lib/libjpeg.so.9 (0x28951000) > libtiff.so.4 => /usr/local/lib/libtiff.so.4 (0x2896f000) > libz.so.2 => /usr/lib/libz.so.2 (0x289b8000) > libm.so.2 => /usr/lib/libm.so.2 (0x289c5000) > libstdc++.so.3 => /usr/lib/libstdc++.so.3 (0x289e0000) > libc_r.so.4 => /usr/lib/libc_r.so.4 (0x28a25000) > libXThrStub.so.6 => /usr/X11R6/lib/libXThrStub.so.6 (0x28adb000) > > >shouldn't that mean i have xrc support? just a little more info.. wxrc -vc rc/*xrc -o xrc_res.cc processing rc/devices.xrc... processing rc/directory.xrc... processing rc/frame.xrc... processing rc/menubar.xrc... processing rc/panel.xrc... adding rc/logo.xpm... processing rc/prefs.xrc... creating C++ source file /home/strgout/iaxclient/simpleclient/iaxcomm/xrc_res.cc... Just to proove i had xrc compiled on the system. > > >Sooo... anyone have any simple code i could compile to test xrc support? > > > > > wxWidgets comes with samples. I believe there are xrc samples in with > the xrc stuff. > > -SteveK > > ok i compiled xrcdemo and it seems to work just fine. wxGTK-2.4.2/contrib/samples/xrc <- from this dir. |
From: John <st...@un...> - 2004-04-16 15:49:23
|
Oh, i just noticed this. This happens on the console of a xterm when i launch iaxcomm. Gtk-CRITICAL **: file gtkwindow.c: line 401 (gtk_window_set_title): assertion `window != NULL' failed. Gtk-CRITICAL **: file gtkmain.c: line 872 (gtk_grab_add): assertion `widget != NULL' failed. at the same time i get a new window saying. "xrc resource 'AddAccount' (class wxDialog) Not Found!" with the option to save the error to a log file which i've already posted. once i hit ok the error goes away and then i'm suck with a proc not doing anything. 4777 strgout 2 0 13776K 9044K poll 0:00 0.00% 0.00% iaxcomm no mem or cpu spike. |
From: John <st...@un...> - 2004-04-16 22:41:04
|
On Fri, Apr 16, 2004 at 12:23:04PM -0400, Steve Kann wrote: > John wrote: > > The code in question here is simply: > static struct iax_event *iax_net_read(void) > { > char buf[65536]; > int res; > struct sockaddr_in sin; > int sinlen; > sinlen = sizeof(sin); > res = recvfrom(netfd, buf, sizeof(buf), 0, (struct sockaddr *) > &sin, &sinlen); > > > I have no idea why you would segfault when calling sizeof an automatic > variable. That should probably be a constant assignment by the compiler.. > > Maybe the segfault is actually somewhere else, and you can find it if > you compile without optimization.. > > -SteveK here is a copy of the build. http://mail.unixjunkie.com/iaxcomm.build.txt |
From: Steve K. <st...@st...> - 2004-04-16 22:51:40
|
John wrote: >On Fri, Apr 16, 2004 at 12:23:04PM -0400, Steve Kann wrote: > > >>John wrote: >> >>The code in question here is simply: >>static struct iax_event *iax_net_read(void) >>{ >> char buf[65536]; >> int res; >> struct sockaddr_in sin; >> int sinlen; >> sinlen = sizeof(sin); >> res = recvfrom(netfd, buf, sizeof(buf), 0, (struct sockaddr *) >>&sin, &sinlen); >> >> >>I have no idea why you would segfault when calling sizeof an automatic >>variable. That should probably be a constant assignment by the compiler.. >> >>Maybe the segfault is actually somewhere else, and you can find it if >>you compile without optimization.. >> >>-SteveK >> >> > >here is a copy of the build. > >http://mail.unixjunkie.com/iaxcomm.build.txt > > > Did you add the -W flags to your CFLAGS? Those aren't in there by default.. Anyway, there's lots of warnings, but they seem to be due to the DEBU(G macro invention that Kram uses.. Try just compiling but not assembling the output, and then look at the assembly.. Just replace -c with -S in the compile line, and call the output .s -- cc -Igsm/inc -Iportaudio/pa_common -Iportaudio/pablio -Iportmixer/px_common -g -Wall -Wpointer-arith -Ilibiax2/src -DIAXC_IAX2 -DLIBIAX -DSPEEX_PREPROCESS=1 -DSPEEX_EC=1 -DLINUX -S -o libiax2/src/iax.s libiax2/src/iax.c Then look for iax_net_read in there.. |
From: John <st...@un...> - 2004-04-16 23:04:34
|
On Fri, Apr 16, 2004 at 06:51:37PM -0400, Steve Kann wrote: > John wrote: > > >On Fri, Apr 16, 2004 at 12:23:04PM -0400, Steve Kann wrote: > > > > > >>John wrote: > >> > >>The code in question here is simply: > >>static struct iax_event *iax_net_read(void) > >>{ > >> char buf[65536]; > >> int res; > >> struct sockaddr_in sin; > >> int sinlen; > >> sinlen = sizeof(sin); > >> res = recvfrom(netfd, buf, sizeof(buf), 0, (struct sockaddr *) > >>&sin, &sinlen); > >> > >> > >>I have no idea why you would segfault when calling sizeof an automatic > >>variable. That should probably be a constant assignment by the compiler.. > >> > >>Maybe the segfault is actually somewhere else, and you can find it if > >>you compile without optimization.. > >> > >>-SteveK > >> > >> > > > >here is a copy of the build. > > > >http://mail.unixjunkie.com/iaxcomm.build.txt > > > > > > > Did you add the -W flags to your CFLAGS? Those aren't in there by default.. > > Anyway, there's lots of warnings, but they seem to be due to the DEBU(G > macro invention that Kram uses.. > > Try just compiling but not assembling the output, and then look at the > assembly.. > > Just replace -c with -S in the compile line, and call the output .s -- > > cc -Igsm/inc -Iportaudio/pa_common -Iportaudio/pablio -Iportmixer/px_common > -g -Wall -Wpointer-arith -Ilibiax2/src -DIAXC_IAX2 -DLIBIAX > -DSPEEX_PREPROCESS=1 -DSPEEX_EC=1 -DLINUX -S -o libiax2/src/iax.s > libiax2/src/iax.c > > > Then look for iax_net_read in there.. > > > Well i didn't know how much of that you wanted to see.. http://mail.unixjunkie.com/iax.s.gz |