You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Fabric 1.1.0无法构建及修改Makefile后orderer编译报错咨询

Fixing "No rule to make target `build/bin/orderer'" in Fabric 1.1.0

Hey there, let's break down this make error you're facing with Hyperledger Fabric 1.1.0. That No rule to make target 'build/bin/orderer' message means Make can't find the instructions it needs to build the orderer binary—and since you modified the official Makefile, that's almost certainly where the issue is rooted. Here's how to troubleshoot and fix it:

  • Check if you removed the orderer target rule
    The official Fabric 1.1.0 Makefile includes explicit rules for building the orderer. Look for a section that looks like this:

    orderer: build/bin/orderer
    
    build/bin/orderer: $(ORDERER_GO_FILES)
        @mkdir -p build/bin
        go build -o $@ ./cmd/orderer
    

    If you accidentally deleted this block or altered the target path (e.g., changed build/bin to a different directory), Make won't know how to generate the binary. Restore or correct this rule first.

  • Verify critical variable definitions
    The ORDERER_GO_FILES variable in the Makefile lists all the Go source files needed to build the orderer. If you modified or deleted this variable, Make loses track of the dependencies required to compile the binary. Double-check that this variable is still correctly defined and points to all the relevant .go files in the orderer module.

  • Don't delete the generic build pattern rule
    Fabric's Makefile uses a pattern rule to handle building most binaries consistently. It usually looks like this:

    build/bin/%:
        @mkdir -p $(@D)
        go build -o $@ ./cmd/$*
    

    If you removed this rule, even if you have the orderer: build/bin/orderer line, Make won't know how to generate the build/bin/orderer file itself. Restore this generic rule if it's missing.

  • Compare with the official Makefile to spot differences
    To pinpoint exactly what went wrong, back up your modified Makefile, then fetch the original 1.1.0 version (if you're using git, run git checkout tags/v1.1.0 -- Makefile). Use a diff tool to compare the two files—this will highlight which changes broke the build rules.

  • Quick workaround: Bypass Makefile temporarily
    If you need to get the binaries built immediately, skip the Makefile and compile directly with go build:

    mkdir -p build/bin
    go build -o build/bin/orderer ./cmd/orderer
    go build -o build/bin/peer ./cmd/peer
    

    This will generate the orderer and peer binaries while you fix the Makefile issues.

内容的提问来源于stack exchange,提问作者Jim Green

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:37:05