Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Error building on Alpine (on Windows builds ok)

未关闭
#254 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
linux

调研方向

首先,在 Alpine Linux 3.18 上使用 V 0.4.0、gcc 和所报告的 repository revision 重现构建,然后将其与使用 tcc 的 Windows 构建进行比较。检查 src/feed_service.v 中的错误,并确定这些错误是由编译器还是 V 版本导致的;项目能够在 Alpine 上成功构建即表示完成。

由索引模型根据 Issue 内容生成。

描述

When I try to clone and build gitly on Alpine Linux 3.18 using v version: V 0.4.0 3c26bff, I get errors:
F.e.:

/src/feed_service.v:14:23: error: exec() returns a Result, so it should have either an `or {}` block, or `!` at the end
   12 |     where_repo_ids := repo_ids.map(it.str()).join(', ')
   13 |
   14 |     commits, _ := app.db.exec('
      |                          ~~~~~~
   15 |         select author, hash, created_at, repo_id, branch_id, message from `Commit`
   16 |             where repo_id in (${where_repo_ids}) order by created_at desc
/src/feed_service.v:20:16: error: invalid variable `commits`
   18 |     mut item_id := 0
   19 |
   20 |     for commit in commits {
      |                   ~~~~~~~
   21 |         vals := commit.vals
   22 |         author_name := vals[0]
/src/feed_service.v:21:18: error: `commit` does not return a value
   19 |
   20 |     for commit in commits {
   21 |         vals := commit.vals
      |                        ~~~~
   22 |         author_name := vals[0]
   23 |         commit_hash := vals[1]

etc
Compiler used on Alpine Linux: -cc gcc

At the same time, on Windows 10 the same repository builds successfully using v version: V 0.4.0 320057d and tcc compiler.

Probably compiler (gcc vs tcc) is the errors' cause?

I'm not an expert in C compilers etc, so I may be wrong.

Appreciate any help!

主要语言
V
星标
1.5k
派生
80
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

vlang/gitly 的其他 Issue

查看 vlang/gitly 的全部 Issue

相似的 Issue

更多 Build System Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。