Страница 1 из 1

Компиляция monit под Freebsd 4.9

Добавлено: 2012-10-01 7:52:07
amx
Всем привет! В этих вопросах я не очень силен, поэтому не пинайте, обычно все из портов гладко ставится, а тут из сорцов, да на систему, что в проверенных на сайте монита не значится.
Почему такой древний мамонт у нас есть - тоже не спрашивайте :)

Итак:
FreeBSD 4.9
Скачиваем monit-5.5

Код: Выделить всё

# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking whether make sets $(MAKE)... (cached) yes
checking for bison... bison -y
checking for flex... /usr/bin/flex
checking for pod2man... /usr/bin/pod2man
checking build system type... i386-unknown-freebsd4.9
checking host system type... i386-unknown-freebsd4.9
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/libexec/elf/ld
checking if the linker (/usr/libexec/elf/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 49152
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking for /usr/libexec/elf/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... no
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/libexec/elf/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... freebsd4.9 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for socket in -lsocket... no
checking for socket in -linet... no
checking for inet_addr in -lnsl... no
checking for inet_aton in -lresolv... no
checking for crypt in -lc... no
checking for crypt in -lcrypt... yes
checking for pthread_create in -lpthread... no
configure: error: POSIX thread library is required
Pthread? Окай!

Код: Выделить всё

cd /usr/ports/devel/pth
make install 
===>  Installing for pth-2.0.7
===>   pth-2.0.7 depends on file: /usr/local/libdata/ldconfig - found
===>   Generating temporary packing list
===>  Checking if devel/pth already installed
./shtool mkdir -f -p -m 755 /usr/local
./shtool mkdir -f -p -m 755 /usr/local/bin
./shtool mkdir -f -p -m 755 /usr/local/include/pth
./shtool mkdir -f -p -m 755 /usr/local/lib/pth
./shtool mkdir -f -p -m 755 /usr/local/man/man1
./shtool mkdir -f -p -m 755 /usr/local/man/man3
./shtool mkdir -f -p -m 755 /usr/local/share/aclocal
./shtool install -c -m 755 pth-config /usr/local/bin/pth-config
./shtool install -c -m 644 pth-config.1 /usr/local/man/man1/pth-config.1
./shtool install -c -m 644 pth.3 /usr/local/man/man3/pth.3
./shtool install -c -m 644 pth.m4 /usr/local/share/aclocal/pth.m4
./shtool install -c -m 644 pth.h /usr/local/include/pth/pth.h
./shtool install -c .libs/libpth.so.20 /usr/local/lib/pth/libpth.so.20
(cd /usr/local/lib/pth && { ln -s -f libpth.so.20 libpth.so || { rm -f libpth.so && ln -s libpth.so.20 libpth.so; }; })
(cd /usr/local/lib/pth && { ln -s -f libpth.so.20 libpth.so || { rm -f libpth.so && ln -s libpth.so.20 libpth.so; }; })
./shtool install -c .libs/libpth.a /usr/local/lib/pth/libpth.a
chmod 644 /usr/local/lib/pth/libpth.a
ranlib /usr/local/lib/pth/libpth.a
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib/pth

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
./shtool install -c -m 755 pthread-config /usr/local/bin/pthread-config
./shtool install -c -m 644 pthread-config.1 /usr/local/man/man1/pthread-config.1
./shtool install -c -m 644 pthread.h /usr/local/include/pth/pthread.h
./shtool install -c -m 644 pthread.3 /usr/local/man/man3/pthread.3
./shtool install -c .libs/libpthread.so.20 /usr/local/lib/pth/libpthread.so.20
(cd /usr/local/lib/pth && { ln -s -f libpthread.so.20 libpthread.so || { rm -f libpthread.so && ln -s libpthread.so.20 libpthread.so; }; })
(cd /usr/local/lib/pth && { ln -s -f libpthread.so.20 libpthread.so || { rm -f libpthread.so && ln -s libpthread.so.20 libpthread.so; }; })
./shtool install -c .libs/libpthread.a /usr/local/lib/pth/libpthread.a
chmod 644 /usr/local/lib/pth/libpthread.a
ranlib /usr/local/lib/pth/libpthread.a
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib/pth

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
===>   Compressing manual pages for pth-2.0.7
===>   Running ldconfig
/sbin/ldconfig -m /usr/local/lib/pth
===>   Installing ldconfig configuration file
===>   Registering installation for pth-2.0.7

Код: Выделить всё

# pkg_info | grep pth
pth-2.0.7           GNU Portable Threads

Код: Выделить всё

cd monit-5.5
./configure
---
все то же самое
---
checking for pthread_create in -lpthread... no
configure: error: POSIX thread library is required
Что делать, кто виноват, как быть, куда копать?

Re: Компиляция monit под Freebsd 4.9

Добавлено: 2012-10-01 10:30:36
amx
monit-4.8.1 что значится в портах поставился нормально... но мне все равно интересно...

Re: Компиляция monit под Freebsd 4.9

Добавлено: 2012-10-01 10:46:58
Dark_ASU
С какими опциями собран pth?

Re: Компиляция monit под Freebsd 4.9

Добавлено: 2012-10-01 10:54:41
amx
Dark_ASU писал(а):С какими опциями собран pth?
с дефолтными, ставился из портов фряхи 4.9, make config предлагает по-умолчанию только:
optimized_cflags = yes
syscall_hard = no
так и оставил, когда собирал

Re: Компиляция monit под Freebsd 4.9

Добавлено: 2012-10-01 11:21:28
hizel
фууУ, гадкий некрофил, изыди!

Re: Компиляция monit под Freebsd 4.9

Добавлено: 2012-10-01 22:48:59
Dark_ASU
Древний он ...