aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: fix compilation issues  (Read 4978 times)

stsp

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 17
fix compilation issues
« on: April 29, 2005, 09:05:55 PM »

Hi.

I am very new to aMule. I tried to compile it several
months ago, and it failed. I tried now, and it failed the
same way. So I thought I'd better fix it myself. The patch
is attached. Apparently aMule uses some things that
are no longer supported by wx (I am updating my wx
from CVS, which is probably why I can't compile aMule).

What the patch does:
1. wxNode* --> compatibility_iterator is an easy one.
2. Removal of wxString::GetWriteBuf() and wxString::UngetWriteBuf()
is a bit fishy: the wx docs do not say these methods are
no longer supported, but apparently they are not available
if you build the wx with the STL support. But in any case
these were unused by aMule, so I just removed them.
3. Apart from the compilation problems, I also had to fix
one runtime bug, which was that the wxString object
returned by thePrefs::GetLanguageID() was not checked
for being an empty string, and so GetChar(0) asserts.

With this patch the aMule compiles and starts up successfully.
There are also some other disturbing problems I have,
which is that I was not able to find the following things:
1. aMule CVS server (so had to download the full  snapshots
every time, which is silly)
2. aMule patch tracker (so had to use this forum, sorry).
Can you please give me a hint as to where to find those?
I visited the SF page, but even there there are no such things!
Btw, if the Joy-User can't find such an important things,
then I guess the web page is in need of some update to
get those things more apparent. Or am I just blind? :)
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: fix compilation issues
« Reply #1 on: April 29, 2005, 09:53:37 PM »

The problem seems to be you're the first to use the STL enabled version of wxWidgets. ;)

Your patch seems fine to me, though I'm as you not sure about wxString::*WriteBuf functions. However, this should be possible to do without using the writebuffer.

I'll walk through it and fix the issues. Many thanks for the patch. :)

Oh, and the questions:
1) The CVS server is private. If you plan on following the changes, then I'd suggest that you install ccache.
2) http://bugs.amule.org
Logged

deltaHF

  • Evil Admin
  • Former Developer
  • Hero Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 3920
  • .. Legends may sleep, but they never die ..
    • http://www.amule.org
RE: fix compilation issues
« Reply #2 on: April 29, 2005, 10:06:31 PM »

Quote
Originally posted by stsp

1. aMule CVS server (so had to download the full  snapshots
every time, which is silly)
2. aMule patch tracker (so had to use this forum, sorry).

hi,

for some reasons we can provide only the daily tarballs, sorry.. and there is no such thing like "patch tracker"..

the only way to get something earlier than the daily tarballs is to become an amule dev ;)

cheers

stsp

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 17
Re: fix compilation issues
« Reply #3 on: April 29, 2005, 11:01:56 PM »

Quote
Originally posted by Xaignar
1) The CVS server is private. If you plan on following the changes, then I'd suggest that you install ccache.
I think I understand your suggestion, although it doesn't
really help. You propose the way to shorten the compilation
time, while I aim for saving my internet traffic which costs
money.

Quote
2) http://bugs.amule.org
OK, SF affected my mind so that I always expect to see
the patch tracker separately from the bug tracker. Well,
can use the bug-tracker too, thanks for the pointer.
Logged

stsp

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 17
RE: fix compilation issues
« Reply #4 on: April 29, 2005, 11:11:13 PM »

Quote
Originally posted by deltaHF
for some reasons we can provide only the daily tarballs, sorry..
Unless a secret, what are those reasons?

Quote
and there is no such thing like "patch tracker"..
OK, I just got used to such a thing being a SourceForge
user. Can live with a bug-tracker too.

Quote
the only way to get something earlier than the daily tarballs is to become an amule dev ;)
My concerns are not as much about the early updates,
but rather about the waste of the traffic. One will surely
*not* update aMule code every day if it requires to D/L
the full 2Mb tarball, while with CVS this is not a problem
at all (few KBs, few seconds to update, few minutes to
recompile). And thinking about the dial-up modem users -
2Mb is a real, real pain for them. So if there is a reason
against the read-only anonymous CVS access, I hope
it is strong enough:)
« Last Edit: April 29, 2005, 11:18:34 PM by stsp »
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
RE: fix compilation issues
« Reply #5 on: April 29, 2005, 11:33:20 PM »

Quote
Originally posted by stsp
Quote
Originally posted by deltaHF
for some reasons we can provide only the daily tarballs, sorry..
Unless a secret, what are those reasons?
I could tell you, but then I'd have to kill you. *boom, tschh!*
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: fix compilation issues
« Reply #6 on: April 30, 2005, 03:53:53 PM »

stsp, if you want to post patches, use the Development board (http://forum.amule.org/board.php?boardid=47)
Logged
concordia cum veritate

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: fix compilation issues
« Reply #7 on: April 30, 2005, 11:29:42 PM »

stsp, I'm afraid that wxWidgets using STL wont be officially supported as of now. While most of the issues can be fixed quite simply, the functions in the kad subfolder are needed while we import kad and can't safely be replaced until that import is completed. So until that point, we wont be supporting STL enabled wxWidgets.
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: fix compilation issues
« Reply #8 on: May 01, 2005, 09:10:29 AM »

Xaignar, I see no point why we can't support STL enabled wxWigdets in 2.0.0, as we don't have KAD right now. When we start importing kademlia, then we can say that we don't support wxWidgets with STL, until we find a proper replacement for those functions.

Considering the above, I commit these fixes.

stsp: I had to change 2 things in your patch:
1) An empty langID is not an error, but it is the 'System Default' language
2) Instead of removing the offending functions, I placed them inside a #if/#endif pair.

Anyway, thanks for the patch.
Logged
concordia cum veritate

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: fix compilation issues
« Reply #9 on: May 01, 2005, 12:57:05 PM »

Well, for one thing, the fix just broke support for wx2.4.2 ... :P
Logged