Forum OpenACS Development: Compiling Naviserver with oACS for Solaris

I am attempting to install openACS and Naviserver on an OmniOS solaris system using the install-ns.sh script found here (https://openacs.org/xowiki/naviserver-openacs). I have tried to run it according to the instructions provided but I am getting errors. The errors I get look like this if I use gmake:

binder.c: In function ‘Binder’:
binder.c:1037:12: error: ‘struct msghdr’ has no member named ‘msg_control’
binder.c:1038:12: error: ‘struct msghdr’ has no member named ‘msg_controllen’
gmake[1]: *** [binder.o] Error 1
gmake[1]: Leaving directory `/usr/local/src/naviserver-4.99.5/nsd'
gmake: *** [all] Error 1

Or Like this if I use make:

make: Warning: Ignoring DistributedMake -j option
make: Fatal error in reader: include/Makefile.global, line 51: Unexpected end of line seen

Any help the community might offer is highly appreciated.

Collapse
Posted by Gustaf Neumann on
Hi Joshua,

unfortunately, i have no Solaris system around.
The problem seems not uncommon to Solaris, see e.g. https://lists.isc.org/pipermail/dhcp-users/2007-June/003884.html

Please try to add the following 3 lines to the begin of binder.c:

#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE_EXTENDED 1
#define __EXTENSIONS__

all the best
-gn
PS: the best auditorium for naviserver issues is at https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Collapse
Posted by Joshua Barton on
I added the source you provided and got the following errors after running gmake.

gcc -O2 -DNDEBUG -Wall -fPIC -pipe -I../include -I"/usr/local/ns/include" -DHAVE_CONFIG_H -c -o binder.o binder.c
binder.c: In function 'Ns_SockBinderListen':
binder.c:808:8: error: 'struct msghdr' has no member named 'msg_accrights'
binder.c:809:8: error: 'struct msghdr' has no member named 'msg_accrightslen'
binder.c: In function 'Binder':
binder.c:1056:16: error: 'struct msghdr' has no member named 'msg_accrights'
binder.c:1057:16: error: 'struct msghdr' has no member named 'msg_accrightslen'
gmake[1]: *** [binder.o] Error 1
gmake[1]: Leaving directory `/usr/local/src/naviserver-4.99.5/nsd'
gmake: *** [all] Error 1

Thanks for your response, I will of course also check out the link you provided.

Collapse
Posted by Jim Lynch on
So I'd say re-run the configure script, and see if you can get those defines in, maybe by defining CC for the configure process (CC="gcc -Dsymbol=value -Danother=value ... " ./configure (etc, params for configure as before)

-Jim

(Gustaf, concur? additions?)

Collapse
Posted by Jim Lynch on
The direct reason you're getting this error, is because the compiler doesn't see some particular members to a struct. One step more indirectly, the struct definition is in a header file (a .h file) and is not being included.
Collapse
Posted by Jim Lynch on
also it looks like the solaris make is having trouble with the makefile, looks like you need gnu make (aka gmake)
Collapse
Posted by Gustaf Neumann on
Dear Joshua,

I've made some changes to NaviServer and the install scripts such they compile for OpenSolaris (OmniOS). The changes to the sources are in the repositories on bitbucket and github in the newest branches. Please get the install scripts from https://openacs.org/xowiki/naviserver-openacs (or https://github.com/gustafn/install-ns) and use in install-ns.sh

   version_ns=HEAD
   version_modules=HEAD
   version_xotcl=HEAD
and in install-oacs.sh
   oacs_core_version=oacs-5-8
   oacs_packages_version=oacs-5-8
   ns_src_dir=/usr/local/src/naviserver
and run the scripts. These install scripts should work on a pretty vanilla system (i used SunOS omnios-vagrant 5.11 omnios-6de5e81 i86pc i386 i86pc). The scripts fetch required packages via IPS ("pkg install ...") when possible and compile Tcl/NaviServer with 64-bit such it links with the IPS postgresql-927 package.

Once the new versions of NaviServer etc. are released, one should switch back to the released versions instead of using "HEAD" (which is often a moving target).

Hope this helps
-gustaf neumann

Collapse
Posted by Joshua Barton on
Thank you Gustaf, I have run install-ns.sh and it works great. I had to ensure for some reason that a newer version of perl was installed but other than that this ran beautifully, thank you so much for taking the time to work on this!
Collapse
Posted by Gustaf Neumann on
Thanks for the feedback! The little project gave me the opportunity to try out vagrant, which is pretty nice.