Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MT7621新版本 编译错误 #12629

Open
1 task done
akihara-sam opened this issue Oct 31, 2024 · 1 comment
Open
1 task done

MT7621新版本 编译错误 #12629

akihara-sam opened this issue Oct 31, 2024 · 1 comment

Comments

@akihara-sam
Copy link

详细叙述

从错误信息来看,主要有以下几个问题:

SMALL_OPTS 警告:

vbnet
复制代码
Makefile:250: Warning: SMALL_OPTS was forced to "-DBUFSIZE=16384 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=165530" but is no longer used and will be ignored. Please check if this setting are still relevant, and move it either to DEFINE or to CFLAGS instead.
表示 SMALL_OPTS 不再使用并且会被忽略。你可以考虑将这些选项添加到 CFLAGS 或 DEFINE 中。

忽略的构建选项警告:

vbnet
复制代码
Makefile:352: Warning: ignoring unknown build option: USE_PTHREAD_PSHARED=1
表明 USE_PTHREAD_PSHARED 选项无效。此选项可能已在 haproxy 3.0 中弃用或者不再兼容,可以尝试在 Makefile 或配置文件中移除该选项。

汇编错误:

less
复制代码
{standard input}:3743: Error: branch to a symbol in another ISA mode
这是一个架构相关的错误,通常意味着 haproxy 的代码中某些指令与当前目标架构 (mipsel_24kc) 不兼容。这可能是因为代码中包含的汇编指令或特定优化在 MIPS 体系结构上无法正常编译。

解决方法
检查和修改 Makefile 配置:

移除 SMALL_OPTS 相关配置,将其内容(如 -DBUFSIZE=16384)移至 CFLAGS 或者 DEFINE。
移除 USE_PTHREAD_PSHARED 选项。
架构兼容性调整:

尝试在 Makefile 中添加 -mips32r2 之类的架构标志,以确保代码和 MIPS 兼容。具体方法是将此选项添加到 CFLAGS 中:
makefile
复制代码
CFLAGS += -mips32r2
如果仍然报错,可能需要考虑降级 haproxy 到一个在 mipsel_24kc 上更稳定的版本。
重新编译: 修改完成后,重新运行 make 命令尝试编译。

重复 issue

  • 没有类似的 issue

具体型号

MT7621

详细日志

make[4]: Entering directory '/workdir/openwrt/build_dir/target-mipsel_24kc_musl/haproxy-ssl/haproxy-3.0.0'
Makefile:250: Warning: SMALL_OPTS was forced to "-DBUFSIZE=16384 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=165530" but is no longer used and will be ignored. Please check if this setting are still relevant, and move it either to DEFINE or to CFLAGS instead.
Makefile:352: Warning: ignoring unknown build option: USE_PTHREAD_PSHARED=1
CC src/task.o
{standard input}: Assembler messages:
{standard input}:3743: Error: branch to a symbol in another ISA mode
make[4]: *** [Makefile:1041: src/task.o] Error 1
make[4]: Leaving directory '/workdir/openwrt/build_dir/target-mipsel_24kc_musl/haproxy-ssl/haproxy-3.0.0'
make[3]: *** [Makefile:149: /workdir/openwrt/build_dir/target-mipsel_24kc_musl/haproxy-ssl/haproxy-3.0.0/.built] Error 2
make[3]: Leaving directory '/workdir/openwrt/feeds/packages/net/haproxy'
time: package/feeds/packages/haproxy/ssl/compile#0.50#0.11#0.58
ERROR: package/feeds/packages/haproxy failed to build (build variant: ssl).
make[2]: *** [package/Makefile:116: package/feeds/packages/haproxy/compile] Error 1
make[2]: Leaving directory '/workdir/openwrt'
make[1]: *** [package/Makefile:110: /workdir/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/workdir/openwrt'
make: *** [/workdir/openwrt/include/toplevel.mk:231: world] Error 2
Error: Process completed with exit code 2.

@akihara-sam
Copy link
Author

改成 ubuntu-22.04 版本 编译成功了,最新版的ubuntu 编译会失败。

env:
REPO_URL: https://github.com/coolsnowwolf/lede
REPO_BRANCH: master
FEEDS_CONF: feeds.conf.default
CONFIG_FILE: hc5962.config
DIY_P1_SH: diy-part1.sh
DIY_P2_SH: diy-part2.sh
UPLOAD_BIN_DIR: false
UPLOAD_FIRMWARE: true
UPLOAD_RELEASE: false
TZ: Asia/Shanghai

jobs:
build:
runs-on: ubuntu-22.04

steps:
- name: Checkout
  uses: actions/checkout@main

- name: Initialization environment
  env:
    DEBIAN_FRONTEND: noninteractive
  run: |
    sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
    sudo docker image prune --all --force
    sudo -E apt-get -qq update
    sudo -E apt-get -qq install ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev libreadline-dev libssl-dev libtool lrzsz mkisofs msmtp ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
    sudo -E apt-get -qq autoremove --purge
    sudo -E apt-get -qq clean
    sudo timedatectl set-timezone "$TZ"
    sudo mkdir -p /workdir
    sudo chown $USER:$GROUPS /workdir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant