Build error with vala 0.48 #3

Closed
opened 2020-03-12 00:24:31 -03:00 by sudoBash418 · 6 comments
First-time contributor

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 2020-03-12 00:29:18 -03:00
Owner

I will take a look.

I will take a look.
Contributor

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")
Contributor

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
Author
First-time contributor

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.
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
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.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cromer/pamac-classic#3
No description provided.