Re: thread_test.c problems

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: thread_test.c problems
Дата
Msg-id 200404271249.i3RCnHb15704@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: thread_test.c problems  (<wespvp@syntegra.com>)
Список pgsql-general
Yep, that looks like a mess.  Not sure why it is happening but in this
example libcrypto and libkrb5 both have _des_crypt:

> /usr/lib/libcrypto.dylib(fcrypt.o) definition of _des_crypt
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) definition of
> _des_crypt

It seems -lkrb5 also contains the -lcrypto routines.  If you compile
without -lcrypto, does it work?  If you modify Makefile.global and
remove -lcrypto:

    LIBS = -lssl -lcrypto -lz -lreadline -ltermcap -lgetopt -lcompat -lipc -ldl -lm -lutil

does it work?  It might, based on those warnings.

Fortunately, it is not related to threading.

---------------------------------------------------------------------------

wespvp@syntegra.com wrote:
> > OK, CVS is ready.  I unconditionally defined:
> >
> >       -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS
> >
> > for all ports.  It can't hurt if they are not supported, but it makes
> > our job easier for porting.  It allowed me to remove almost all the
> > port-specific thread stuff.  The other tests are done by configure and
> > thread_test.
> >
> > Should fix Darwin compile and other platforms without mucking with the
> > thread detection code.
>
> I tried it on Mac OS X 10.2.8 also (gcc 3.1).  It seems to build ok, except
> that I get numerous warnings at different places in the build like the ones
> below.
>
> I did just verify that these warnings also occur with the 7.4.2 release.
>
> Wes
>
> gcc -no-cpp-precomp -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations vacuumdb.o common.o -L../../../src/interfaces/libpq
> -lpq -L../../../src/port   -lpam -lssl -lcrypto -lkrb5 -lz -lreadline
> -ltermcap -lm  -lpgport -o vacuumdb
> ld: warning multiple definitions of symbol _des_crypt
> /usr/lib/libcrypto.dylib(fcrypt.o) definition of _des_crypt
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) definition of
> _des_crypt
> ld: warning multiple definitions of symbol _des_fcrypt
> /usr/lib/libcrypto.dylib(fcrypt.o) definition of _des_fcrypt
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) definition of
> _des_fcrypt
> ld: warning multiple definitions of symbol _des_is_weak_key
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) definition of
> _des_is_weak_key
> /usr/lib/libcrypto.dylib(set_key.o) definition of _des_is_weak_key
> ld: warning multiple definitions of symbol _des_set_key
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) definition of
> _des_set_key
> /usr/lib/libcrypto.dylib(set_key.o) definition of _des_set_key
> ld: warning multiple definitions of symbol _des_key_sched
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) definition of
> _des_key_sched
> /usr/lib/libcrypto.dylib(set_key.o) definition of _des_key_sched
> ld: warning multiple definitions of symbol _des_fixup_key_parity
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) definition of
> _des_fixup_key_parity
> /usr/lib/libcrypto.dylib(set_key.o) definition of _des_fixup_key_parity
> ld: warning multiple definitions of symbol _des_check_key_parity
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) definition of
> _des_check_key_parity
> /usr/lib/libcrypto.dylib(set_key.o) definition of _des_check_key_parity
> ld: warning multiple definitions of symbol _des_ecb_encrypt
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) definition of
> _des_ecb_encrypt
> /usr/lib/libcrypto.dylib(ecb_enc.o) definition of _des_ecb_encrypt
> ld: warning multiple definitions of symbol _crypt
> /usr/lib/libcrypto.dylib(fcrypt.o) definition of _crypt
> /usr/lib/libm.dylib(crypt.So) definition of _crypt
> ld: warning multiple definitions of symbol _des_read_pw_string
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) definition of
> _des_read_pw_string
> /usr/lib/libcrypto.dylib(read_pwd.o) definition of _des_read_pw_string
> ld: warning suggest use of -bind_at_load, as lazy binding may result in
> errors or different symbols being used
> symbol _des_cbc_cksum used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(cbc_cksm.o)
> symbol _des_cbc_encrypt used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(cbc_enc.o)
> symbol _des_check_key_parity used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(set_key.o)
> symbol _des_ecb_encrypt used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(ecb_enc.o)
> symbol _des_fixup_key_parity used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(set_key.o)
> symbol _des_is_weak_key used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(set_key.o)
> symbol _des_key_sched used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(set_key.o)
> symbol _des_pcbc_encrypt used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(pcbc_enc.o)
> symbol _des_quad_cksum used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(qud_cksm.o)
> symbol _des_random_key used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(rand_key.o)
> symbol _des_read_password used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(read2pwd.o)
> symbol _des_read_pw_string used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(read_pwd.o)
> symbol _des_set_key used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(set_key.o)
> symbol _des_string_to_key used from dynamic library
> /usr/lib/libkrb5.dylib(ProjectBuilderMasterObjectFile.o) not from earlier
> dynamic library /usr/lib/libcrypto.0.9.dylib(str2key.o)
> sed -e 's,@bindir@,/usr/local/pgsql7.4.2+/bin,g' \
>     -e 's,@includedir@,/usr/local/pgsql7.4.2+/include,g' \
>     -e 's,@includedir_server@,/usr/local/pgsql7.4.2+/include/server,g' \
>     -e 's,@libdir@,/usr/local/pgsql7.4.2+/lib,g' \
>     -e 's,@pkglibdir@,/usr/local/pgsql7.4.2+/lib,g' \
>     -e "s|@configure@|'--prefix=/usr/local/pgsql7.4.2+' '--with-perl'
> '--with-krb5' '--with-openssl' '--with-pam' '--with-rendezvous'
> '--enable-thread-safety' '--enable-depend'|g" \
>     -e 's,@version@,7.5devel,g' \
>   pg_config.sh >pg_config
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

В списке pgsql-general по дате отправления:

Предыдущее
От: Timothy Perrigo
Дата:
Сообщение: Re: questions on rules
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: questions on rules