-
Notifications
You must be signed in to change notification settings - Fork 51
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
Unable to compile on Solaris #1
Comments
Thanks for your report! I'll look into changing the yacc command line. $() is a valid command substitution according to SUS: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03; I think this is a Solaris specialty. I'll have to see what I can do about err.h. Could you tell me what defines struct queue? |
Hi, The Solaris sh man page is here: http://docs.oracle.com/cd/E19963-01/html/821-1461/sh-1.html (There is a POSIX-compliant option in /usr/xpg4/bin, but it is not the default) (/bin is a symlink to /usr/bin on Solaris) The Solaris sh seem to be an actual derivative of the Bourne shell... A version can be found here for testing: http://heirloom.sourceforge.net/sh.html Solaris 11 uses ksh as its /bin/sh, which might work better. (It might make sense to mention in the documentation that a standard compliant /bin/sh is required) bison works fine as yacc, it might make sense to mention in the readme (or a "INSTALL" file) which yacc is expected. I'll try to find the gcc parameter that gives preprocessed code for the struct queue issue if I'm near the Solaris server again... (Things like "make install" might also need work on Solaris - sendmail is installed and runs by default, but that is probably a matter for packagers / another issue) An option to compile without OpenSSL might also have its uses (e.g. for embedded systems), but that should probably be a feature request. For the documentation it might make sense to mention something like this: (I have not actually tested this list, specifying versions might also be necessary if some versions is known bad...) (Noting when POSIX-compliant versions is fine might also help) Set the CC, YACC, INSTALL and LEX variable to relevant commands if you have problems. Gert |
Thanks for the useful feedback. I'll try to update the docs as soon as On 01/12/2012 06:48 PM, mohag wrote:
|
Just some notes on shells: |
I pasted the preprocessor output here: https://gist.github.com/1604902 Looks like stream.h might be the culprit... |
The relevant man page: http://docs.oracle.com/cd/E19683-01/816-0226/6m6nqfv66/index.html |
Defining _XPG_4_2 gets rid of the stream.h header (for STREAMS), but it results in some IPv6 related things breaking:
|
Oh that is inconvenient... How can we get to the IPv6 stuff then? |
This fixes the queue issue: paths.h is also missing. It seem to be present on Solaris 11 though: http://docs.oracle.com/cd/E23824_01/html/821-1464/paths.h-3head.html Commenting out the #include for it and adding this in a few place makes process, but it still fails on later files: The later errors seem to be mainly related to LOCK_EX not being defined on Solaris. (LOCK_EX is defined in the include files in /usr/ucbinclude, but adding them to C_INCLUDE_PATH causes other failures) Hardcoding the path to the file.h in util.c and spool.c with LOCK_EX gets me further.... It then fails in dfcompat.c with: Using this as a replacement makes it compile: It then returns some linker errors:
Adding -lsocket to LDADD in the Makefile shorten the list...
|
Not defining _XPG_4_2 and renaming the "queue" type (my script above renames it to dma_queue) gets rid of the conflict and allows the IPv6 stuff. |
Hi,
Low priority.
dma version: 0.7
Unable to compile on Solaris 9 or 10.
The yacc does not support the -o option. Setting YACC to bison fixes that...
get-version.sh need to be edited to use bash. (The "$()" construct is not valid in real Bourne shell)
err.h needs some help to be found...
Output for Solaris 10 with GNU make is then:
$ C_INCLUDE_PATH=/usr/sfw/include/openssl gmake
get-version.sh: syntax error at line 3:
gitver=$' unexpected gcc -O -pipe -Wall -DDMA_VERSION='""' -DLIBEXEC_PATH='"/usr/local/lib"' -DCONF_PATH='"/etc/dma"' -include dfcompat.h -o aliases_parse.o -c aliases_parse.c In file included from aliases_parse.y:5: **dma.h:111: error: redefinition of
struct queue'**aliases_parse.y: In function
yyerror': aliases_parse.y:15: warning: implicit declaration of function
warnx'/usr/ccs/bin/yaccpar: At top level:
/usr/ccs/bin/yaccpar:5: warning: ignoring #pragma ident
/usr/ccs/bin/yaccpar: In function
yyparse': /usr/ccs/bin/yaccpar:164: warning: label
yynewstate' defined but not used/usr/ccs/bin/yaccpar:374: warning: label `yyerrlab' defined but not used
gmake: *** [aliases_parse.o] Error 1
It might be that it is mostly documentation problems... (Dependencies, etc is not clear from the README)
Thanks,
Gert van den Berg
The text was updated successfully, but these errors were encountered: