Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot install any kernel sources; very weird
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Tatsh
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2007
Posts: 96

PostPosted: Sun Dec 18, 2011 5:54 pm    Post subject: Cannot install any kernel sources; very weird Reply with quote

Basically,
Code:
# emerge xen-sources


and (what I hope to switch to)

Code:
# emerge hardened-sources


and there is not any useful information in the build log. They get to the point of installing, but it is impossible to do `make menuconfig`.

Code:
# make -j2 menuconfig
scripts/kconfig/mconf Kconfig
init/Kconfig:375: can't open file "kernel/irq/Kconfig"
make[1]: *** [menuconfig] Error 1
make: *** [menuconfig] Error 2


Build log is simply where Portage stopped. http://paste.pocoo.org/show/522603/

Anyone encountered this? I really don't know what I did wrong here. I've never seen this before.
Back to top
View user's profile Send private message
tomtom69
n00b
n00b


Joined: 09 Nov 2010
Posts: 71

PostPosted: Sun Dec 18, 2011 6:16 pm    Post subject: Reply with quote

Hi,

are you sure you are in the correct subdir when you use "make menuconfig"?
not /usr/src/linux, but /usr/src/linux-(whatever version)-gentoo-(whatever revision)...
Do you have the subdir kernel/irq in your kernel source subdir? (every kernel sources I know have this subdir and a file named "Kconfig" in it)


tom
Back to top
View user's profile Send private message
Tatsh
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2007
Posts: 96

PostPosted: Sun Dec 18, 2011 6:29 pm    Post subject: Reply with quote

tomtom69 wrote:
Hi,

are you sure you are in the correct subdir when you use "make menuconfig"?
not /usr/src/linux, but /usr/src/linux-(whatever version)-gentoo-(whatever revision)...
Do you have the subdir kernel/irq in your kernel source subdir? (every kernel sources I know have this subdir and a file named "Kconfig" in it)


tom


Plenty of Kconfig files but not irq/Kconfig:

Code:
find -name Kconfig | grep irq


within /usr/src returns nothing.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 7679

PostPosted: Sun Dec 18, 2011 6:30 pm    Post subject: Reply with quote

What is the output of ls -l /usr/src/linux*? Did you intend to use a root shell to build the kernel? This is neither required nor recommended.
Back to top
View user's profile Send private message
Tatsh
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2007
Posts: 96

PostPosted: Sun Dec 18, 2011 7:14 pm    Post subject: Reply with quote

Hu wrote:
What is the output of ls -l /usr/src/linux*? Did you intend to use a root shell to build the kernel? This is neither required nor recommended.


Code:
# ls -l /usr/src/linux*
lrwxrwxrwx  1 root root   23 Dec 18 12:44 /usr/src/linux -> linux-3.0.4-hardened-r5

/usr/src/linux-2.6.38-xen:
total 472
-rw-r--r--  1 root root  18693 Mar 14  2011 COPYING
-rw-r--r--  1 root root  93910 Mar 14  2011 CREDITS
drwxr-xr-x 90 root root  12288 Dec 18 12:13 Documentation
-rw-r--r--  1 root root   2464 Mar 14  2011 Kbuild
-rw-r--r--  1 root root    252 Mar 14  2011 Kconfig
-rw-r--r--  1 root root 191678 Dec 18 12:12 MAINTAINERS
-rw-r--r--  1 root root  52128 Dec 18 12:12 Makefile
-rw-r--r--  1 root root  17512 Mar 14  2011 README
-rw-r--r--  1 root root   3371 Mar 14  2011 REPORTING-BUGS
drwxr-xr-x 26 root root   4096 Dec 18 12:13 arch
drwxr-xr-x  2 root root   4096 Dec 18 12:13 block
drwxr-xr-x 10 root root   4096 Dec 18 12:13 drivers
drwxr-xr-x 37 root root   4096 Dec 18 12:13 firmware
drwxr-xr-x 70 root root   4096 Dec 18 12:13 fs
drwxr-xr-x 21 root root   4096 Dec 18 12:13 include
drwxr-xr-x  2 root root   4096 Dec 18 12:13 init
drwxr-xr-x  2 root root   4096 Dec 18 12:13 ipc
drwxr-xr-x  8 root root   4096 Dec 18 12:13 lib
drwxr-xr-x  2 root root   4096 Dec 18 12:13 mm
drwxr-xr-x 53 root root   4096 Dec 18 12:13 net
drwxr-xr-x  9 root root   4096 Dec 18 12:13 samples
drwxr-xr-x 13 root root   4096 Dec 18 12:13 scripts
drwxr-xr-x  8 root root   4096 Dec 18 12:13 security
drwxr-xr-x 21 root root   4096 Dec 18 12:13 sound
drwxr-xr-x  3 root root   4096 Dec 18 12:13 virt

/usr/src/linux-3.0.4-hardened-r5:
total 488
-rw-r--r--  1 root root  18693 Jul 21 22:17 COPYING
-rw-r--r--  1 root root  94495 Jul 21 22:17 CREDITS
drwxr-xr-x 93 root root  12288 Dec 18 12:39 Documentation
-rw-r--r--  1 root root   2464 Jul 21 22:17 Kbuild
-rw-r--r--  1 root root    252 Jul 21 22:17 Kconfig
-rw-r--r--  1 root root 195191 Jul 21 22:17 MAINTAINERS
-rw-r--r--  1 root root  55688 Dec 18 12:38 Makefile
-rw-r--r--  1 root root  17459 Jul 21 22:17 README
-rw-r--r--  1 root root   3371 Jul 21 22:17 REPORTING-BUGS
drwxr-xr-x 26 root root   4096 Dec 18 12:39 arch
drwxr-xr-x  2 root root   4096 Dec 18 12:39 block
drwxr-xr-x 20 root root   4096 Dec 18 12:39 drivers
drwxr-xr-x 38 root root   4096 Dec 18 12:39 firmware
drwxr-xr-x 71 root root   4096 Dec 18 12:39 fs
drwxr-xr-x  2 root root   4096 Dec 18 12:39 grsecurity
drwxr-xr-x 22 root root   4096 Dec 18 12:45 include
drwxr-xr-x  2 root root   4096 Dec 18 12:39 init
drwxr-xr-x  2 root root   4096 Dec 18 12:39 ipc
drwxr-xr-x  8 root root   4096 Dec 18 12:39 lib
drwxr-xr-x  2 root root   4096 Dec 18 12:39 mm
drwxr-xr-x 53 root root   4096 Dec 18 12:39 net
drwxr-xr-x 10 root root   4096 Dec 18 12:39 samples
drwxr-xr-x 13 root root   4096 Dec 18 12:39 scripts
drwxr-xr-x  8 root root   4096 Dec 18 12:39 security
drwxr-xr-x 22 root root   4096 Dec 18 12:39 sound
drwxr-xr-x  3 root root   4096 Dec 18 12:39 virt


It is not complete. And installation always fails like in my original log.

Code:
# qcheck xen-sources | grep are\ good
  * 25547 out of 38500 files are good
Back to top
View user's profile Send private message
Goverp
Apprentice
Apprentice


Joined: 07 Mar 2007
Posts: 273

PostPosted: Sun Dec 18, 2011 7:27 pm    Post subject: Reply with quote

Run out of space?
_________________
Greybeard
Back to top
View user's profile Send private message
Aquous
l33t
l33t


Joined: 08 Jan 2011
Posts: 619

PostPosted: Sun Dec 18, 2011 7:38 pm    Post subject: Reply with quote

Please post your /etc/make.conf.
Back to top
View user's profile Send private message
Tatsh
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2007
Posts: 96

PostPosted: Mon Dec 19, 2011 6:23 am    Post subject: Reply with quote

