# Failed to calculate module dependencies

## Sujao

Hi all,

I have a strange problem. When I boot my gentoo machine I get the following message

```
Calculating module dependencies

Failed to calculate dependencies

Loading Module MODULENAME

Failed to load MODULENAME

Loading Module MODULENAME2

Failed to load MODULENAME2

...

...

```

MODULNAME=respective module name

When I try to manually load I a module I get this message:

```
FATAL: Module MODULENAME not found
```

I really cant remember that I changed anything in my system. I surely didnt recompiled my kernel or modules. I would know that. I also looked through the history of root and didnt find anything suspicious there. Though I must say that this problem occured 10min before I had to go to holiday and I didnt had time to deal with it. Now after 3 weeks I dont remember everything I did before this error occured.

At the moment I dont even have an idea where to look.  Should I try to recompile the modules? Any ideas how to find the reason for this mess?

----------

## Adwin

Did you change any access rights? Did you use any CHMOD?

----------

## Sujao

Not that I remember. Which files do you have in mind? I can can check them then.

----------

## Sujao

I think I solved the problem. I made a

```
make modules && make modules_install
```

and nearly all the modules were loaded. I still had to load "nvidia" manually. Otherwise the X-Server aborted with an error. I still get the error "Failed to calculate dependencies". What exactly does this mean? And who is responsible for calculating the dependencies. Knowing that I could check this element for errors.

----------

## Adwin

you can automatically load nvidia by 

# echo nvidia >> /etc/modules.autoload.d/kernel-2.x

----------

## murilo_belluzzo

i getthis error:

```
Calculating module dependencies

Failed to calculate dependencies
```

but all my modules in kernel-2.6 are loaded sucessifully, and im not haveing any problens whit them .... no error msgs.

I simply dont know why this error appers .... can anyone help me solve this ?

----------

## neryo

 *murilo_belluzzo wrote:*   

> i getthis error:
> 
> ```
> Calculating module dependencies
> 
> ...

 

i have the same problem! all modules are loaded correctly, i haven't problems with my gentoo but however appears this error message at boot... 

```
Calculating module dependencies

Failed to calculate dependencies
```

i have recompiled my kernel, version 2.6.12-gentoo-r6, i have recompiled baselayout and have ran modules-update.. but nothing.....

anyone have an idea? thanks in advantage.....  :Rolling Eyes: 

----------

## neryo

murilo_belluzzo: 

you could try to comment from /etc/init.d/modules 

```
&>/dev/null
```

approximately to line 91, after /sbin/modules-update put the char #

```

     90                 ebegin "Calculating module dependencies"

     91                 /sbin/modules-update &>/dev/null

     92                 eend $? "Failed to calculate module dependencies" 

```

reboot your system and you will see the error that /sbin/modules-update gives to you....then post here the string.. 

After this method, my problem is "Error while loading shared lib... blablabla cannot open shared libraries libstdc++.so.5", but it s strange.. with locate i have found this librarie...

```
# locate libstdc++.so.5

/opt/OpenOffice.org/program/libstdc++.so.5

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libstdc++.so.5

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libstdc++.so.5.0.7

#  gcc-config -l

[1] i686-pc-linux-gnu-3.3.5-20050130 *

[2] i686-pc-linux-gnu-3.3.5-20050130-hardened

[3] i686-pc-linux-gnu-3.3.5-20050130-hardenednopie

[4] i686-pc-linux-gnu-3.3.5-20050130-hardenednopiessp

[5] i686-pc-linux-gnu-3.3.5-20050130-hardenednossp 
```

any idea? thanks  :Rolling Eyes: 

----------

## rstebih

Make sure the filename extensions ( ie. .ko ) are removed from the module names in the '/etc/modules.autoload.d/kernel-2.x' file.

----------

## neryo

 *rstebih wrote:*   

> Make sure the filename extensions ( ie. .ko ) are removed from the module names in the '/etc/modules.autoload.d/kernel-2.x' file.

 

no... it's not this the problem... maybe you haven't understood.  :Wink: 

the problem is not during the loading modules.. but when the system calculates the dependencies...  :Rolling Eyes: 

if you comment this  &>/dev/null in the file /etc/init.d/modules, you can see the real problem that happens during the loadng procedure..

For example my problem is cp: error while loading shared libraries... bla bla.. cannot open shared libraries libstdc++.so.5 .. and i haven't found yet the solution.. any idea for this error?? 

thanks ....

----------

## neryo

uhm...i have resolved my problem "Failed to calculate.." re-compiling all the system....

```
# emerge -e system
```

there was probably some binary corrupt  :Mad: 

----------

## fw146

 *neryo wrote:*   

> uhm...i have resolved my problem "Failed to calculate.." re-compiling all the system....
> 
> ```
> # emerge -e system
> ```
> ...

 

Did your baselayout get updated in the process? Could you perhaps check it via 

```
genlop -t baselayout
```

I get the same "error". The library is in /usr, which is not mounted at the time modules-update is run. Atleast  in my case, as I have usr as a seperate partition. 

Oh BTW this particular system is not connected to the net, so your input would help me fix the problem.

Thanks.

----------

