compile android: depmod: ERROR: Found 2 modules in dependency cycles!

本文介绍了一位用户在尝试编译安装Linux内核4.4.0-rc1版本时遇到的依赖循环错误,并提供了详细的解决方案,包括禁用Lustre和LNET模块的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


https://bbs.archlinux.org/viewtopic.php?id=205322


Hi,

i am currently trying to compile/install the kernel 4.4.0-rc1. I use the Arch Kernel config from "/proc/config.gz".

"make" works fine, "make modules_install" produces the following error:

  [...]
  INSTALL sound/soc/snd-soc-core.ko
  INSTALL sound/soundcore.ko
  INSTALL sound/synth/emux/snd-emux-synth.ko
  INSTALL sound/synth/snd-util-mem.ko
  INSTALL sound/usb/6fire/snd-usb-6fire.ko
  INSTALL sound/usb/bcd2000/snd-bcd2000.ko
  INSTALL sound/usb/caiaq/snd-usb-caiaq.ko
  INSTALL sound/usb/hiface/snd-usb-hiface.ko
  INSTALL sound/usb/line6/snd-usb-line6.ko
  INSTALL sound/usb/line6/snd-usb-pod.ko
  INSTALL sound/usb/line6/snd-usb-podhd.ko
  INSTALL sound/usb/line6/snd-usb-toneport.ko
  INSTALL sound/usb/line6/snd-usb-variax.ko
  INSTALL sound/usb/misc/snd-ua101.ko
  INSTALL sound/usb/snd-usb-audio.ko
  INSTALL sound/usb/snd-usbmidi-lib.ko
  INSTALL sound/usb/usx2y/snd-usb-us122l.ko
  INSTALL sound/usb/usx2y/snd-usb-usx2y.ko
  INSTALL virt/lib/irqbypass.ko
  DEPMOD  4.4.0-rc1-ARCH
depmod: ERROR: Found 2 modules in dependency cycles!
depmod: ERROR: Cycle detected: lnet -> libcfs -> lnet
Makefile:1139: recipe for target '_modinst_post' failed
make: *** [_modinst_post] Error 1

Some information:
Device: Lenovo Yoga 900-13
CPU: i7-6500U
Architecture: x86_64
I made some code manipulations according to this thread to make my hardware work: https://bbs.archlinux.org/viewtopic.php?id=204355
But I think they are not related to the issue.

Does somebody have an idea how to solve this problem?

Regards

Richard

Last edited by DonRichie (2015-11-21 15:19:32)

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Hi There,

I ran into this problem today as well. It looks like this is a problem with the Lusture networking modules (LNET), as described here http://www.gossamer-threads.com/lists/l … ?page=last. You can work around the problem by disabling the LUSTURE and LNET kernel modules in your .config file. I just did a simple grep for every module containing LUSTURE or LNET, switching actual modules from 'm' to 'n' and commenting out module options. After that I was able to execute `make modules install` just fine.


### Webpack 编译失败解决方案 Webpack 缺失依赖项通常是因为项目中的某些模块未被正确安装或者配置不完整。以下是针对 `ERROR Failed to compile with 1 error` 的分析和解决方法。 #### 1. 检查 Node.js 和 npm/yarn 版本 确保使用的 Node.js 和 npm 或 yarn 是兼容版本。如果版本过旧或过高,可能会导致依赖无法正常解析。可以通过以下命令检查当前环境的版本: ```bash node -v npm -v yarn -v ``` 建议升级至最新稳定版以减少潜在冲突[^1]。 #### 2. 删除并重新安装 node_modules 文件夹 有时缓存可能导致依赖丢失或损坏。可以尝试删除 `node_modules` 并重新执行安装操作: ```bash rm -rf node_modules package-lock.json npm install ``` 对于使用 Yarn 的项目,则运行以下命令: ```bash rm -rf node_modules yarn.lock yarn install ``` 此过程会清理掉可能存在的错误依赖关系,并依据最新的包管理器锁文件重建整个依赖树[^3]。 #### 3. 审核 package.json 中的脚本定义 查看项目的 `package.json` 是否存在合理的开发服务器启动指令。例如,在引用中提到的是通过 `"dev"` 脚本来调用 Webpack 开发服务: ```json { "scripts": { "dev": "webpack-dev-server" } } ``` 确认该路径下确实有对应的入口点以及 Webpack 配置文件 (通常是 `webpack.config.js`) 存在。 #### 4. 查阅具体报错日志定位问题 当遇到 “missing dependency” 类型错误时,仔细阅读完整的堆栈跟踪信息可以帮助快速锁定哪个模块存在问题。比如从 Compilation 对象获取统计数据过程中发现缺少必要字段的情况可参照如下代码片段处理: ```javascript // webpack/Stats.js 示例调整部分逻辑来捕获异常情况下的默认值设定 class Stats { constructor(compilation) { this.entries = compilation?.entries || []; this.modules = compilation?.modules || []; } toJson() { return this; } } module.exports = Stats; ``` 上述修改利用了 ES6 可选链语法(`?`)防止因属性不存在引发崩溃现象[^2]。 #### 5. 更新 Webpack 至匹配版本 最后考虑更新 Webpack 到支持现有插件集的新版本号上。注意每次大版本迭代之间可能存在 API 差异需同步适配更改之处。 --- ### 总结 按照以上步骤逐一排查应该能够有效缓解大多数由缺失依赖引起的编译难题。务必保持工具链条各环节处于良好状态以便顺利构建前端资源。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值