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

Author Topic: cvs-20062001 doesn´t compile on suse9.3  (Read 7142 times)

IhmSelbst

  • Full Member
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 220
    • http://www.ed2k-serverboard.de/
cvs-20062001 doesn´t compile on suse9.3
« on: January 20, 2006, 08:04:12 AM »

according to expectations after Kry´s posting http://forum.amule.org/thread.php?threadid=8893, there are some problems with today´s cvs now. - it doesnt´t compile on SuSE9.3, neither without, nor with debug enabled, whereas, on SuSE10.0 and 10.1alpha4, it did. (compiling cvs from yesterday and the day before worked on suse9.3, too.)

it´s last words, before it died on the 9.3-box were:

Quote
...
SafeFile.h:204:2: Warnung: #warning DOCS
In Datei, eingefügt von kademlia/kademlia/Search.h:45,
                    von PartFile.cpp:74:
kademlia/io/ByteIO.h:48:2: Warnung: #warning Marked for deletion
PartFile.cpp:334:18: Warnung: #warning Code for full file alloc - should be done on thread.
PartFile.cpp:478:50: Warnung: #warning Kry - UPDATE
PartFile.cpp:483:50: Warnung: #warning Kry - UPDATE
PartFile.cpp:488:50: Warnung: #warning needs setfiletype string
PartFile.cpp:610:58: Warnung: #warning Kry - UPDATE
PartFile.cpp:869:18: Warnung: #warning Kry - UPDATE
PartFile.cpp:871:18: Warnung: #warning Kry - UPDATE
PartFile.cpp:944:26: Warnung: #warning UPGRADE!
PartFile.cpp: In member function `bool CPartFile::SavePartFile(bool)':
PartFile.cpp:945: error: Syntaxfehler before `,' token
PartFile.cpp:950: error: Syntaxfehler before `,' token
PartFile.cpp:2962:2: Warnung: #warning Kry - serious review. I did some, and seems to be ok, but...
make[3]: *** [amuled-PartFile.o] Fehler 1
make[3]: *** Warte auf noch nicht beendete Prozesse...
make[3]: Leaving directory `/usr/src/packages/BUILD/amule-cvs/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/usr/src/packages/BUILD/amule-cvs/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/usr/src/packages/BUILD/amule-cvs'
make: *** [all] Fehler 2
error: Bad exit status from /var/tmp/rpm-tmp.66189 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.66189 (%build)

cu

Radek

  • Full Member
  • ***
  • Karma: 5
  • Offline Offline
  • Posts: 149
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #1 on: January 21, 2006, 11:37:47 AM »

Same on Debian Sarge with today's (20060121) snapshot.
« Last Edit: January 21, 2006, 11:38:38 AM by Radek »
Logged
There are 10 kinds of people - those who are able to understand binary numbers and those who aren't...

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #2 on: January 21, 2006, 12:11:08 PM »

It does compile and run on Ubuntu Breezy. Seems to be a problem with 'older' distributions.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #3 on: January 21, 2006, 01:12:03 PM »

The problem is I see no problem on the code and it works here.
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #4 on: January 21, 2006, 01:23:43 PM »

old gcc probably...

works here on gentoo, gcc-3.4.5 and 4.0.2
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

OldFrog

  • Sr. Member
  • ****
  • Karma: 31
  • Offline Offline
  • Posts: 385
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #5 on: January 21, 2006, 03:44:58 PM »

No trouble on Mandriva 2006.0

Quote
gcc --version
gcc (GCC) 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

As said :D
Logged
Computer Science is no more about computers than astronomy is about telescopes (Edsger W. Dijkstra)

Radek

  • Full Member
  • ***
  • Karma: 5
  • Offline Offline
  • Posts: 149
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #6 on: January 22, 2006, 12:05:39 AM »

Quote
Originally posted by stefanero
 old gcc probably...

works here on gentoo, gcc-3.4.5 and 4.0.2
On Debian Sarge I have gcc 3.3.5 as standard compiler  :(
« Last Edit: January 22, 2006, 12:06:42 AM by Radek »
Logged
There are 10 kinds of people - those who are able to understand binary numbers and those who aren't...

IhmSelbst

  • Full Member
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 220
    • http://www.ed2k-serverboard.de/
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #7 on: January 22, 2006, 01:07:51 AM »

Quote
Originally posted by Radek
On Debian Sarge I have gcc 3.3.5 as standard compiler  :(
also here on the suse9.3-box 8o ;( :( :

gcc --version
gcc (GCC) 3.3.5 20050117 (prerelease) (SUSE Linux)
Copyright © 2003 Free Software Foundation, Inc.
Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es
gibt KEINE Garantie; auch nicht für VERKAUFBARKEIT oder FÜR SPEZIELLE ZWECKE.


cu

Radek

  • Full Member
  • ***
  • Karma: 5
  • Offline Offline
  • Posts: 149
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #8 on: January 22, 2006, 08:24:01 PM »

I had a little time right now and fooled around with PartFile.cpp. This was, what I did
Code: [Select]
--- src/PartFile.cpp
+++ src/PartFile.cpp
@@ -938,12 +938,14 @@
  snprintf(number,9,"%hu",(unsigned short int)i_pos);
  namebuffer[0] = FT_GAPSTART;
  #warning UPGRADE!
- CTagInt32( char2unicode(namebuffer), (uint32)gaplist.GetAt(pos)->start ).WriteTagToFile( &file );
+ wxString sJunk = char2unicode( namebuffer );       // 20060122/Radek TEST
+ CTagInt32( sJunk, (uint32)gaplist.GetAt(pos)->start ).WriteTagToFile( &file );
  // gap start = first missing byte but gap ends = first non-missing byte
  // in edonkey but I think its easier to user the real limits
  namebuffer[0] = FT_GAPEND;
 
- CTagInt32( char2unicode(namebuffer), (uint32)(gaplist.GetAt(pos)->end + 1) ).WriteTagToFile( &file );
+ sJunk = char2unicode( namebuffer );                // 20060122/Radek TEST
+ CTagInt32( sJunk, (uint32)(gaplist.GetAt(pos)->end + 1) ).WriteTagToFile( &file );
 
  ++i_pos;
Afterwards, the compilation went through without further complaints.
This code should do the same as the original one. It is slightly less elegant ;) but if it works...

I have no real idea, what the older compiler versions have against the original version of the code.. Also I'm not sure, what optimizations make out of it. Maybe it would be better to define sJunk outside of the loop (I have no experience with gcc, I normally use Keil or Watcom)
« Last Edit: January 22, 2006, 08:31:20 PM by Radek »
Logged
There are 10 kinds of people - those who are able to understand binary numbers and those who aren't...

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #9 on: January 22, 2006, 10:37:04 PM »

The tag constructor takes a wxString reference, but char2unicode returns a char-buffer, which it seems gcc-3.3 has trouble implicitly converting to a wxString. I'm making some changes that will fix the problem.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #10 on: January 23, 2006, 06:52:37 AM »

As long as you don't make it slower like radek's one...
Logged

IhmSelbst

  • Full Member
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 220
    • http://www.ed2k-serverboard.de/
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #11 on: January 23, 2006, 07:23:01 AM »

Quote
Originally posted by stefanero
old gcc probably...

works here on gentoo, gcc-3.4.5 and 4.0.2


indeed, after having installed gcc 3.4.5 here now, it seems to work on SuSE9.3 again.

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #12 on: January 23, 2006, 07:34:29 AM »

Well today's one should work on all anyway
Logged

Radek

  • Full Member
  • ***
  • Karma: 5
  • Offline Offline
  • Posts: 149
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #13 on: January 23, 2006, 11:17:29 AM »

It does compile on Debian Sarge now without complaints.

@Kry
My experiment was of course not intended for production. I could see that this part of code was work in progress and didn't have the time to really grasp the surrounding context. I just wanted to find out what the problem was, because I couldn't see any. Call it professional curiosity ;)

But why do you think my ugly fix would work slower? IMHO, the only difference to your code is that the conversion normally done implicitly by the compiler was done explicitly. And the question of the variable assignment inside the loop being a slow down depends on the optimizer.  With a standard optimizer the resulting code could very well be the same.

I often have to work around compiler bugs or similar problems, because I have inherited projects that are old enough (>>20 years), that the compilers used at that time were still quite buggy. And no one pays for renewing, so all have to live with the work hours that go into programming around such annoying problems (Sometimes the code doesn't work anymore if I remove a comment line :) ).
Logged
There are 10 kinds of people - those who are able to understand binary numbers and those who aren't...

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: cvs-20062001 doesn´t compile on suse9.3
« Reply #14 on: January 23, 2006, 12:31:06 PM »

Quote
Originally posted by Radek
It does compile on Debian Sarge now without complaints.

@Kry
My experiment was of course not intended for production. I could see that this part of code was work in progress and didn't have the time to really grasp the surrounding context. I just wanted to find out what the problem was, because I couldn't see any. Call it professional curiosity ;)

But why do you think my ugly fix would work slower? IMHO, the only difference to your code is that the conversion normally done implicitly by the compiler was done explicitly. And the question of the variable assignment inside the loop being a slow down depends on the optimizer.  With a standard optimizer the resulting code could very well be the same.

I often have to work around compiler bugs or similar problems, because I have inherited projects that are old enough (>>20 years), that the compilers used at that time were still quite buggy. And no one pays for renewing, so all have to live with the work hours that go into programming around such annoying problems (Sometimes the code doesn't work anymore if I remove a comment line :) ).

Sure the variable creation and assignment inside the loop was slower, and optimizations are not involved because we always work with debug and no optimizations anyway. There was nothing wrong on your code and I know it was not intended for final purposes. That was a warning for Xaignar, and he did well on the change ;)
Logged
Pages: [1] 2