Author Topic: gcc version 4.1.1  (Read 4184 times)

Quantus

  • Hydlaa Resident
  • *
  • Posts: 92
  • Member of the Crystal Squadron
    • View Profile
    • PlaneShift Yliakum
gcc version 4.1.1
« on: December 15, 2006, 11:47:35 am »
Does anyone got PS compiled with gcc version 4.1.1?

Thanks in advance

Bereror

  • Hydlaa Notable
  • *
  • Posts: 773
    • View Profile
    • Planeshift API
Re: gcc version 4.1.1
« Reply #1 on: December 15, 2006, 11:59:12 am »
gcc 4.1.1 here and works fine.
PlaneShift Sources
PlaneShift API
"Words never spoken
Are the strongest resounding"

Xordan

  • Moderator
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: gcc version 4.1.1
« Reply #2 on: December 15, 2006, 05:58:36 pm »
I compile the official linux release with 4.1.1, so I can confirm it works too!

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
Re: gcc version 4.1.1
« Reply #3 on: December 16, 2006, 12:14:25 pm »
I have one problem with Crystal Space (FC6, gcc 4.1.1), include/csutil/formatter.h does not compile, gcc complains about non-template used as template. The following lines are involved:
Code: [Select]
    CS_FORMATTER_TYPENAME_QUALIFIER
    csPrintfFormatter<Twriter,Treader>::IEEEFloatMantissa<T, Tbase> mantissa;
I "fixed" it by replacing them with:
Code: [Select]
    IEEEFloatMantissa<T, Tbase> mantissa;
I have no idea if this was right or wrong way, but everything seems to be working...

EDIT: Ah, I forgot, I also had to disable ptmalloc in CS  :-\.
« Last Edit: December 16, 2006, 12:31:36 pm by Wired_Crawler »
"Close the world, txEn eht nepO."

Quantus

  • Hydlaa Resident
  • *
  • Posts: 92
  • Member of the Crystal Squadron
    • View Profile
    • PlaneShift Yliakum
Re: gcc version 4.1.1
« Reply #4 on: December 18, 2006, 08:35:14 am »
Most of Fedora Core 6 with gcc 4.1.1 I've found here and http://hydlaa.com/smf/index.php?topic=26823.0

So I've got all compiled but have to make several changes (not known why, just tried):
Can't load psserver, cause getting allways an error message, so I commented out:
/*
if (!PreloadItemStatsDatabase())
return false;
*/
in file ./src/server/cachemanager.cpp

After doing this and cleaning up the database from some duplicate entries, I'm able to start the program, but getting on:
# spawn
a core dump.

This is caused through:
PS Server: loadmap npcroom1
Cleaning map file.
Region npcroom1 loaded successfully in 12ms
PS Server: spawn

Program received signal SIGSEGV, Segmentation fault.

(gdb) backtrace
#0 0x0825ced8 in psItemStats::GetIsGlyph (this=0x0) at src/server/bulkobjects/psitemstats.cpp:745
#1 0x0825dc70 in psItemStats::InstantiateBasicItem (this=0x0, transient=false) at src/server/bulkobjects/psitemstats.cpp:994
#2 0x082512c3 in psCharacterInventory (this=0xb6036014) at src/server/bulkobjects/pscharacter.cpp:91
#3 0x082513ce in psCharacter (this=0xb603600c) at src/server/bulkobjects/pscharacter.cpp:1108
#4 0x0821fea2 in psCharacterLoader::LoadAllNPCCharacterData (this=0x841ee40, sector=0x0, count=@0xb6dbdcd8)
at src/server/bulkobjects/pscharacterloader.cpp:142
#5 0x080fe512 in SpawnManager::RepopulateLive (this=0x8a3c388, sectorinfo=0x0) at src/server/spawnmanager.cpp:510
#6 0x0816642f in com_spawn (sector=0xb6dbdd45 "") at src/server/command.cpp:485
#7 0x082d6d91 in execute_line (cmd=0x8a1fdac "spawn", buffer=0x0) at src/common/util/serverconsole.cpp:146
#8 0x082d73a4 in psServerConsoleCommand::Trigger (this=0x8a1fd40) at src/common/util/serverconsole.h:138
#9 0x082cf74b in EventManager::ProcessEventQueue (this=0x8a1a458) at src/common/util/eventmanager.cpp:94
#10 0x082cfb55 in EventManager::Run (this=0x8a1a458) at src/common/util/eventmanager.cpp:199
#11 0x08187b00 in csPosixThread::ThreadRun (param=0x8a192b8) at libs/csutil/generic/cspthrd.cpp:531
#12 0x00ad93db in start_thread () at ./include/csutil/scf_interface.h:101
#13 0x00a3306e in clone () at ./include/csutil/scf_interface.h:101
(gdb)

Bereror

  • Hydlaa Notable
  • *
  • Posts: 773
    • View Profile
    • Planeshift API
Re: gcc version 4.1.1
« Reply #5 on: December 18, 2006, 09:48:51 am »
Well, as you commented out loading item stats from the database, there are now no item stats in your server. Restore the sources as they were, rebuild your server and then check the database. Look for 'Small key' in the item_stats table and delete the duplicate (there are most likely two records with the same name, 'Small key' and 'Small Key'). It's a bug in the CVS database that worked fine with mysql 4 and stopped working with mysql 5.
PlaneShift Sources
PlaneShift API
"Words never spoken
Are the strongest resounding"

ThomPhoenix

  • Testers
  • Forum Addict
  • *
  • Posts: 2678
  • A Phoenix, what'd you expect?
    • View Profile
Re: gcc version 4.1.1
« Reply #6 on: December 18, 2006, 10:38:31 am »
Last time I checked CVS that duplicate "Small Key" bug was fixed ;)
We're not evil. We're simply amazing.

Quantus

  • Hydlaa Resident
  • *
  • Posts: 92
  • Member of the Crystal Squadron
    • View Profile
    • PlaneShift Yliakum
Re: gcc version 4.1.1
« Reply #7 on: December 18, 2006, 11:53:35 am »
You will get:
Code: [Select]
Duplicate item_stats name where name='GoldFalchion' found.
Could not initialize database cache.
error while initializing server!
if you don't comment the lines :)

As I tried the PreloadItemStatsDatabase() seems to be wrong ("PS-Revision:  2006-12-10 00:00:00 UTC"), cause there are no duplicates.
A fresh CVS Download is currently impossible, cause the SF-server gets timeouts :(

But what I can surely say: "The Databse scripts seems not fitting to the source and outdated"
So I will try later

MustangMR

  • Hydlaa Resident
  • *
  • Posts: 128
    • View Profile
Re: gcc version 4.1.1
« Reply #8 on: April 27, 2008, 05:44:11 pm »
I'll add that I had problems compiling with 4.1.0.  Upgrading to 4.2.1 will compile all the packages, though, as of 4/27/08.