bytebase / bytebase/bytebase

build failed on loongarch platform

Open
#11,737 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
14.5k
Forks
984
Avg merge
15h 58m
Merged PRs (30d)
256

Description

Provide the Bytebase version you are using

2.16.0

Describe the bug
Start building Bytebase monolithic 2.16.0...

Step 1 - building Bytebase frontend...
Lockfile is up to date, resolution step is skipped
Packages: +862
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 862, reused 862, downloaded 0, added 0, done
node_modules/.pnpm/leveldown@5.6.0/node_modules/leveldown: Running install script, failed in 1s
.../node_modules/leveldown install$ node-gyp-build
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@10.1.0
│ gyp info using node@20.12.2 | linux | loong64
│ gyp info find Python using Python version 3.11.6 found at "/usr/bin/python3"
│ gyp info spawn /usr/bin/python3
│ gyp info spawn args [
│ gyp info spawn args '/home/loong/nodejs_20.12.2-0_loongarch64/usr/lib/node_modules/pnpm/dist/n…
│ gyp info spawn args 'binding.gyp',
│ gyp info spawn args '-f',
│ gyp info spawn args 'make',
│ gyp info spawn args '-I',
│ gyp info spawn args '/home/loong/gitee/Bytebase/frontend/node_modules/.pnpm/leveldown@5.6.0/no…
│ gyp info spawn args '-I',
│ gyp info spawn args '/home/loong/nodejs_20.12.2-0_loongarch64/usr/lib/node_modules/pnpm/dist/n…
│ gyp info spawn args '-I',
│ gyp info spawn args '/home/loong/.cache/node-gyp/20.12.2/include/node/common.gypi',
│ gyp info spawn args '-Dlibrary=shared_library',
│ gyp info spawn args '-Dvisibility=default',
│ gyp info spawn args '-Dnode_root_dir=/home/loong/.cache/node-gyp/20.12.2',
│ gyp info spawn args '-Dnode_gyp_dir=/home/loong/nodejs_20.12.2-0_loongarch64/usr/lib/node_modu…
│ gyp info spawn args '-Dnode_lib_file=/home/loong/.cache/node-gyp/20.12.2/<(target_arch)/node.l…
│ gyp info spawn args '-Dmodule_root_dir=/home/loong/gitee/Bytebase/frontend/node_modules/.pnpm/…
│ gyp info spawn args '-Dnode_engine=v8',
│ gyp info spawn args '--depth=.',
│ gyp info spawn args '--no-parallel',
│ gyp info spawn args '--generator-output',
│ gyp info spawn args 'build',
│ gyp info spawn args '-Goutput_dir=.'
│ gyp info spawn args ]
│ gyp info spawn make
│ gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│ make: 进入目录“/home/loong/gitee/Bytebase/frontend/node_modules/.pnpm/leveldown@5.6.0/node_mod…
│   CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o
│ In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47,
│                  from ../deps/leveldb/leveldb-1.20/port/port.h:16,
│                  from ../deps/leveldb/leveldb-1.20/db/filename.h:14,
│                  from ../deps/leveldb/leveldb-1.20/db/builder.cc:7:
│ ../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:229:2: error: #error Please implement Atomi…
│   229 | #error Please implement AtomicPointer for this platform.
│       |  ^~~~~
│ make: *** [deps/leveldb/leveldb.target.mk:155:Release/obj.target/leveldb/deps/leveldb/leveldb…
│ make: 离开目录“/home/loong/gitee/Bytebase/frontend/node_modules/.pnpm/leveldown@5.6.0/node_mod…
│ gyp ERR! build error 
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack at ChildProcess.<anonymous> (/home/loong/nodejs_20.12.2-0_loongarch64/usr/lib/n…
│ gyp ERR! System Linux 6.9.0-rc3-loong64-desktop
│ gyp ERR! command "/home/loong/nodejs_20.12.2-0_loongarch64/usr/bin/node" "/home/loong/nodejs_2…
│ gyp ERR! cwd /home/loong/gitee/Bytebase/frontend/node_modules/.pnpm/leveldown@5.6.0/node_modul…
│ gyp ERR! node -v v20.12.2
│ gyp ERR! node-gyp -v v10.1.0
│ gyp ERR! not ok 
└─ Failed in 1s at /home/loong/gitee/Bytebase/frontend/node_modules/.pnpm/leveldown@5.6.0/node_modules/leveldown                                                                                      
 ELIFECYCLE  Command failed with exit code 1.
Completed building Bytebase frontend.

Step 2 - building Bytebase backend...
backend/server/server_frontend_embed.go:17:12: pattern dist: no matching files found
Steps to reproduce

scripts/build_bytebase.sh

Expected behavior

Build successful

Provide the database you are using

No response

Provide the version control system you are using

No response

Additional context

https://github.com/Level/leveldown show that

This module will soon be deprecated, because it is superseded by classic-level.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scripts/build_bytebase.sh and reproduce the frontend leveldown install failure, focusing on the reported leveldb atomic_pointer.h error on loong64. Then inspect backend/server/server_frontend_embed.go, where the missing dist result is reported, and verify that the build completes successfully on LoongArch.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, javascript, node.js
Domain
backend, build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.