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

Make fails on Solaris 10.4 #117

Closed
ngaijohnsen opened this issue Jan 25, 2019 · 3 comments
Closed

Make fails on Solaris 10.4 #117

ngaijohnsen opened this issue Jan 25, 2019 · 3 comments

Comments

@ngaijohnsen
Copy link

ngaijohnsen commented Jan 25, 2019

Building on Solaris 10.4 seems to be broken.

First issue I encountered was a undefined "MNTTYPE_NFS" in etc/afpd/quota.c. After adding #include <sys/mntent.h> to quota.c that was resolved.

Then it fails hard on what seems like glib related issues:

.....
Making all in afpd
make  all-am
  CC       afpd-afpstats_obj.o
In file included from /usr/lib/glib-2.0/include/glibconfig.h:9:0,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /usr/include/glib-2.0/gobject/gbinding.h:28,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from afpstats_obj.c:22:
afpstats_obj.c: In function ‘afpstats_obj_get_type’:
/usr/include/glib-2.0/glib/gmacros.h:232:53: error: size of array ‘_GStaticAssertCompileTimeAssertion_1’ is negative
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                                     ^
/usr/include/glib-2.0/glib/gmacros.h:229:47: note: in definition of macro ‘G_PASTE_ARGS’
 #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
                                               ^~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:232:44: note: in expansion of macro ‘G_PASTE’
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                            ^~~~~~~
/usr/include/glib-2.0/glib/gthread.h:249:5: note: in expansion of macro ‘G_STATIC_ASSERT’
     G_STATIC_ASSERT (sizeof *(location) == sizeof (gpointer));       \
     ^~~~~~~~~~~~~~~
