~lattis/muon#72: 
ArcaOS Support

I tried to build Muon on ArcaOS (especially relevant since they only have Python 2 and no Python 3 for now, which makes using Meson completely impossible) and got the following errors:

+ output=muon
+ dir=
+ [ -n  ]
+ pkgconf_cmd=
+ command -v pkgconf
+ command -v pkg-config
+ pkgconf_cmd=pkg-config
+ [ -n pkg-config ]
+ pkg-config libpkgconf
+ pkgconf_src=libpkgconf_null.c
+ pkgconf_cflags=
+ pkgconf_libs=
+ c99 -Iinclude src/amalgam.c -o muon
In file included from src/amalgam.c:18:
src/error.c: In function 'error_diagnostic_store_push_src':
src/error.c:48:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   48 |   if (s->id == (uint64_t)src && strcmp(s->src.label, src->label) == 0) {
      |                ^
src/error.c:61:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   61 |    .id = (uint64_t)src,
      |          ^
In file included from src/amalgam.c:79:
src/platform/filesystem.c: In function 'fs_make_symlink':
src/platform/filesystem.c:763:6: warning: implicit declaration of function 'symlinkat'; did you mean 'symlink'? [-Wimplicit-function-declaration]
  763 |  if (symlinkat(target, 0, path) != 0) {
      |      ^~~~~~~~~
      |      symlink
src/platform/filesystem.c: In function 'fs_chmod':
src/platform/filesystem.c:810:7: warning: implicit declaration of function 'fchmodat'; did you mean '_chmod'? [-Wimplicit-function-declaration]
  810 |   if (fchmodat(AT_FDCWD, path, (mode_t)mode, AT_SYMLINK_NOFOLLOW) == -1) {
      |       ^~~~~~~~
      |       _chmod
src/platform/filesystem.c:810:16: error: 'AT_FDCWD' undeclared (first use in this function)
  810 |   if (fchmodat(AT_FDCWD, path, (mode_t)mode, AT_SYMLINK_NOFOLLOW) == -1) {
      |                ^~~~~~~~
src/platform/filesystem.c:810:16: note: each undeclared identifier is reported only once for each function it appears in
src/platform/filesystem.c:810:46: error: 'AT_SYMLINK_NOFOLLOW' undeclared (first use in this function)
  810 |   if (fchmodat(AT_FDCWD, path, (mode_t)mode, AT_SYMLINK_NOFOLLOW) == -1) {
      |                                              ^~~~~~~~~~~~~~~~~~~
In file included from src/amalgam.c:84:
src/platform/term.c: In function 'term_winsize':
src/platform/term.c:20:9: error: variable 'w' has initializer but incomplete type
   20 |  struct winsize w = { 0 };
      |         ^~~~~~~
src/platform/term.c:20:23: warning: excess elements in struct initializer
   20 |  struct winsize w = { 0 };
      |                       ^
src/platform/term.c:20:23: note: (near initialization for 'w')
src/platform/term.c:20:17: error: storage size of 'w' isn't known
   20 |  struct winsize w = { 0 };
      |                 ^
src/platform/term.c:21:16: error: 'TIOCGWINSZ' undeclared (first use in this function)
   21 |  if (ioctl(fd, TIOCGWINSZ, &w) == -1) {
      |                ^~~~~~~~~~

I wonder if some of these functions are really necessary for the core functionality of Muon.

gcc-9.2.0 bash 5.0.11

Status
REPORTED
Submitter
~xvilka
Assigned to
No-one
Submitted
2 years ago
Updated
1 year, 10 months ago
Labels
No labels applied.

~lattis 2 years ago

The errors in filesystem.c are probably the most difficult. The other issues aren't very important.

~xvilka 2 years ago

Absolutely. I opened an issue in ArcaOS also requesting to add those functions: https://mantis.arcanoae.com/view.php?id=3327

Regarding those two warnings, they happen on any 32bit system:

src/error.c: In function 'error_diagnostic_store_push_src':
src/error.c:48:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   48 |   if (s->id == (uint64_t)src && strcmp(s->src.label, src->label) == 0) {
      |                ^
src/error.c:61:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   61 |    .id = (uint64_t)src,
      |          ^

~eschwartz 2 years ago

Please note that access to this system is restricted to current Arca Noae support subscribers. If your subscription has expired, your account here will be disabled and you will need to renew or purchase a new support subscription to regain access.

I'll take your word for it. :D

~xvilka 2 years ago

Here is the issue in the libc ArcaOS uses: https://github.com/bitwiseworks/libcx/issues/81

~vtorri 2 years ago

for pointer to int, cast first to uintptr_t: (uint64_t)(uintptr_t)src

~vtorri 1 year, 10 months ago

@~xvilka no news on this ?

Register here or Log in to comment, or comment via email.