Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lospejos opened this issue Aug 11, 2023 · 0 comments
Open

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

lospejos opened this issue Aug 11, 2023 · 0 comments

Comments

@lospejos
Copy link
Contributor

lospejos commented Aug 11, 2023

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!

This was referenced Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant