# [RISOLTO] Problema module-rebuild

## stifler83

Salve vi illustro il mio problema, quando vado ad eseguire emerge @module-rebuild ecco cosa ottengo

```

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

Calculating dependencies  ... done!

[ebuild   R   ] x11-drivers/nvidia-drivers-195.36.31  USE="acpi (multilib) -custom-cflags -gtk" 0 kB [?=>0]

[ebuild   R   ] app-emulation/vmware-modules-238.2-r1  0 kB [1]

Total: 2 packages (2 reinstalls), Size of downloads: 0 kB

Portage tree and overlays:

 [0] /usr/portage

 [1] /var/lib/layman/vmware

 [?] indicates that the source repository could not be determined

>>> Verifying ebuild manifests

>>> Starting parallel fetch

>>> Emerging (1 of 2) x11-drivers/nvidia-drivers-195.36.31

 * NVIDIA-Linux-x86_64-195.36.31-pkg2.run RMD160 SHA1 SHA256 size ;-) ...[ ok ]

 * checking ebuild checksums ;-) ...                                     [ ok ]

 * checking auxfile checksums ;-) ...                                    [ ok ]

 * checking miscfile checksums ;-) ...                                   [ ok ]

 * CPV:  x11-drivers/nvidia-drivers-195.36.31

 * REPO: gentoo

 * USE:  acpi amd64 elibc_glibc kernel_linux multilib userland_GNU

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/2.6.36-gentoo-r5/build

 * Found sources for kernel version:

 *     2.6.36-gentoo-r5

 * Checking for MTRR support ...

 [ ok ]

>>> Unpacking source...

>>> Unpacking NVIDIA-Linux-x86_64-195.36.31-pkg2.run to /var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2

>>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work

>>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2 ...

 * Applying NVIDIA_glx-defines.patch ...

 [ ok ]

 * Applying NVIDIA_glx-glheader.patch ...

 [ ok ]

 * Applying 195.30-unified-arch.patch ...

 [ ok ]

 * Converting NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv/Makefile.kbuild to use M= instead of SUBDIRS= ...

 [ ok ]

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2 ...

>>> Source configured.

>>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2 ...

 * Preparing nvidia module

make HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.36-gentoo-r5/build HOST_CC=x86_64-pc-linux-gnu-gcc CC=x86_64-pc-linux-gnu-gcc clean module 

NVIDIA: calling KBUILD...

make -C /lib/modules/2.6.36-gentoo-r5/build \

   KBUILD_SRC=/usr/src/linux-2.6.36-gentoo-r5 \

   KBUILD_EXTMOD="/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv" -f /usr/src/linux-2.6.36-gentoo-r5/Makefile \

   modules

test -e include/generated/autoconf.h -a -e include/config/auto.conf || (      \

   echo;                        \

   echo "  ERROR: Kernel configuration is invalid.";      \

   echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\

   echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";   \

   echo;                        \

   /bin/false)

mkdir -p /var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv/.tmp_versions ; rm -f /var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv/.tmp_versions/*

make -f /usr/src/linux-2.6.36-gentoo-r5/scripts/Makefile.build obj=/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv

  x86_64-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv/.nv.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include -I/usr/src/linux-2.6.36-gentoo-r5/arch/x86/include -Iinclude  -I/usr/src/linux-2.6.36-gentoo-r5/include -include include/generated/autoconf.h   -I/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack   -I/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wno-multichar -Werror -mcmodel=kernel -mno-red-zone -fno-defer-pop -MD -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"195.36.31\" -UDEBUG -U_DEBUG -DNDEBUG  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)"  -D"KBUILD_MODNAME=KBUILD_STR(nvidia)"  -c -o /var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv/nv.o /var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv/nv.c

/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv/nv.c:417: error: unknown field ‘ioctl’ specified in initializer

/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv/nv.c:417: warning: initialization from incompatible pointer type

make[4]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv/nv.o] Error 1

make[3]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv] Error 2

make[2]: *** [sub-make] Error 2

NVIDIA: left KBUILD.

nvidia.ko failed to build!

make[1]: *** [module] Error 1

make: *** [module] Error 2

 * ERROR: x11-drivers/nvidia-drivers-195.36.31 failed:

 *   Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux       SYSOUT=/lib/modules/2.6.36-gentoo-r5/build HOST_CC=x86_64-pc-linux-gnu-gcc CC=x86_64-pc-linux-gnu-gcc clean module

 * 

 * Call stack:

 *     ebuild.sh, line   47:  Called src_compile

 *   environment, line 4150:  Called linux-mod_src_compile

 *   environment, line 3060:  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}";

 * 

 * If you need support, post the output of 'emerge --info =x11-drivers/nvidia-drivers-195.36.31',

 * the complete build log and the output of 'emerge -pqv =x11-drivers/nvidia-drivers-195.36.31'.

 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/temp/environment'.

 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/work/NVIDIA-Linux-x86_64-195.36.31-pkg2'

>>> Failed to emerge x11-drivers/nvidia-drivers-195.36.31, Log file:

>>>  '/var/tmp/portage/x11-drivers/nvidia-drivers-195.36.31/temp/build.log'

 * Messages for package x11-drivers/nvidia-drivers-195.36.31:

```

Idee sul problema? Sarò io che non lo vedo data la tarda ora? (4:44 della mattina)   :Very Happy: Last edited by stifler83 on Wed Dec 22, 2010 2:38 am; edited 1 time in total

----------

## fbcyborg

Prova a fare invece:

```
module-rebuild rebuild
```

Ma usi distcc? Io con nvidia-drivers non ho mai avuto problemi con distcc, ma c'è un errore che mi pare compaia in questi casi:

```
[...]CROSS_COMPILE=x86_64-pc-linux-gnu- [...]
```

----------

## stifler83

Ecco cosa ottengo se eseguo il comando

```
emerge @module-rebuild rebuild

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "rebuild".
```

----------

## fbcyborg

Avevo scritto un'altra cosa:

 *fbcyborg wrote:*   

> Prova a fare invece:
> 
> ```
> module-rebuild rebuild
> ```
> ...

 

 :Wink: 

----------

## cloc3

 *fbcyborg wrote:*   

> Avevo scritto un'altra cosa:
> 
>  *fbcyborg wrote:*   Prova a fare invece:
> 
> ```
> ...

 

si. ma lui usa il portage in sviluppo.

dunque per lui il pacchetto sys-kernel/module-rebuild è obsoleto.

l'errore è un errore di compilazione.

siccome si tratta di un software già precedentemente compilato nel sistema, bisogna capire cosa sia cambiato nel frattempo. nuovo kernel? nuova versione di X? nuovo altro?

si cerca di riportarsi alla condizione precedente, quella che funzionava, per avere più informazioni, poi si cerca su bugzilla ed, eventualmente, si segnala il problema.

----------

## fbcyborg

Dunque, se per versione di sviluppo si parla della 2.2.0_alpha* allora ho anche io la versione di sviluppo e non ho problemi nell'utilizzo di module-rebuild.

Io volevo solo fare questa prova giusto così per vedere. Anzi, io continuo a usare module-rebuild sinceramente.

----------

## cloc3

 *fbcyborg wrote:*   

> Anzi, io continuo a usare module-rebuild sinceramente.

 

e non morirai per questo  :Smile: 

soltanto che il nuovo portage definisce i sets con la sintassi @set. quindi il tuo programma diventa superfluo.

----------

## stifler83

esattamente io vado ad utilizzare i sets del nuovo portage che sono estremamente comodi. Non riesco a determinare il problema che determina l'errore in fase di compilazione, io ho aggiornato lo xorg, ricompilato un nuovo kernel anche  :Smile:  ma non riesco a capire dov'è il problema.

----------

## xdarma

 *stifler83 wrote:*   

> 
> 
> ```
> 
> [ebuild   R   ] x11-drivers/nvidia-drivers-195.36.31  USE="acpi (multilib) -custom-cflags -gtk" 0 kB [?=>0]
> ...

 

Secondo me si può fare il merge del thread con questo: [Risolto] errore compilazione driver nvidia

----------

## fbcyborg

Ah, ma allora è solo un problema con quel pacchetto?  meglio, non è, il comando emerge @module-rebuild che crea problemi.

----------

## stifler83

Il problema si potrebbe dire parzialmente fixato  :Smile:  Allora vado a lanciare 

```
 eix nvidia-drivers

[U] x11-drivers/nvidia-drivers

     Available versions:  96.43.16!s 96.43.18!s ~96.43.19!s 173.14.25!s 173.14.27!s ~173.14.28!s ~190.53-r1!s 195.36.24!s 195.36.31!s ~256.44!s ~256.44-r1!s 256.52!s ~256.53!s ~260.19.21!s [M]~260.19.26!s ~260.19.29!s {acpi custom-cflags gtk kernel_linux multilib}

     Installed versions:  195.36.31!s[?](19:02:54 07/11/2010)(acpi kernel_linux multilib -custom-cflags -gtk)

     Homepage:            http://www.nvidia.com/

     Description:         NVIDIA X11 driver and GLX libraries

eix nvidia-settings

[U] media-video/nvidia-settings

     Available versions:  ~173.14.25 ~173.14.27 ~185.18.36 ~190.53 195.36.24 ~195.36.31 ~256.44 256.52 ~260.19.29

     Installed versions:  195.36.24[?](15:52:44 14/10/2010)

     Homepage:            http://www.nvidia.com/

     Description:         NVIDIA Linux X11 Settings Utility

```

Vado a smascherare i pacchetti, rilancio il comando eix ottengono questo risultato

```
[U] x11-drivers/nvidia-drivers

     Available versions:  96.43.16!s 96.43.18!s ~96.43.19!s 173.14.25!s 173.14.27!s ~173.14.28!s ~190.53-r1!s 195.36.24!s 195.36.31!s ~256.44!s ~256.44-r1!s (~)256.52!s ~256.53!s ~260.19.21!s [M]~260.19.26!s ~260.19.29!s {acpi custom-cflags gtk kernel_linux multilib}

     Installed versions:  195.36.31!s[?](19:02:54 07/11/2010)(acpi kernel_linux multilib -custom-cflags -gtk)

     Homepage:            http://www.nvidia.com/

     Description:         NVIDIA X11 driver and GLX libraries

[U] media-video/nvidia-settings

     Available versions:  ~173.14.25 ~173.14.27 ~185.18.36 ~190.53 195.36.24 ~195.36.31 ~256.44 (~)256.52 ~260.19.29

     Installed versions:  195.36.24[?](15:52:44 14/10/2010)

     Homepage:            http://www.nvidia.com/

     Description:         NVIDIA Linux X11 Settings Utility

```

Potete notare che la versione 256.52 smascherata ha davanti al pacchetto (~) che non riesco a capire che indica  :Smile: 

Spavaldo vado a lanciare emerge per compilare ed ottengo il seguente FAIL =)

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

Calculating dependencies... done!

[ebuild     U ] net-misc/dhcpcd-5.2.8-r1 [5.2.8] USE="zeroconf" 0 kB [?=>0]

[ebuild  N    ] app-admin/eselect-xvmc-0.1  0 kB [0]

[ebuild  N    ] x11-libs/libXvMC-1.0.5  USE="-debug" 251 kB [0]

[ebuild     U ] app-text/aspell-0.60.6-r2 [0.60.6-r1] USE="nls -examples" LINGUAS="en it -af -be -bg -br -ca -cs -cy -da -de -el -eo -es -et -fi -fo -fr -ga -gl -he -hr -is -la -lt -nl -no -pl -pt -pt_BR -ro -ru -sk -sl -sr -sv -uk -vi" 0 kB [?=>0]

[ebuild     U ] x11-drivers/nvidia-drivers-256.52 [195.36.31] USE="acpi (multilib) -custom-cflags -gtk" 41,902 kB [?=>0]

[ebuild     U ] media-video/nvidia-settings-256.52 [195.36.24] 1,426 kB [?=>0]

[blocks b     ] <media-video/nvidia-settings-256.52 ("<media-video/nvidia-settings-256.52" is blocking x11-drivers/nvidia-drivers-256.52)

Total: 6 packages (4 upgrades, 2 new), Size of downloads: 43,578 kB

Conflict: 1 block

Portage tree and overlays:

 [0] /usr/portage

 [?] indicates that the source repository could not be determined

```

Aumentando la versione del pacchetto smascherato il risultato non cambia  :Smile: 

----------

## cloc3

devi smascherare anche gli nvidia-settings

----------

## stifler83

bè quello era scontato, ho smascherati sia nvidia-drivers che nvidia-settings e questo è quello che ottengo quando lancio

```
emerge -NDupv world

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

[/u][/b]

Calculating dependencies... done![/u]

[ebuild     U ] net-misc/dhcpcd-5.2.8-r1 [5.2.8] USE="zeroconf" 0 kB [?=>0]

[ebuild  N    ] app-admin/eselect-xvmc-0.1  0 kB [0]

[ebuild  N    ] x11-libs/libXvMC-1.0.5  USE="-debug" 251 kB [0]

[ebuild     U ] app-text/aspell-0.60.6-r2 [0.60.6-r1] USE="nls -examples" LINGUAS="en it -af -be -bg -br -ca -cs -cy -da -de -el -eo -es -et -fi -fo -fr -ga -gl -he -hr -is -la -lt -nl -no -pl -pt -pt_BR -ro -ru -sk -sl -sr -sv -uk -vi" 0 kB [?=>0]                                                                  

[ebuild     U ] x11-drivers/nvidia-drivers-256.52 [195.36.31] USE="acpi (multilib) -custom-cflags -gtk" 41,902 kB [?=>0]

[ebuild     U ] media-video/nvidia-settings-256.52 [195.36.24] 1,426 kB [?=>0]

[blocks b     ] <media-video/nvidia-settings-256.52 ("<media-video/nvidia-settings-256.52" is blocking x11-drivers/nvidia-drivers-256.52)

Total: 6 packages (4 upgrades, 2 new), Size of downloads: 43,578 kB

Conflict: 1 block

Portage tree and overlays:

 [0] /usr/portage

 [?] indicates that the source repository could not be determined

```

ovviamento ripeto che smascherando una versione maggiore il risultato non cambia, mi rimane bloccato nvidia settings alla versione 256.52.

----------

## stifler83

ok risolto, ho eliminato nvidia-setting. Procedo per ordine cosi che anche chi non è pratico può capire  :Wink:  ho lanciato 

```
emerge -C nvidia-settings
```

poi dopo aver smascherato i pacchetti nvidia-drivers e nvidia-settings ho rilanciato

```
emerge -NDupv world
```

poi ho lanciato l'ultimo comando incriminato ovvero

```
emerge @module-rebuild
```

ed ecco fatto che tutto è andato a dritto  :Cool: 

----------

