aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2 3 ... 7

Author Topic: aMule, wxWidgets 2.9+ and Snow Leopard... (we got it!)  (Read 68641 times)

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
aMule, wxWidgets 2.9+ and Snow Leopard... (we got it!)
« on: September 06, 2009, 05:58:55 PM »

Are there any known issues building aMule on wxWidgets 2.9?

As far as I understand we have to wait for 2.9 being stable to get a Snow Leopard "native" aMule...
In most cases Snowie produces 64-bit stuff and wxMac 2.8 leaks 64-bit Carbon support.

So we need wxCocoa which is under development yet...  :-\

UPDATE: We got it working here!
« Last Edit: September 18, 2009, 09:18:48 AM by mirko.g »
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #1 on: September 06, 2009, 10:05:17 PM »

None that I know of. Stu worked a lot lately on wx-2.9 compatibility, so it should work now.
Logged
concordia cum veritate

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #2 on: September 06, 2009, 10:44:18 PM »

Compile, not work necessarily, especially not on wxCocoa.

wxMac 2.8 does not lack 64bits Carbon support, Carbon is simply not 64bits. You can compile 32bit wxMac (carbon) applications for Snow Leopard, or of course try wxCocoa in 2.9, but that'd be fun to say the least.

Read this if you haven't:
http://wiki.wxwidgets.org/Development:_wxMac#Building_under_10.6_Snow_Leopard


Logged

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #3 on: September 07, 2009, 07:05:19 AM »

Read this if you haven't:
http://wiki.wxwidgets.org/Development:_wxMac#Building_under_10.6_Snow_Leopard

Thanks, this is what I read before trying... but they don't say you have to (re)install all MacPorts 32-bit...  >:(
I will keep trying the second way...  :D
« Last Edit: September 07, 2009, 07:53:58 AM by mirko.g »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #4 on: September 08, 2009, 11:11:27 PM »

Stu worked a lot lately on wx-2.9 compatibility, so it should work now.
Main work was rather on wx than on aMule. The networking code has seen big changes, and especially Unix was troublesome to fix. I'm afraid the latest Unix networking patch (61813) didn't make it into 2.9.0 . Does Mac also use Unix networking code (src/unix/sockunix.cpp) ?

Go ahead, try it. I don't have a clue how it behaves on Mac, and I'd like to find out. And the wx guys need the feedback to get 3.0 done.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #5 on: September 08, 2009, 11:23:42 PM »

Does Mac also use Unix networking code (src/unix/sockunix.cpp) ?

As far as I know, yes it does..

Quote
Go ahead, try it. I don't have a clue how it behaves on Mac, and I'd like to find out. And the wx guys need the feedback to get 3.0 done.

I was able to compile wx 2.9... but aMule seems not to recognize wx-config even if it actually exists.  :-\
Still trying different configurations of wx...
Logged

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #6 on: September 09, 2009, 03:50:58 PM »

I got it!  8)
Now I'm facing a new problem and I need your help boys!!!  :P

How to build aMule while I'm using an unrecognized wxWidgets port? I mean:

Quote
$ ./wx-config --selected-config
osx_cocoa-unicode-release-static-2.9

but

Quote
(allowed values: auto, gtk1, gtk2, msw, motif, x11, mac, mgl, dfb, base)

???
Logged

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #7 on: September 09, 2009, 04:11:37 PM »

Ok, I answer myself!  :P
"Why don't you use that wonderful Search button over there?!?!?!?!"

Attached is my patch to aMule configure file. (see below)
« Last Edit: September 09, 2009, 05:14:32 PM by mirko.g »
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #8 on: September 09, 2009, 04:19:36 PM »

Could you please use unified diff format for the patch? (diff -u file.old file.new) It's easier to read.

Apart from that: My compliments for your work here and particularly for creating a patch! Thank you!
Logged

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #9 on: September 09, 2009, 05:18:20 PM »

Could you please use unified diff format for the patch? (diff -u file.old file.new) It's easier to read.

Apart from that: My compliments for your work here and particularly for creating a patch! Thank you!

I think it's the least I can do... :)
I attached the patch for aMule configure in unified format and a cumulative patch for wxWidgets 2.9.0 to be successfully built with cocoa on Snow Leopard (it seems it will be included in future releases). I included the "large file" support which was missing.
Hope they are the right formats... I don't know how to get rid of those .DS_Store files...
« Last Edit: September 09, 2009, 07:28:01 PM by mirko.g »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #10 on: September 09, 2009, 10:35:27 PM »

You are trying to build aMule 2.2.5 with wx 2.9. Only aMule SVN builds with it.

And your patch is to the wrong file - configure is generated. The source code for the part you changed is m4/wxwin.m4 . However there is already a toolkit "cocoa" in it (added by Kry) - are you sure that osx_cocoa is correct ?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #11 on: September 10, 2009, 12:36:06 AM »

osx_cocoa is probably the new name. The corect thing to do would be to use the m4 included with wx svn.
Logged

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #12 on: September 10, 2009, 06:42:20 AM »

You are trying to build aMule 2.2.5 with wx 2.9. Only aMule SVN builds with it.

Oh thanks!  :o

Quote
And your patch is to the wrong file - configure is generated. The source code for the part you changed is m4/wxwin.m4 . However there is already a toolkit "cocoa" in it (added by Kry) - are you sure that osx_cocoa is correct ?

Uhm... I found some old post where this solution was adopted to add a missing toolkit/wx port...
I used --with-osx_cococa to build wxWidgets 2.9.0 and it results in:

Quote
$ ./wx-config --selected-config
osx_cocoa-unicode-release-static-2.9

Using osx_cocoa the selected toolkit check is passed...
« Last Edit: September 10, 2009, 06:54:22 AM by mirko.g »
Logged

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #13 on: September 10, 2009, 09:18:00 AM »

This should be the right patch...
BTW, I cannot find any link to cocoa toolkit.  ???
« Last Edit: September 10, 2009, 09:19:39 AM by mirko.g »
Logged

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: aMule, wxWidgets 2.9.0 and Snow Leopard...
« Reply #14 on: September 10, 2009, 10:10:00 AM »

At his point I'm not able to compile aMule (even SVN release)...

wxWidgets 2.9.0 (with patches)
I patched sources to solve a problem with texctrl under cocoa (read this) and applied this patch for undefined large file support.
Then, this is the only way I found to compile wxWidgets with no errors:
Quote
$ ./configure --enable-unicode --disable-shared --disable-debug --disable-debug_gdb --with-osx_cocoa --with-macosx-version-min=10.6

Only some warnings like:
Quote
... "wxEVENTS_COMPATIBILITY_2_8" is not defined

aMule SVN Release 2.2.X
I applied only the patch to add "osx_cocoa" toolkit option to configure file. Then I tried a "no frills" configuration:
Quote
$ ./configure --disable-debug --enable-optimize --with-wxdir=../wxWidgets-2.9.0/ --with-crypto-prefix=/opt/local/ --with-gdlib-config=/opt/local/bin/gdlib-config --with-libiconv-prefix=/opt/local --with-toolkit=osx_cocoa

But make fails after a few lines:
Quote
ECMuleSocket.cpp: In member function ‘virtual int CECMuleSocket::InternalGetLastError()’:
ECMuleSocket.cpp:136: error: ‘wxSOCKET_DUMMY’ was not declared in this scope
ECMuleSocket.cpp:115: warning: enumeration value ‘wxSOCKET_OPTERR’ not handled in switch
make[7]: *** [ECMuleSocket.o] Error 1
make[7]: *** Waiting for unfinished jobs....
In file included from /Users/mirko/Desktop/TEMP/wxWidgets-2.9.0/include/wx/memory.h:16,
                 from /Users/mirko/Desktop/TEMP/wxWidgets-2.9.0/include/wx/object.h:20,
                 from /Users/mirko/Desktop/TEMP/wxWidgets-2.9.0/include/wx/event.h:17,
                 from /Users/mirko/Desktop/TEMP/wxWidgets-2.9.0/include/wx/socket.h:23,
                 from ECMuleSocket.h:29,
                 from RemoteConnect.h:30,
                 from RemoteConnect.cpp:26:
/Users/mirko/Desktop/TEMP/wxWidgets-2.9.0/include/wx/string.h: In constructor ‘wxString::iterator::iterator(wxString*, wxStringImpl::iterator)’:
/Users/mirko/Desktop/TEMP/wxWidgets-2.9.0/include/wx/string.h:1008: warning: declaration of ‘str’ shadows a member of 'this'
/Users/mirko/Desktop/TEMP/wxWidgets-2.9.0/include/wx/string.h: In constructor ‘wxString::const_iterator::const_iterator(const wxString*, wxStringImpl::const_iterator)’:
/Users/mirko/Desktop/TEMP/wxWidgets-2.9.0/include/wx/string.h:1053: warning: declaration of ‘str’ shadows a member of 'this'
make[6]: *** [all] Error 2
make[5]: *** [all-recursive] Error 1
make[4]: *** [all] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Logged
Pages: [1] 2 3 ... 7