What is wrong with my GCC?
Trying to install some slackbuilds Im getting the same error all the time:
configure: error: in `/tmp/SBo/mono-2.10.9': configure: error: C compiler cannot create executables Same thing happened with code::blocks, LÖVE configure... Mono config.log http://pastebin.com/vD5bHAvw code::blocks config.log http://pastebin.com/u2b3tMMn also trying to compile things (not sure if this is related): # gcc -o prog3 prog3.c prog3.c:1:19: fatal error: stdio.h: No such file or directory with: find /usr -name stdio.h /usr/src/linux-3.2.29/arch/powerpc/boot/stdio.h /usr/lib64/gcc/x86_64-slackware-linux/4.7.1/include/ssp/stdio.h /usr/lib64/bcc/include/stdio.h /usr/include/isc/stdio.h /usr/include/c++/4.7.1/tr1/stdio.h Im no expert and have no idea what is going on... |
Hi,
possibly the architecture isn't recognized correctly. If you build for 64bit, please check if the slackbuildscript is able to recognize this architecture. Otherwise change it in the Slackbuildscript. Markus |
Missing glibc? Try (re)installing that package.
|
Quote:
What distro do you use? Have you installed complete gcc suite? |
slackware 14.0 64...
It should come with the installation right? I also installed http://www.slackware.com/~alien/multilib/14.0/ and Im feeling I did something wrong here... |
As pointed out by bosth, /usr/include/stdio.h is provided by glibc, which should be installed. Did you make a full install?
Also, check that all your packages are for x86_64. Following command should return 0: Code:
ls -l /var/log/packages | grep i486 | wc -l |
Quote:
But if you chose custom package selection then you had to select binutils, gcc, glibc, kernel headers, all this stuff... btw, take a look into /var/log/packages to make sure they are actually installed. As bosth suggested above, glibc is likely missing (package glib-1.2.10-x86_64-3, at least om my Slack) Quote:
"/usr/include/stdio.h" should remain there... |
Quote:
|
Quote:
"glib-2.15-x86_64-<some number>". Also, if he successfully installed multilibs there will be another file like "glibc-2.15_multilib-x86_64-7alien", which substitutes /usr/include/stdio.h, but in any case it must be there. |
ls -l /var/log/packages | grep i486 | wc -l returned 0 and yes, I did a full install
and on /var/log/packages: -rw-r--r-- 1 root root 1436 02.10.2012 16:56 glib-1.2.10-x86_64-3 -rw-r--r-- 1 root root 7416 02.10.2012 16:56 glib-networking-2.32.3-x86_64-1 -rw-r--r-- 1 root root 43781 02.10.2012 16:56 glib2-2.32.4-x86_64-1 -rw-r--r-- 1 root root 210 22.10.2012 02:40 glibc-2.15_multilib-x86_64-7alien -rw-r--r-- 1 root root 2287 16.11.2012 19:22 glibc-debug-2.15_multilib-x86_64-7alien -rw-r--r-- 1 root root 464815 22.10.2012 02:41 glibc-i18n-2.15_multilib-x86_64-7alien -rw-r--r-- 1 root root 1303 22.10.2012 02:41 glibc-profile-2.15_multilib-x86_64-7alien -rw-r--r-- 1 root root 15553 22.10.2012 02:41 glibc-solibs-2.15_multilib-x86_64-7alien -rw-r--r-- 1 root root 69793 22.10.2012 02:41 glibc-zoneinfo-2012f_ I still have no idea on what seems to be the problem |
Iuz,
Your problem is likely that your environment isn't set properly. To find those settings you can type the following commands: Code:
env Quote:
REF: http://en.wikipedia.org/wiki/Unix_shell Bourne shell (sh) Almquist shell (ash) Bourne-Again shell (bash) Debian Almquist shell (dash) Korn shell (ksh) Z shell (zsh) C shell (csh) TENEX C shell (tcsh) other shells.............. The next thing to do is determine if there is a .*rc file, or a .bash_profile file. To find the current logged in user's home shell Configuration file (*rc)... use: Code:
man updatedb There may be a .bash_profile file in /home/loginuser along with .bashrc. You can put configurations in either file, and you can create either if it doesn’t exist. But, why two different files? What is the difference? According to the bash man page, .bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells. If .bash_profile exists in /home/user/ with the following information already inserted: Code:
PATH=$PATH:$HOME/bin You need to list the *rc file to verify the contents and set the PATHS. I'm ASSUMING a Bash shell......Your may be different! Code:
cat .bashrc Quote:
Quote:
It's up to you to locate exactly where all the libs, and includes are located. That is what all the previous commands should have helped you do. Just because you have /usr/lib & /usr/local/lib included....doesn't mean your needed lib is in that path. That is where your detective work comes to play. SEARCH and use grep to locate the libs. Once you have the env file set either reboot or reset the env. Once again, your system command for this can/may be different. Code:
source .bashrc REF: http://linux.about.com/library/cmd/blcmdl1_ulimit.htm Quote:
Code:
echo "PATH=$PATH:/home/jacob/Dakota/bin" >> .bashrc Code:
find /usr -iname "stdio.h" Quote:
Code:
/* HELLO.C -- Hello, world */ Code:
gcc -o hello hello.c Quote:
Quote:
Larry |
Larry, everything you said above is correct.
But, it would be his next step. For now he is missing /usr/include/stdio.h - the glibc header which is expected by gcc. It comes from glibc-2.15-x86_64-7.txz. As Didier mentioned, it is in the /l series, so I guess step one is go into directory slackware64/l of installation CD and run "installpkg glibc-2.15-x86_64-7.txz" Quote:
#include "stdio.h", or #include <stdio.h> ? (note angle brackets vs quotation marks) |
Quote:
you have to reinstall glibc-debug-2.15_multilib-x86_64-7alien from Alien's packages. |
sorry, a mistake - I mean "glibc-2.15_multilib-x86_64-7alien",
not the "-debug-" version |
Quote:
I know this type of error, it's likely related to the architecture. Markus |
Quote:
Ideally, you would use <...> for standard C libraries and "..." for libraries that you write, and are present in the current directory. Larry |
Quote:
Redownload and reinstall that package. |
The problem was the broken package...
Thanks everyone for helping... |
All times are GMT -5. The time now is 10:25 PM. |