| View previous topic :: View next topic |
| Author |
Message |
mamay n00b

Joined: 28 Jan 2007 Posts: 6
|
Posted: Sun Jan 28, 2007 4:43 am Post subject: Error: C compiler cannot create executables |
|
|
After a recent emerge world -uv it seems that my gcc toolkit is broken. It seems that gcc thinks that some of my .so libraries are corrupted or something like that. I have tried resetting/verifying the make.conf flags as mentioned elsewhere on the forum to no avail. Please help with this issue if you can.
Here is the error message
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /var/tmp/portage/app-editors/nano-2.0.2/work/nano-2.0.2/config.log
!!! ERROR: app-editors/nano-2.0.2 failed.
Call stack:
ebuild.sh, line 1611: Called dyn_compile
ebuild.sh, line 968: Called qa_call 'src_compile'
environment, line 1297: Called src_compile
nano-2.0.2.ebuild, line 41: Called econf '--bindir=/bin' '--enable-color' '--enable-multibuffer' '--enable-nanorc' '--disable-wrapping-as-root' '--disable-spell' '--disable-justify' '--disable-debug' '--enable-nls' '--enable-utf8' '--disable-tiny' '--without-slang'
ebuild.sh, line 574: Called die
!!! econf failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/app-editors/nano-2.0.2/temp/build.log'.
I have tried to build a simple c program but it fails too. Here is an example:
main.c
#include <stdio.h>
int main(){
printf("Hello world\n");
return 0;
}
when I do gcc main.c I get the following error message:
/lib64/libc.so.6: file not recognized: File format not recognized
collect2: ld returned 1 exit status
The g++ of the similar code:
#include <stdio.h>
#include <iostream.h>
int main(){
cout <<"Hello world\n";
return 0;
}
g++ main.cpp produces the following:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/backward/iostream.h:31,
from test.cpp:2:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libm.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
My current setup
System AMD Opteron 248 (2x)
gcc -v:
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.1.1-r3/work/gcc-4.1.1/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.1 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --enable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.1 (Gentoo 4.1.1-r3)
make.conf
CFLAGS="-O2 -mmmx -mtune=opteron -msse -msse2 -m3dnow -fexpensive-optimizations -mfpmath=sse,387 -pipe "
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j4"
ALSA_CARDS="intel8x0 emul0k1"
#ALSA_TOOLS=
ACCEPT_KEYWORDS="~amd64"
USE="3dnow alsa unicode bash-completion threads nptl nptlonly acl ruby tcltk socks5 bzip2 hardened"
Here is the full config.log:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GNU nano configure 2.0.2, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ ./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --bindir=/bin --enable-color --enable-multibuffer --enable-nanorc --disable-wrapping-as-root --disable-spell --disable-justify --disable-debug --enable-nls --enable-utf8 --disable-tiny --without-slang --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu
## --------- ##
## Platform. ##
## --------- ##
hostname = supertux
uname -m = x86_64
uname -r = 2.6.19-gentoo-r1
uname -s = Linux
uname -v = #2 SMP Fri Dec 8 02:53:42 EST 2006
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/sbin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/lib/portage/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /opt/bin
PATH: /usr/x86_64-pc-linux-gnu/gcc-bin/4.1.1
PATH: /opt/blackdown-jdk-1.4.2.03/bin
PATH: /opt/blackdown-jdk-1.4.2.03/jre/bin
PATH: /usr/kde/3.5/sbin
PATH: /usr/kde/3.5/bin
PATH: /usr/qt/3/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1820: checking build system type
configure:1838: result: x86_64-pc-linux-gnu
configure:1860: checking host system type
configure:1875: result: x86_64-pc-linux-gnu
configure:1897: checking target system type
configure:1912: result: x86_64-pc-linux-gnu
configure:1954: checking for a BSD-compatible install
configure:2010: result: /bin/install -c
configure:2021: checking whether build environment is sane
configure:2064: result: yes
configure:2129: checking for gawk
configure:2145: found /bin/gawk
configure:2156: result: gawk
configure:2167: checking whether make sets $(MAKE)
configure:2188: result: yes
configure:2392: checking for x86_64-pc-linux-gnu-gcc
configure:2408: found /usr/bin/x86_64-pc-linux-gnu-gcc
configure:2419: result: x86_64-pc-linux-gnu-gcc
configure:2697: checking for C compiler version
configure:2704: x86_64-pc-linux-gnu-gcc --version >&5
x86_64-pc-linux-gnu-gcc (GCC) 4.1.1 (Gentoo 4.1.1-r3)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2707: $? = 0
configure:2714: x86_64-pc-linux-gnu-gcc -v >&5
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.1.1-r3/work/gcc-4.1.1/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.1 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --enable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.1 (Gentoo 4.1.1-r3)
configure:2717: $? = 0
configure:2724: x86_64-pc-linux-gnu-gcc -V >&5
x86_64-pc-linux-gnu-gcc: '-V' option must have argument
configure:2727: $? = 1
configure:2750: checking for C compiler default output file name
configure:2777: x86_64-pc-linux-gnu-gcc -O2 -mmmx -mtune=opteron -msse -msse2 -m3dnow -fexpensive-optimizations -mfpmath=sse,387 -pipe conftest.c >&5
/lib64/libc.so.6: file not recognized: File format not recognized
collect2: ld returned 1 exit status
configure:2780: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "GNU nano"
| #define PACKAGE_TARNAME "nano"
| #define PACKAGE_VERSION "2.0.2"
| #define PACKAGE_STRING "GNU nano 2.0.2"
| #define PACKAGE_BUGREPORT "nano-devel@gnu.org"
| #define PACKAGE "nano"
| #define VERSION "2.0.2"
| #define _GNU_SOURCE 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2819: error: C compiler cannot create executables
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-pc-linux-gnu
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-O2 -mmmx -mtune=opteron -msse -msse2 -m3dnow -fexpensive-optimizations -mfpmath=sse,387 -pipe'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-pc-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=x86_64-pc-linux-gnu
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-pc-linux-gnu
ac_cv_path_install='/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_CC=x86_64-pc-linux-gnu-gcc
ac_cv_prog_make_make_set=yes
ac_cv_target=x86_64-pc-linux-gnu
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /var/tmp/portage/app-editors/nano-2.0.2/work/nano-2.0.2/missing --run aclocal-1.9'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /var/tmp/portage/app-editors/nano-2.0.2/work/nano-2.0.2/missing --run tar'
AUTOCONF='${SHELL} /var/tmp/portage/app-editors/nano-2.0.2/work/nano-2.0.2/missing --run autoconf'
AUTOHEADER='${SHELL} /var/tmp/portage/app-editors/nano-2.0.2/work/nano-2.0.2/missing --run autoheader'
AUTOMAKE='${SHELL} /var/tmp/portage/app-editors/nano-2.0.2/work/nano-2.0.2/missing --run automake-1.9'
AWK='gawk'
CC='x86_64-pc-linux-gnu-gcc'
CCDEPMODE=''
CFLAGS='-O2 -mmmx -mtune=opteron -msse -msse2 -m3dnow -fexpensive-optimizations -mfpmath=sse,387 -pipe'
CPP=''
CPPFLAGS=''
CURSES_LIB=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GLIB_CFLAGS=''
GLIB_GENMARSHAL=''
GLIB_LIBS=''
GLIB_MKENUMS=''
GMSGFMT=''
GOBJECT_QUERY=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
INTLLIBS=''
LDFLAGS=''
LIBICONV=''
LIBINTL=''
LIBOBJS=''
LIBS=''
LN_S=''
LTLIBICONV=''
LTLIBINTL=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /var/tmp/portage/app-editors/nano-2.0.2/work/nano-2.0.2/missing --run makeinfo'
MKINSTALLDIRS=''
MSGFMT=''
MSGMERGE=''
OBJEXT=''
PACKAGE='nano'
PACKAGE_BUGREPORT='nano-devel@gnu.org'
PACKAGE_NAME='GNU nano'
PACKAGE_STRING='GNU nano 2.0.2'
PACKAGE_TARNAME='nano'
PACKAGE_VERSION='2.0.2'
PATH_SEPARATOR=':'
PKGDATADIR=''
PKG_CONFIG=''
POSUB=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
USE_COLOR_FALSE=''
USE_COLOR_TRUE=''
USE_NLS=''
USE_NLS_FALSE=''
USE_NLS_TRUE=''
VERSION='2.0.2'
XGETTEXT=''
ac_ct_CC=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='/bin'
build='x86_64-pc-linux-gnu'
build_alias='x86_64-pc-linux-gnu'
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='pc'
datadir='/usr/share'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-pc-linux-gnu'
host_alias='x86_64-pc-linux-gnu'
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='/usr/share/info'
install_sh='/var/tmp/portage/app-editors/nano-2.0.2/work/nano-2.0.2/install-sh'
libdir='/usr/lib64'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='/var/lib'
mandir='/usr/share/man'
mkdir_p='mkdir -p --'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='/etc'
target='x86_64-pc-linux-gnu'
target_alias=''
target_cpu='x86_64'
target_os='linux-gnu'
target_vendor='pc'
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME "GNU nano"
#define PACKAGE_TARNAME "nano"
#define PACKAGE_VERSION "2.0.2"
#define PACKAGE_STRING "GNU nano 2.0.2"
#define PACKAGE_BUGREPORT "nano-devel@gnu.org"
#define PACKAGE "nano"
#define VERSION "2.0.2"
#define _GNU_SOURCE 1
configure: exit 77 |
|
| Back to top |
|
 |
Anaki n00b


Joined: 06 Nov 2005 Posts: 33 Location: Hungary
|
Posted: Sun Jan 28, 2007 5:27 am Post subject: |
|
|
Hi!
I had the same problem several hours ago, and i solved it by upgrading binutils (!?) |
|
| Back to top |
|
 |
elsenator Tux's lil' helper


Joined: 19 Jan 2005 Posts: 84
|
Posted: Sun Jan 28, 2007 2:22 pm Post subject: "C compiler cannot create executables" |
|
|
A problem recently occurred within my Gentoo system. No matter what i try to emerge, i get the following error during configure, and then it quits:
| Quote: |
...
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /var/tmp/portage/foobillard-3.0a/work/foobillard-3.0a/config.log
...
|
I've been searching through the forums for a solution, but none of the threads I've found solved the problem. My guess is that there is some sort of trouble with an environment variable or something, but I'm not exactly an expert when it comes to programming or compilers so I really don't know what to do about it.
Does anyone know a solution to this problem? I've recently updated my udev just in case that could have caused it, and that's pretty much it. I haven't messed around with GCC at all(if I have, I can't recall it). |
|
| Back to top |
|
 |
mamay n00b

Joined: 28 Jan 2007 Posts: 6
|
Posted: Sun Jan 28, 2007 2:47 pm Post subject: |
|
|
Anaki
Would you mind sharing how did you manage to do that since my gcc is broken for the time being and upgrading of the binutils requires a fully functional toolchain in order to do the compiling, which is currently broken on my system.
Thanks
| Anaki wrote: | Hi!
I had the same problem several hours ago, and i solved it by upgrading binutils (!?) |
|
|
| Back to top |
|
 |
elsenator Tux's lil' helper


Joined: 19 Jan 2005 Posts: 84
|
Posted: Sun Jan 28, 2007 2:50 pm Post subject: |
|
|
| I'm very interested in knowing how you emerged binutils too, since the compiler is broken, i can't do that. I'm having a similar problem. |
|
| Back to top |
|
 |
elsenator Tux's lil' helper


Joined: 19 Jan 2005 Posts: 84
|
Posted: Sun Jan 28, 2007 2:50 pm Post subject: |
|
|
Discussion continued here:
[Edit by NeddySeagoon - Merged the threads] |
|
| Back to top |
|
 |
mamay n00b

Joined: 28 Jan 2007 Posts: 6
|
Posted: Sun Jan 28, 2007 2:58 pm Post subject: |
|
|
Well that's the thing, it seems to me that the binutils which I have currently have showed up in portage tree sometime around 2006-12-18, and binutils binutils-2.17.50.0.11 is there as of 2007-01-04 (according to the timestamp in my tree). What I think that could be happening is that sometimes the binutils which I have emerged (with ~amd64 keyword) is a release behind which could be part of the issue. As far as me being able to emerge binutils, I have emerged it and my toolkit become broken afterwards.
With the current state of my toolchain I am unable to emerge anything at all, whith no means of rebuilding it either.
| elsenator wrote: | | I'm very interested in knowing how you emerged binutils too, since the compiler is broken, i can't do that. I'm having a similar problem. |
|
|
| Back to top |
|
 |
