Wednesday, September 30, 2009

virtualbox compilation failed

Problème :

The compilation of virtualbox fails :

...
>>> Failed to emerge app-emulation/virtualbox-modules-1.6.6-r1, Log file:

>>> '/var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/temp/build.log'

* Messages for package app-emulation/virtualbox-modules-1.6.6-r1:

*
* ERROR: app-emulation/virtualbox-modules-1.6.6-r1 failed.
* Call stack:
* ebuild.sh, line 49: Called src_compile
* environment, line 3365: Called linux-mod_src_compile
* environment, line 2605: Called die
* The specific snippet of code:
* eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" CROSS_COMPILE=${CHOST}- LDFLAGS=\"$(get_abi_LDFLAGS)\" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
* The die message:
* Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS= KERN_DIR=/usr/src/linux KERNOUT=/usr/src/linux all
*
* 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-emulation/virtualbox-modules-1.6.6-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/temp/environment'.
...


Solution :

The actual virtualbox version is too old for this kernel.You need to get the last version
of virtualbox (x86).
Add this in your /etc/portage/package.keywords :

app-emulation/virtualbox-ose ~x86
app-emulation/virtualbox-modules ~x86
app-emulation/virtualbox-ose-additions ~x86
dev-util/kbuild ~x86

Then emerge app-emulation/virtualbox-ose

Monday, September 28, 2009

Failed to emerge dev-java/ant-core-1.7.1-r4

Problème

When i update my gentoo, i've the following problem :
Failed to emerge dev-java/ant-core-1.7.1-r4

It's java_config fault :
Traceback (most recent call last):
File "/usr/bin/java-config-2", line 8, in
from java_config_2 import __version__
ImportError: No module named java_config_2

Solution

You have to emerge java_config once again :
=> Solution : emerge -l java-config



Example of failed compilation :
Traceback (most recent call last):
File "/usr/bin/java-config-2", line 8, in
from java_config_2 import __version__
ImportError: No module named java_config_2
*
* Can't run java-config --help
* Have you upgraded python recently but haven't
* run python-updater yet?
*
* ERROR: dev-java/ant-core-1.7.1-r4 failed.
* Call stack:
* ebuild.sh, line 49: Called pkg_setup
* ebuild.sh, line 1273: Called java-pkg-2_pkg_setup
* java-pkg-2.eclass, line 61: Called java-pkg_init
* java-utils-2.eclass, line 2050: Called die
* The specific snippet of code:
* die "Can't run java-config --help"
* The die message:
* Can't run java-config --help
*
* 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/dev-java/ant-core-1.7.1-r4/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-java/ant-core-1.7.1-r4/temp/die.env'.
*
!!! When you file a bug report, please include the following information:
GENTOO_VM= CLASSPATH="." JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info

>>> Failed to emerge dev-java/ant-core-1.7.1-r4, Log file:

>>> '/var/tmp/portage/dev-java/ant-core-1.7.1-r4/temp/build.log'

* Messages for package dev-java/ant-core-1.7.1-r4:

*
* Can't run java-config --help
* Have you upgraded python recently but haven't
* run python-updater yet?
*
* ERROR: dev-java/ant-core-1.7.1-r4 failed.
* Call stack:
* ebuild.sh, line 49: Called pkg_setup
* ebuild.sh, line 1273: Called java-pkg-2_pkg_setup
* java-pkg-2.eclass, line 61: Called java-pkg_init
* java-utils-2.eclass, line 2050: Called die
* The specific snippet of code:
* die "Can't run java-config --help"
* The die message:
* Can't run java-config --help
*
* 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/dev-java/ant-core-1.7.1-r4/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-java/ant-core-1.7.1-r4/temp/die.env'.

Friday, September 25, 2009

Search ebuild faster with eix

Problem :

You can search ebuild with emerge -s.Is there a faster way to search packet ?

Solution :

It exists a tool to make search faster on portage tree and other non official trees : eix

0) Install it :
  $ echo app-portage/eix >> /etc/portage/package.keywords
$ emerge -av app-portage/eix

1) Update it (you have to do this after emerge --sync) : update-eix
2) Search a packet (for example mediawiki) : eix -s mediawiki

Monday, September 21, 2009

Gentoo wiki

You search some help on Gentoo ?
See the Wiki Gentoo

You will see many help on materials, configuration ...

Saturday, September 19, 2009

equery

Definition : Equery is a package query tool.

Installation :

# emerge gentoolkit

USE :

Here is some common use about equery :

- List all installed package : equery l

$ equery l
ou
$ equery list


The output of the command is : [---] [--] package.

The first bracket can have these values :
I : installed package
P : Portage
O : Overlay

The second bracket can have these value :
~ : by keywords.
- : by arch
M : masqued


Example :
$ equery l
[ Searching for all packages in all categories among: ]
* installed packages
[I--] [ ] app-admin/eselect-1.1.3 (0)

[I--] [M ] app-admin/eselect-ctags-1.5 (0)

...


- List all dependency of a packet : equery depends [packet]

$ equery depends vim
[ Searching for packages depending on vim... ]

app-vim/gentoo-syntax-20070506 (>=app-editors/vim-7.0)

virtual/editor-0 (app-editors/vim)



- Search at which packet belongs this file : equery b [fichier]

# equery belongs /usr/bin/audacious
ou
# equery b /usr/bin/audacious


For more informations, you can see the official gentoo documentation : gentoolkit

Friday, September 11, 2009

Gentoo optimization : prelink

Definition :

prelink is a binary that take shared libraries and put them in binary.It permits for example to start kde more quickly.Use it and you will see !


Installation :

emerge prelink
env-update

Use :

prelink -amR

You have to execute the command each time you update your system because new shared libraries have to be integrate in binary.


Example :

# prelink -amR
prelink: /usr/lib/xulrunner/xpcshell: Could not find one of the dependencies
prelink: /usr/lib/xulrunner/TestGtkEmbed: Could not find one of the dependencies
prelink: /usr/lib/xulrunner/regxpcom: Could not find one of the dependencies
prelink: /usr/lib/xulrunner/mozilla-xremote-client: Could not find one of the dependencies
prelink: /usr/lib/xulrunner/xulrunner-stub: Could not find one of the dependencies
prelink: /usr/lib/xulrunner/xulrunner-bin: Could not find one of the dependencies
prelink: /usr/bin/qtdemo: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1
prelink: /usr/kde/3.5/bin/kpendulum.kss: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1
prelink: /usr/bin/tcdecode: Cannot prelink against non-PIC shared library /usr/lib/libavcodec.so.52
prelink: /usr/bin/compiz: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1
prelink: /usr/bin/ffmpeg: Cannot prelink against non-PIC shared library /usr/lib/libavutil.so.49
prelink: /usr/kde/3.5/bin/kwave.kss: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1
prelink: /usr/kde/3.5/bin/kgravity.kss: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1
prelink: /usr/kde/3.5/bin/kflux.kss: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1
prelink: /usr/bin/glxgears: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGLcore.so.1
prelink: /usr/kde/3.5/bin/krotation.kss: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1
prelink: /usr/i686-pc-linux-gnu/gcc-bin/4.1.2/i686-pc-linux-gnu-c++ is no longer hardlink to /usr/i686-pc-linux-gnu/gcc-bin/4.1.2/i686-pc-linux-gnu-g++
prelink: /usr/kde/3.5/bin/kspace.kss: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1
prelink: /usr/kde/3.5/bin/ksolarwinds.kss: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1
prelink: /usr/kde/3.5/bin/keuphoria.kss: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1
prelink: /usr/bin/glxinfo: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1
prelink: /usr/kde/3.5/bin/kdesktop_lock: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1
prelink: /usr/kde/3.5/bin/kfountain.kss: Cannot prelink against non-PIC shared library //usr//lib/opengl/nvidia/lib/libGL.so.1

Don't be afraid of warning message.See the official gentoo documentation for more details : prelink


NOTE :

- This command isn't dangerous but you must be sure that you have enought space in you hard disk.If not, some executable will be truncate. Use df -h to check it.

Monday, September 7, 2009

eselect

In this article i will present that we can do with the eselect command.

Definition : eselect is a command to configure and administrate gentoo system.It can be use for example to switch kernel or java version.You have to use this command carrefully.

Installation : It's possible that you need to install before use.To install :
$ echo app-admin/eselect ~x86 >> /etc/portage/package.keywords
$ emerge -av app-admin/eselect

Common use : List possible selection and set one of them
eselect list

Example:
# eselect java-vm list
Available Java Virtual Machines:
[1] sun-jdk-1.5
[2] sun-jdk-1.6 system-vm

# eselect kernel list
Available kernel symlink targets:
[1] linux-2.6.26-gentoo-r3
[2] linux-2.6.27-gentoo-r4
[3] linux-2.6.27-gentoo-r5
[4] linux-2.6.27-gentoo-r7
[5] linux-2.6.28-gentoo
[6] linux-2.6.28-gentoo-r1
[7] linux-2.6.29-gentoo-r2
[8] linux-2.6.29-gentoo-r4
[9] linux-2.6.30-gentoo-r1 *

Set a selection :

# eselect kernel set 1
# eselect kernel set linux-2.6.27-gentoo-r7

Activate fonction to a module :

You can for example activate or disable vim for bash completion.

Example :
$ eselect bashcomp enable vim



http://www.gentoo.org/proj/en/eselect/index.xml