#3 Build error with vala 0.48

Closed
opened 6 months ago by sudoBash418 · 6 comments

vala 0.46.6 builds fine, but with vala 0.48.0 I get the following error when building, repeated multiple times for the same file:

system_daemon.c: In function ‘pamac_system_daemon_update_dbs’:
system_daemon.c:4409:4: error: function ‘__errno_location’ is initialized like a variable
In file included from src/pamac-system-daemon/9faade0@@pamac-system-daemon@exe/system_daemon.c:36:
../src/pamac-system-daemon/system_daemon.vala:489:24: error: expected identifier before ‘(’ token
  489 |      current_error.errno = (uint) errno;
      |                        ^~~~~
vala 0.46.6 builds fine, but with vala 0.48.0 I get the following error when building, repeated multiple times for the same file: ``` system_daemon.c: In function ‘pamac_system_daemon_update_dbs’: system_daemon.c:4409:4: error: function ‘__errno_location’ is initialized like a variable In file included from src/pamac-system-daemon/9faade0@@pamac-system-daemon@exe/system_daemon.c:36: ../src/pamac-system-daemon/system_daemon.vala:489:24: error: expected identifier before ‘(’ token 489 | current_error.errno = (uint) errno; | ^~~~~ ```
cromer self-assigned this 6 months ago
cromer commented 6 months ago
Owner

I will take a look.

I will take a look.
aleskva commented 6 months ago

pacman seems to be unable to satisfy vala < 0.48 (“unable to satisfy dependency ‘vala<0.48’ required by pamac-classic”)

pacman seems to be unable to satisfy vala < 0.48 ("unable to satisfy dependency 'vala<0.48' required by pamac-classic")
aleskva commented 6 months ago

BTW if I install vala 0.46 manually and then update pacman-classic, pacman-classic still offers me to upgrade vala to 0.48, which it shouldn’t or should? I’m confused

BTW if I install vala 0.46 manually and then update pacman-classic, pacman-classic still offers me to upgrade vala to 0.48, which it shouldn't or should? I'm confused
sudoBash418 commented 6 months ago
Poster

BTW if I install vala 0.46 manually and then update pacman-classic, pacman-classic still offers me to upgrade vala to 0.48, which it shouldn’t or should? I’m confused

Yes, it should offer to upgrade vala, just as pacman -Syu would.

The pamac-classic package has a build-time dependency on the vala package, not a runtime dependency; the difference being that after the pamac-classic package is built, it doesn’t need vala to be installed at all to run. In other words, the only time pamac-classic requires vala<0.48 is when installing/updating pamac-classic itself.

If you allow vala to be updated, it shouldn’t cause any issues aside from not being able to install/update pamac-classic until the fix for this issue is released.

> BTW if I install vala 0.46 manually and then update pacman-classic, pacman-classic still offers me to upgrade vala to 0.48, which it shouldn't or should? I'm confused Yes, it should offer to upgrade vala, just as `pacman -Syu` would. The `pamac-classic` package has a *build-time* dependency on the vala package, not a *runtime* dependency; the difference being that after the `pamac-classic` package is built, it doesn't need `vala` to be installed at all to run. In other words, the only time `pamac-classic` requires `vala<0.48` is when installing/updating `pamac-classic` itself. If you allow vala to be updated, it shouldn't cause any issues aside from not being able to install/update `pamac-classic` until the fix for this issue is released.
cromer commented 6 months ago
Owner

I have pushed a new version 7.1.3. The build now succeeds, but I don’t want to close this yet because the fix is very hacky. For whatever reason having a struct that contains the variable “errno” causes a conflict now that errno.h is included in the generated c code. Not sure if this is a problem with vala, errno.h, or something else entirely. But for the time being I just changed the variable name to fix the build as seen in this commit: d3fe4c0bae

I have pushed a new version 7.1.3. The build now succeeds, but I don't want to close this yet because the fix is very hacky. For whatever reason having a struct that contains the variable "errno" causes a conflict now that errno.h is included in the generated c code. Not sure if this is a problem with vala, errno.h, or something else entirely. But for the time being I just changed the variable name to fix the build as seen in this commit: https://git.cromer.cl/cromer/pamac-classic/commit/d3fe4c0bae96147f96ca6ae03d5cde5c41b8eba7
cromer commented 6 months ago
Owner

Looks like pamac also had the same issue with 0.48. They fixed it with the same solution I found: aaa481fe98

Renamed the errno variable.

For now I am going to close this.

Looks like pamac also had the same issue with 0.48. They fixed it with the same solution I found: https://gitlab.manjaro.org/applications/pamac/-/commit/aaa481fe98f42e7344b05c3dff5faf17571b25b7 Renamed the errno variable. For now I am going to close this.
cromer closed this issue 6 months ago
Sign in to join this conversation.
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.