LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   unmerging linux-headers and broken system (https://www.linuxquestions.org/questions/gentoo-87/unmerging-linux-headers-and-broken-system-4175494646/)

fuorviato 02-12-2014 08:11 AM

unmerging linux-headers and broken system
 
First of all, I do admit I did a stupid thing :). Being a debian user, thought removing kernel-headers would have beeen harmless so I unmerged it.
As the result, I cannot emerge it again, not to speak about any other program I'd like to install. Basically, nothing emerges failing with the following:
I'd appreciate any help and promise I'll be a good user next time :]

Quote:

 * Package: sys-kernel/linux-headers-3.10
 * Repository: gentoo
 * Maintainer: toolchain@gentoo.org
 * USE: abi_x86_32 elibc_glibc kernel_linux userland_GNU x86
 * FEATURES: preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking gentoo-headers-base-3.10.tar.xz to /var/tmp/portage/sys-kernel/linux-headers-3.10/work
>>> Unpacking gentoo-headers-3.10-1.tar.xz to /var/tmp/portage/sys-kernel/linux-headers-3.10/work
>>> Source unpacked in /var/tmp/portage/sys-kernel/linux-headers-3.10/work
>>> Preparing source in /var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10 ...
/var/tmp/portage/sys-kernel/linux-headers-3.10/temp/environment: line 1226: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
/var/tmp/portage/sys-kernel/linux-headers-3.10/temp/environment: line 1226: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8)
* Applying various patches (bugfixes/updates) ...
* 00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch ...
 [ ok ]
* 00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch ...
 [ ok ]
* 00_all_0003-Omnikey-Cardman-4000-pull-in-ioctl.h-in-user-header.patch ...
 [ ok ]
* 00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch ...
 [ ok ]
* 00_all_0005-netfilter-pull-in-limits.h.patch ...
 [ ok ]
* 00_all_0006-convert-PAGE_SIZE-usage.patch ...
 [ ok ]
* 00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch ...
 [ ok ]
* 00_all_0008-unifdef-drop-unused-errno.h-include.patch ...
 [ ok ]
* 00_all_0009-Btrfs-use-__u64-in-exported-user-headers.patch ...
 [ ok ]
* 00_all_0010-x86-make-stat-statfs-64-bit-for-x86_64-kernels.patch ...
 [ ok ]
* Done with patching
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10 ...
>>> Source compiled.
>>> Test phase [not enabled]: sys-kernel/linux-headers-3.10

>>> Install linux-headers-3.10 into /var/tmp/portage/sys-kernel/linux-headers-3.10/image/ category sys-kernel
make -j3 headers_install INSTALL_HDR_PATH=/var/tmp/portage/sys-kernel/linux-headers-3.10/image///usr/include/.. ARCH=x86 CROSS_COMPILE=i686-pc-linux-gnu-
CHK include/generated/uapi/linux/version.h
UPD include/generated/uapi/linux/version.h
WRAP arch/x86/include/generated/asm/clkdev.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
HOSTCC arch/x86/tools/relocs_32.o
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_32.h
HOSTCC arch/x86/tools/relocs_64.o
In file included from arch/x86/tools/relocs.h:10:0,
from arch/x86/tools/relocs_64.c:1:
/usr/include/errno.h:1:31: fatal error: asm-generic/errno.h: No such file or directory
compilation terminated.
In file included from arch/x86/tools/relocs.h:10:0,
from arch/x86/tools/relocs_32.c:1:
/usr/include/errno.h:1:31: fatal error: asm-generic/errno.h: No such file or directory
compilation terminated.
make[1]: *** [arch/x86/tools/relocs_64.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [arch/x86/tools/relocs_32.o] Error 1
make: *** [archscripts] Error 2
make: *** Waiting for unfinished jobs....
* ERROR: sys-kernel/linux-headers-3.10::gentoo failed (install phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-kernel/linux-headers-3.10::gentoo'`,
* the complete build log and the output of `emerge -pqv '=sys-kernel/linux-headers-3.10::gentoo'`.
* The complete build log is located at '/var/tmp/portage/sys-kernel/linux-headers-3.10/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-kernel/linux-headers-3.10/temp/environment'.
* Working directory: '/var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10'
* S: '/var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10'

i92guboj 02-13-2014 02:23 AM

Right,I guess you missed the big red warning when unmerging that ;)

In any case, don't worry. It's easy to get back from this one using a prebuilt package.

As I am typing from an x86 box I just packaged it with quickpkg, and uploaded it to my server. All you need to do is to download this into your root fs /.

Then tar xf it. After that, you should re-emerge linux-headers (first thing), to replace my hand-made package with a legitimate Gentoo one.

http://www.jesgue.es/files/gentoo-x8...aders-3.9.tbz2

By the way, you might be interested in adding this to your make.conf, so portage automatically builds packages at least for system packages. Those packages come in handy when you break something vital.

Code:

FEATURES="buildsyspkg"

syg00 02-13-2014 02:57 AM

So this would be right up there with unmerging python ?. Did that once, several years ago ....

i92guboj 02-13-2014 03:24 AM

Unmerging python is slightly worse, both practically and philosophically speaking. However, the worst thing is unmerging glibc and/or tar, that will require a livecd to recover.

fuorviato 02-13-2014 03:35 AM

Quote:

Originally Posted by i92guboj (Post 5116717)
Right,I guess you missed the big red warning when unmerging that ;)

In any case, don't worry. It's easy to get back from this one using a prebuilt package.

As I am typing from an x86 box I just packaged it with quickpkg, and uploaded it to my server. All you need to do is to download this into your root fs /.

Then tar xf it. After that, you should re-emerge linux-headers (first thing), to replace my hand-made package with a legitimate Gentoo one.

http://www.jesgue.es/files/gentoo-x8...aders-3.9.tbz2

By the way, you might be interested in adding this to your make.conf, so portage automatically builds packages at least for system packages. Those packages come in handy when you break something vital.

Code:

FEATURES="buildsyspkg"

Thanks for that :) I untared the usr folder to the root . However, I have no idea why but system seems to be really messed up. Look at the examples:

Quote:

emerge -av linux-headers-3.10
Fatal Python error: Failed to open /dev/urandom
Aborted
Gentoo-20121221 / # eselect python list
/usr/share/eselect/libs/core.bash: line 83: /dev/null: No such file or directory
!!! Error: Couldn't source /usr/share/eselect/libs/default.eselect
Call stack:
* do_action (core.bash:84)
* main (eselect:203)
exiting


/usr/share/eselect/libs/core.bash: line 83: /dev/null: No such file or directory
!!! Error: Couldn't source /usr/share/eselect/libs/default.eselect
Call stack:
* do_action (core.bash:84)
* es_do_list_modules (eselect:126)
* es_do_help (eselect:102)
* main (eselect:206)
exiting
Yesterday, I copied over the usr directory from the official stage3 to my system being convinced it will recover the missing headers. It seems, however that I've made it more messy than before.
Is there any way-out of this except for reinstalling the whole system?

i92guboj 02-13-2014 03:44 AM

Ugh, if you did that, then I am afraid that re-installing is the fastest way out of this problem.

The fact that there's not even a valid /dev/null means that your system is horribly broken. Note that by replacing your whole /usr with the one in the stage you probably downgraded glibc. That alone is enough to turn your system into a dead boulder.

fuorviato 02-13-2014 03:56 AM

Eh, I should have waited but to tell the truth I was quite sure gentoo user-experts would have just ignored me having realized my stupidity.
I've been switching to gentoo for a while being still a noob for some matters. All the same, I want to learn but hardly, there's a way to achieve unless making mistakes :)

Thanks for your support.

i92guboj 02-13-2014 04:11 AM

Quote:

Originally Posted by fuorviato (Post 5116749)
Eh, I should have waited but to tell the truth I was quite sure gentoo user-experts would have just ignored me having realized my stupidity.

Hey! we've all been there at some point, so, please, ask as much as you need, either here, at the Gentoo fora, the mailing lists, irc or wherever you feel more comfortable. Even "experts" commit mistakes from time to time ;)

Quote:

I've been switching to gentoo for a while being still a noob for some matters. All the same, I want to learn but hardly, there's a way to achieve unless making mistakes :)
That's the spirit. But next time, if you are in doubt just ask. Sometimes there's an easy way back, that is, until you give the definitive step that will make things horribly worse :)

Quote:

Thanks for your support.
You're very welcome.

Emerson 02-13-2014 04:40 AM

I really wonder what broke your system, linux-headers is a system package alright and you get a big fat warning when removing it. In actuality it is used to build glibc only and should not cause havoc, at least not instantly.
Anyhow, methinks for stable Gentoo binary packages can be downloaded from attic if need arises?

fuorviato 02-13-2014 05:22 AM

Quote:

Originally Posted by Emerson (Post 5116771)
I really wonder what broke your system, linux-headers is a system package alright and you get a big fat warning when removing it. In actuality it is used to build glibc only and should not cause havoc, at least not instantly.

And, infact - it works! I just rebooted, remounted all the partitions, mounted proc and dev and it was it.
I am still having the problem with linux-headers-3.10 but this time, the error is different and the compilation process seems to have gone few steps further. Am I right?

Quote:

[32;01m * Package: sys-kernel/linux-headers-3.10
 * Repository: gentoo
 * Maintainer: toolchain@gentoo.org
 * USE: abi_x86_32 elibc_glibc kernel_linux userland_GNU x86
 * FEATURES: preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking gentoo-headers-base-3.10.tar.xz to /var/tmp/portage/sys-kernel/linux-headers-3.10/work
>>> Unpacking gentoo-headers-3.10-1.tar.xz to /var/tmp/portage/sys-kernel/linux-headers-3.10/work
>>> Source unpacked in /var/tmp/portage/sys-kernel/linux-headers-3.10/work
>>> Preparing source in /var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10 ...
/var/tmp/portage/sys-kernel/linux-headers-3.10/temp/environment: line 1226: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
/var/tmp/portage/sys-kernel/linux-headers-3.10/temp/environment: line 1226: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8)
* Applying various patches (bugfixes/updates) ...
* 00_all_0001-kbuild-auto-convert-size-types-in-userspace-headers.patch ...
 [ ok ]
* 00_all_0002-linux-stat.h-remove-__GLIBC__-checks.patch ...
 [ ok ]
* 00_all_0003-Omnikey-Cardman-4000-pull-in-ioctl.h-in-user-header.patch ...
 [ ok ]
* 00_all_0004-linux-pull-in-other-needed-headers-for-userspace.patch ...
 [ ok ]
* 00_all_0005-netfilter-pull-in-limits.h.patch ...
 [ ok ]
* 00_all_0006-convert-PAGE_SIZE-usage.patch ...
 [ ok ]
* 00_all_0007-asm-generic-fcntl.h-namespace-kernel-file-structs.patch ...
 [ ok ]
* 00_all_0008-unifdef-drop-unused-errno.h-include.patch ...
 [ ok ]
* 00_all_0009-Btrfs-use-__u64-in-exported-user-headers.patch ...
 [ ok ]
* 00_all_0010-x86-make-stat-statfs-64-bit-for-x86_64-kernels.patch ...
 [ ok ]
* Done with patching
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10 ...
>>> Source compiled.
>>> Test phase [not enabled]: sys-kernel/linux-headers-3.10

>>> Install linux-headers-3.10 into /var/tmp/portage/sys-kernel/linux-headers-3.10/image/ category sys-kernel
make -j3 headers_install INSTALL_HDR_PATH=/var/tmp/portage/sys-kernel/linux-headers-3.10/image///usr/include/.. ARCH=x86 CROSS_COMPILE=i686-pc-linux-gnu-
CHK include/generated/uapi/linux/version.h
UPD include/generated/uapi/linux/version.h
WRAP arch/x86/include/generated/asm/clkdev.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
HOSTCC arch/x86/tools/relocs_32.o
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_32.h
HOSTCC arch/x86/tools/relocs_64.o
In file included from arch/x86/tools/relocs_32.c:17:0:
arch/x86/tools/relocs.c: In function 'read_ehdr':In file included from arch/x86/tools/relocs_64.c:17:0:
arch/x86/tools/relocs.c: In function 'read_ehdr':
arch/x86/tools/relocs.c:334:13: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c:334:13: note: each undeclared identifier is reported only once for each function it appears in

arch/x86/tools/relocs.c:334:13: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c:334:13: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/tools/relocs.c: In function 'read_shdrs':
arch/x86/tools/relocs.c:398:27: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c: In function 'read_strtabs':
arch/x86/tools/relocs.c:436:35: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c: In function 'read_shdrs':
arch/x86/tools/relocs.c:398:27: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c: In function 'read_strtabs':arch/x86/tools/relocs.c: In function 'read_symtabs':
arch/x86/tools/relocs.c:436:35: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c: In function 'read_symtabs':
arch/x86/tools/relocs.c:461:35: error: 'errno' undeclared (first use in this function)

arch/x86/tools/relocs.c: In function 'read_relocs':
arch/x86/tools/relocs.c:494:35: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c:461:35: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c: In function 'read_relocs':
arch/x86/tools/relocs.c:494:35: error: 'errno' undeclared (first use in this function)
make[1]: *** [arch/x86/tools/relocs_32.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [arch/x86/tools/relocs_64.o] Error 1
make: *** [archscripts] Error 2
make: *** Waiting for unfinished jobs....
* ERROR: sys-kernel/linux-headers-3.10::gentoo failed (install phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-kernel/linux-headers-3.10::gentoo'`,
* the complete build log and the output of `emerge -pqv '=sys-kernel/linux-headers-3.10::gentoo'`.
* The complete build log is located at '/var/tmp/portage/sys-kernel/linux-headers-3.10/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-kernel/linux-headers-3.10/temp/environment'.
* Working directory: '/var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10'
* S: '/var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10'
.

i92guboj 02-13-2014 07:06 AM

Your system is broken.

The first errors (the ones about your locales) are probably easily fixable by re-editing /etc/locale.gen (if needed, just to make sure it's ok), and then running "locale-gen" as root.

You must make sure that you generate the locales that portage is complaining about (en_US.UTF-8).

But the rest of errors about undefined symbols and that stuff is probably due to your toolchain being completely broken, which, as I said, is to be expected when your system binaries have been built against a toolchain that you abruptly overwrote with another one.

If you truly want to recover from this, as a learning exercise, you can look into the [url=http://tinderbox.dev.gentoo.org/]gentoo tinderbox[/u], which has prebuilt binaries for the most critical packages. You might be able to do something using those, you'll need to restore portage, glibc, gcc, binutils, coreutils, sandbox, libtool, python and probably some others.

The x86 branch is here:

http://tinderbox.dev.gentoo.org/default-linux/x86/

You can put the packages in /usr/portage/packages and use emerge -K to force installation via binary packages. Or, if that doesn't work, just use tar as before (your system can't possibly go any worse, so...).

If you get to the point where you can use "eselect" to pick the new binary toolchain, and then "emerge -e system" then that's a good start.

fuorviato 02-13-2014 08:56 AM

Quote:

You can put the packages in /usr/portage/packages and use emerge -K to force installation via binary packages. Or, if that doesn't work, just use tar as before (your system can't possibly go any worse, so...).

If you get to the point where you can use "eselect" to pick the new binary toolchain, and then "emerge -e system" then that's a good start.
OK. I will give it a try in next days when I get more free time. As you said - it can't go any worse :).
Stay tuned for more ;)

fuorviato 02-17-2014 05:34 AM

Quote:

If you truly want to recover from this, as a learning exercise, you can look into the [url=http://tinderbox.dev.gentoo.org/]gentoo tinderbox[/u], which has prebuilt binaries for the most critical packages. You might be able to do something using those, you'll need to restore portage, glibc, gcc, binutils, coreutils, sandbox, libtool, python and probably some others.

The x86 branch is here:

http://tinderbox.dev.gentoo.org/default-linux/x86/

You can put the packages in /usr/portage/packages and use emerge -K to force installation via binary packages. Or, if that doesn't work, just use tar as before (your system can't possibly go any worse, so...).
I downloaded portage binary file from tinderbox, created /usr/portage/rescue dir to have all the system binaries stored.
When I emerge
Quote:

Gentoo-20121221 rescue # emerge -K portage-2.2.7.tbz2
I'm getting

Quote:

*** emerging by path is broken and may not always work!!!
*** You need to adjust PKGDIR to emerge this package.
I adjusted, the PKGDIR variable to
Quote:

PKGDIR="${PORTDIR}/packages/rescue"
so it should be good to go.
What am I missing?

i92guboj 02-17-2014 05:40 AM

You just

Code:

emerge -K "=portage-2.2.7"

fuorviato 02-17-2014 05:59 AM

Quote:

emerge -K "=portage-2.2.7"

* IMPORTANT: 5 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "=portage-2.2.7".

I've also tried untaring. 2 dirs /usr and /etc extract from the archive. Should I copy them over?
I'm afraid, I'm stopping understanding what I am doing.

i92guboj 02-18-2014 02:19 AM

Well, let's stop and think for a moment.

That message is misleading and probably means that portage can't find the binary package. "-K" forces the usage of binary packages, so, if no binary package can be found, it fails. Admittedly the error message is a bit weird.

So, please, do this:

Code:

$ emerge -pv portage
Note down the exact version of the package that portage is trying to emerge, then go to tinderbox and download the same exact version. After that, put it in /usr/portage/packages/sys-apps/ (sys-apps is the portage category where the package "portage" lives). If you have adjusted PKGDIR in your make.conf, then adjust this path accordingly.

After this, the emerge -K command should work.

You could untar them, but I only advice that if portage is broken beyong repair. If emerge is working we should use it instead of randomly throwing files into the fs.

Also, if you need clarification in some step, please, just ask and I'll try to explain more clearly.

fuorviato 02-18-2014 08:51 AM

Quote:

emerge -pv portage
shows the requested version is 2.2.7 and that corresponds to the one I'm trying to install.

Quote:

emerge -pv portage

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] sys-apps/portage-2.2.7 USE="(ipc) -build -doc -epydoc (-pypy2_0) -python2 -python3 (-selinux) -xattr" LINGUAS="-ru" PYTHON_TARGETS="python2_7 python3_3 (-pypy2_0) -python2_6 -python3_2 (-python3_4)" 886 kB

Total: 1 package (1 reinstall), Size of downloads: 886 kB

Anyway. I copied the tbz archive to /usr/portage/packages/sys-apps and now it is there

Quote:

ls sys-apps/po
policycoreutils/ portage/ portage-2.2.7.tbz2 powerpc-utils/
I've also adjusted the /etc/make/conf PKGBUILD so portage finds the packages

Quote:

chroot) Gentoo-20121221 portage # grep -i PKG /etc/make.conf
PKGDIR="${PORTDIR}/packages/"
FEATURES="buildsyspkg"
But. If I emerge -K, it fails again:

Quote:

emerge -K "=portage-2.2.7"

* IMPORTANT: 5 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "=portage-2.2.7".
Just a side note: I notice, there's a subdir under /usr/portage/packages, named "portage" with some ebuilds in it. Just a shoot: Maybe putting the tbz file there will help emerge find it?

i92guboj 02-18-2014 10:23 AM

Setting PKGDIR is not needed if you are using the default /usr/portage/packages.

Make sure you don't have a duplicated make.conf, both /etc/portage/make.conf and /etc/make.conf are valid. So, double check that.

Besides that, I'd start afresh, and do this:

Code:

$ cd /usr/portage/packages
$ rm -rf *
$ mkdir sys-apps
$ cd sys-apps
$ wget http://tinderbox.dev.gentoo.org/default-linux/x86/sys-apps/portage-2.2.7.tbz2
$ emerge -vaK portage

If that doesn't tell you that it wants to install from binary repo (or fails at all) then something is screwed.

If your package tells you that it's masked because of CHOST, edit /usr/portage/packages/Packages (it's just a plain text file), look for the package "portage", and then for the CHOST line, then change from i486 to i686, and repeat the emerge command.

For this concrete package, this should be fine.

fuorviato 02-18-2014 12:29 PM

I don't know if it's important, but I've jus realized my portage tree lays directly under /usr/portage, so I adjusted the make.conf accordingly.

Quote:

PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}"
Is that correct?

Quote:

Make sure you don't have a duplicated make.conf, both /etc/portage/make.conf and /etc/make.conf are valid. So, double check that.
I got rid of /etc/portage/make.conf just at start, so It's not duplicated.
I also noted if it's the case, emerge will notify the user when issuing any command.

Summing up: You want me to remove the whole portage tree under /usr/portage, make a new category-dir and emerge the binary file. Right?

i92guboj 02-18-2014 01:14 PM

No!

I want you to remove the contents of /usr/portage/packages/

i92guboj 02-18-2014 01:16 PM

I posted that as fast as I could to avoid a little disaster (nothing compared to the rest though). There's no need to wipe portage. And there's no need for you to put that in make.conf either. As I said, if you are using the defaults, you don't need to put them explicitly in make.conf.

/usr/portage is the default for $PORTDIR, so no need to add it.
Same goes for /usr/portage/packages for $PKGDIR and /usr/portage/distfiles for $DISTDIR.

Please, remove the contents of /usr/portage/packages, then proceed as I told you in the post above, and see if that helps at all :)

fuorviato 02-18-2014 01:48 PM

Sorry. I was close to the disaster once again.
Now, I've just adjusted PKGDIR to the default value but it seems there is no directory named packages under /usr/portage.

Quote:

chroot) Gentoo-20121221 ~ # cd /usr/portage/packages
bash: cd: /usr/portage/packages: No such file or directory
Under /usr/portage lays my whole "tree".
I hope I'm not missing anything obvious.

i92guboj 02-18-2014 02:32 PM

No, just create it if it doesn't exist. I have no idea if it comes by default in the standard portage tree.

Maybe it's created the first time you use quickpkg, or when you emerge a package with FEATURES="buildpkg" (or "buildsyspkg").

But you can just create it manually. Just to be sure you can do this and see where it's pointing by default.

Code:

emerge --info|grep PKGDIR

fuorviato 02-18-2014 02:45 PM

OK. Just followed your instructions.
At first emerge would complain about the CHOST, but after changing it in Packages file it went fine (what is that file about BTW?).

Now portage shouts about python.

Quote:

emerge -vaK portage

* IMPORTANT: 5 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.


These are the packages that would be merged, in order:

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "dev-lang/python:3.2".
(dependency required by "sys-apps/portage-2.2.7" [binary])
(dependency required by "portage" [argument])
So I guess, I'll have to download it as binary and emerge in the same way prior to repairing portage.

i92guboj 02-18-2014 02:51 PM

You can try that. If something fails I can provide native i686 binaries. As long as they don't conflict with my installation.

As for your question, well, I admittedly no speciallist in how Gentoo handles bins, I rarelly needed that, but it seems to register some aspects on how the binaries residing there were compiled. Note that, unlike ebuilds, binary build do have an specific arch, chost, cflags, uses, etc.

fuorviato 02-18-2014 03:14 PM

Following your strategy I've made it to emerge portage :)

At first python needed sqlite so I created the right directory under /usr/portage/packages, download sqlite it and emerged. After emerging sqlite, I did the same with python and eventually, portage. All of this required manual changing chost entry in the updating Packages file.

So far so good. Seems to be good strategy to follow with the rest, right?
Hopefully. There won't be many deps to download and install.

i92guboj 02-18-2014 03:20 PM

Some packages might pose a probles, for example glibc and gcc. If you need to reinstall those let me know. don't install those from tinderbox.

fuorviato 02-18-2014 03:29 PM

in the previous post, you told me to recover:
Quote:

portage, glibc, gcc, binutils, coreutils, sandbox, libtool, python and probably some others.
Portage and python are already ahead. I can start with binutils, coreutils,sanbox,libtool and repair glibc and gcc at the end. What do you think?

i92guboj 02-18-2014 04:02 PM

Yes, but that was before knowing that the packages in tinderbox differ from your chost.

You should use bin packages only to restore your system to a point where portage can do its job.

So, if you can already emerge packages there's no need to continue that path. Just to test, can portage re-emerge itself now?

fuorviato 02-18-2014 04:12 PM

Yes, it can :). So, is the system in working-stage now?

i92guboj 02-18-2014 04:21 PM

That's a good start, however, since the breakage was somewhat important, I'd do this:

Code:

$ emerge -eva @system
Check the output and if there's nothing wrong go ahead. That should recompile the whole system set (it will take a while). The system set is the basic system, which is more-or-less what comes in the stage (but not exactly).

After that ends, if there's no problem, see this

Code:

gcc-config -l

See what compiler is set as system compiler (marked with an asterisk). If there's a newer one you might want to enable it. After that, if nothing fails (that'd surprise me greatly), do this to update your whole world, and ensure that everything is consistent

Code:

emerge -auDvN @world

fuorviato 02-18-2014 04:28 PM

You were right - Too soon for claiming victory ;).

emerge -eva @system still fails.



Quote:

>>> Emerging (2 of 321) app-arch/bzip2-1.0.6-r3
* bzip2-1.0.6.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking bzip2-1.0.6.tar.gz to /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work
>>> Source unpacked in /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work
>>> Preparing source in /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6 ...
* Applying bzip2-1.0.4-makefile-CFLAGS.patch ... [ ok ]
* Applying bzip2-1.0.6-saneso.patch ... [ ok ]
* Applying bzip2-1.0.4-man-links.patch ... [ ok ]
* Applying bzip2-1.0.6-progress.patch ... [ ok ]
* Applying bzip2-1.0.3-no-test.patch ... [ ok ]
* Applying bzip2-1.0.4-POSIX-shell.patch ... [ ok ]
* Applying bzip2-1.0.6-mingw.patch ... [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6 ...
make -j3 CC=i686-pc-linux-gnu-gcc AR=i686-pc-linux-gnu-ar RANLIB=i686-pc-linux-gnu-ranlib -f Makefile-libbz2_so all
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64 -c blocksort.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64 -c huffman.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64 -c crctable.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64 -c randtable.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64 -c compress.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64 -c decompress.c
blocksort.c: In function 'mainSort':
blocksort.c:347:6: warning: inlining failed in call to 'mainGtU.part.0': function not considered for inlining [-Winline]
blocksort.c:751:6: warning: called from here [-Winline]
blocksort.c:347:6: warning: inlining failed in call to 'mainGtU.part.0': call is unlikely and code size would grow [-Winline]
blocksort.c:751:6: warning: called from here [-Winline]
blocksort.c:347:6: warning: inlining failed in call to 'mainGtU.part.0': call is unlikely and code size would grow [-Winline]
blocksort.c:751:6: warning: called from here [-Winline]
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64 -c bzlib.c
i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o
i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64 -o bzip2-shared bzip2.c libbz2.so.1.0.6
bzip2.c: In function 'testStream':
bzip2.c:612:37: warning: variable 'nread' set but not used [-Wunused-but-set-variable]
bzip2.c: In function 'compress':
bzip2.c:1225:44: error: 'errno' undeclared (first use in this function)
bzip2.c:1225:44: note: each undeclared identifier is reported only once for each function it appears in
bzip2.c: In function 'uncompress':
bzip2.c:1414:44: error: 'errno' undeclared (first use in this function)
bzip2.c: In function 'testf':
bzip2.c:1594:44: error: 'errno' undeclared (first use in this function)
bzip2.c: In function 'applySavedFileAttrToOutputFile':
bzip2.c:1128:4: warning: ignoring return value of 'fchown', declared with attribute warn_unused_result [-Wunused-result]
make: *** [all] Error 1
emake failed
* ERROR: app-arch/bzip2-1.0.6-r3::gentoo failed (compile phase):
* (no error message)
*
* Call stack:
* ebuild.sh, line 93: Called src_compile
* environment, line 2114: Called bemake '-f' 'Makefile-libbz2_so' 'all'
* environment, line 374: Called die
* The specific snippet of code:
* emake CC="$(tc-getCC)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" "$@" || die
*
* If you need support, post the output of `emerge --info '=app-arch/bzip2-1.0.6-r3::gentoo'`,
* the complete build log and the output of `emerge -pqv '=app-arch/bzip2-1.0.6-r3::gentoo'`.
* The complete build log is located at '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/environment'.
* Working directory: '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6'
* S: '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6'

>>> Failed to emerge app-arch/bzip2-1.0.6-r3, Log file:

>>> '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/build.log'

* Messages for package app-arch/bzip2-1.0.6-r3:

* ERROR: app-arch/bzip2-1.0.6-r3::gentoo failed (compile phase):
* (no error message)
*
* Call stack:
* ebuild.sh, line 93: Called src_compile
* environment, line 2114: Called bemake '-f' 'Makefile-libbz2_so' 'all'
* environment, line 374: Called die
* The specific snippet of code:
* emake CC="$(tc-getCC)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" "$@" || die
*
* If you need support, post the output of `emerge --info '=app-arch/bzip2-1.0.6-r3::gentoo'`,
* the complete build log and the output of `emerge -pqv '=app-arch/bzip2-1.0.6-r3::gentoo'`.
* The complete build log is located at '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/environment'.
* Working directory: '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6'
* S: '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6'

* GNU info directory index is up-to-date.

i92guboj 02-18-2014 04:52 PM

I'll upload a bin package for binutils. It's one of these packages that won't work from another CHOST, so I am preparing one for i686. As soon as it's up I'll give you the link, then you can install like the others above.

That error might have something to do with binutils, we can't be sure though. But trying is for free.

By the way, once you install that, you can resume the last emerge operation by using "emerge --resume", as long as you didn't launch another emerge in the while.

You might also find useful to know that "emerge --resume --skipfirst" will skip the last package and continue from the next upwards.

ps. While I was writing it finished, so here you are:

http://www.jesgue.es/files/gentoo-x8...ls-2.23.2.tbz2

fuorviato 02-19-2014 03:47 AM

I emerged binutils without problems (thank you)

It seems however, the compilation fails with the same error as before.
Weird, 2 packages just emerged and it is bzip2 to crash.

Code:

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests
>>> Running pre-merge checks for sys-libs/pam-1.1.6-r2
openpty failed: 'out of pty devices'

>>> Emerging (1 of 321) virtual/libintl-0
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/virtual/libintl-0/work
>>> Compiling source in /var/tmp/portage/virtual/libintl-0/work ...
>>> Source compiled.
>>> Test phase [not enabled]: virtual/libintl-0

>>> Install libintl-0 into /var/tmp/portage/virtual/libintl-0/image/ category virtual
>>> Completed installing libintl-0 into /var/tmp/portage/virtual/libintl-0/image/


>>> Installing (1 of 321) virtual/libintl-0
 * checking 0 files for package collisions
>>> Merging virtual/libintl-0 to /
>>> Safely unmerging already-installed instance...
No package files given... Grabbing a set.
>>> Regenerating /etc/ld.so.cache...
>>> Original instance of package unmerged safely.
>>> virtual/libintl-0 merged.

>>> Emerging (2 of 321) app-arch/bzip2-1.0.6-r3
 * bzip2-1.0.6.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                [ ok ]
>>> Unpacking source...
>>> Unpacking bzip2-1.0.6.tar.gz to /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work
>>> Source unpacked in /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work
>>> Preparing source in /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6 ...
 * Applying bzip2-1.0.4-makefile-CFLAGS.patch ...                                                          [ ok ]
 * Applying bzip2-1.0.6-saneso.patch ...                                                                  [ ok ]
 * Applying bzip2-1.0.4-man-links.patch ...                                                                [ ok ]
 * Applying bzip2-1.0.6-progress.patch ...                                                                [ ok ]
 * Applying bzip2-1.0.3-no-test.patch ...                                                                  [ ok ]
 * Applying bzip2-1.0.4-POSIX-shell.patch ...                                                              [ ok ]
 * Applying bzip2-1.0.6-mingw.patch ...                                                                    [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6 ...
make -j3 CC=i686-pc-linux-gnu-gcc AR=i686-pc-linux-gnu-ar RANLIB=i686-pc-linux-gnu-ranlib -f Makefile-libbz2_so all
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c blocksort.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c huffman.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c crctable.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c randtable.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c compress.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c decompress.c
blocksort.c: In function 'mainSort':
blocksort.c:347:6: warning: inlining failed in call to 'mainGtU.part.0': function not considered for inlining [-Winline]
blocksort.c:751:6: warning: called from here [-Winline]
blocksort.c:347:6: warning: inlining failed in call to 'mainGtU.part.0': call is unlikely and code size would grow [-Winline]
blocksort.c:751:6: warning: called from here [-Winline]
blocksort.c:347:6: warning: inlining failed in call to 'mainGtU.part.0': call is unlikely and code size would grow [-Winline]
blocksort.c:751:6: warning: called from here [-Winline]
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c bzlib.c
i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o
i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -o bzip2-shared bzip2.c libbz2.so.1.0.6
bzip2.c: In function 'testStream':
bzip2.c:612:37: warning: variable 'nread' set but not used [-Wunused-but-set-variable]
bzip2.c: In function 'compress':
bzip2.c:1225:44: error: 'errno' undeclared (first use in this function)
bzip2.c:1225:44: note: each undeclared identifier is reported only once for each function it appears in
bzip2.c: In function 'uncompress':
bzip2.c:1414:44: error: 'errno' undeclared (first use in this function)
bzip2.c: In function 'testf':
bzip2.c:1594:44: error: 'errno' undeclared (first use in this function)
bzip2.c: In function 'applySavedFileAttrToOutputFile':
bzip2.c:1128:4: warning: ignoring return value of 'fchown', declared with attribute warn_unused_result [-Wunused-result]
make: *** [all] Error 1
emake failed
 * ERROR: app-arch/bzip2-1.0.6-r3::gentoo failed (compile phase):
 *  (no error message)
 *
 * Call stack:
 *    ebuild.sh, line  93:  Called src_compile
 *  environment, line 2114:  Called bemake '-f' 'Makefile-libbz2_so' 'all'
 *  environment, line  374:  Called die
 * The specific snippet of code:
 *      emake CC="$(tc-getCC)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" "$@" || die
 *
 * If you need support, post the output of `emerge --info '=app-arch/bzip2-1.0.6-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-arch/bzip2-1.0.6-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6'
 * S: '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6'

>>> Failed to emerge app-arch/bzip2-1.0.6-r3, Log file:

>>>  '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/build.log'

 * Messages for package app-arch/bzip2-1.0.6-r3:

 * ERROR: app-arch/bzip2-1.0.6-r3::gentoo failed (compile phase):
 *  (no error message)
 *
 * Call stack:
 *    ebuild.sh, line  93:  Called src_compile
 *  environment, line 2114:  Called bemake '-f' 'Makefile-libbz2_so' 'all'
 *  environment, line  374:  Called die
 * The specific snippet of code:
 *      emake CC="$(tc-getCC)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" "$@" || die
 *
 * If you need support, post the output of `emerge --info '=app-arch/bzip2-1.0.6-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-arch/bzip2-1.0.6-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6'
 * S: '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6'

 * GNU info directory index is up-to-date.

 * IMPORTANT: 5 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


i92guboj 02-19-2014 03:50 AM

Can you paste the whole contents of /var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/build.log?

fuorviato 02-19-2014 03:57 AM

Sure. Sorry about not having it done before.

Code:

[32;01m * Package:    app-arch/bzip2-1.0.6-r3
 * Repository: gentoo
 * Maintainer: base-system@gentoo.org
 * USE:        abi_x86_32 elibc_glibc kernel_linux userland_GNU x86
 * FEATURES:  preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking bzip2-1.0.6.tar.gz to /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work
>>> Source unpacked in /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work
>>> Preparing source in /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6 ...
 * Applying bzip2-1.0.4-makefile-CFLAGS.patch ...
 [ ok ]
 * Applying bzip2-1.0.6-saneso.patch ...
 [ ok ]
 * Applying bzip2-1.0.4-man-links.patch ...
 [ ok ]
 * Applying bzip2-1.0.6-progress.patch ...
 [ ok ]
 * Applying bzip2-1.0.3-no-test.patch ...
 [ ok ]
 * Applying bzip2-1.0.4-POSIX-shell.patch ...
 [ ok ]
 * Applying bzip2-1.0.6-mingw.patch ...
 [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6 ...
make -j3 CC=i686-pc-linux-gnu-gcc AR=i686-pc-linux-gnu-ar RANLIB=i686-pc-linux-gnu-ranlib -f Makefile-libbz2_so all
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c blocksort.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c huffman.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c crctable.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c randtable.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c compress.c
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c decompress.c
blocksort.c: In function 'mainSort':
blocksort.c:347:6: warning: inlining failed in call to 'mainGtU.part.0': function not considered for inlining [-Winline]
blocksort.c:751:6: warning: called from here [-Winline]
blocksort.c:347:6: warning: inlining failed in call to 'mainGtU.part.0': call is unlikely and code size would grow [-Winline]
blocksort.c:751:6: warning: called from here [-Winline]
blocksort.c:347:6: warning: inlining failed in call to 'mainGtU.part.0': call is unlikely and code size would grow [-Winline]
blocksort.c:751:6: warning: called from here [-Winline]
i686-pc-linux-gnu-gcc -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -c bzlib.c
i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o
i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -O2 -march=native -pipe -fpic -fPIC -Wall -Winline -D_FILE_OFFSET_BITS=64  -o bzip2-shared bzip2.c libbz2.so.1.0.6
bzip2.c: In function 'testStream':
bzip2.c:612:37: warning: variable 'nread' set but not used [-Wunused-but-set-variable]
bzip2.c: In function 'compress':
bzip2.c:1225:44: error: 'errno' undeclared (first use in this function)
bzip2.c:1225:44: note: each undeclared identifier is reported only once for each function it appears in
bzip2.c: In function 'uncompress':
bzip2.c:1414:44: error: 'errno' undeclared (first use in this function)
bzip2.c: In function 'testf':
bzip2.c:1594:44: error: 'errno' undeclared (first use in this function)
bzip2.c: In function 'applySavedFileAttrToOutputFile':
bzip2.c:1128:4: warning: ignoring return value of 'fchown', declared with attribute warn_unused_result [-Wunused-result]
make: *** [all] Error 1
emake failed
 * ERROR: app-arch/bzip2-1.0.6-r3::gentoo failed (compile phase):
 *  (no error message)
 *
 * Call stack:
 *    ebuild.sh, line  93:  Called src_compile
 *  environment, line 2114:  Called bemake '-f' 'Makefile-libbz2_so' 'all'
 *  environment, line  374:  Called die
 * The specific snippet of code:
 *      emake CC="$(tc-getCC)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" "$@" || die
 *
 * If you need support, post the output of `emerge --info '=app-arch/bzip2-1.0.6-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-arch/bzip2-1.0.6-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6'
 * S: '/var/tmp/portage/app-arch/bzip2-1.0.6-r3/work/bzip2-1.0.6'


i92guboj 02-19-2014 03:59 AM

The output doesn't contain any extra info, but we had to try :)

Which gcc and glibc versions do you have installed? What does gcc-config -l say?

fuorviato 02-19-2014 04:09 AM

It shows the following:

Quote:

[1] i686-pc-linux-gnu-4.7.3 *
Are you suspecting gcc as a reason of the issue?

i92guboj 02-19-2014 04:42 AM

That's my same sys-devel/gcc version, so I uploaded a binary package.

If glibc is 2.17, then just pick those and install them. The sys-libs/glibc absolutely must match, so, if it's even slightly different, don't install my 2.17 package. Installing a different glibc from the stage is probably what started all of this, so be careful... Note that the "errno.h" file that appears mentioned in the bzip2 error is part of the standard glibc library, so it's very likely that the problem is due to mismatching components. If your glibc is some other version, you will need a binary package for that concrete version.

http://www.jesgue.es/files/gentoo-x8...-4.7.3-r1.tbz2
http://www.jesgue.es/files/gentoo-x8...libc-2.17.tbz2

After that, just to be sure, use "gcc-config -l" to check that that's the only compiler, and re-set it using "gcc-config 1". To be on the safe side do also this:

Code:

$ env-update
$ source /etc/profile

Then cross your fingers and try to emerge bzip2 again.

In case that doesn't work, just download this bzip2 binary, and install it. Then do the emerge -e world thing, and if bzip2 fails again just use --resume --skipfirst. Maybe you've just hit a rare bzip2 bug and the rest will compile ok.

ps. My packages are a bit big because I have debug symbols enabled. But don't worry, they won't slow down your system because the debug stuff is split from the binaries. Anyway, that will go away as soon as you are able to recompile them yourself.

fuorviato 02-19-2014 08:17 AM

I made it to install gcc. When to "libgc", it seems to be the same version. Right?

Quote:

emerge -pv glibc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild N ~] sys-kernel/linux-headers-3.13 0 kB
[ebuild R ] sys-libs/glibc-2.17:2.2 USE="-debug -gd (-hardened) (-multilib) -nscd -profile (-selinux) -suid -systemtap -vanilla" 10,807 kB

Total: 2 packages (1 new, 1 reinstall), Size of downloads: 10,807 kB

i92guboj 02-19-2014 08:55 AM

Right :)

fuorviato 02-19-2014 09:23 AM

Fails:

I'm not a programmer myself but it seems glibs complains abaou some main directories missing.
Maybe I should run
Quote:

emerge -Kva
from /root ?

Quote:

>>> Extracting info
[32;01m * [39;49;00mPackage: sys-libs/glibc-2.17
[32;01m * [39;49;00mRepository: gentoo
[32;01m * [39;49;00mUSE:
[32;01m * [39;49;00mFEATURES: preserve-libs sandbox userpriv usersandbox
>>> Extracting sys-libs/glibc-2.17
[32;01m*[39;49;00m checking 1693 files for package collisions
1000 files checked ...
>>> Merging sys-libs/glibc-2.17 to /
sed: can't read /home/tmp/portage/sys-libs/glibc-2.17/image//etc/host.conf: No such file or directory
[32;01m*[0m Defaulting /etc/host.conf:multi to on
/var/tmp/portage/sys-libs/glibc-2.17/temp/environment: line 2410: pushd: /home/tmp/portage/sys-libs/glibc-2.17/image//lib: No such file or directory
/var/tmp/portage/sys-libs/glibc-2.17/temp/environment: line 2418: ./ld-*.so: No such file or directory
[31;01m*[0m ERROR: sys-libs/glibc-2.17::gentoo failed (preinst phase):
[31;01m*[0m simple run test (/bin/date) failed
[31;01m*[0m
[31;01m*[0m Call stack:
[31;01m*[0m ebuild.sh, line 93: Called pkg_preinst
[31;01m*[0m environment, line 3111: Called eblit-run 'pkg_preinst'
[31;01m*[0m environment, line 982: Called eblit-glibc-pkg_preinst
[31;01m*[0m environment, line 796: Called glibc_sanity_check
[31;01m*[0m environment, line 2418: Called die
[31;01m*[0m The specific snippet of code:
[31;01m*[0m ./ld-*.so --library-path . ${x} > /dev/null || die "simple run test (${x}) failed";
[31;01m*[0m
[31;01m*[0m If you need support, post the output of `emerge --info '=sys-libs/glibc-2.17::gentoo'`,
[31;01m*[0m the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.17::gentoo'`.
[31;01m*[0m The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.17/temp/build.log'.
[31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.17/temp/environment'.
[31;01m*[0m Working directory: '/'
[31;01m*[0m S: '/var/tmp/portage/sys-libs/glibc-2.17/work/glibc-2.17'
!!! FAILED preinst: 1

i92guboj 02-19-2014 09:30 AM

Yes. Binary package usually don't include files under /etc for security reasons. I'll try to upload a new package soon. It'll take a bit because it's big and my upload speed is not so good.

fuorviato 02-19-2014 09:33 AM

Sure. Take your time :)

i92guboj 02-19-2014 09:38 AM

It was faster this time.

The file is up now, you can use the same link above, I overwrote the old one.

After merging this, take one minute to run etc-update, and review your /etc/locale.gen and run "locale-gen" if needed.

fuorviato 02-19-2014 09:57 AM

Thanks but here I'm loosing you again. What exactly happened? Glibc didn't merge due /etc files missing?
Shall I run the newest package from /root or under right category-dir?

i92guboj 02-19-2014 10:12 AM

It didn't merge because the glibc ebuild does something with some files that should be contained in the tarball. But in this case they were not there, because the packages created with the quickpkg tool omit some files. This is ok for most packages, but it seems it is not ok for glibc. So I repackaged it to include everYthing.

The package must be in /usr/portage/packages/sys-libs

fuorviato 02-19-2014 10:25 AM

Hmm. still fails with the same error as before
I used the link from your previous post just as you told me to.


Quote:

>>> Extracting info
[32;01m * [39;49;00mPackage: sys-libs/glibc-2.17
[32;01m * [39;49;00mRepository: gentoo
[32;01m * [39;49;00mUSE:
[32;01m * [39;49;00mFEATURES: preserve-libs sandbox userpriv usersandbox
>>> Extracting sys-libs/glibc-2.17
[32;01m*[39;49;00m checking 1693 files for package collisions
1000 files checked ...
>>> Merging sys-libs/glibc-2.17 to /
sed: can't read /home/tmp/portage/sys-libs/glibc-2.17/image//etc/host.conf: No such file or directory
[32;01m*[0m Defaulting /etc/host.conf:multi to on
/var/tmp/portage/sys-libs/glibc-2.17/temp/environment: line 2410: pushd: /home/tmp/portage/sys-libs/glibc-2.17/image//lib: No such file or directory
/var/tmp/portage/sys-libs/glibc-2.17/temp/environment: line 2418: ./ld-*.so: No such file or directory
[31;01m*[0m ERROR: sys-libs/glibc-2.17::gentoo failed (preinst phase):
[31;01m*[0m simple run test (/bin/date) failed
[31;01m*[0m
[31;01m*[0m Call stack:
[31;01m*[0m ebuild.sh, line 93: Called pkg_preinst
[31;01m*[0m environment, line 3111: Called eblit-run 'pkg_preinst'
[31;01m*[0m environment, line 982: Called eblit-glibc-pkg_preinst
[31;01m*[0m environment, line 796: Called glibc_sanity_check
[31;01m*[0m environment, line 2418: Called die
[31;01m*[0m The specific snippet of code:
[31;01m*[0m ./ld-*.so --library-path . ${x} > /dev/null || die "simple run test (${x}) failed";
[31;01m*[0m
[31;01m*[0m If you need support, post the output of `emerge --info '=sys-libs/glibc-2.17::gentoo'`,
[31;01m*[0m the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.17::gentoo'`.
[31;01m*[0m The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.17/temp/build.log'.
[31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.17/temp/environment'.
[31;01m*[0m Working directory: '/'
[31;01m*[0m S: '/var/tmp/portage/sys-libs/glibc-2.17/work/glibc-2.17'
!!! FAILED preinst: 1


i92guboj 02-19-2014 11:19 AM

Admittedly, now that I think about it, I never emerged a binary for glibc. I have only done it the hard way, by untaring in /. I guess that's the sanest option that you have for that package. Just

Code:

$ cd /; tar xf /usr/portage/packages/sys-libs/glibc-2.17.tbz2

fuorviato 02-19-2014 11:41 AM

You've just made my day - Bzip2 made it! I'm now emerging the rest. So far so good :) Keep your fingers crossed.


All times are GMT -5. The time now is 02:16 PM.