[FUG-BR] Compilando com um patch não oficial (mas no jeitão BSD :)

Tiago Cruz tiagocruz em forumgdh.net
Qui Nov 17 09:44:56 BRST 2005


Rainer e Giovanni,

Obrigado pelas dicas passadas! Ontem eu perdi meu dia inteiro tentado
resolver este problema e não consegui... suas dicas foram muito
valiosas, eu não sabia que era necessário, por exemplo, o
openldap-server eu pensei que o client era suficiente.

Eu tenho os seguintes pacotes atualmente:

auth_ldap-1.6.0_4   Apache module to authenticate against an LDAP 
nss_ldap-1.239      RFC 2307 NSS module
openldap-client-2.2.29 Open source LDAP client implementation
openldap-server-2.2.29 Open source LDAP server implementation
pam_ldap-1.8.0      A pam module for authenticating with LDAP
pear-DB_ldap-1.1.0  PEAR DB compliant interface to LDAP servers

Será que vale a pena atualizar para o OpenLDAP para o 2.3?

Bom, eu tentei primeiro o método de criar meu próprio patch do Giovanni,
que não deu certo. Tentei o patch pronto do Rainer, e também não deu
certo :-(

Em ambos os casos, a compilação para logo no início com o mesmo erro
(Unable to link to LDAP library.), e eu sinceramente não sei mais o que
fazer.... será que vocês passaram por isso e podem me ajudar? Muito
agradecido!

Segue o make, meus pacotes e o config.log para ajudar vocês a me
ajudarem :^)


[root em HOMER: squidguard]# make
===>   squidGuard-1.2.0_1 depends on shared library: db3.3 - found
===>  Configuring for squidGuard-1.2.0_1
checking for gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c -o root -g
wheel
checking for bison... bison -y
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for lynx... false
checking for perl... /usr/bin/perl
checking for egrep... grep -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... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking for ldap_init in -lldap... yes

Unable to link to LDAP library.

===========================================================================

[root em HOMER: squidguard]# ls /var/db/pkg
apache-2.0.55/             expat-1.95.8_3/            libgpg-error-1.1/
pear-Console_Getopt-1.2/   popt-1.7/
auth_ldap-1.6.0_4/         fontconfig-2.2.3,1/        libiconv-1.9.2_1/
pear-DB-1.7.6,1/           portaudit-0.5.10/
autoconf-2.59_2/           freebsd-update-1.6_1/      libltdl-1.5.20/
pear-DB_ldap-1.1.0/        portupgrade-20041226_7/
bash-3.0.16_1/             freetype2-2.1.10_1/        libtool-1.3.5_2/
pear-PEAR-1.4.4/           python-2.4.2/
bison-1.75_2,1/            gettext-0.14.5/            libtool-1.5.20/
pear-XML_RPC-1.4.3/        ruby-1.8.3/
bsdiff-4.2/                glib-1.2.10_11/            links-2.1.p17,1/
perl-5.8.7/                ruby18-bdb1-0.2.2/
cscope-15.5_1/             gmake-3.80_2/              m4-1.4.4/
php4-4.4.1_2/              samba-3.0.20b,1/
cups-base-1.1.23.0_5/      gnutls-1.0.24_1/           nss_ldap-1.239/
php4-pcre-4.4.1_2/         squid-2.5.12/
cvsup-without-gui-16.1h_2/ grc-1.0.6/
openldap-client-2.2.29/    php4-pear-4.4.1_1/         sudo-1.6.8.9/
cyrus-sasl-2.1.21_1/       gtk-1.2.10_13/
openldap-server-2.2.29/    php4-xml-4.4.1_2/          tiff-3.7.4/
db3-3.3.11_2,1/            help2man-1.36.2/           p5-gettext-1.03/
pkgconfig-0.17.2/          vim-6.3.85/
db42-4.2.52_4/             jpeg-6b_3/                 pam_ldap-1.8.0/
pkgdb.db                   wget-1.10.2/
db43-4.3.29/               libgcrypt-1.2.2/
pear-Archive_Tar-1.3.1/    png-1.2.8_2/
xorg-libraries-6.8.2/

===========================================================================

[root em HOMER: squidguard]#
cat /usr/ports/www/squidguard/work/squidGuard-1.2.0/config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ ./configure --with-db-inc=/usr/local/include/db3
--with-db-lib=/usr/local/lib
--with-sg-config=/usr/local/etc/squid/squidGuard.conf
--with-sg-dbhome=/var/db/squidGuard --with-sg-logdir=/var/log
--exec-prefix=/usr/local

## --------- ##
## Platform. ##
## --------- ##

hostname = homer.b4b4.net
uname -m = i386
uname -r = 6.0-STABLE
uname -s = FreeBSD
uname -v = FreeBSD 6.0-STABLE #2: Wed Nov 16 11:30:12 BRST 2005
root em homer.b4b4.net:/usr/obj/usr/src/sys/YODA

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /sbin
PATH: /usr/sbin
PATH: /usr/local/sbin
PATH: /bin
PATH: /usr/bin
PATH: /usr/local/bin
PATH: /usr/games
PATH: ~/bin
PATH: .


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1346: checking for gcc
configure:1372: result: cc
configure:1616: checking for C compiler version
configure:1619: cc --version </dev/null >&5
cc (GCC) 3.4.4 [FreeBSD] 20050518
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

configure:1622: $? = 0
configure:1624: cc -v </dev/null >&5
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.4 [FreeBSD] 20050518
configure:1627: $? = 0
configure:1629: cc -V </dev/null >&5
cc: `-V' option must have argument
configure:1632: $? = 1
configure:1655: checking for C compiler default output file name
configure:1658: cc -O2 -fno-strict-aliasing -pipe    conftest.c  >&5
configure:1661: $? = 0
configure:1707: result: a.out
configure:1712: checking whether the C compiler works
configure:1718: ./a.out
configure:1721: $? = 0
configure:1738: result: yes
configure:1745: checking whether we are cross compiling
configure:1747: result: no
configure:1750: checking for suffix of executables
configure:1752: cc -o conftest -O2 -fno-strict-aliasing -pipe
conftest.c  >&5
configure:1755: $? = 0
configure:1780: result:
configure:1786: checking for suffix of object files
configure:1807: cc -c -O2 -fno-strict-aliasing -pipe   conftest.c >&5
configure:1810: $? = 0
configure:1832: result: o
configure:1836: checking whether we are using the GNU C compiler
configure:1860: cc -c -O2 -fno-strict-aliasing -pipe   conftest.c >&5
configure:1866: $? = 0
configure:1870: test -z
                         || test ! -s conftest.err
configure:1873: $? = 0
configure:1876: test -s conftest.o
configure:1879: $? = 0
configure:1892: result: yes
configure:1898: checking whether cc accepts -g
configure:1919: cc -c -g  conftest.c >&5
configure:1925: $? = 0
configure:1929: test -z
                         || test ! -s conftest.err
configure:1932: $? = 0
configure:1935: test -s conftest.o
configure:1938: $? = 0
configure:1949: result: yes
configure:1966: checking for cc option to accept ANSI C
configure:2036: cc  -c -O2 -fno-strict-aliasing -pipe   conftest.c >&5
configure:2042: $? = 0
configure:2046: test -z
                         || test ! -s conftest.err
configure:2049: $? = 0
configure:2052: test -s conftest.o
configure:2055: $? = 0
configure:2073: result: none needed
configure:2091: cc -c -O2 -fno-strict-aliasing -pipe   conftest.c >&5
conftest.c:2: error: syntax error before "me"
configure:2097: $? = 1
configure: failed program was:
| #ifndef __cplusplus
|   choke me
| #endif
configure:2235: checking how to run the C preprocessor
configure:2270: cc -E  conftest.c
configure:2276: $? = 0
configure:2308: cc -E  conftest.c
conftest.c:9:28: ac_nonexistent.h: No such file or directory
configure:2314: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:2353: result: cc -E
configure:2377: cc -E  conftest.c
configure:2383: $? = 0
configure:2415: cc -E  conftest.c
conftest.c:9:28: ac_nonexistent.h: No such file or directory
configure:2421: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:2464: checking whether make sets $(MAKE)
configure:2484: result: yes
configure:2531: checking for a BSD-compatible install
configure:2586: result: /usr/bin/install -c -o root -g wheel
configure:2601: checking for bison
configure:2617: found /usr/local/bin/bison
configure:2627: result: bison -y
configure:2643: checking for flex
configure:2659: found /usr/bin/flex
configure:2669: result: flex
configure:2682: checking for yywrap in -lfl
configure:2712: cc -o conftest -O2 -fno-strict-aliasing -pipe
conftest.c -lfl   >&5
configure:2718: $? = 0
configure:2722: test -z
                         || test ! -s conftest.err
configure:2725: $? = 0
configure:2728: test -s conftest
configure:2731: $? = 0
configure:2744: result: yes
configure:2822: checking lex output file root
configure:2833: flex conftest.l
configure:2836: $? = 0
configure:2848: result: lex.yy
configure:2853: checking whether yytext is a pointer
configure:2869: cc -o conftest -O2 -fno-strict-aliasing -pipe
conftest.c  -lfl >&5
configure:2875: $? = 0
configure:2879: test -z
                         || test ! -s conftest.err
configure:2882: $? = 0
configure:2885: test -s conftest
configure:2888: $? = 0
configure:2902: result: yes
configure:2915: checking for lynx
configure:2947: result: false
configure:2956: checking for perl
configure:2975: found /usr/bin/perl
configure:2988: result: /usr/bin/perl
configure:3084: checking for egrep
configure:3094: result: grep -E
configure:3099: checking for ANSI C header files
configure:3124: cc -c -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3 conftest.c >&5
configure:3130: $? = 0
configure:3134: test -z
                         || test ! -s conftest.err
configure:3137: $? = 0
configure:3140: test -s conftest.o
configure:3143: $? = 0
configure:3232: cc -o conftest -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3  -L/usr/local/lib
conftest.c  >&5
configure:3235: $? = 0
configure:3237: ./conftest
configure:3240: $? = 0
configure:3255: result: yes
configure:3279: checking for sys/types.h
configure:3295: cc -c -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3 conftest.c >&5
configure:3301: $? = 0
configure:3305: test -z
                         || test ! -s conftest.err
configure:3308: $? = 0
configure:3311: test -s conftest.o
configure:3314: $? = 0
configure:3325: result: yes
configure:3279: checking for sys/stat.h
configure:3295: cc -c -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3 conftest.c >&5
configure:3301: $? = 0
configure:3305: test -z
                         || test ! -s conftest.err
configure:3308: $? = 0
configure:3311: test -s conftest.o
configure:3314: $? = 0
configure:3325: result: yes
configure:3279: checking for stdlib.h
configure:3295: cc -c -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3 conftest.c >&5
configure:3301: $? = 0
configure:3305: test -z
                         || test ! -s conftest.err
configure:3308: $? = 0
configure:3311: test -s conftest.o
configure:3314: $? = 0
configure:3325: result: yes
configure:3279: checking for string.h
configure:3295: cc -c -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3 conftest.c >&5
configure:3301: $? = 0
configure:3305: test -z
                         || test ! -s conftest.err
configure:3308: $? = 0
configure:3311: test -s conftest.o
configure:3314: $? = 0
configure:3325: result: yes
configure:3279: checking for memory.h
configure:3295: cc -c -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3 conftest.c >&5
configure:3301: $? = 0
configure:3305: test -z
                         || test ! -s conftest.err
configure:3308: $? = 0
configure:3311: test -s conftest.o
configure:3314: $? = 0
configure:3325: result: yes
configure:3279: checking for strings.h
configure:3295: cc -c -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3 conftest.c >&5
configure:3301: $? = 0
configure:3305: test -z
                         || test ! -s conftest.err
configure:3308: $? = 0
configure:3311: test -s conftest.o
configure:3314: $? = 0
configure:3325: result: yes
configure:3279: checking for inttypes.h
configure:3295: cc -c -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3 conftest.c >&5
configure:3301: $? = 0
configure:3305: test -z
                         || test ! -s conftest.err
configure:3308: $? = 0
configure:3311: test -s conftest.o
configure:3314: $? = 0
configure:3325: result: yes
configure:3279: checking for stdint.h
configure:3295: cc -c -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3 conftest.c >&5
configure:3301: $? = 0
configure:3305: test -z
                         || test ! -s conftest.err
configure:3308: $? = 0
configure:3311: test -s conftest.o
configure:3314: $? = 0
configure:3325: result: yes
configure:3279: checking for unistd.h
configure:3295: cc -c -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3 conftest.c >&5
configure:3301: $? = 0
configure:3305: test -z
                         || test ! -s conftest.err
configure:3308: $? = 0
configure:3311: test -s conftest.o
configure:3314: $? = 0
configure:3325: result: yes
configure:3342: checking for unistd.h
configure:3347: result: yes
configure:3498: checking db.h usability
configure:3510: cc -c -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3 conftest.c >&5
configure:3516: $? = 0
configure:3520: test -z
                         || test ! -s conftest.err
configure:3523: $? = 0
configure:3526: test -s conftest.o
configure:3529: $? = 0
configure:3539: result: yes
configure:3543: checking db.h presence
configure:3553: cc -E  -I/usr/local/include/db3 conftest.c
configure:3559: $? = 0
configure:3579: result: yes
configure:3614: checking for db.h
configure:3621: result: yes
configure:3652: checking regex.h usability
configure:3664: cc -c -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3 conftest.c >&5
configure:3670: $? = 0
configure:3674: test -z
                         || test ! -s conftest.err
configure:3677: $? = 0
configure:3680: test -s conftest.o
configure:3683: $? = 0
configure:3693: result: yes
configure:3697: checking regex.h presence
configure:3707: cc -E  -I/usr/local/include/db3 conftest.c
configure:3713: $? = 0
configure:3733: result: yes
configure:3768: checking for regex.h
configure:3775: result: yes
configure:3796: checking for ldap_init in -lldap
configure:3826: cc -o conftest -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3  -L/usr/local/lib
conftest.c -lldap   >&5
configure:3832: $? = 0
configure:3836: test -z
                         || test ! -s conftest.err
configure:3839: $? = 0
configure:3842: test -s conftest
configure:3845: $? = 0
configure:3858: result: yes
configure:3895: cc -o conftest -O2 -fno-strict-aliasing -pipe
-I/usr/local/include/db3  -I/usr/local/include/db3  -L/usr/local/lib
conftest.c -lldap  >&5
conftest.c:2:19: ldap.h: No such file or directory
conftest.c: In function `main':
conftest.c:5: error: `LDAP' undeclared (first use in this function)
conftest.c:5: error: (Each undeclared identifier is reported only once
conftest.c:5: error: for each function it appears in.)
conftest.c:5: error: `p' undeclared (first use in this function)
conftest.c:6: error: `LDAP_PORT' undeclared (first use in this function)
configure:3898: $? = 1
configure: program exited with status 1
configure: failed program was:
|
|       #include <ldap.h>
|       int main()
|       {
|               LDAP *p;
|               p = ldap_init("localhost", LDAP_PORT);
|               exit(0);
|       }
|

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_lib_fl_yywrap=yes
ac_cv_header_stdlib_h=yes
ac_cv_lib_ldap_ldap_init=yes
ac_cv_prog_cc_g=yes
ac_cv_env_LDFLAGS_set=
ac_cv_c_compiler_gnu=yes
ac_cv_exeext=
ac_cv_env_CFLAGS_set=set
ac_cv_path_LYNX=false
ac_cv_env_CPP_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_host_alias_set=
ac_cv_prog_YACC='bison -y'
ac_cv_header_regex_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_prog_lex_root=lex.yy
ac_cv_env_build_alias_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_target_alias_set=
ac_cv_prog_cc_stdc=
ac_cv_env_CFLAGS_value='-O2 -fno-strict-aliasing -pipe '
ac_cv_env_CC_set=set
ac_cv_header_sys_types_h=yes
ac_cv_header_stdc=yes
ac_cv_header_strings_h=yes
ac_cv_path_PERL=/usr/bin/perl
ac_cv_header_stdint_h=yes
ac_cv_header_inttypes_h=yes
ac_cv_prog_egrep='grep -E'
ac_cv_prog_make_make_set=yes
ac_cv_header_unistd_h=yes
ac_cv_header_string_h=yes
ac_cv_env_CPPFLAGS_value=
ac_cv_header_memory_h=yes
ac_cv_header_db_h=yes
ac_cv_env_host_alias_value=
ac_cv_prog_CPP='cc -E'
ac_cv_env_build_alias_value=
ac_cv_prog_lex_yytext_pointer=yes
ac_cv_prog_ac_ct_CC=cc
ac_cv_env_target_alias_value=
ac_cv_env_CC_value=cc
ac_cv_env_CPP_set=
ac_cv_prog_LEX=flex
ac_cv_objext=o

## ----------------- ##
## Output variables. ##
## ----------------- ##

BLACKLISTS=''
CC='cc'
CFLAGS='-O2 -fno-strict-aliasing -pipe  -I/usr/local/include/db3'
CGIFILE=''
CPP='cc -E'
CPPFLAGS=' -I/usr/local/include/db3'
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='grep -E'
EXEEXT=''
FTPDIR=''
INSTALL_DATA='install  -o root -g wheel -m 444'
INSTALL_PROGRAM='install  -s -o root -g wheel -m 555'
INSTALL_SCRIPT='install  -o root -g wheel -m 555'
LDFLAGS=' -L/usr/local/lib'
LEX='flex'
LEXLIB='-lfl'
LEX_OUTPUT_ROOT='lex.yy'
LIBOBJS=''
LIBS='-lldap '
LTLIBOBJS=''
LYNX='false'
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PERL='/usr/bin/perl'
ROBOTEXCEPTIONS=''
SET_MAKE=''
SHELL='/bin/sh'
SQUIDGUARDROBOT=''
SQUIDGUARDROBOTUA=''
TESTDIR=''
VERSION=''
YACC='bison -y'
ac_c=''
ac_ct_CC='cc'
ac_n=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${prefix}/share'
exec_prefix='/usr/local'
host_alias=''
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sg_cfgdir='/usr/local/etc/squid'
sg_config='/usr/local/etc/squid/squidGuard.conf'
sg_dbhome='/var/db/squidGuard'
sg_logdir='/var/log'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define ACCONFIG 1
#define ACDBHOME 1
#define ACLOGDIR 1
#define HAVE_INTTYPES_H 1
#define HAVE_LIBLDAP 1
#define HAVE_MEMORY_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UNISTD_H 1
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define STDC_HEADERS 1
#define YYTEXT_POINTER 1

configure: exit 1



_______________________________________________
Freebsd mailing list
Freebsd em fug.com.br
http://mail.fug.com.br/mailman/listinfo/freebsd_fug.com.br




Mais detalhes sobre a lista de discussão freebsd