Skip to content

Error building on Alpine (on Windows builds ok) #254

Description

@lospejos

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions