Jump to content

Error trying to compile a c++ source file


Recommended Posts

well I went to Easy Urpmi and followed the steps, now it is downloading something that will take about half an hour....Im not sure what it is downloading but when it is done I will let you know :P

Link to comment
Share on other sites

well here it is:

[root@dhcp-1397-25 purefan]# urpmi.addmedia main ftp://ftp.clinet.fi/pub/mirrors/Mandrake-...i586/media/main with media_info/hdlist.cz

using different removable device [/dev/hdb] for "Installation CD 3 (x86) (cdrom3)"

using different removable device [/dev/hdb] for "Installation CD 1 (x86) (cdrom1)"

using different removable device [/dev/hdb] for "Installation CD 2 (x86) (cdrom2)"

added medium main

examining synthesis file [/var/lib/urpmi/synthesis.hdlist.Installation CD 3 (x86) (cdrom3).cz]

examining synthesis file [/var/lib/urpmi/synthesis.hdlist.Installation CD 1 (x86) (cdrom1).cz]

examining synthesis file [/var/lib/urpmi/synthesis.hdlist.Installation CD 2 (x86) (cdrom2).cz]

computing md5sum of existing source hdlist (or synthesis)

retrieving source hdlist (or synthesis) of "main"...

    ftp://ftp.clinet.fi/pub/mirrors/Mandrake-..._info/hdlist.cz

found probed hdlist (or synthesis) as media_info/hdlist.cz

...retrieving done

examining hdlist file [/var/cache/urpmi/partial/hdlist.main.cz]

examining pubkey file of "main"...

...imported key 70771ff3 from pubkey file of "main"

performing second pass to compute dependencies

 

examining hdlist file [/var/lib/urpmi/hdlist.Installation CD 3 (x86) (cdrom3).cz]

built hdlist synthesis file for medium "Installation CD 3 (x86) (cdrom3)"

examining hdlist file [/var/lib/urpmi/hdlist.Installation CD 1 (x86) (cdrom1).cz]

built hdlist synthesis file for medium "Installation CD 1 (x86) (cdrom1)"

examining hdlist file [/var/lib/urpmi/hdlist.Installation CD 2 (x86) (cdrom2).cz]

built hdlist synthesis file for medium "Installation CD 2 (x86) (cdrom2)"

examining hdlist file [/var/lib/urpmi/hdlist.main.cz]

built hdlist synthesis file for medium "main"

found 0 headers in cache

removing 0 obsolete headers in cache

write config file [/etc/urpmi/urpmi.cfg]

[root@dhcp-1397-25 purefan]#

 

And now something interesting happened, I went through this thread and started repeating the checking process. when I did urpmi gcc-c++ it asked me if I wanted to satisfy the 7 dependencies...so I said YEAH!!! and now it is downloading...brb

Link to comment
Share on other sites

[root@dhcp-1397-25 purefan]# urpmi gcc-c++

To satisfy dependencies, the following 7 packages are going to be installed (80 MB):

binutils-2.15.92.0.2-6mdk.i586

gcc-3.4.3-7mdk.i586

gcc-c++-3.4.3-7mdk.i586

gcc-cpp-3.4.3-7mdk.i586

libbinutils2-2.15.92.0.2-6mdk.i586

libstdc++6-3.4.3-7mdk.i586

libstdc++6-devel-3.4.3-7mdk.i586

Is this OK? (Y/n) Y

the last part wouldnt copy I guess its because it is in constant renewal, but it says the address from where it is downloading, the percentage.....Im afraid its gonna download/install 80Mgs, meaning i'll be here another while hehehe

Edited by purefan
Link to comment
Share on other sites

and finally, after it downloaded everything and (I guess) installed it all:

Preparing...                ##################################################

  1:libstdc++6            ##################################################

  2:libstdc++6-devel      ##################################################

  3:libbinutils2          ##################################################

  4:binutils              ##################################################

  5:gcc-cpp                ##################################################

  6:gcc                    ##################################################

  7:gcc-c++                ##################################################

[root@dhcp-1397-25 purefan]# urpmi gcc-c++

Everything already installed

[root@dhcp-1397-25 purefan]# rpm -qa | grep gcc

gcc2.96-cpp-2.96-0.83mdk

gcc-cpp-3.4.3-7mdk

gcc-c++-3.4.3-7mdk

libgcc1-3.4.1-3mdk

gcc-3.4.3-7mdk

 

and now I test...

and it works!!! :D:D:D

thanks!!!

Thank you all so much!!!

my program did not compile but at least I can see that the lines from the compiler are there, meaning that if I have a compile that screams at me at least I ahve a cmopiler installed!!! :D:D:D:D

COOOOL!!!!!

thank you so much!!!! :D:D:D

Link to comment
Share on other sites

Ok here it is! at least I feel we're getting somewhere.

it looks now like my gcc was not installed...but it was! or at least I thought it was...

I downloaded the 40megs file

unzip...

configure (in a separate folder as it said)

built (for the hour it took to finish)

and installed!

...not much that could go wrong I think....

and in each phase it ended with no message error...so I assumed it was properly installed....

<sigh>

 

[root@dhcp-1397-25 root]# urpmi gcc-c++
no package named gcc-c++

[root@dhcp-1397-25 root]# urpmi gcc
Everything already installed

[root@dhcp-1397-25 root]# urpmi c++
The following packages contain c++:
libflac++4
libsigc++1.0_0
libstdc++5
libstdc++6
libstdc++6-devel

[root@dhcp-1397-25 root]# urpmi g++
no package named g++

 

Forgive me if this is out of place, stupid, obvious or whatever, but were you installing from source or from an RPM? If you were using the source file (I thought this might be the case from the talk of unzipping, configuring and building), then it's not going to show up when you do 'rpm -qa |grep gcc', or when you try urpmi/urpmf/urpmq. Assuming the config and everything is kosher, gcc should still work, though.

 

FWIW, I'm using 10.1OE (Discovery), and I'm pretty sure the RPMs for gcc are on one of the 3 CD's (not sure which one).

 

In any case, it appears to be sorted now, so feel free to ignore this if you want :)

 

 

Alex (still trying to make sure that there's not something blatantly obvious that I've missed, and also waiting for someone to point out glaring errors... :unsure: )

Edited by alexpank
Link to comment
Share on other sites

Alex: My understanding is we were trying to get gcc-c++ installed, which did not appear to be present in the 10.1 Community sources, which purefan was running. It is true rpm does not know about packages installed from source and will go ahead and install similar packages in parallel, perhaps overwriting conflicting files, I don't know. I did not address those issues, don't know. This is one reason, I think, it is always a good idea to work with software packaged in your package manager's system. There is even checkinstall in contrib/ sources for building rpms from a source package.

 

purefan: It appears you have added a source for 2005, not 10.1 Official, as I suggested. That's fine. It's just that urpmi will want to upgrade all your packages to 2005, anytime there is a call for a package that is newer in 2005 or requires a dependency that has a newer version in 2005: urpmi will always select and install the latest available package. If you were to do urpmi --auto-select, every package on your machine would be upgraded to the 2005 version, a long process over ftp on a dial-up. This manner of upgrade has worked fine for some or there might be some glitches introduced compared to a fresh install. It's impossible to tell. You could stay with this situation, disable the ftp 2005 source in Software Media Manager, enabling it only when you wanted to install from it, remove the source from media manager and add the 10.1 Official source, use urpmi --excludemedia main <packagename> on the commandline whenever you don't want urpmi to look in the 2005 main source to find packages.... See man urpmi, man urpmi.addmedia, man urpmi.removemedia...

Link to comment
Share on other sites

very interesting...i will consider trying to upgrade every package, I know it will take ages...but perhaps it is worth it, when I start getting error messages due to old-version files I will perhaps try to upgrade everything, as for now it is working fine so I yet don't see the need.

For answering alexpank's question...Im not sure! lol! well I downloaded the source and tried to install, everything looked ok after installing but I still wasnt able to compile c++ source files....so I guess not everything was ok, after I started following rolf's and bvc's suggestions I guess we installed the rpm, but I am sure it was not in any of my mandrake 10.1 Community cds, why am I so sure?? -> well I installed the whole package of development! :)

Again fellas thank you very much.

btw the code I was trying to compile was a simple "hello world" but It was set for compiling under MSVC++6 so it had things like

using namespace std;

which does not exist in linux (now I know :P).

Edited by purefan
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...