afpstats_obj.c:61:6: note: in expansion of macro ‘g_once_init_enter’
  if (g_once_init_enter(&g_define_type_id__volatile)) {
      ^~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:32:0,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/glib-2.0/gobject/gbinding.h:28,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from afpstats_obj.c:22:
/usr/include/glib-2.0/glib/gthread.h:250:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     (void) (0 ? (gpointer) *(location) : 0);                         \
                 ^
afpstats_obj.c:61:6: note: in expansion of macro ‘g_once_init_enter’
  if (g_once_init_enter(&g_define_type_id__volatile)) {
      ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/glib-2.0/include/glibconfig.h:9:0,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /usr/include/glib-2.0/gobject/gbinding.h:28,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from afpstats_obj.c:22:
/usr/include/glib-2.0/glib/gmacros.h:232:53: error: size of array ‘_GStaticAssertCompileTimeAssertion_2’ is negative
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                                     ^
/usr/include/glib-2.0/glib/gmacros.h:229:47: note: in definition of macro ‘G_PASTE_ARGS’
 #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
                                               ^~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:232:44: note: in expansion of macro ‘G_PASTE’
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                            ^~~~~~~
/usr/include/glib-2.0/glib/gatomic.h:129:5: note: in expansion of macro ‘G_STATIC_ASSERT’
     G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer));                 \
     ^~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:251:7: note: in expansion of macro ‘g_atomic_pointer_get’
     (!g_atomic_pointer_get (location) &&                             \
       ^~~~~~~~~~~~~~~~~~~~
afpstats_obj.c:61:6: note: in expansion of macro ‘g_once_init_enter’
  if (g_once_init_enter(&g_define_type_id__volatile)) {
      ^~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/gthread.h:32:0,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/glib-2.0/gobject/gbinding.h:28,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from afpstats_obj.c:22:
/usr/include/glib-2.0/glib/gatomic.h:130:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     (gpointer) __atomic_load_4 ((atomic), __ATOMIC_SEQ_CST);                 \
     ^
/usr/include/glib-2.0/glib/gthread.h:251:7: note: in expansion of macro ‘g_atomic_pointer_get’
     (!g_atomic_pointer_get (location) &&                             \
       ^~~~~~~~~~~~~~~~~~~~
afpstats_obj.c:61:6: note: in expansion of macro ‘g_once_init_enter’
  if (g_once_init_enter(&g_define_type_id__volatile)) {
      ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/glib-2.0/include/glibconfig.h:9:0,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /usr/include/glib-2.0/gobject/gbinding.h:28,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from afpstats_obj.c:22:
/usr/include/glib-2.0/glib/gmacros.h:232:53: error: size of array ‘_GStaticAssertCompileTimeAssertion_3’ is negative
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                                     ^
/usr/include/glib-2.0/glib/gmacros.h:229:47: note: in definition of macro ‘G_PASTE_ARGS’
 #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
                                               ^~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:232:44: note: in expansion of macro ‘G_PASTE’
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                            ^~~~~~~
/usr/include/glib-2.0/glib/gthread.h:256:5: note: in expansion of macro ‘G_STATIC_ASSERT’
     G_STATIC_ASSERT (sizeof *(location) == sizeof (gpointer));       \
     ^~~~~~~~~~~~~~~
afpstats_obj.c:70:3: note: in expansion of macro ‘g_once_init_leave’
   g_once_init_leave(&g_define_type_id__volatile, g_define_type_id);
   ^~~~~~~~~~~~~~~~~
*** Error code 1
The following command caused the error:
echo "  CC      " afpd-afpstats_obj.o;gcc -DHAVE_CONFIG_H -I. -I../..   -I../../include -I../../include -I../.. -I/usr/include/kerberosv5 -D_REENTRANT -pthreads  -DAPPLCNAME -DSERVERTEXT=\"/usr/local/var/netatalk/msg/\"  -D_PATH_AFPDPWFILE=\"/usr/local/etc/afppasswd\"  -D_PATH_AFPDUAMPATH=\"/usr/local/lib/netatalk//\"  -D_PATH_CONFDIR=\"/usr/local/etc/\"  -D_PATH_STATEDIR='"/usr/local/var/netatalk/"'   -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pcre -D_REENTRANT -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pcre -DDBUS_COMPILATION -D_U_="__attribute__((unused))" -g -O2 -MT afpd-afpstats_obj.o -MD -MP -MF .deps/afpd-afpstats_obj.Tpo -c -o afpd-afpstats_obj.o `test -f 'afpstats_obj.c' || echo './'`afpstats_obj.c
make: Fatal error: Command failed for target `afpd-afpstats_obj.o'
Current working directory /root/Netatalk-netatalk-3-1-12/etc/afpd
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /root/Netatalk-netatalk-3-1-12/etc/afpd
*** Error code 1
The following command caused the error:
fail=; \
if (target_option=k; case ${target_option-} in  ?) ;;  *) echo "am__make_running_with_option: internal error: invalid"  "target option '${target_option-}' specified" >&2;  exit 1;;  esac;  has_opt=no;  sane_makeflags=$MAKEFLAGS;  if {  if test -z '2'; then  false;  elif test -n ''; then  true;  elif test -n '' && test -n ''; then  true;  else  false;  fi;  }; then  sane_makeflags=$MFLAGS;  else  case $MAKEFLAGS in  *\\[\ \      ]*)  bs=\\;  sane_makeflags=`printf '%s\n' "$MAKEFLAGS"  | sed "s/$bs$bs[$bs $bs        ]*//g"`;;  esac;  fi;  skip_next=no;  strip_trailopt ()  {  flg=`printf '%s\n' "$flg" | sed "s/$1.*$//"`;  };  for flg in $sane_makeflags; do  test $skip_next = yes && { skip_next=no; continue; };  case $flg in  *=*|--*) continue;;  -*I) strip_trailopt 'I'; skip_next=yes;;  -*I?*) strip_trailopt 'I';;  -*O) strip_trailopt 'O'; skip_next=yes;;  -*O?*) strip_trailopt 'O';;  -*l) strip_trailopt 'l'; skip_next=yes;;  -*l?*) strip_trailopt 'l';;  -[dEDm]) skip_next=yes;;  -[JT]) skip_next=yes;;  esac;  case $flg in  *$target_option*) has_opt=yes; break;;  esac;  done;  test $has_opt = yes); then \
  failcom='fail=yes'; \
else \
  failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
case "all-recursive" in \
  distclean-* | maintainer-clean-*) list='spotlight afpd cnid_dbd netatalk uams' ;; \
  *) list='spotlight afpd cnid_dbd netatalk uams' ;; \
esac; \
for subdir in $list; do \
  echo "Making $target in $subdir"; \
  if test "$subdir" = "."; then \
    dot_seen=yes; \
    local_target="$target-am"; \
  else \
    local_target="$target"; \
  fi; \
  (CDPATH="${ZSH_VERSION+.}:" && cd $subdir && make  $local_target) \
  || eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
  make  "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /root/Netatalk-netatalk-3-1-12/etc
*** Error code 1
The following command caused the error:
fail=; \
if (target_option=k; case ${target_option-} in  ?) ;;  *) echo "am__make_running_with_option: internal error: invalid"  "target option '${target_option-}' specified" >&2;  exit 1;;  esac;  has_opt=no;  sane_makeflags=$MAKEFLAGS;  if {  if test -z '1'; then  false;  elif test -n ''; then  true;  elif test -n '' && test -n ''; then  true;  else  false;  fi;  }; then  sane_makeflags=$MFLAGS;  else  case $MAKEFLAGS in  *\\[\ \      ]*)  bs=\\;  sane_makeflags=`printf '%s\n' "$MAKEFLAGS"  | sed "s/$bs$bs[$bs $bs        ]*//g"`;;  esac;  fi;  skip_next=no;  strip_trailopt ()  {  flg=`printf '%s\n' "$flg" | sed "s/$1.*$//"`;  };  for flg in $sane_makeflags; do  test $skip_next = yes && { skip_next=no; continue; };  case $flg in  *=*|--*) continue;;  -*I) strip_trailopt 'I'; skip_next=yes;;  -*I?*) strip_trailopt 'I';;  -*O) strip_trailopt 'O'; skip_next=yes;;  -*O?*) strip_trailopt 'O';;  -*l) strip_trailopt 'l'; skip_next=yes;;  -*l?*) strip_trailopt 'l';;  -[dEDm]) skip_next=yes;;  -[JT]) skip_next=yes;;  esac;  case $flg in  *$target_option*) has_opt=yes; break;;  esac;  done;  test $has_opt = yes); then \
  failcom='fail=yes'; \
else \
  failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
case "all-recursive" in \
  distclean-* | maintainer-clean-*) list='include libatalk bin config etc contrib distrib doc man  macros test libevent' ;; \
  *) list='libevent include libatalk bin config etc contrib distrib doc man macros test' ;; \
esac; \
for subdir in $list; do \
  echo "Making $target in $subdir"; \
  if test "$subdir" = "."; then \
    dot_seen=yes; \
    local_target="$target-am"; \
  else \
    local_target="$target"; \
  fi; \
  (CDPATH="${ZSH_VERSION+.}:" && cd $subdir && make  $local_target) \
  || eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
  make  "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /root/Netatalk-netatalk-3-1-12
*** Error code 1
make: Fatal error: Command failed for target `all'

Any hints on what the issue could be would be very appreciated.

Thanks!

@ngaijohnsen
Copy link
Author

ngaijohnsen commented Jan 25, 2019

Slight update. Disabling afp stats enables the compile to complete. Not entirely sure what kind of consequence this will have for me though.

./configure --with-init-style=solaris --without-afpstats

Basically now afpd -V says:

afpd has been compiled with support for these features:

          AFP versions: 2.2 3.0 3.1 3.2 3.3 3.4 
         CNID backends: dbd last tdb 
      Zeroconf support: Avahi
  TCP wrappers support: Yes
         Quota support: Yes
   Admin group support: Yes
    Valid shell checks: Yes
      cracklib support: No
            EA support: ad | sys
           ACL support: Yes
          LDAP support: Yes
         D-Bus support: No
     Spotlight support: No
         DTrace probes: Yes

Can anyone clarify what this means for me? I want to run netatalk on Solaris for plug-and-play file sharing / timemachine for our Macs with working zeroconf. Comparing afpd -V output above with the output from my working netatalk 3.1.9 on Solaris 10.3, the only difference is the D-bus support.

Thanks!

@rdmark
Copy link
Member

rdmark commented Feb 7, 2023

@ngaijohnsen afpstats is just a diagnostic tool, which uses the D-Bus interface. See the afpstats manpage or https://netatalk.sourceforge.io/3.1/htmldocs/afpstats.1.html

Both are optional and Netatalk should work without either of them.

@rdmark
Copy link
Member

rdmark commented Feb 7, 2023

The MNTTYPE_NFS issue is being fixed with #196 for 3.1

@rdmark rdmark closed this as completed Feb 7, 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

2 participants