Software > Programmieren, Kompilieren

Nagios 3.X unter Solaris 10

(1/6) > >>

Brenner:
Ich wollte heute die Nagios 3.0.2 Version unter Solaris 10 U5 X86  installieren, aber bekomme es einfach nicht hin. Spätestens bei "make all" werden Fehler geworfen.


Hat es von Euch schon jemand probiert bzw. kennt ein HowTo? Die HowTos für die Nagios 2.X scheinen nutzlos zu sein.

escimo:

--- Zitat von: Brenner am 17. Juni 2008, 17:02:15 ---Spätestens bei "make all" werden Fehler geworfen.
--- Ende Zitat ---
Was für Fehler?  ::)

"make all"? Für welche Zielplattformen willst du denn alles übersetzen? Doch bestimmt nur für Solaris 10/x86 (oder x64).

Ohne die Doku, HowTo's oder die README von Nagios gelesen zu haben. Was passiert bei folgenden Kommandos...
  # cd <nagios-src-dir>
  # ./configure --help
  # ./configure <list with options from Brenner>
  # ./make
  # ./make install


Gruß
escimo

Brenner:
Also,

ich habe mich an folgendes HowTo gehalten:
http://ls5-www.cs.uni-dortmund.de/~windmueller/nagios-solaris10.html
inkl. Configure Optionen usw.



bash-3.00# ./configure --help
`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local/nagios]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/nagios/bin', `/usr/local/nagios/lib' etc.  You can specify
an installation prefix other than `/usr/local/nagios' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --infodir=DIR          info documentation [PREFIX/info]
  --mandir=DIR           man documentation [PREFIX/man]

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
--disable-statusmap=disables compilation of statusmap CGI
--disable-statuswrl=disables compilation of statuswrl (VRML) CGI
--enable-nanosleep enables use of nanosleep (instead sleep) in event timing
--enable-event-broker enables integration of event broker routines
--enable-embedded-perl will enable embedded Perl interpreter
--enable-cygwin enables building under the CYGWIN environment

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
--with-nagios-user=<user> sets user name to run nagios
--with-nagios-group=<grp> sets group name to run nagios
--with-command-user=<user> sets user name for command access
--with-command-group=<grp> sets group name for command access
--with-mail=<path_to_mail> sets path to equivalent program to mail
--with-httpd-conf=<path_to_conf> sets path to Apache conf.d directory
--with-checkresult-dir=<path> sets path to check results spool directory
--with-temp-dir=<path> sets path to temp directory
--with-init-dir=<path> sets directory to place init script into
--with-lockfile=<path> sets path and file name for lock file
--with-gd-lib=DIR sets location of the gd library
--with-gd-inc=DIR sets location of the gd include files
--with-cgiurl=<local-url> sets URL for cgi programs (do not use a trailing slash)
--with-htmurl=<local-url> sets URL for public html
--with-perlcache turns on cacheing of internally compiled Perl scripts

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
  CPP         C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

bash-3.00#




./configure --prefix=/opt/local/nagios-3.0.2 --with-nagios-user=nagios --with-nagios-group=nagios --with-gd-lib=/opt/sfw/lib --with-gd-inc=/opt/sfw/include
*** Configuration summary for nagios 3.0.2 05-19-2008 ***:

 General Options:
 -------------------------
        Nagios executable:  nagios
        Nagios user/group:  nagios,nagios
       Command user/group:  nagios,nagios
            Embedded Perl:  no
             Event Broker:  yes
        Install ${prefix}:  /opt/local/nagios-3.0.2
                Lock file:  ${prefix}/var/nagios.lock
   Check result directory:  ${prefix}/var/spool/checkresults
           Init directory:  /etc/init.d
  Apache conf.d directory:  /etc/httpd/conf.d
             Mail program:  /usr/bin/mail
                  Host OS:  solaris2.10

 Web Interface Options:
 ------------------------
                 HTML URL:  http://localhost/nagios/
                  CGI URL:  http://localhost/nagios/cgi-bin/
 Traceroute (used by WAP):  /usr/sbin/traceroute


Review the options above for accuracy.  If they look okay,
type 'make all' to compile the main program and CGIs.



Ausgabe von "make"
bash-3.00# make
Please supply a command line argument (i.e. 'make all').  Other targets are:
   nagios cgis contrib modules
   clean
   install install-base install-cgis install-html install-config install-init install-commandmode fullinstall
bash-3.00#



Ausgabe von "make all"

bash-3.00# make all
cd ./base && make
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE  -c  broker.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE  -c  nebmods.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE  -c  checks.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE  -c  config.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE  -c  commands.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE  -c  events.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE  -c  flapping.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE  -c  logging.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o macros-base.o ../common/macros.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE  -c  notifications.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE  -c  sehandlers.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o skiplist.o ../common/skiplist.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE  -c  utils.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o retention-base.o sretention.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o xretention-base.o ../xdata/xrddefault.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o comments-base.o ../common/comments.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o xcomments-base.o ../xdata/xcddefault.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o objects-base.o ../common/objects.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o xobjects-base.o ../xdata/xodtemplate.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o statusdata-base.o ../common/statusdata.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o xstatusdata-base.o ../xdata/xsddefault.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o perfdata-base.o perfdata.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o xperfdata-base.o ../xdata/xpddefault.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o downtime-base.o ../common/downtime.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -c -o xdowntime-base.o ../xdata/xdddefault.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE  -c  ../common/snprintf.c
gcc -g -O2 -I/opt/sfw/include -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DNSCORE -o nagios nagios.c broker.o nebmods.o checks.o config.o commands.o events.o flapping.o logging.o macros-base.o notifications.o sehandlers.o skiplist.o utils.o retention-base.o xretention-base.o comments-base.o xcomments-base.o objects-base.o xobjects-base.o statusdata-base.o xstatusdata-base.o perfdata-base.o xperfdata-base.o downtime-base.o xdowntime-base.o  ../common/snprintf.o   -L/opt/sfw/lib  -lm  -lpthread -ldl -lrt  -lglib-2.0
gcc: ../common/snprintf.o: Datei oder Verzeichnis nicht gefunden
*** Error code 1
make: Fatal error: Command failed for target `nagios'
Current working directory /var/tmp/nagios-3.0.2/base
*** Error code 1
make: Fatal error: Command failed for target `all'
bash-3.00#

escimo:
Ok, du nutzt die GNU-Tools unterhalb von /usr/sfw, um Nagios zu übersetzen.


--- Zitat von: Brenner am 18. Juni 2008, 08:22:53 ---ich habe mich an folgendes HowTo gehalten:
http://ls5-www.cs.uni-dortmund.de/~windmueller/nagios-solaris10.html
inkl. Configure Optionen usw.
--- Ende Zitat ---
Und hast du dich auch an die Installationsanweisungen, die bei den Quellen meist in Form einer/mehrerer README beiliegt, gehalten?

Sind denn alle Vorbedingungen erfüllt:
[1] Alle benötigten Pfade (PATH, LD_LIBRARY_PATH usw.) sind korrekt gesetzt..

--- Zitat ---Make sure that /usr/ccs/bin is part of your PATH. Then run these commands:
--- Ende Zitat ---
...siehe Howto. Enthält u.a. as, ld, m4, a und mehr die eventuell von Nagios für Solaris zum Build benötigt werden. Sollte /usr/sfw/bin im Pfad an erste Stelle stehen, tauschen. Oder stell bitte mal dem Output von `echo $PATH` zur Verfügung.
[2] Gruppe und Nutzer wurden angelegt?
[3] Das Verzeichnis /opt/local existiert?
[4] Die GD Graphics Library (SFWgd) ist installiert (evtl. von der Solaris Companion CD oder blastwave.org)?

Manchmal hilft auch der Build von einem "Source Code"-externen Verzeichnis aus.
Was passiert, wenn du folgendes machst:
  # mkdir nbuild && cd nbuild
  # ../nagios-src/configure <...>
  # ../nagios-src/make all

Viele Grüße
escimo

Brenner:
Die Readme helfen nicht da es keine offiziellen Installationsanweisungen für Nagios unter Solaris gibt.


zu1)
PATH habe ich erweitert, sie hat folgenden Inhalt:

bash-3.00# echo $PATH
/usr/sbin:/usr/bin:/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:/usr/sfw/bin/gcc
bash-3.00#


Mit "LD_LIBRARY_PATH" kann ich grad nichts anfangen.


zu2) Gruppe und Nutzer habe ich angelegt.


zu3) Verzeichnis /opt/local existiert.


zu4) Habe das Paket von SUN aus der Companion Quelle heruntergeladen und installiert.


zu "waspassiertwenndufolgendesmachst")

Ich habe im / das Verzeichnis angelegt und bin rein gewechselt und habe anschließend configure ausgeführt. "Make all" geht aber auf diese Weise nicht (Datei oder Verzeichnis nicht gefunden). Da muss man wohl doch im Verzeichnis stehen.



Danke für die Bemühungen.

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln