Compile problems.

Everything todo with programming goes HERE.
Post Reply
User avatar
/dev/null
Shutout Match Winner
Posts: 819
Joined: Sat Sep 04, 2004 6:28 pm
Location: Chicago-ish

Compile problems.

Post by /dev/null »

Ok, I have a coupla questions,

1. Has anyone compiled tron on gcc 3.4.2
2. Has anyone compiled tron on amd64 for native x86_64

Main reason i ask is when i try to compile tron after building my system up with the new gcc and x86_64 it errors out quite nicely, I havnt been able to deduce if this is from the new gcc, or the new architechture. Precompiled tron binaries still work as normal, but i cant compile shit. This effectivly puts a stop on me helpin out with the code some more, as my shit is currently in choke stage, I might revert back to an older gcc and see how it works out.
User avatar
subby
Shutout Match Winner
Posts: 1199
Joined: Sun Dec 21, 2003 1:18 am
Location: A cave, Melbourne, Australia.

Post by subby »

Yes I've tried and yes there are errors. I fixed some errors. Didn't know what to do with some other errors so removed some lines of code untill it worked. I don't know how thses chnages affect the program....


IS your first error a dependancy error?
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

I've also had errors when I did an upgrade of my Fedora Core 2 to rawhide.

I had g++ 3.4.2 installed and it thowed this error:

Code: Select all

