OpenWRT 编译 error GNU libiconv not in use but included iconv.h is from libiconv

如题,编译时碰到上述错误,google后一大堆,唯独没有OpenWRT的解决办法,找到这篇文章:

http://www.lellansin.com/openwrt-%e7%bc%96%e8%af%91-error-gnu-libiconv-not-in-use-but-included-iconv-h-is-from-libiconv.html

按照文章的方法,在glib目录下,手动执行:

./configure --enable-iconv=no --with-libiconv=gnu

貌似 --enable-iconv=no 没有被识别到(不加也可以)

然后再编译,就可以了!

 

总觉得此种解决方法不够完美,应该还有更好的方法,知道的童鞋,留个言 ^_^

---------------------------------------------------

感谢wumingxing0228(http://blog.csdn.net/wumingxing0228)给出了解决方法:

from :http://lists.en.qi-hardware.com/pipermail/discussion/2011-February/007092.html

The OpenWrt menuconfig gained a new boolean symbol called
"CONFIG_BUILD_NLS" which is disabled by default [2]. Turning it on will
enable the building of the full gettext (libintl) and libiconv packages.

The setting can be found in the "Global Build Settings" menu, called
"Compile with full language support".

Packages using either iconv or intl have been changed [3] to include the
new convenience file "include/nls.mk" which exports variables to use
within Makefiles to pull in the right iconv or intl implementation.

The exported variables are:

 ICONV_FULL     - set to 1 if the full iconv implementation is used,
                  else unset
 ICONV_PREFIX   - path to the location of the include/ and lib/ dirs
                  of the currently used iconv implementation
 ICONV_DEPENDS  - expands to a dependency specification that results
                  either in +libiconv-full or nothing, depending on the
                  CONFIG_BUILD_NLS symbol
 ICONV_CFLAGS   - contains the appropriate CFLAGS to make programs find
                  the iconv headers
 ICONV_CPPFLAGS - alias to ICONV_CFLAGS
 ICONV_LDFLAGS  - contains the appropriate LDFLAGS to make programs link
                  to the iconv implementation

 INTL_FULL      - set to 1 if the full libintl implementation is used,
                  else unset
 INTL_PREFIX    - path to the location of the include/ and lib/ dirs
                  of the currently used libintl implementation
 INTL_DEPENDS   - expands to a dependency specification that results
                  either in +libintl-full or nothing, depending on the
                  CONFIG_BUILD_NLS symbol
 INTL_CFLAGS    - contains the appropriate CFLAGS to make programs find
                  the libintl headers
 INTL_CPPFLAGS  - alias to INTL_CFLAGS
 INTL_LDFLAGS   - contains the appropriate LDFLAGS to make programs link
                  to the libintl implementation

Additionally the include automatically extends the TARGET_CFLAGS,
TARGET_CPPFLAGS and TARGET_LDFLAGS variables so that most programs
should pick up the libs automatically in their configure/make process.

To adapt existing package Makefiles to the new mechanism, the following
changes must be made:

 - Add "include $(INCLUDE_DIR)/nls.mk" below the existing "package.mk"
   include

 - Remove existing extensions to TARGET_CFLAGS/CPPFLAGS/LDFLAGS like
   "TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/lib/libintl/include/" (if any)

 - Replace existing extensions to other variables with $(ICONV_PREFIX),
   $(INTL_PREFIX) where applicable (e.g.
   "EXTRA_CPPFLAGS+=-I$(STAGING_DIR)/usr/lib/libiconv/include" to
   "EXTRA_CPPFLAGS+=$(ICONV_CPPFLAGS)" or
   "EXTRA_CPPFLAGS+=-I$(ICONV_PREFIX)/include")

 - Replace dependency specifications like +libiconv, +libiconv-full,
   +libintl or +libintl-full with $(ICONV_DEPENDS) or $(INTL_DEPENDS)

 - Some packages have configure switches like "--with-libiconv=gnu",
   those should be wrapped similar to this:
   "$(if $(ICONV_FULL),--with-libiconv=gnu)"

 - If a program is known to fail with the stub implementation, a
   dependency like "DEPENDS:=@BUILD_NLS" can be specified to hide and
   disable the package from menuconfig if CONFIG_BUILD_NLS is unset


Neither the stub nor the full packages install their (shared) objects
and headers into a "standard" location ($(STAGING_DIR)/usr/...) anymore
so programs that must use them have to use the nls.mk facility.

Programs with optional iconv/intl support will just skip over them as
they're not detectable without extra flags anymore.

As the current Backfire branch and Trunk share the same packages feed,
the BUILD_NLS support has been merged into the latest branch as well.
1) http://lists.en.qi-hardware.com/pipermail/discussion/2011-January/006770.html
2) https://dev.openwrt.org/changeset/25302
3) https://dev.openwrt.org/changeset/25319



回答: 当出现"rooter is not in the sudoers file. This incident will be reported."的错误提示时,表示用户"rooter"没有在sudoers文件中被授权执行sudo命令。sudoers文件是用来配置哪些用户或用户组可以执行sudo命令的文件。在引用\[2\]中提到了sudoers文件的配置方式,可以根据需要选择适合的配置方式。如果你想让用户"rooter"能够执行sudo命令,你可以编辑sudoers文件并添加相应的配置。另外,根据引用\[1\]中的描述,你可以使用"mysql -u root -p"命令连接MySQL实例,然后输入登录密码来登录。 #### 引用[.reference_title] - *1* [MySQL8.016安装和配置——Windows](https://blog.csdn.net/qq_39572257/article/details/92089838)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [root is not in the sudoers file. This incident will be reported的解决方案](https://blog.csdn.net/huangzx3/article/details/81101332)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [openwrt 编译内核 error: #error GNU libiconv not in use but includediconv.h is from libicon](https://blog.csdn.net/qq_36600682/article/details/125781168)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值