aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: amuled on Mac OS X?  (Read 5404 times)

HipHopPunkSuperStar

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
amuled on Mac OS X?
« on: January 16, 2005, 04:46:20 PM »

So browsing around I read a bit about amuled, as I used mldonkey a lot, I thought it would be nice to give it a try as aMule takes some performance away form my computer and I don't fear starting something form the terminal or controling amule via web.

But I can't get it to compile...

Here is what I tried:
Code: [Select]
./configure --disable-systray --disable-gtk --with-wx-config=/usr/local/bin/wx-config --enable-debug --disable-optimise --enable-amule-daemon --enable-amulecmd --enable-webserver --enable-amulecmdgui --enable-webservergui
where the first part is form another thread in the crash forum: http://forum.amule.org/thread.php?threadid=4644&sid=
I have wxWidgets from CVS and that one line commented out.
The second part starting from --enable-amule-daemon is from another thread I found around here, but is also pretty clear from ./configure --help

The configure script exits without any error or warning:
Code: [Select]
Configure script has finished system check.

  Configured aMule 2.0.0rc8 for 'powerpc-apple-darwin7.7.0'.

  aMule enabled options:

  **** aMule Core ****
  Should aMule be compiled in debug mode?                  yes
  Should aMule be compiled with verbose console output?    no
  Should aMule be compiled with upload speed sense?        no
  Should aMule be compiled with profiling?                 no
  Should aMule be compiled with optimizations?             no
  Should aMule be compiled with systray?                   no
  Should aMule be compiled with UTF-8 systray?             no
  Should aMule be compiled with pure GTK code?             no
  Should aMule be linked against patched gsocket?          no
  Should aMule monolithic application be built?            yes
  Should aMule daemon version be built? (EXPERIMENTAL)     yes
  Should aMule remote gui be built? (EXPERIMENTAL)         no
  Crypto++ library/headers style?                          embeded

  **** aMule TextClient ****
  Should amulecmd (TextClient) be linked against wxbase?   yes
  Should aMule Command Line Client be built?               yes
  Should aMule GUI Client be built?                        yes

  **** aMule WebServer ****
  Should aMule WebServer be built?                         yes
  Should aMule WebServer GUI be built?                     yes

  **** aMule ED2K Links Handler ****
  Should aMule ED2K Links Handler be built?                yes

  **** aMuleLinkCreator ****
  Should aMuleLinkCreator GUI version (alc) be built?      yes
  Should aMuleLinkCreator for console (alcc) be built?     yes

  **** aMule Statistics ****
  Should C aMule Statistics (CAS) be built?                yes
  Should aMule GUI Statistics (wxCas) be built?            yes

  **** General Libraries and Tools ****
  Should ccache support be enabled?                        no
  Libraries aMule will use to build:
                                       wxWidgets          2.5.3
                                       GTK                Not detected (Not used)


But then make exits with the following warning/error:
Code: [Select]
In file included from WebInterface.cpp:36:
WebInterface.h:47: error: base class `wxFrame' has incomplete type
WebInterface.h:50: error: `wxDEFAULT_FRAME_STYLE' was not declared in this scope
/usr/local/include/wx-2.5/wx/mac/carbon/frame.h:115: error: `const wxEventTable wxFrame::sm_eventTable' is protected
WebInterface.cpp:103: error: within this context
WebInterface.cpp:104: error: invalid static_cast from type `void (CamulewebFrame::*)(wxCommandEvent&)' to type `void (wxEvtHandler::*)(wxCommandEvent&)'
WebInterface.cpp:105: error: invalid static_cast from type `void (CamulewebFrame::*)(wxCommandEvent&)' to type `void (wxEvtHandler::*)(wxCommandEvent&)'
WebInterface.cpp:106: error: invalid static_cast from type `void (CamulewebFrame::*)(wxCommandEvent&)' to type `void (wxEvtHandler::*)(wxCommandEvent&)'
WebInterface.cpp:107: error: invalid static_cast from type `void (CamulewebFrame::*)(wxIdleEvent&)' to type `void (wxEvtHandler::*)(wxIdleEvent&)'
WebInterface.cpp:108: error: invalid static_cast from type `void (CamulewebFrame::*)(wxTimerEvent&)' to type `void (wxEvtHandler::*)(wxTimerEvent&)'
WebInterface.cpp: In constructor `CamulewebFrame::CamulewebFrame(const wxString&, const wxPoint&, const wxSize&, long int)':
WebInterface.cpp:113: error: type `class wxFrame' is not a direct base of `CamulewebFrame'
WebInterface.cpp:127: error: `SetMenuBar' undeclared (first use this function)
WebInterface.cpp:127: error: (Each undeclared identifier is reported only once for each function it appears in.)
WebInterface.cpp:133: error: no matching function for call to `wxTextCtrl::wxTextCtrl(CamulewebFrame* const, int, const wxChar*&, const wxPoint&, wxSize, unsigned int)'
/usr/local/include/wx-2.5/wx/mac/carbon/textctrl.h:27: error: candidates are: wxTextCtrl::wxTextCtrl(const wxTextCtrl&)
/usr/local/include/wx-2.5/wx/mac/carbon/textctrl.h:41: error:                 wxTextCtrl::wxTextCtrl(wxWindow*, int, const wxString& = wxEmptyString, const wxPoint& = wxDefaultPosition, const wxSize& = wxDefaultSize, long int = 0, const wxValidator& = wxDefaultValidator, const wxString& = wxTextCtrlNameStr)
/usr/local/include/wx-2.5/wx/mac/carbon/textctrl.h:33: error:                 wxTextCtrl::wxTextCtrl()
WebInterface.cpp:144: error: no matching function for call to `wxStaticLine::wxStaticLine(CamulewebFrame* const, int, const wxPoint&, const wxSize&, wxOrientation)'
/usr/local/include/wx-2.5/wx/mac/carbon/statline.h:25: error: candidates are: wxStaticLine::wxStaticLine(const wxStaticLine&)
/usr/local/include/wx-2.5/wx/mac/carbon/statline.h:38: error:                 wxStaticLine::wxStaticLine(wxWindow*, int, const wxPoint& = wxDefaultPosition, const wxSize& = wxDefaultSize, long int = wxHORIZONTAL, const wxString& = wxStaticTextNameStr)
/usr/local/include/wx-2.5/wx/mac/carbon/statline.h:30: error:                 wxStaticLine::wxStaticLine()
WebInterface.cpp:147: error: no matching function for call to `wxTextCtrl::wxTextCtrl(CamulewebFrame* const, , const wxChar*&, const wxPoint&, wxSize, int)'
/usr/local/include/wx-2.5/wx/mac/carbon/textctrl.h:27: error: candidates are: wxTextCtrl::wxTextCtrl(const wxTextCtrl&)
/usr/local/include/wx-2.5/wx/mac/carbon/textctrl.h:41: error:                 wxTextCtrl::wxTextCtrl(wxWindow*, int, const wxString& = wxEmptyString, const wxPoint& = wxDefaultPosition, const wxSize& = wxDefaultSize, long int = 0, const wxValidator& = wxDefaultValidator, const wxString& = wxTextCtrlNameStr)
/usr/local/include/wx-2.5/wx/mac/carbon/textctrl.h:33: error:                 wxTextCtrl::wxTextCtrl()
WebInterface.cpp:151: error: `SetSizer' undeclared (first use this function)
WebInterface.cpp:152: error: no matching function for call to `wxBoxSizer::SetSizeHints(CamulewebFrame* const)'
/usr/local/include/wx-2.5/wx/sizer.h:407: error: candidates are: void wxSizer::SetSizeHints(wxWindow*)
WebInterface.cpp:154: error: no matching function for call to `wxTimer::wxTimer(CamulewebFrame* const, )'
/usr/local/include/wx-2.5/wx/mac/carbon/timer.h:27: error: candidates are: wxTimer::wxTimer(const wxTimer&)
/usr/local/include/wx-2.5/wx/mac/carbon/timer.h:30: error:                 wxTimer::wxTimer(wxEvtHandler*, int = -1)
/usr/local/include/wx-2.5/wx/mac/carbon/timer.h:29: error:                 wxTimer::wxTimer()
WebInterface.cpp: In member function `void CamulewebFrame::OnQuit(wxCommandEvent&)':
WebInterface.cpp:161: error: `Show' undeclared (first use this function)
WebInterface.cpp:162: error: `Close' undeclared (first use this function)
WebInterface.cpp: In member function `void CamulewebFrame::OnAbout(wxCommandEvent&)':
WebInterface.cpp:172: error: cannot convert `CamulewebFrame* const' to `wxWindow*' for argument `4' to `int wxMessageBox(const wxString&, const wxString&, long int, wxWindow*, int, int)'
WebInterface.cpp: In member function `virtual bool CamulewebApp::OnInit()':
WebInterface.cpp:215: error: `Show' undeclared (first use this function)
make[2]: *** [amulewebDLG-WebInterface.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Any suggestions?
It may be that there were old things in my aMule Directory even before the ./configure from an old compilation. I don't know.
If this may producee some error, please tell me how to get rid of the leftovers of previous compilations.

(I tried this with aMule-2.0.0rc8,
Most recent Mac OS X 10.3.7
Latest XCode)
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: amuled on Mac OS X?
« Reply #1 on: January 16, 2005, 04:58:24 PM »

--enable-amulecmdgui --enable-webservergui


remove that and retry. But it's most probably your wx instalation. You want full aMule or only daemon? If only daemon, disable the monolithic one.
Logged

HipHopPunkSuperStar

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
Re: amuled on Mac OS X?
« Reply #2 on: January 16, 2005, 07:31:37 PM »

okay, did that and used --disable-monolithic aswell,
now amuled crashes after some minutes with this:
Code: [Select]
Adding file /Users/anonymous/.aMule/Temp/001.part.met to shares
Adding file /Users/anonymous/.aMule/Temp/002.part.met to shares
Adding file /Users/anonymous/.aMule/Temp/003.part.met to shares
Adding file /Users/anonymous/.aMule/Temp/004.part.met to shares
Adding file /Users/anonymous/.aMule/Temp/005.part.met to shares
AICH Thread: Syncronization thread started.
AICH Thread: Masterhashes of known files have been loaded.
AICH Thread: No new files found.
*** TCP socket at 4662
ListenSocket: Ok.
*** UDP socket at 4672
AICH Thread: Thread terminated.
CServerSocket: destroying socket 0x3201700
CServerSocket: terminated
Socket 0x32343e0 started dload
ECSocket::ReadBuffer error The socket is non-blocking and the operation would block
ECSocket::ReadBuffer error The socket is non-blocking and the operation would block
ECSocket::ReadBuffer error The socket is non-blocking and the operation would block

OOPS! - Seems like aMule crashed.
aMule version is: 2.0.0rc8 using wxMac v2.5.3
--== no BACKTRACE for your platform ==--

Abort trap

Further I couldn't get to see what was going on over the webinterface, the webserver starts fine, but in the browser I just don't see anything.  I probably missed something -on the otherhand I read somewhere that there was a problem with the webserver in rc8, so maybe its that...?

Anyway while amuled was running it finaly produced a lot of dl-traffic and from amulecmd I could see that it was downloading stuff with 12-15kB/s, something that never had happend to me before with the normal amule with Mac-Gui / .app-Container.

Reading on about the problem with the webserver in rc8 i downloaded amule-cvs.20050116 from:
http://amule.hirnriss.net/

the ./configure runs fine with the same arguments, but make gives me:

Code: [Select]
...
SHAHashSet.cpp:48:2: warning: #warning FILE TODO: LOGLINES
if g++ -DHAVE_CONFIG_H -I. -I. -I..    -I/usr/local/lib/wx/include/mac-ansi-release-2.5 -I/usr/local/include/wx-2.5 -D__WXMAC__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DWX_PRECOMP -DNO_GCC_PRAGMA   -DwxUSE_GUI=0 -DAMULE_DAEMON  -DUSE_EMBEDDED_CRYPTO -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0   -MT amuled-CFile.o -MD -MP -MF ".deps/amuled-CFile.Tpo" \
  -c -o amuled-CFile.o `test -f 'CFile.cpp' || echo './'`CFile.cpp; \
then mv -f ".deps/amuled-CFile.Tpo" ".deps/amuled-CFile.Po"; \
else rm -f ".deps/amuled-CFile.Tpo"; exit 1; \
fi
CFile.cpp: In member function `virtual bool CFile::Create(const wxChar*, bool, int)':
CFile.cpp:255: warning: unused parameter `bool bOverwrite'
CFile.cpp: In member function `virtual bool CFile::Open(const wxChar*, CFile::OpenMode, int)':
CFile.cpp:287: error: `O_LARGEFILE' undeclared (first use this function)
CFile.cpp:287: error: (Each undeclared identifier is reported only once for each function it appears in.)
make[4]: *** [amuled-CFile.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Any hints?
Should I try the same with an older CVS or something?
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: amuled on Mac OS X?
« Reply #3 on: January 17, 2005, 09:56:31 PM »

This has been fixed on CVS.  It will be in tomorrow's snapshot.

In the meantime, if you just want to apply the fix yourself, edit /src/CFile.cpp

Change line 287 from:
Code: [Select]
   int flags = O_BINARY | O_LARGEFILE;to:
Code: [Select]
   int flags = O_BINARY;
#ifdef __linux__
    flags |= O_LARGEFILE;
#endif
Thanks for the report!  :)
Logged

HipHopPunkSuperStar

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
Re: amuled on Mac OS X?
« Reply #4 on: January 18, 2005, 12:35:20 PM »

Okay, compiled fine with todays snapshot, but the daemon still crashes after 20 to 30 minutes:
Code: [Select]
*** UDP socket at 4672
AICH Thread: Thread terminated.
Sorry, running amuleweb along with amuled is not supported yet. run amuleweb -f yourself
CServerSocket: destroying socket 0x3208090
CServerSocket: terminated
Socket 0x320e600 started dload
Socket 0x323c1e0 started dload
Socket 0x326f0a0 started dload
Socket 0x3262d20 started dload
Socket 0x3253380 started dload
CClientReqSocketHandler: thread 59316736 for 0x3262d20 exited
CClientReqSocketHandler: thread 59017216 for 0x3253380 exited

OOPS! - Seems like aMule crashed.
aMule version is: CVS using wxMac v2.5.3
--== no BACKTRACE for your platform ==--
Any hints?
What about this BACKTRACE?
No way to get it to work?
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: amuled on Mac OS X?
« Reply #5 on: January 18, 2005, 12:51:49 PM »

See this to learn about backtraces.
Logged

HipHopPunkSuperStar

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
Re: amuled on Mac OS X?
« Reply #6 on: January 18, 2005, 03:13:14 PM »

Okay, got the following:
Code: [Select]
Program received signal EXC_BAD_ACCESS, Could not access memory.
[Switching to process 7668 thread 0x41b3]
0x00000004 in ?? ()
(gdb) bt
#0  0x00000004 in ?? ()
Cannot access memory at address 0x4
Cannot access memory at address 0x4
(gdb) bt full
#0  0x00000004 in ?? ()
No symbol table info available.
(gdb)
Note, I got this running amuled so I changed the line form the wiki:
Quote
To create a backtrace, open a console and do the following:

$ gdb /where/to/install/aMule/bin/amule
(gdb) run

To $gdb /where/to/install/aMule/bin/amuled

This is with todays CVS-snapshot from the link I mentioned above.

Need anything else?

BTW while running amuled in gdb I wasn't able to get the webserver up and running
Quote
Creating client...
Now, doing connection....
Using host 'localhost' port:4712
Trying to connect (timeout = 10 sec)...
ECSocket::ReadBuffer error The socket is non-blocking and the operation would block
A socket error occured during authentication. Exiting.
While amulecmd worked fine...
Logged

HipHopPunkSuperStar

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
Re: amuled on Mac OS X?
« Reply #7 on: January 18, 2005, 03:49:24 PM »

And anotherone, this one says more...
Quote
Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand.
[Switching to process 7676 thread 0x2ddf]
0x00001994 in ?? ()
then bt :
Code: [Select]
(gdb) bt
#0  0x00001994 in ?? ()
#1  0x00001994 in ?? ()
#2  0x0165a384 in wxSocketBase::Read(void*, unsigned) ()
#3  0x00013bb4 in ECSocket::ReadBuffer(wxSocketBase*, void*, unsigned) (this=0x240e8e0, sock=0x4d3c6c0, buffer=0xf058ac78, len=1) at ECSocket.cpp:136
#4  0x00013a6c in ECSocket::ReadNumber(wxSocketBase*, void*, unsigned) (this=0x240e8e0, sock=0x4d3c6c0, buffer=0xf058ac78, len=1) at ECSocket.cpp:92
#5  0x00013f58 in ECSocket::ReadFlags(wxSocketBase*) (this=0x240e8e0, sock=0x4d3c6c0) at ECSocket.cpp:212
#6  0x00013ffc in ECSocket::ReadPacket(wxSocketBase*) (this=0x240e8e0, sock=0x4d3c6c0) at ECSocket.cpp:234
#7  0x0004db40 in ExternalConnClientThread::Entry() (this=0x4d11980) at ExternalConn.cpp:1608
#8  0x02269888 in wxThreadInternal::MacThreadStart(void*) ()
#9  0x902c6d88 in PrivateMPEntryPoint ()
#10 0x900246e8 in _pthread_body ()
and bt full :
Code: [Select]
(gdb) bt full
#0  0x00001994 in ?? ()
No symbol table info available.
#1  0x00001994 in ?? ()
No symbol table info available.
#2  0x0165a384 in wxSocketBase::Read(void*, unsigned) ()
No symbol table info available.
#3  0x00013bb4 in ECSocket::ReadBuffer(wxSocketBase*, void*, unsigned) (this=0x240e8e0, sock=0x4d3c6c0, buffer=0xf058ac78, len=1) at ECSocket.cpp:136
        msgRemain = 1
        LastIO = 0
        iobuf = 0xf058ac78 ""
        error = false
#4  0x00013a6c in ECSocket::ReadNumber(wxSocketBase*, void*, unsigned) (this=0x240e8e0, sock=0x4d3c6c0, buffer=0xf058ac78, len=1) at ECSocket.cpp:92
No locals.
#5  0x00013f58 in ECSocket::ReadFlags(wxSocketBase*) (this=0x240e8e0, sock=0x4d3c6c0) at ECSocket.cpp:212
        i = 0
        flags = 0
        b = 0 '\0'
#6  0x00013ffc in ECSocket::ReadPacket(wxSocketBase*) (this=0x240e8e0, sock=0x4d3c6c0) at ECSocket.cpp:234
        flags = 4032343504
        p = (CECPacket *) 0x0
#7  0x0004db40 in ExternalConnClientThread::Entry() (this=0x4d11980) at ExternalConn.cpp:1608
        request = (CECPacket *) 0xf058ad90
        response = (CECPacket *) 0x0
#8  0x02269888 in wxThreadInternal::MacThreadStart(void*) ()
No symbol table info available.
#9  0x902c6d88 in PrivateMPEntryPoint ()
No symbol table info available.
#10 0x900246e8 in _pthread_body ()
No symbol table info available.
(gdb)

Hope that helps...
Logged