[klaxnek@nemesis armagetronad]$ make
chmod 755 batch/*
touch src/dep
make -kC src/tron
make[1]: Entering directory `/home/klaxnek/armagetronad/src/tron'
dep:1: *** missing separator. Stop. 
make[1]: Leaving directory `/home/klaxnek/armagetronad/src/tron'
make: *** [all] Error 2
I wasn't able to solve that problem. It was a problem when generating dependencies files (dep). The dep file contained "wrong paths" and bad formatted lines. I was able to solve that wrong format with sed commands but it throwed other errors grrr. Because of this today I'm reinstalling a clean Fedora Core 2 (but we'll need to solve these problems because Fedora Core 3 final and other distros new versions are approaching)

I suppose we'll need to edit some parts of the code (as u said subby) to make that parts g++3.4+ compatible (or add other code with #ifdefs GCC_VERSION>2 or something like this).
User avatar
/dev/null
Shutout Match Winner
Posts: 819
Joined: Sat Sep 04, 2004 6:28 pm
Location: Chicago-ish

errors errors

Post by /dev/null »

Well downgrading my gcc fixed one error, but its still not likin the whole x86_64

Code: Select all

g++ -I. -I.. -I../.. -march=k8 -pipe -I/usr/include/SDL -D_REENTRANT  -I. -I../../src -c  tMemManager.cpp -o tMemManager.o
ar cru tools.a tCrypt.o tArray.o tError.o tConfiguration.o tHeap.o tString.o tConsole.o tMemStack.o tRing.o tCallback.o tEventQueue.o tLinkedList.o tToDo.o tSysTime.o tLocale.o tSafePTR.o tDirectories.o tMemManager.o
ranlib tools.a
make[2]: Leaving directory `/var/tmp/portage/armagetron-0.2.6.0/work/armagetron-0.2.6.0/src/tools'
touch ../tools/tools.a
make[1]: Target `all' not remade because of errors.
make[1]: Leaving directory `/var/tmp/portage/armagetron-0.2.6.0/work/armagetron-0.2.6.0/src/tron'
make: *** [all] Error 2

User avatar
subby
Shutout Match Winner
Posts: 1199
Joined: Sun Dec 21, 2003 1:18 am
Location: A cave, Melbourne, Australia.

Post by subby »

klax wrote:I've also had errors when I did an upgrade of my Fedora Core 2 to rawhide.

I had g++ 3.4.2 installed and it thowed this error:

Code: Select all

[klaxnek@nemesis armagetronad]$ make
chmod 755 batch/*
touch src/dep
make -kC src/tron
make[1]: Entering directory `/home/klaxnek/armagetronad/src/tron'
dep:1: *** missing separator. Stop. 
make[1]: Leaving directory `/home/klaxnek/armagetronad/src/tron'
make: *** [all] Error 2
I wasn't able to solve that problem. It was a problem when generating dependencies files (dep). The dep file contained "wrong paths" and bad formatted lines. I was able to solve that wrong format with sed commands but it throwed other errors grrr. Because of this today I'm reinstalling a clean Fedora Core 2 (but we'll need to solve these problems because Fedora Core 3 final and other distros new versions are approaching)

I suppose we'll need to edit some parts of the code (as u said subby) to make that parts g++3.4+ compatible (or add other code with #ifdefs GCC_VERSION>2 or something like this).
Ok to fix the dep problem and turn one error into a warning use the folowing makefile.global.in

-fpermissive turns an error into a warning and -M (by memory it hink,i'll check) fixes the bad output in the dep file.


edit... extension not allow doh! zipping it up now....

ok attached now and you can ignore the -pedantic that was just a test
man gcc wrote: -M Instead of outputting the result of preprocessing, output a rule
suitable for make describing the dependencies of the main source
file. The preprocessor outputs one make rule containing the object
file name for that source file, a colon, and the names of all the
included files, including those coming from -include or -imacros
command line options.
I wish they would keep things consistant, took me a long time to find this fix!
Attachments
Makefile.global.in.zip
(1.36 KiB) Downloaded 432 times
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

Thanks subby!!! :D

I'll try it again then with Fedora rawhide (when I solve my problems installing XP and linux in the same machine, yesterday installing linux it trashed my mbr and leaved my windows xp unbootable sniff).
User avatar
subby
Shutout Match Winner
Posts: 1199
Joined: Sun Dec 21, 2003 1:18 am
Location: A cave, Melbourne, Australia.

Post by subby »

klax wrote:Thanks subby!!! :D

I'll try it again then with Fedora rawhide (when I solve my problems installing XP and linux in the same machine, yesterday installing linux it trashed my mbr and leaved my windows xp unbootable sniff).
when u say unbootable do you mean u can't edit lilo.conf to make it bootable?
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

Well, this is a bit offtopic but I really need help.
It installed grub by default, and selecting 'Other' XP didn't boot sniff. In linux I saw that in grub.conf there was a line of 'chainloader +1' or something like this. I've read somewhere that this was a problem with newer distros, but I don't have the solution...

In the past I always installed linux and xp without problems, always installing grub in the boot partition in linux, extracting the boot sector with a dd command and using the ntloader to boot linux. But I don't know why with this new 80GB hard drive it ****** my xp boot.

Anyway, I'll reinstall linux and windows but here is my question:

In which order do u suggest me to install?
I have 2 HDs:
1. a 80GB connected in master in ide0
2. a 12GB connected in slave in ide1

I want to install windows in HD1 and linux in HD2. Which order do u suggest?
User avatar
Lucifer
Project Developer
Posts: 8683
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Klax, it just doesn't sound like a very big loss to me, sorry. :) When I installed Mandrake 10 and I couldn't boot windows anymore, I cheered. Said "Finally they've done something right!"

That said, this is a common problem. I'll bet if you google it you'll find a common solution. Happened with some versions of the 2.6 kernel shipped with Mandrake and Fedora. i don't have any further details, sorry. As I said, I didn't bother fixing mine, I felt I had actually gained something.
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

The problem was the I hadn't internet connection at home (only in job and very limited time) and I was very sad because I had a lot of games and movies in iso files in my win partition lol

I have an usb dsl modem and I couldn't connect to internet to download the linux drivers, and I couldn't boot in xp to download them. Next time I'll pick up a router grrr

Now I have a raw windows to connect and I'll google as u suggested Lucifer ;)
Next time I'll do a backup of my usb dsl modem linux drivers lol

I will inform all of you of my new problems ;P

Sorry again for this offtopic
User avatar
/dev/null
Shutout Match Winner
Posts: 819
Joined: Sat Sep 04, 2004 6:28 pm
Location: Chicago-ish

Post by /dev/null »

Ok, you need to do a few things first your grub.conf should look something like this

Code: Select all

# Which listing to boot as default. 0 is the first, 1 the second etc.
default 0
# How many seconds to wait before the default listing is booted.
timeout 30
# Nice, fat splash-image to spice things up :)
# Comment out if you don't have a graphics card installed
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Linux 
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /kernel-2.whatever root=/dev/hda3

# The next three lines are only if you dualboot with a Windows system.
# In this case, Windows is hosted on /dev/hda6.
title=Windows XP
rootnoverify (hd0,5)
makeactive
chainloader +1
Ok, theres a few things to explain to this first, notably how grub counts drives, say you have xp on your first drive and linux on your second, then xp would be (hd0,0) and linux would be (hd1,0), now the first number signifys which physical drive (It doesnt count cdroms or other removable media like that) and the second number is the partition on that drive. Also, the kernel line refers to whatever you kernel is named in /boot, if there is also an initrd of the same version you should also add the line

initrd /initrd-2.whatever
Also to set up grub you need to run a few commands,

Code: Select all

# grub
grub> root (hd0,0)          (Specify where your /boot partition resides)
grub> setup (hd0)           (Install GRUB in the MBR)
grub> quit                  (Exit the GRUB shell)
[/code]
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

Thanks all for your help ;)

Here is how I solved it:

1. Launch Fedora Core 2 CD1
2. Boot with: linux rescue
3. chroot /mnt/sysimage
4. sfdisk -d /dev/hda > partitiontable.txt
5. cat partitiontable.txt | sfdisk --no-reread -H255 /dev/hda

I understood it is a problem with disk geometry.
With these comands now I can boot my windows partition and I haven't lost anything XD.
Time to install linux and retake the coding.
Post Reply