grissom 发表于 2023-3-16 18:47

openwrt编译问题,小白来请教

本帖最后由 grissom 于 2023-3-18 20:45 编辑

小白初学编译,本地编译环境编译原版Openwrt,解决了几个问题后,被这个问题难倒了。。。:'(


/openwrt/staging_dir/toolchain-x86_64_gcc-11.2.0_musl/usr/include -I/home/uuser/openwrt/staging_dir/toolchain-x86_64_gcc-11.2.0_musl/include/fortify -I/home/uuser/openwrt/staging_dir/toolchain-x86_64_gcc-11.2.0_musl/include " LDFLAGS="-L/home/uuser/openwrt/staging_dir/toolchain-x86_64_gcc-11.2.0_musl/usr/lib -L/home/uuser/openwrt/staging_dir/toolchain-x86_64_gcc-11.2.0_musl/lib -znow -zrelro "   ./configure --target=x86_64-openwrt-linux --host=x86_64-openwrt-linux --build=x86_64-pc-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls; fi; )
touch /home/uuser/openwrt/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /home/uuser/openwrt/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug/.built
touch /home/uuser/openwrt/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug/.built_check
make -C "/home/uuser/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.19" KCFLAGS="-fmacro-prefix-map=/home/uuser/openwrt/build_dir/target-x86_64_musl=target-x86_64_musl -fno-caller-saves " HOSTCFLAGS="-O2 -I/home/uuser/openwrt/staging_dir/host/include -I/home/uuser/openwrt/staging_dir/hostpkg/include -I/home/uuser/openwrt/staging_dir/target-x86_64_musl/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="x86_64-openwrt-linux-musl-" ARCH="x86" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Tue Jan3 00:24:21 2023" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/home/uuser/openwrt/staging_dir/host/lib" KBUILD_HOSTLDLIBS="-L/home/uuser/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V=''cmd_syscalls= KBUILD_EXTRA_SYMBOLS="" KERNELRELEASE=6.1.19 M="/home/uuser/openwrt/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug" EXTRA_CFLAGS=" -DCONFIG_BUTTON_HOTPLUG=1" CONFIG_BUTTON_HOTPLUG=m modules
make: Entering directory '/home/uuser/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.19'
CC /home/uuser/openwrt/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug/button-hotplug.o
/home/uuser/openwrt/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug/button-hotplug.c: In function 'button_hotplug_work':
/home/uuser/openwrt/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug/button-hotplug.c:177:9: error: implicit declaration of function 'broadcast_uevent' [-Werror=implicit-function-declaration]
177 |         broadcast_uevent(event->skb, 0, 1, GFP_KERNEL);
      |         ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make: *** Error 1
make: *** Error 2
make: Leaving directory '/home/uuser/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.19'
make: *** Error 2
make: Leaving directory '/home/uuser/openwrt/package/kernel/button-hotplug'
time: package/kernel/button-hotplug/compile#1.11#0.37#1.46
    ERROR: package/kernel/button-hotplug failed to build.
make: *** Error 1
make: Leaving directory '/home/uuser/openwrt'
make: *** Error 2
make: Leaving directory '/home/uuser/openwrt'
make: *** 错误 2

Makefile文件里面就1行


看了lean大的仓库里相关文件,是一样的内容。

可是本地编译怎么会报错呢。。。怎么能将这个ERROR关闭呢?

各位大神有没有遇见过这个问题,,,请赐教。。。。。。

唐韵洁 发表于 2023-3-16 19:17

你选的插件太多了,

grissom 发表于 2023-3-16 20:56

为了编译成功,我把插件都取消了。。没有插件了。。。

aming.ou 发表于 2023-3-17 09:05

还是站在路人肩膀吧,不要从0开始。建议用SDK编译你要的插件ipk,再用imagebuilder集成你的插件封包为固件

atshot 发表于 2023-3-17 10:02

make -j1 v=s 执行完截图

grissom 发表于 2023-3-18 21:03

有没有哪位大神能帮小弟一下,,,怎么解决这个问题啊。。。
页: [1]
查看完整版本: openwrt编译问题,小白来请教