在编译freeradius2时,遇到了如下错误:
<prep>
/usr/bin/ld: .libs/debug.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: .libs/debug.o: Relocations in generic ELF (EM: 8)
.libs/debug.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
</prep>
解决方法如下:
1. 修改**lede/package/feeds/packages/freeradius2/Makefile**文件
> 修改方案如下:
```
PKG_NAME:=freeradius2
PKG_VERSION:=2.2.9
PKG_RELEASE:=1
PKG_BUILD_DEPENDS:=libtool # 加入这行代码
```
```
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
R="$(PKG_INSTALL_DIR)" \
INSTALLSTRIP="" \
all certs install
endef
修改为:
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
R="$(PKG_INSTALL_DIR)" \
INSTALLSTRIP="" LIBTOOL:="$(STAGING_DIR)/host/libltdl/bin/libtool" \
all certs install
endef
```
就这样,重新编译即可
网友评论