The compiled CDC cannot be started with TiUP Playground

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 编译生成的cdc无法用tiup playground启动

| username: TiDBer_S4eEz9Qb

Reproduction steps:

  1. git clone -b v7.1.0 git@github.com:pingcap/tiflow.git
  2. Made some modifications (very small changes)
  3. make cdc
  4. Placed the executable file cdc into the .tiup/components/cdc/v7.1.0 directory
  5. Executed tiup playground --ticdc 1

Error as follows:
Start pd instance:v7.1.0
Start tikv instance:v7.1.0
Start tidb instance:v7.1.0
Start cdc instance:v7.1.0
Force tidb(2048) to quit…
tidb quit
Force tikv(2028) to quit…
tikv quit
Force pd(2019) to quit…
pd quit
Error: Playground bootstrapping failed: fork/exec ~/.tiup/components/cdc/v7.1.0/cdc: exec format error

| username: ShawnYan | Original post link

Did you add executable permissions (+x)?

| username: TiDBer_S4eEz9Qb | Original post link

The case is solved. I was compiling locally on a Mac, so it failed. Later, I compiled it on CentOS and it worked.

| username: ShawnYan | Original post link

Did you move the compilation from Mac to CentOS?

| username: linnana | Original post link

The executable files are different, right?

| username: TiDBer_S4eEz9Qb | Original post link

Yes.

| username: Anna | Original post link

LOL