Jump to content

Missing Compiler???


caddyman379
 Share

Recommended Posts

Ok, I went to compile UnrealIRCd and it failed.. So I went and downloaded GCC, went to install it, and heres what I got when I executed ./configure

 

[root@CustomMachine02451 gcc-3.3.2]# ./configure

Configuring for a i686-pc-linux-gnuoldld host.

Created "Makefile" in /home/user/gcc-3.3.2 using "mt-frag"

./configure: line 8: cc: command not found

*** The command 'cc -o conftest -g conftest.c' failed.

*** You must set the environment variable CC to a working compiler.

[root@CustomMachine02451 gcc-3.3.2]#

 

Im the same guy that did Bad Installtion of mandrake, that problem went away with urpmi, but I'm still missing a compiler. Not sure if this makes a difference, but I downloaded it while i was running a normal user account, and i tried installing under root.

 

Thanks!

 

Richard

Link to comment
Share on other sites

Downloading it under a normal user and installing it as root is how it is usually done. The problem is that in order to use the configure, make, make install sequence, you need to have a compiler on your system. (That is what make does, it compiles the software). Therefore, you need to come up with a different way of putting gcc onto your system.

 

If you have no compiler, you will never be able to compile the compile so that you can compile other software. Got is? :D

 

Anyway, try this

 

$ urpmi gcc

 

and see what happens. This should install a rpm based gcc that will then in turn allow you to compile software.

 

 

(The dollar sign is simply the root prompt, don't actually use that as part of the command)

Link to comment
Share on other sites

you can't do ./configure w/o gcc

 

install a gcc rpm

 

 

 

keep the tarballs minimal on an rpm based sys. If you want to compile get .src.rpms and

 

rpmbuild --rebuild <package.src.rpm>

 

[OT] I keep lagging behind you today, eh fuzzylizard? :lol:

Link to comment
Share on other sites

Ok, UnrealIRCd compiles, but what the hell does this mean.

me and kIRC..

 

checking for gcc... gcc

checking whether the C compiler (gcc -O2 -Wall -s) works... yes

checking whether the C compiler (gcc -O2 -Wall -s) is a cross-compiler... no

checking whether we are using GNU C... yes

checking whether gcc accepts -g... yes

checking how to run the C preprocessor... gcc -E

checking for c++... no

checking for xlC... no

checking for DCC... no

checking for c++... no

checking for g++... no

checking for gcc... gcc

checking whether the C++ compiler (gcc -O2 -Wall -s) works... no

configure: error: installation or configuration problem: C++ compiler cannot create executables.

 

ok i think that there are a few compiler problems which probably will remain unsolved even after i clear this one up, what other things could be messed up?

Link to comment
Share on other sites

From the sounds of things, you are either missing the C++ compiler or missing some much needed library files. I think the first one is the most probable. Once again try this:

 

# urpmi gpp

 

I think that is the C++ compiler. Or you could try installing something like KDevelop -- a C/C++ ide -- which should force urpmi to install all dependencies which should include all necessary compilers.

Link to comment
Share on other sites

Ok went to re-compile UnrealIRCd after it segfaulted :/

it went well for the first half of it, then:

/home/user/Unreal3.1.1/src/res.c:113: undefined reference to `res_init'

res.o(.text+0x47):/home/user/Unreal3.1.1/src/res.c:114: undefined reference to `_res'

res.o(.text+0x50):/home/user/Unreal3.1.1/src/res.c:116: undefined reference to `_res'

res.o(.text+0x66):/home/user/Unreal3.1.1/src/res.c:117: undefined reference to `_res'

res.o(.text+0x438): In function `send_res_msg':

/home/user/Unreal3.1.1/src/res.c:362: undefined reference to `_res'

res.o(.text+0x440):/home/user/Unreal3.1.1/src/res.c:362: undefined reference to `_res'

res.o(.text+0x446):/home/user/Unreal3.1.1/src/res.c:363: more undefined references to `_res' follow

s_bsd.o(.text+0x27): In function `add_local_domain':

/home/user/Unreal3.1.1/src/s_bsd.c:158: undefined reference to `res_init'

s_bsd.o(.text+0x2d):/home/user/Unreal3.1.1/src/s_bsd.c:160: undefined reference to `_res'

s_bsd.o(.text+0x4e):/home/user/Unreal3.1.1/src/s_bsd.c:163: undefined reference to `_res'

collect2: ld returned 1 exit status

make[1]: *** [ircd] Error 1

make[1]: Leaving directory `/home/user/Unreal3.1.1/src'

make: *** [build] Error 2

 

I installed both of what you guys suggested and kirc still refuses to compile.

 

kirc says:

checking for strings.h... yes

checking for sys/stat.h... yes

checking for sys/select.h... yes

checking for socket in -lsocket... no

checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include

checking for QT-1.3x... configure: error: QT-1.30 (headers and libraries) not found. Please check your installation!

[root@CustomMachine02451 kirc-0.9.5-04]#

 

thanks for all of your help guys, without you i dont know whati would have done.

 

Cheers,

Richard

Link to comment
Share on other sites

You are going to have to install the QT libraries. Once again

 

# urpmi QT-1.30

 

And the next piece in the puzzle should be installed.

 

Suggestion, if you can find an rpm package of whatever you are trying to install, it would be a lot easier. Basically what you are missing are all the development packages. When you installed Mandrake you did not select development and a few other options that install programming type stuff onto your computer. So, now when you try and compile something, you are having to install all the devel packages.

 

HINT: whatever the error is when trying to configure software, it usually means that a package of some sort is missing. Just take the name of the package that the error occured on and try to install it using urpmi.

Link to comment
Share on other sites

Ok, now this is pissing me off :/

I started downloading QT3-common with urpmi, then one of its depedent packages stopped downloading at 95%, so i was like ok and iclosed that terminal. Now when i try to install qt i get the following:

 

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

libqt3-3.1.2-14.1.92mdk.i586

qt3-common-3.1.2-14.1.92mdk.i586

Is this OK? (Y/n) y

medium "contrib" uses an invalid list file:

mirror is probably not up-to-date, trying to use alternate method

 

http://distro.ibiblio.org/pub/linux/distri....92mdk.i586.rpm

installing /var/cache/urpmi/rpms/qt3-common-3.1.2-14.1.92mdk.i586.rpm

Installation failed:

libqt3 = 3.1.2-14.1.92mdk is needed by qt3-common-3.1.2-14.1.92mdk

qt3-common = 3.1.2-14mdk is needed by (installed) libqt3-3.1.2-14mdk

Installation failed, some files are missing:

http://distro.ibiblio.org/pub/linux/distri....92mdk.i586.rpm

You may want to update your urpmi database

[root@CustomMachine02451 user]#

 

I updated the urpmi database...

Link to comment
Share on other sites

This is what I did. Do a search for a rpm from either www.rpmseek.com or www.rpmfind.net. Find whatever rpm you want from them and get to the point where you are going to download it. Find the mirror you like best, and add it as a urpmi source. When you have a good one like I do you can issue something like

urpmi --media <whateveryounameit> gcc

and it will find all appropriate dependencies and do it all for you. Setting up a urpmi source isn't as hard as some want to make it. I will do something like

ftp ftp.mirrors.rpmsource.net

or whatever site it is and sign in with user anonymous and a null password. Then I refer to the rpmseek download page for what directories to go down to get to the rpms. When I get to the last directory before the RPMS or SRPMS (or whatever) folder, there should be a folder there also named "base." I then cd base, and ls to make sure it has a "hdlist.cz" file there. The syntax is quite simple for adding a rpm source

urpmi.addmedia <UserDefinedNameOfSource> ftp ftp.rpmsource.net/contrib/Mandrake/9.1/RPMS with ../base/hdlist.cz

The "ftp" by itself designates the type of rpm source you are adding, whereas the "ftp.rpmsource....." is the full path to the folder on the server where the rpms reside for your distribution. I have spent a lot of time on urpmi and finally decided that it works quite well when you have good sources defined.

You can designate whichever rpm source you want (such as the one you just added) with the "--media <UserDefinedNameOfSource>" switch. This removes a LOT of frustration from rpm.

 

If you just want to use the "contrib" source you could do a

urpmi.update contrib

Edited by Vdubjunkie
Link to comment
Share on other sites

I started downloading QT3-common with urpmi, then one of its depedent packages stopped downloading at 95%, so i was like ok and iclosed that terminal. Now when i try to install qt i get the following:

 

You've found one of the problems with urpmi, it's thinks its's installed the package you were downloading but killed. Obviously this package is in some broken state and likewise so is the urpmi database. I know how to repair rpm databases but I'm not sure how urpmi ones differ - hopefully someone else will know.

Link to comment
Share on other sites

it's probably a good idea to remove any rpms from

/var/cache/urpmi/rpms/

then update the sources

then rebuild the database (should been done already but why not again,eh?)

rm -f /var/lib/rpm/__db* && rpm --rebuilddb

and try again

 

rpm/urpmi/gurpmi/rpmdrake/MandrakeUpdate etc...=same database

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...