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

Problems building recent NUT on Solaris 8 #1736

Closed
jimklimov opened this issue Dec 22, 2022 · 4 comments
Closed

Problems building recent NUT on Solaris 8 #1736

jimklimov opened this issue Dec 22, 2022 · 4 comments
Labels
bug CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) documentation solaris Solaris and illumos systems
Milestone

Comments

@jimklimov
Copy link
Member

jimklimov commented Dec 22, 2022

Following up from mailing list discussion at https://alioth-lists.debian.net/pipermail/nut-upsuser/2022-December/013051.html

  • lacking python (so need to disable augeas to run autogen.sh)
  • older perl does not support newer open() syntax we use (fixes in helper scripts needed at least to run autogen.sh)
  • default shell interpreter issues, and no easy way to choose another for configure script
  • after getting something built, NUT clients seem to not actually connect() to a data server

Original issue was reported with a SPARC build of the OS, but many points were reproduced and are being fixed in an x86 (32-bit) VM prepared per mac-65/Solaris_8_x86_VM#1 notes, using an add-on TGCware set of packages for compiler and some modern tools that are absent in default OS installation.

@jimklimov jimklimov added bug documentation CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) solaris Solaris and illumos systems labels Dec 22, 2022
@jimklimov jimklimov added this to the 2.8.1 milestone Dec 22, 2022
@jimklimov
Copy link
Member Author

jimklimov commented Dec 22, 2022

Some notes (TODO: bump docs):

  • For CONFIG_SHELL, system dtksh seems to support the syntax (unlike /bin/sh), but segfaults during configure tests. Alternatively /usr/tgcware/bin/bash (4.4ish) can be used.
  • To run ci_build.sh the shebang should be locally fixed to call /usr/tgcware/bin/bash, or the PATH should point to it as a first hit - which may need a bit of complex setup, e.g. a symlink into a dedicated directory, if we want to primarily use OS-provided tools otherwise; I stuck a symlink to /usr/lib/ccache which has to be first anyway.
  • default grep lacks the -E option which was preferred over egrep since Replace "egrep" by "grep -E" in shell code - modern systems frown upon the former #1660 - however starting the PATH with /usr/xpg4/bin fixes the problem

jimklimov added a commit to jimklimov/nut that referenced this issue Dec 22, 2022
@jimklimov
Copy link
Member Author

For lack of python - can follow the suggestion (tweaked for older shell syntax):

WITHOUT_NUT_AUGEAS=true; export WITHOUT_NUT_AUGEAS; ./autogen.sh

jimklimov added a commit to jimklimov/nut that referenced this issue Dec 22, 2022
jimklimov added a commit to jimklimov/nut that referenced this issue Dec 22, 2022
jimklimov added a commit to jimklimov/nut that referenced this issue Dec 22, 2022
jimklimov added a commit to jimklimov/nut that referenced this issue Dec 22, 2022
jimklimov added a commit to jimklimov/nut that referenced this issue Dec 22, 2022
jimklimov added a commit to jimklimov/nut that referenced this issue Dec 22, 2022
jimklimov added a commit to jimklimov/nut that referenced this issue Dec 22, 2022
@jimklimov
Copy link
Member Author

jimklimov commented Dec 22, 2022

So far one problem remains: nutlogtest fails when libc is dumb about printf("%s", NULL) -- this segfaults on Solaris 8 and likely would kill NUT programs if they carelessly log a NULL string variable/method-return value somewhere; but otherwise with this branch NUT can be built and self-tested (including runs of upsd with a dummy driver and client connections talking to it).

Some tweaks were imminent as detailed above:

### bash-2.03$ echo $PATH
### /usr/bin::/usr/dt/bin:/usr/openwin/bin:/bin:/usr/ucb:/usr/tgcware/bin:/usr/tgcware/gnu:/usr/tgcware/gcc42/bin:/usr/tgcware/i386-pc-solaris2.8/bin
### bash-2.03$ echo $LD_LIBRARY_PATH
### /usr/lib:/usr/tgcware/lib:/usr/tgcware/gcc42/lib:/usr/tgcware/i386-pc-solaris2.8/lib

:; git clean -fffdddxxx ; \
    CONFIG_SHELL=/usr/tgcware/bin/bash \
    WITHOUT_NUT_AUGEAS=true \
    PATH="/usr/xpg4/bin:$PATH" \
    /usr/tgcware/bin/bash ./ci_build.sh

@jimklimov
Copy link
Member Author

jimklimov commented Jan 2, 2023

Builds are fixed by PR above, as far passing configuration, self-tests including NIT, and a make distcheck.

Bugs due to printf handling of NULL as detailed above are still possible, may become focus of a different effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) documentation solaris Solaris and illumos systems
Projects
None yet
Development

No branches or pull requests

1 participant