elsenator Tux's lil' helper


Joined: 19 Jan 2005 Posts: 84
|
Posted: Sun Jan 28, 2007 3:01 pm Post subject: |
|
|
| mamay wrote: | Well that's the thing, it seems to me that the binutils which I have currently have showed up in portage tree sometime around 2006-12-18, and binutils binutils-2.17.50.0.11 is there as of 2007-01-04 (according to the timestamp in my tree). What I think that could be happening is that sometimes the binutils which I have emerged (with ~amd64 keyword) is a release behind which could be part of the issue. As far as me being able to emerge binutils, I have emerged it and my toolkit become broken afterwards.
With the current state of my toolchain I am unable to emerge anything at all, whith no means of rebuilding it either.
| elsenator wrote: | | I'm very interested in knowing how you emerged binutils too, since the compiler is broken, i can't do that. I'm having a similar problem. |
|
Sorry, i was actually referring to how Anaki could emerge binutils(i should have quoted that), if he got the same error as we do. |
|
| Back to top |
|
 |
wynn Veteran


Joined: 01 Apr 2005 Posts: 2395 Location: UK
|
Posted: Sun Jan 28, 2007 3:14 pm Post subject: |
|
|
It looks, from the error messages, as though glibc is corrupt | Code: | /lib64/libc.so.6: file not recognized: File format not recognized
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libm.so: file not recognized: File format not recognized | Probably the only way you are going to get out of this Catch-22 situation is to boot up the install CD and download a stage3 tarball.
I don't know whether this will wipe out portage so you may have to install a portage snapshot as well.
You should now have a working glibc, compiler and so on. _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
| Back to top |
|
 |
elsenator Tux's lil' helper


Joined: 19 Jan 2005 Posts: 84
|
Posted: Sun Jan 28, 2007 3:18 pm Post subject: |
|
|
| wynn wrote: | It looks, from the error messages, as though glibc is corrupt | Code: | /lib64/libc.so.6: file not recognized: File format not recognized
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libm.so: file not recognized: File format not recognized | Probably the only way you are going to get out of this Catch-22 situation is to boot up the install CD and download a stage3 tarball.
I don't know whether this will wipe out portage so you may have to install a portage snapshot as well.
You should now have a working glibc, compiler and so on. |
Yes, that could be a solution, although i think it's a pretty drastic one. What annoys me is that i have no idea how this problem occurred(and, therefore, no idea how to reverse it). Can anyone shed some light on this? Or has Linux suddenly begun to act like Windows, with unexplainable errors.
EDIT: I've been thinking a bit about your suggestion with the boot cd and downloading a stage3 tarball, but that would also ruin all(or many) of my configuration files wouldn't it? |
|
| Back to top |
|
 |
Anaki n00b


Joined: 06 Nov 2005 Posts: 33 Location: Hungary
|
Posted: Sun Jan 28, 2007 4:32 pm Post subject: |
|
|
Hi!
Here is how i did:
I created a new partition, where I extracted a stage3 tarball.After that I chrooted into that " new system", and created a binutils package. And then I used this new package, in my "old" gentoo installation.
| Code: | | emerge --usepkgonly binutils |
Edit:
You can grab my binutils package (amd64) here: w3.externet.hu/~Anaki/binutils-2.17.50.0.11.tbz2 |
|
| Back to top |
|
 |
elsenator Tux's lil' helper


Joined: 19 Jan 2005 Posts: 84
|
Posted: Sun Jan 28, 2007 6:31 pm Post subject: |
|
|
| Anaki wrote: | Hi!
Here is how i did:
I created a new partition, where I extracted a stage3 tarball.After that I chrooted into that " new system", and created a binutils package. And then I used this new package, in my "old" gentoo installation.
| Code: | | emerge --usepkgonly binutils |
Edit:
You can grab my binutils package (amd64) here: w3.externet.hu/~Anaki/binutils-2.17.50.0.11.tbz2 |
I just tried doing exactly that, both with binutils and gcc. Everything went fine, but i still get the exact same error when trying to compile stuff in the non-chrooted system afterwards. I'm reeeeally starting to get weirded out by this. I have no idea where to go from here. If anyone has any other suggestions i would greatly appreciate it! |
|
| Back to top |
|
 |
mamay n00b

Joined: 28 Jan 2007 Posts: 6
|
Posted: Sun Jan 28, 2007 6:51 pm Post subject: |
|
|
There are number of problems with doing chrooted setup first of all the glibc in the current stage is 2.4 while the one I have currently is 2.5 which I am going to assume are totally incompatible for this purpose. It could be possible to do a chrooted build and then merely copy these over. The problem is that I am going to bet that it is not the issue with the .so itself as it seems to be good enough to drive my entire system. I the .so would be corrupted I see it as being impossible to even boot the system. (I HAVE TRIED THIS, so I can say this for sure).
I am going to bet that it has something to do with the toolchain settings being corrupted.
With this said I would like some help on setting the following up:
1. Build the chroot environment to exact spec as the original system, versions and all
2. Build the toolchain
3. Bring over the built toolchain over to the main system
4. Use merge to deploy this build toolchain (exactly as it would be deployed by default by emerge)
5. Hope that the full toolchain rebuild will fix this issue and that your system is back to normal
I am thinking of manually executing the emerge build steps so that I can control the build and deployment stages in order to attempt this. If anyone can give me some pointers on how to accomplish this I would appreciate it greatly as I am still a n00b in this kind of business.
Thanks |
|
| Back to top |
|
 |
elsenator Tux's lil' helper


Joined: 19 Jan 2005 Posts: 84
|
Posted: Sun Jan 28, 2007 7:25 pm Post subject: [solved] |
|
|
Ok, i seem to have solved my problem now. I had a look at this very old thread: http://forums.gentoo.org/viewtopic.php?t=27486 and did a small test compile of a hello world program, and i got an error telling me that /usr/local/include wasn't a directory. So i checked it, and it was in fact a text file... So, i backed up that file and instead made it into a directory. After that, everything seems to work again. I have no idea at all how the include dir had been turned into a text file... Something must have gone wrong when compiling some custom stuff not in portage.
EDIT: Also, i've been looking into what was inside the include text file, and it leads to some wiimote related stuff. So, be careful when fooling around with WMD and CWiid, since these are the two wiimote related pieces of software that i've tried to compile. |
|
| Back to top |
|
 |
madisonicus Veteran


Joined: 20 Sep 2006 Posts: 1125
|
Posted: Mon Jan 29, 2007 1:02 am Post subject: |
|
|
Glad to hear you fixed this.
Please add [SOLVED] to the message title so that others with this error can see you did find a solution.
Cheers,
m _________________ Please add [SOLVED] to your message title if you feel that your question has been answered.
------
Intel Q9300 Core2 Quad * Gigabyte GA-EP35C-DS3R
Samsung x360
AMD64 x2 4200+ * TF7050-M2 * HTPC |
|
| Back to top |
|
 |
elsenator Tux's lil' helper


Joined: 19 Jan 2005 Posts: 84
|
Posted: Mon Jan 29, 2007 6:05 am Post subject: |
|
|
| madisonicus wrote: | Glad to hear you fixed this.
Please add [SOLVED] to the message title so that others with this error can see you did find a solution.
Cheers,
m |
I would, but i didn't create the thread so i can't. :/ Also, i believe my solution was in fact quite unique, and probably not the solution Mamay is looking for. |
|
| Back to top |
|
 |
mamay n00b

Joined: 28 Jan 2007 Posts: 6
|
Posted: Mon Jan 29, 2007 8:11 pm Post subject: |
|
|
| The problem which I have with the toolchain still persists, and the solution proposed by elsenator did not apply. |
|
| Back to top |
|
 |
wynn Veteran


Joined: 01 Apr 2005 Posts: 2395 Location: UK
|
Posted: Tue Jan 30, 2007 5:34 am Post subject: |
|
|
mamay: Yes, glibc must be OK as you are able to boot and this runs many things which depend on libc.so.6 if not libm.so.
/lib64/libc.so.6 is a symlink as is /lib64/libm.so.6 | Code: | lrwxrwxrwx 1 root root 11 Nov 6 14:08 /lib64/libc.so.6 -> libc-2.4.so
lrwxrwxrwx 1 root root 11 Nov 6 14:08 /lib64/libm.so.6 -> libm-2.4.so | except there isn't a /lib64/libm.so as in the error message.
Would it be worthwhile checking that these symlinks are there and point, in your case, to libc-2.5.so and libm-2.5.so?
Would you run file on them | Code: | # file /lib64/libc-2.4.so
/lib64/libc-2.4.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, stripped
# file /lib64/libm-2.4.so
/lib64/libm-2.4.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, stripped |
To get a new toolchain as in your post above, you need to do what Anaki did:- Create a new partition
- Download and unpack a stage3 tarball and a portage snapshot as in the install guide
- You may like to run "emerge -e system" and "emerge -e world" at this point â just to be sure
- Emerge the versions of gcc, binutils, glibc and so on that you think are causing trouble
- Package them and then upgrade your original system with these packages â again as Anaki did
The chrooting, setting up the network and so on is as in the QuickInstall Guide, it doesn't seem necessary to repeat them. _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
| Back to top |
|
 |
mamay n00b

Joined: 28 Jan 2007 Posts: 6
|
Posted: Tue Jan 30, 2007 11:34 pm Post subject: Error: C compiler cannot create executables [SOLVED] |
|
|
Thanks wynn, for the proposed solution.
I have done something similar to what you proposed and as was suggested by Anaki.
What I have done is as follows:
- created a gentoo folder under home directory
- downloaded and unpacked stage3 in gentoo directory
- downloaded and unpacked portage snapshot in the gentoo directory
- copied my /etc/make.conf to the gentoo/etc
- chrooted into the gentoo
- added FEATURES="buildpkg" to the make.conf # this will automatically build the binary packages under portage/packages/All
- did emerge --sync
- did emerge system -e # rebuild the base system with my CFLAGS and USE flags which also built the binary packages
on my main system (one with broken gcc) I have apache running so I set up a host to serve the binary packages built in the chrooted environment (AKA binhostserver) which basically a vhost which serves /home/${USERNAME}/gentoo/usr/portage/packages
- added the following to my main system's /etc/make.conf:
- PKGDIR="/home/${USERNAME}/gentoo/usr/portage/packages"
- PORTAGE_BINHOST="http://localhost/pkg" #this is the place where my apache was serving the binary files
- did emerge -eg system on my main system which basically re-emerged my base system using prebuilt binaries from the chrooted environment
- finally I rebooted
After this my system is back to being fully functional (YES! )
Note: substitute ${USERNAME} with your username.
wynn:
I have checked the links prior to your post in similar fashion as you have recommended, but did not find anything out of the ordinary with the .so files or the links to the binaries, which is why I opted for a base system re-emerge. Since my system was functional enough not to require a separate partition I merely got away with the chrooted environment which was easier to set up and did not require an extra partition.
In all thanks a lot to all who contributed to this solution. I still have no idea what prompted the initial screw up with my gcc toolkit, but am happy that it is finally fixed. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|