Aquous wrote:
Please post your /etc/make.conf.


Code:
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-march=native -msse2 -O2 -pipe"
# CFLAGS="-march=nocona -O2 -pipe"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
USE="mmx sse sse2"
MAKEOPTS="-j2"

USE="-alsa -oss -berkdb -bluetooth -debug -gtk -gnome -kde -qt -qt3 -qt4 -ipv6 -ldap -oss -pulseaudio -qt3 -xscreensaver"
USE="$USE 3dnow bash-completion cjk ipv6 sse3 unicode vim-syntax"
# USE="png jpeg -X -qt -kde -gtk -gnome -oss -alsa -qt3 -qt4 -debug"

SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"

LINGUAS="en_GB"

NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip headers limit_req limit_zone memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi flv gzip_static image_filter stub_status xslt headers_more sub dav map perl geoip"
NGINX_MODULES_MAIL="smtp"

ACCEPT_LICENSE="*"

GENTOO_MIRRORS="http://mirror.mcs.anl.gov/pub/gentoo/ rsync://mirror.mcs.anl.gov/gentoo/ ftp://mirror.mcs.anl.gov/pub/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ rsync://gentoo.chem.wisc.edu/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ http://mirrors.cs.wmich.edu/gentoo http://www.cyberuse.com/gentoo/ http://mirror.datapipe.net/gentoo ftp://mirror.datapipe.net/gentoo http://gentoo.mirrors.easynews.com/linux/gentoo/ http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ ftp://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ http://www.gtlib.gatech.edu/pub/gentoo rsync://rsync.gtlib.gatech.edu/gentoo ftp://ftp.gtlib.gatech.edu/pub/gentoo http://gentoo.mirrors.hoobly.com/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ rsync://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://lug.mtu.edu/gentoo/ ftp://lug.mtu.edu/gentoo/ ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ http://gentoo.netnitco.net http://gentoo.osuosl.org/ rsync://mirrors.rit.edu/gentoo/ ftp://mirrors.rit.edu/gentoo/ http://mirrors.rit.edu/gentoo/ ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://gentoo.llarian.net/pub/gentoo http://gentoo.llarian.net/ ftp://gentoo.mirrors.tds.net/gentoo rsync://gentoo.mirrors.tds.net/gentoo http://gentoo.mirrors.tds.net/gentoo http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://ftp.lug.udel.edu/pub/gentoo/ http://mirror.lug.udel.edu/pub/gentoo/ ftp://mirror.its.uidaho.edu/gentoo/ http://mirror.its.uidaho.edu/pub/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/ rsync://gentoo.cs.uni.edu/gentoo-distfiles http://gentoo.cs.uni.edu/ http://mirror.usu.edu/mirrors/gentoo/ ftp://ftp.wallawalla.edu/pub/mirrors/ftp.gentoo.org"


This is for a web server.

Goverp, says 53% used so I'm sure I have the space.
Back to top
View user's profile Send private message
tomtom69
n00b
n00b


Joined: 09 Nov 2010
Posts: 71

PostPosted: Mon Dec 19, 2011 7:26 am    Post subject: Reply with quote

You are missing some subdirs from the kernel sources which are normally included in the packages.
At least there is missing:
- kernel
- usr
- tools
I would recommend to delete the archives in /usr/portage/distfiles, re-download and unpack them. It looks like there is something missing in the packages or something goes wrong during unpacking...
Back to top
View user's profile Send private message
Tatsh
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2007
Posts: 96

PostPosted: Mon Dec 19, 2011 8:19 am    Post subject: Reply with quote

tomtom69 wrote:
You are missing some subdirs from the kernel sources which are normally included in the packages.
At least there is missing:
- kernel
- usr
- tools
I would recommend to delete the archives in /usr/portage/distfiles, re-download and unpack them. It looks like there is something missing in the packages or something goes wrong during unpacking...


Tried that. Even changed the mirrors.

Code:
>>> Installing (1 of 1) sys-kernel/xen-sources-2.6.38

>>> Failed to install sys-kernel/xen-sources-2.6.38, Log file:

>>>  '/var/tmp/portage/sys-kernel/xen-sources-2.6.38/temp/build.log'

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


It's so weird. There's no useful information in that log whatsoever. It's just like the one I pasted in the original post.
Back to top
View user's profile Send private message
tomtom69
n00b
n00b


Joined: 09 Nov 2010
Posts: 71

PostPosted: Mon Dec 19, 2011 9:02 am    Post subject: Reply with quote

this is really weird.

Why does 'install' fail?
Do you really have enough disk space at the partition(s) where /var and /usr are mounted? When it´s a web server maybe /var and /usr use different partitions and one of them runs out of space.
Did you try to clean the target subdirs /var/tmp/portage/sys-kernel/xen-sources-2.6.38 and /usr/src/xen-sources-2.6.38 completely with rm -rf before emerging the kernel sources?
Another cause could be a corrupted file system hat needs an fsck.
Back to top
View user's profile Send private message
Tatsh
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2007
Posts: 96

PostPosted: Mon Dec 19, 2011 9:25 am    Post subject: Reply with quote

tomtom69 wrote:
this is really weird.

Why does 'install' fail?
Do you really have enough disk space at the partition(s) where /var and /usr are mounted? When it´s a web server maybe /var and /usr use different partitions and one of them runs out of space.
Did you try to clean the target subdirs /var/tmp/portage/sys-kernel/xen-sources-2.6.38 and /usr/src/xen-sources-2.6.38 completely with rm -rf before emerging the kernel sources?
Another cause could be a corrupted file system hat needs an fsck.


I did transfer this image via dd and ssh over the web. It might be that I need to do an fsck indeed.
Back to top
View user's profile Send private message
Tatsh
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2007
Posts: 96

PostPosted: Mon Dec 19, 2011 10:07 am    Post subject: Reply with quote

Solved this. It was due to lack of RAM. After a successful install via a rescue boot, and rebooting, I did:

Code:

swapon /dev/sda2 # for some reason not on
/etc/init.d/php-fpm stop
emerge -C hardened-sources
emerge hardened-sources


It wasn't until after the reboot that Portage gave a Python traceback which had an obvious message:

Code:

>>> Installing (1 of 1) sys-kernel/hardened-sources-3.0.4-r5
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 1724, in unmerge
    phase.start()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 24, in start
    self._start()
  File "/usr/lib64/portage/pym/_emerge/EbuildPhase.py", line 115, in _start
    self._start_task(env_extractor, self._env_extractor_exit)
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 146, in _start_task
    task.start()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 24, in start
    self._start()
  File "/usr/lib64/portage/pym/_emerge/BinpkgEnvExtractor.py", line 43, in _start
    self._start_task(extractor_proc, self._extractor_exit)
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 146, in _start_task
    task.start()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 24, in start
    self._start()
  File "/usr/lib64/portage/pym/_emerge/SpawnProcess.py", line 123, in _start
    retval = self._spawn(self.args, **kwargs)
  File "/usr/lib64/portage/pym/_emerge/SpawnProcess.py", line 159, in _spawn
    return spawn_func(args, **kwargs)
  File "/usr/lib64/portage/pym/portage/process.py", line 245, in spawn
    pid = os.fork()
  File "/usr/lib64/portage/pym/portage/__init__.py", line 215, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 12] Cannot allocate memory
Back to top
View user's profile Send private message
tclover
Apprentice
Apprentice


Joined: 10 Apr 2011
Posts: 295

PostPosted: Mon Dec 19, 2011 1:11 pm    Post subject: Reply with quote

Why the `-j2' for menuconfig!? Try without that thing, it should work.
_________________
mkinitramfs-ll:topic 879125::(bar-)overlay:topic 889918
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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