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

compile error under smartos #322

Closed
falood opened this issue Aug 2, 2016 · 3 comments
Closed

compile error under smartos #322

falood opened this issue Aug 2, 2016 · 3 comments
Labels

Comments

@falood
Copy link

falood commented Aug 2, 2016

# uname -a
SunOS local.local 5.11 joyent_20160218T022556Z i86pc i386 i86pc Solaris
# git status
HEAD detached at v4.6.0
# clang -v
clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-sun-solaris2.11
Thread model: posix
# make
  CC       watchman-log.o
log.c:78:5: error: implicit declaration of function 'dprintf' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    dprintf(STDERR_FILENO,
@wez
Copy link
Contributor

wez commented Aug 2, 2016

Something like this will likely get you up and running again:

$ git diff
diff --git a/log.c b/log.c
index 4e796d8..7caefb0 100644
--- a/log.c
+++ b/log.c
@@ -74,6 +74,7 @@ static void crash_handler(int signo, siginfo_t *si, void *ucontext) {
     }
   }

+#ifndef sun
   if (si) {
     dprintf(STDERR_FILENO,
         "Terminating due to signal %d %s "
@@ -84,6 +85,7 @@ static void crash_handler(int signo, siginfo_t *si, void *ucontext) {
     dprintf(STDERR_FILENO, "Terminating due to signal %d %s. %s\n",
       signo, w_strsignal(signo), reason);
   }
+#endif

 #if defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS_FD)
   {

@falood
Copy link
Author

falood commented Aug 2, 2016

Thank you! but another exception raised

  CC       watchman-opendir.o
opendir.c:190:28: error: unused parameter 'fd' [-Werror,-Wunused-parameter]
static int realpath_fd(int fd, char *canon, size_t canon_size) {
                           ^
opendir.c:335:28: error: use of undeclared identifier 'O_DIRECTORY'
  fd = open_strict(parent, O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC );
                           ^
opendir.c:367:30: error: use of undeclared identifier 'O_DIRECTORY'
  int fd = open_strict(path, O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC);
                             ^
3 errors generated.
Makefile:2099: recipe for target 'watchman-opendir.o' failed
make[1]: *** [watchman-opendir.o] Error 1

I delete O_DIRECTORY above and this is next error.

  CC       watcher/watchman-portfs.o
watcher/portfs.c:177:42: error: no member named 'st' in 'struct watchman_file'
  success = do_watch(state, name, &file->st);
                                   ~~~~  ^
watcher/portfs.c:202:19: error: incompatible pointer types passing 'struct watchman_dir_handle *' to parameter of type 'DIR *' [-Werror,-Wincompatible-pointer-types]
  if (fstat(dirfd(osdir), &st) == -1) {
                  ^~~~~
/usr/include/dirent.h:102:24: note: passing argument to parameter here
extern int              dirfd(DIR *);

@wez wez added the wontfix label Sep 10, 2016
@wez
Copy link
Contributor

wez commented Sep 10, 2016

I'm sorry about this, but we don't have time/resources to look after the solaris/smartos build. If there was a CI system that we could use to keep the tests running we'd gladly use it.
The solaris port is now in an officially unmaintained state (I've updated the website to indicate this).

I would love to keep it alive but it needs someone to maintain it; we don't use solaris/smartos and can't justify the time to set up and debug in that environment.

We will gladly accept pull requests from folks that want to help out and keep it alive!

I'm going to close this as "wontfix" but rather than meaning "we will never fix this", it should be interpreted as "we don't plan on fixing it, but will accept fixes from others".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants