| View previous topic :: View next topic |
| Author |
Message |
ali3nx l33t


Joined: 21 Sep 2003 Posts: 722 Location: Winnipeg, Canada
|
Posted: Thu Nov 09, 2006 2:07 am Post subject: libpq and postgresql econfig fails threadsafe checks |
|
|
I've been using threaded web services for a number of years on many different gentoo servers for the obvious advantages gained from having multi threaded applications especially when used alongside nptl libc. There's certain environment consistancies which need to be addressed when using such an environment such as ensuring libperl and perl are both compiled with ithreads so that mod_perl will work with mpm-worker apache2 and that any other third party modules are also compiled with threading enabled. Databases and their libraries also fit into this requirement. Mysql for example detects and passes nptl thread safety tests but libpq and postgresql will not. When using ithreaded perl and threaded php alongside mpm-worker apache2 ~arch builds of both libpq and postgresql would appear appropriate due to the availability of the threads useflags in both ebuilds. One could reasonably assume that if mysql passed checks which seek the use of -pthread libpq and postgresql should pass the tests and happily resume compiling... However that doesn't appear to be the situtation.
| Code: | checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... (cached) yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... yes
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for the pthreads library -lpthreadGC2... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for strerror_r... yes
checking for getpwuid_r... yes
checking for gethostbyname_r... yes
checking whether getpwuid_r takes a fifth argument... yes
checking whether strerror_r returns int... no
checking test program... ok
checking whether printf supports argument control... yes
checking whether long int is 64 bits... no
checking whether long long int is 64 bits... yes
checking snprintf format for long long int... %lld
checking for unsigned long... yes
checking size of unsigned long... 4
checking for size_t... yes
checking size of size_t... 4
checking for short... yes
checking alignment of short... 2
checking for int... yes
checking alignment of int... 4
checking for long... yes
checking alignment of long... 4
checking for long long int... yes
checking alignment of long long int... 4
checking for double... yes
checking alignment of double... 4
checking for int8... no
checking for uint8... no
checking for int64... no
checking for uint64... no
checking for sig_atomic_t... yes
checking for POSIX signal interface... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
checking for working memcmp... yes
checking for library containing gettext... none required
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for msgfmt... msgfmt
checking for msgmerge... msgmerge
checking for xgettext... xgettext
checking for onsgmls... no
checking for nsgmls... no
checking for openjade... no
checking for jade... no
checking for DocBook V4.2... no
checking for DocBook stylesheets... no
checking for collateindex.pl... /usr/bin/collateindex.pl
checking for sgmlspl... no
checking thread safety of required library functions... no
configure: error:
*** Thread test program failed. Your platform is not thread-safe.
*** Check the file 'config.log'for the exact reason.
***
*** You can use the configure option --enable-thread-safety-force
*** to force threads to be enabled. However, you must then run
*** the program in src/tools/thread and add locking function calls
*** to your applications to guarantee thread safety.
!!! ERROR: dev-db/libpq-8.1.5 failed.
Call stack:
ebuild.sh, line 1546: Called dyn_compile
ebuild.sh, line 937: Called src_compile
libpq-8.1.5.ebuild, line 70: Called die
!!! configure failed
!!! If you need support, post the topmost build error, and the call stack if relevant. |
| Code: | silicon ~ # emerge --info
Portage 2.1.1-r1 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r1 i686)
=================================================================
System uname: 2.6.18-gentoo-r1 i686 Intel(R) Xeon(TM) CPU 2.40GHz
Gentoo Base System version 1.12.6
Last Sync: Thu, 09 Nov 2006 00:00:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python: 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache: 2.3
dev-util/confcache: [Not Present]
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.60
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils: 2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -m32 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openjms/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=pentium4 -O2 -m32 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg candy ccache distlocks fixpackages metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 16bit 7zip S3TC X X509 Xaw3d a52 aac acl acpi activefilter admin adns aiglx aim aio akode alsa amd ansi ao aoss aotuv apache2 aper artworkextra asf audiofile authdaemond automount avahi avantgo bash-completion bcmath bdf berkdb bidi big-tables binfilter bitmap-fonts blender-game browserplugin bzip2 cairo cap catalogs cdda cddb cdinstall cdio cdparanoia cdr cdrom cgi chroot cjk clamav clamd clanJavaScript clanVoice cli cluster corba cpudetection cpulimit cracklib crypt css cups curlwrappers daap dbus dga dhcp dio divx djbfft dlloader dmi dnd dpms dri dts dvd dvdr dvdread eap-tls ecc edl eds eep elf elibc_glibc emboss encode erandom evo exif expat ext-png ext-zlib extensions extraengine extrafilters extramodules fam fame fastcgi fbcon ffmpeg fftw firefox flac fltk fluidsynth fmod font-server fontconfig foomaticdb fortran fpx freetype freewnn fuse gb gcl gd gdbm geoip ggi gif gimp gimpprint ginac glade glgd glibc-omitfp glitz glx gmtfull gnome gnome-print gnomecanvas gnomedb gnuplot gnutls gpgme gphoto2 gpm graphicsmagick graphviz gs gsl gsm gstreamer gtk gtk2 gtkhtml hal hardenedphp hbci hddtemp hdf high-ints howl iconv icq ide idl idn ieee1394 ifp image imagemagick imap imlib imlib2 immqt-bc innodb input_devices_evdev input_devices_joystick input_devices_keyboard input_devices_mouse ipod ipv6 irda irmc isdnlog ithreads j2ee jabber java java5 javacomm javamail javascript jbig jboss jce jms jmx john joystick jpeg jpeg2k jpgraph jta junit jython kakasi kde kdehiddenvisibility kdepim kerberos kernel_linux lame latex lcms ldap leim libclamav libdsk libg++ libgd libgda libsamplerate libvisual libwww linguas_en live lm_sensors log4j logrotate logwatch lua lzo lzw m17n-lib mad maildir matroska max-idx-128 mbox mdb migemo mikmod mime mixer mjpeg mmap mmx mng mod modperl module mono motif mozp3p mozsvg mozxmlterm mp3 mp4 mpeg mpeg2 mpi mplayer mpm-worker msn mule musepack music musicbrainz mysql mysqli nagios-dns nagios-ntp nagios-ping nagios-ssh nas ncurses net netcdf netpbm network neural nfs njb nls nptl nptlonly nsplugin nspr ntlm nvidia oav objc ocaml odbc offensive ofx ogg oggvorbis on-the-fly-crypt openal openexr opengl oscar ospfapi oss pam pam_chroot pam_console pam_timestamp parse-clocks pcap pccts pcntl pcre pda pdf perl pg-hier pg-intdatetime pg-vacuumdelay php physfs pic plotutils png pop portaudio postgres povray ppds pppd pri print procmail pthreads python pyzor qdbm qt3 qt4 quicktime quotas quotes razor rdesktop readline real reflection resperl rhino rogue rplay rtsp ruby samba sasl scanner sdl server servlet-2.3 servlet-2.4 session sftplogging shared sharedmem shout silc skins skk slp smime smp sndfile snmp snortsam socks5 softquota sox speex spell spf spl sqlite sqlite3 sse sse2 ssl stencil-buffer stream stroke struts subversion svg swat swig sysfs syslog sysvipc szip t1lib taglib tcl tcltk tcpd tcsim tetex tga theora threads tidy tiff tk tools transcode truetype truetype-fonts type1-fonts udev uim unicode unzip urandom usb userland_GNU userlocales utf8 v4l v4l2 vcd vda vhosts video_cards_fbdev video_cards_mach64 video_cards_vesa video_cards_vga videos virus-scan vlm vorbis wddx wifi win32codecs winbind wma wmf wxwindows x264 xanim xatrix xchatdccserver xface xgetdefault xine xinetd xml xml2 xmlrpc xorg xosd xpm xrandr xscreensaver xslt xv xvid xvmc yahoo yaz yp yv12 zaptel zeo zeroconf zip zlib zvbi"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS |
This is an ongoing problem which has manifested in many different gentoo systems on both x86 and x86_64 using either non hardened, hardened or even selinux on either architecture that I could really use some suggestions on how to fix. I would rather not use non threaded web services... a numa enabled smp opteron just loves the pressure from a threaded application stack but unfortunately unless libpq and postgresql pass and compile thread safe consistantly I couldn't reasonably deploy postgresql on gentoo in production. I like the features postgresql offers but without php having postgres support thread safe...
| Code: | * checking php-patchset-5.1.6-r3.tar.bz2 ;-) ... [ ok ] * checking hardening-patch-5.1.6-0.4.15-gentoo-r1.patch.gz ;-) ... [ ok ] * Determining SAPI(s) to build
* Enabled SAPI: cli
* Enabled SAPI: cgi
* Disabled SAPI: apache
* Enabled SAPI: apache2
*
* If this package fails with a fatal error about Apache2 not having
* been compiled with a compatible MPM, this is normally because you
* need to toggle the 'threads' USE flag.
*
* If 'threads' is off, try switching it on.
* If 'threads' is on, try switching it off.
*
*
* You must build dev-db/libpq with the 'threads' USE flag
* turned on if you want to build PHP with threads support!
*
!!! ERROR: dev-lang/php-5.1.6-r6 failed.
Call stack:
ebuild.sh, line 1562: Called dyn_setup
ebuild.sh, line 665: Called pkg_setup
php-5.1.6-r6.ebuild, line 106: Called php5_1-sapi_pkg_setup
php5_1-sapi.eclass, line 270: Called php5_1-sapi_check_use_flags
php5_1-sapi.eclass, line 206: Called php_check_pgsql
php-common-r1.eclass, line 222: Called die
!!! Rebuild dev-db/libpq with 'threads' USE flag enabled
!!! If you need support, post the topmost build error, and the call stack if relevant. |
As I previousuly mentioned this is an ongoing problem and not related to just this system or even this specific toolchain environment. gcc-3.4 with glibc compiled with or without nptl still seems to bark when postgresql fails econfig. sometimes libpq will compile without any errors passing the tests above but postgresql will not. Very peculiar and frustrating. Perhaps a toolchain developer might find this intriguing if it is indeed releated to glibc. Suggestions anyone?
*edit*
Here's the config from this specific system in question. _________________ Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper! |
|
| Back to top |
|
 |
llongi Retired Dev


Joined: 15 Apr 2004 Posts: 459 Location: Switzerland
|
Posted: Thu Nov 09, 2006 5:52 pm Post subject: |
|
|
| Code: |
configure:22570: checking thread safety of required library functions
configure:22598: i686-pc-linux-gnu-gcc -o conftest -march=pentium4 -O2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -DIN_CONFIGURE -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lkrb5 -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd -lpthread >&5
configure:22601: $? = 0
configure:22603: ./conftest
./configure: line 22604: 24217 Segmentation fault ./conftest$ac_exeext
configure:22606: $? = 139
configure: program exited with status 139
|
That's why it fails that test... The libraries are there, it manages to compile the test, but the test then segfaults. :S
Very strange, works here on my x86, GCC 3.4...
You'd have to try to reproduce that test and that segfault manually to debug it with gdb, not really easy to do for configure tests... _________________ Best regards, Luca. |
|
| Back to top |
|
 |
ali3nx l33t


Joined: 21 Sep 2003 Posts: 722 Location: Winnipeg, Canada
|
Posted: Fri Nov 10, 2006 1:50 am Post subject: |
|
|
| CHTEKK wrote: | | Code: |
configure:22570: checking thread safety of required library functions
configure:22598: i686-pc-linux-gnu-gcc -o conftest -march=pentium4 -O2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -DIN_CONFIGURE -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lkrb5 -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd -lpthread >&5
configure:22601: $? = 0
configure:22603: ./conftest
./configure: line 22604: 24217 Segmentation fault ./conftest$ac_exeext
configure:22606: $? = 139
configure: program exited with status 139
|
That's why it fails that test... The libraries are there, it manages to compile the test, but the test then segfaults. :S
Very strange, works here on my x86, GCC 3.4...
You'd have to try to reproduce that test and that segfault manually to debug it with gdb, not really easy to do for configure tests... |
I worked into the wee hours last night and decided i would try to bootstrap both my dev boxes I have here to test if a freshly bootstrapped toolchain would pass the conftest error noted above. A 1U smp HT 604 xeon server with 2 gigs of ram and an 2U numafied smp 246 opteron also with 2 gigs of ram. I started by bootstrapping the xeon then later after completeing the initial bootstrap (i value the xeon slightly less than my 2U opteron hammer) I started the bootstrap on my opteron server. I mention this mainly due to how each system finished before the other and it's interestingly related to my findings. The opteron carries significantly more load than my xeon which turned out to be fortunate. The error from libpq was retrieved from the xeon after completing both bootstrap and the advised emerge -e system both of which finished before my opteron could finish it's bootstrap. As I mentioned the opteron did -not- have an opportunity to emerge -e system but curiously libpq-8.1.5 was listed in the updates for the xeon and it apparently did compile without erroring at the -lpthread tests however later afterwards errored verbosely as you see below...
| Code: | silicon portage # emerge -pv libpq
These are the packages that would be merged, in order:
Calculating dependencies ... done!
[ebuild R ] dev-db/libpq-8.1.5 USE="kerberos nls pam pg-intdatetime readline ssl threads zlib" 0 kB
Total size of downloads: 0 kB
silicon portage # emerge libpq
Calculating dependencies ... done!
>>> Emerging (1 of 1) dev-db/libpq-8.1.5 to /
* postgresql-base-8.1.5.tar.bz2 MD5 ;-) ... [ ok ] * postgresql-base-8.1.5.tar.bz2 RMD160 ;-) ... [ ok ] * postgresql-base-8.1.5.tar.bz2 SHA1 ;-) ... [ ok ] * postgresql-base-8.1.5.tar.bz2 SHA256 ;-) ... [ ok ] * postgresql-base-8.1.5.tar.bz2 size ;-) ... [ ok ] * postgresql-opt-8.1.5.tar.bz2 MD5 ;-) ... [ ok ] * postgresql-opt-8.1.5.tar.bz2 RMD160 ;-) ... [ ok ] * postgresql-opt-8.1.5.tar.bz2 SHA1 ;-) ... [ ok ] * postgresql-opt-8.1.5.tar.bz2 SHA256 ;-) ... [ ok ] * postgresql-opt-8.1.5.tar.bz2 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * checking postgresql-base-8.1.5.tar.bz2 ;-) ... [ ok ] * checking postgresql-opt-8.1.5.tar.bz2 ;-) ... [ ok ]>>> Unpacking source...
>>> Unpacking postgresql-base-8.1.5.tar.bz2 to /var/tmp/portage/libpq-8.1.5/work
tar: Read 7168 bytes from -
>>> Unpacking postgresql-opt-8.1.5.tar.bz2 to /var/tmp/portage/libpq-8.1.5/work
tar: Read 5120 bytes from -
* Applying libpq-8.1.5-gentoo.patch ... [ ok ]>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/libpq-8.1.5/work/postgresql-8.1.5 ...
* Using GNU config files from /usr/share/libtool
* Updating config/config.sub [ ok ] * Updating config/config.guess [ ok ]configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking which template to use... linux
checking whether to build with 64-bit integer date/time support... yes
checking whether NLS is wanted... yes
checking for default port number... 5432
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
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 i686-pc-linux-gnu-gcc accepts -g... yes
checking for i686-pc-linux-gnu-gcc option to accept ANSI C... none needed
checking if i686-pc-linux-gnu-gcc supports -Wdeclaration-after-statement... yes
checking if i686-pc-linux-gnu-gcc supports -Wendif-labels... yes
checking if i686-pc-linux-gnu-gcc supports -fno-strict-aliasing... yes
configure: using CFLAGS=-march=pentium4 -O2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
checking whether the C compiler still works... yes
checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E
checking allow thread-safe client libraries... yes
checking whether to build with Tcl... no
checking whether to build Perl modules... no
checking whether to build Python modules... no
checking whether to build with Kerberos 5 support... yes
checking whether to build with PAM support... yes
checking whether to build with Bonjour support... no
checking whether to build with OpenSSL support... yes
checking for egrep... grep -E
configure: using CPPFLAGS=-D_GNU_SOURCE
configure: using LDFLAGS=
checking for gawk... gawk
checking for flex... /usr/bin/flex
checking whether ln -s works... yes
checking for ld used by GCC... /usr/i686-pc-linux-gnu/bin/ld
checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes
checking for i686-pc-linux-gnu-ranlib... i686-pc-linux-gnu-ranlib
checking for lorder... no
checking for tar... /bin/tar
checking for i686-pc-linux-gnu-strip... i686-pc-linux-gnu-strip
checking whether it is possible to strip libraries... yes
checking for bison... bison -y
checking for perl... /usr/bin/perl
checking for main in -lbsd... yes
checking for setproctitle in -lutil... no
checking for main in -lm... yes
checking for main in -ldl... yes
checking for main in -lnsl... yes
checking for main in -lsocket... no
checking for main in -lipc... no
checking for main in -lIPC... no
checking for main in -llc... no
checking for main in -ldld... no
checking for main in -lld... no
checking for main in -lcompat... no
checking for main in -lBSD... no
checking for main in -lgen... no
checking for main in -lPW... no
checking for main in -lresolv... yes
checking for library containing getopt_long... none required
checking for main in -lunix... no
checking for library containing crypt... -lcrypt
checking for library containing fdatasync... none required
checking for shmget in -lcygipc... no
checking for readline... yes (-lreadline)
checking for inflate in -lz... yes
checking for library containing com_err... -lkrb5
checking for library containing krb5_sendauth... none required
checking for CRYPTO_new_ex_data in -lcrypto... yes
checking for SSL_library_init in -lssl... yes
checking for pam_start in -lpam... yes
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 crypt.h usability... yes
checking crypt.h presence... yes
checking for crypt.h... yes
checking dld.h usability... no
checking dld.h presence... no
checking for dld.h... no
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking fp_class.h usability... no
checking fp_class.h presence... no
checking for fp_class.h... no
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/pstat.h usability... no
checking sys/pstat.h presence... no
checking for sys/pstat.h... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking kernel/OS.h usability... no
checking kernel/OS.h presence... no
checking for kernel/OS.h... no
checking kernel/image.h usability... no
checking kernel/image.h presence... no
checking for kernel/image.h... no
checking SupportDefs.h usability... no
checking SupportDefs.h presence... no
checking for SupportDefs.h... no
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking krb5.h usability... yes
checking krb5.h presence... yes
checking for krb5.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking security/pam_appl.h usability... yes
checking security/pam_appl.h presence... yes
checking for security/pam_appl.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for preprocessor stringizing operator... yes
checking for signed types... yes
checking for working volatile... yes
checking for __func__... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for tzname... yes
checking for union semun... no
checking for struct sockaddr_un... yes
checking for struct sockaddr_storage... yes
checking for struct sockaddr_storage.ss_family... yes
checking for struct sockaddr_storage.__ss_family... no
checking for struct sockaddr_storage.ss_len... no
checking for struct sockaddr_storage.__ss_len... no
checking for struct sockaddr.sa_len... no
checking for struct addrinfo... yes
checking for struct cmsgcred... no
checking for struct fcred... no
checking for struct sockcred... no
checking for struct option... yes
checking for z_streamp... yes
checking for krb5_ticket.enc_part2... yes
checking for krb5_error.text.data... yes
checking whether F_FULLFSYNC is declared... no
checking for int timezone... yes
checking types of arguments for accept()... int, int, struct sockaddr *, size_t *
checking whether gettimeofday takes only one argument... no
checking for cbrt... yes
checking for dlopen... yes
checking for fcvt... yes
checking for fdatasync... yes
checking for getpeereid... no
checking for memmove... yes
checking for poll... yes
checking for pstat... no
checking for readlink... yes
checking for setproctitle... no
checking for setsid... yes
checking for sigprocmask... yes
checking for symlink... yes
checking for sysconf... yes
checking for towlower... yes
checking for utime... yes
checking for utimes... yes
checking for waitpid... yes
checking for wcstombs... yes
checking whether fdatasync is declared... yes
checking for struct sockaddr_in6... yes
checking for PS_STRINGS... no
checking for snprintf... yes
checking for vsnprintf... yes
checking whether snprintf is declared... yes
checking whether vsnprintf is declared... yes
checking for isinf... yes
checking for crypt... yes
checking for fseeko... yes
checking for getopt... yes
checking for getrusage... yes
checking for inet_aton... yes
checking for random... yes
checking for rint... yes
checking for srandom... yes
checking for strdup... yes
checking for strerror... yes
checking for strtol... yes
checking for strtoul... yes
checking for unsetenv... yes
checking for getaddrinfo... yes
checking for getopt_long... yes
checking for rl_completion_append_character... yes
checking for rl_completion_matches... yes
checking for rl_filename_completion_function... yes
checking for replace_history_entry... yes
checking for finite... yes
checking for sigsetjmp... yes
checking for syslog... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for optreset... no
checking for strtoll... yes
checking for strtoull... yes
checking for atexit... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... (cached) yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... yes
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for the pthreads library -lpthreadGC2... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for strerror_r... yes
checking for getpwuid_r... yes
checking for gethostbyname_r... yes
checking whether getpwuid_r takes a fifth argument... yes
checking whether strerror_r returns int... no
checking test program... ok
checking whether printf supports argument control... yes
checking whether long int is 64 bits... no
checking whether long long int is 64 bits... yes
checking snprintf format for long long int... %lld
checking for unsigned long... yes
checking size of unsigned long... 4
checking for size_t... yes
checking size of size_t... 4
checking for short... yes
checking alignment of short... 2
checking for int... yes
checking alignment of int... 4
checking for long... yes
checking alignment of long... 4
checking for long long int... yes
checking alignment of long long int... 4
checking for double... yes
checking alignment of double... 4
checking for int8... no
checking for uint8... no
checking for int64... no
checking for uint64... no
checking for sig_atomic_t... yes
checking for POSIX signal interface... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
checking for working memcmp... yes
checking for library containing gettext... none required
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for msgfmt... msgfmt
checking for msgmerge... msgmerge
checking for xgettext... xgettext
checking for onsgmls... no
checking for nsgmls... no
checking for openjade... no
checking for jade... no
checking for DocBook V4.2... no
checking for DocBook stylesheets... no
checking for collateindex.pl... /usr/bin/collateindex.pl
checking for sgmlspl... no
checking thread safety of required library functions... *** glibc detected *** ./conftest: double free or corruption (!prev): 0x08056228 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7b8ebab]
/lib/libc.so.6(__libc_free+0x79)[0xb7b900e7]
/usr/lib/libsandbox.so[0xb7f0dfcc]
/usr/lib/libsandbox.so[0xb7f0e09a]
/usr/lib/libsandbox.so[0xb7f0df28]
/usr/lib/libsandbox.so[0xb7f114e0]
/lib/ld-linux.so.2[0xb7f24c87]
/lib/libc.so.6(exit+0xe6)[0xb7b58886]
/lib/libc.so.6(__libc_start_main+0xe4)[0xb7b4386c]
./conftest[0x8048881]
======= Memory map: ========
08048000-08049000 r-xp 00000000 fd:01 887487 /var/tmp/portage/libpq-8.1.5/work/postgresql-8.1.5/conftest
08049000-0804a000 rw-p 00001000 fd:01 887487 /var/tmp/portage/libpq-8.1.5/work/postgresql-8.1.5/conftest
0804a000-080bf000 rw-p 0804a000 00:00 0 [heap]
b6900000-b6979000 rw-p b6900000 00:00 0
b6979000-b6a00000 ---p b6979000 00:00 0
b6ac0000-b6ac1000 ---p b6ac0000 00:00 0
b6ac1000-b72c1000 rw-p b6ac1000 00:00 0
b72c1000-b72c2000 ---p b72c1000 00:00 0
b72c2000-b7ac4000 rw-p b72c2000 00:00 0
b7ac4000-b7ac6000 r-xp 00000000 fd:00 2393376 /usr/lib/libkrb5support.so.0.0
b7ac6000-b7ac7000 rw-p 00001000 fd:00 2393376 /usr/lib/libkrb5support.so.0.0
b7ac7000-b7afe000 r-xp 00000000 03:03 163289 /lib/libncurses.so.5.5
b7afe000-b7b07000 rw-p 00036000 03:03 163289 /lib/libncurses.so.5.5
b7b07000-b7b08000 rw-p b7b07000 00:00 0
b7b08000-b7b0a000 r-xp 00000000 03:03 163324 /lib/libcom_err.so.2.1
b7b0a000-b7b0b000 rw-p 00001000 03:03 163324 /lib/libcom_err.so.2.1
b7b0b000-b7b2d000 r-xp 00000000 fd:00 2395337 /usr/lib/libk5crypto.so.3.0
b7b2d000-b7b2e000 rw-p 00021000 fd:00 2395337 /usr/lib/libk5crypto.so.3.0
b7b2e000-b7c3e000 r-xp 00000000 03:03 164160 /lib/libc-2.4.so
b7c3e000-b7c40000 r--p 0010f000 03:03 164160 /lib/libc-2.4.so
b7c40000-b7c42000 rw-p 00111000 03:03 164160 /lib/libc-2.4.so
b7c42000-b7c45000 rw-p b7c42000 00:00 0
b7c45000-b7c54000 r-xp 00000000 03:03 164181 /lib/libpthread-2.4.so
b7c54000-b7c55000 r--p 0000e000 03:03 164181 /lib/libpthread-2.4.so
b7c55000-b7c56000 rw-p 0000f000 03:03 164181 /lib/libpthread-2.4.so
b7c56000-b7c58000 rw-p b7c56000 00:00 0
b7c58000-b7c7a000 r-xp 00000000 03:03 164158 /lib/libm-2.4.so
b7c7a000-b7c7c000 rw-p 00021000 03:03 164158 /lib/libm-2.4.so
b7c7c000-b7c7e000 r-xp 00000000 03:03 164178 /lib/libdl-2.4.so
b7c7e000-b7c80000 rw-p 00001000 03:03 164178 /lib/libdl-2.4.so
b7c80000-b7c81000 rw-p b7c80000 00:00 0
b7c81000-b7c91000 r-xp 00000000 03:03 164167 /lib/libnsl-2.4.so
b7c91000-b7c93000 rw-p 0000f000 03:03 164167 /lib/libnsl-2.4.so
b7c93000-b7c95000 rw-p b7c93000 00:00 0
b7c95000-b7ca3000 r-xp 00000000 03:03 164148 /lib/libresolv-2.4.so
b7ca3000-b7ca5000 rw-p 0000d000 03:03 164148 /lib/libresolv-2.4.so
b7ca5000-b7ca7000 rw-p b7ca5000 00:00 0
b7ca7000-b7cac000 r-xp 00000000 03:03 163836 /lib/libcrypt-2.4.so
b7cac000-b7cae000 rw-p 00004000 03:03 163836 /lib/libcrypt-2.4.so
b7cae000-b7cd5000 rw-p b7cae000 00:00 0
b7cd5000-b7cfd000 r-xp 00000000 03:03 164186 /lib/libreadline.so.5.1
b7cfd000-b7d01000 rw-p 00028000 03:03 164186 /lib/libreadline.so.5.1
b7d01000-b7d02000 rw-p b7d01000 00:00 0
b7d02000-b7d13000 r-xp 00000000 03:03 163863 /lib/libz.so.1.2.3
b7d13000-b7d14000 rw-p 00010000 03:03 163863 /lib/libz.so.1.2.3
b7d14000-b7d78000 r-xp 00000000 fd:00 2395341 /usr/lib/libkrb5.so.3.2
b7d78000-b7d7a000 rw-p 00064000 fd:00 2395341 /usr/lib/libkrb5.so.3.2
b7d7a000-b7d7b000 rw-p b7d7a000 00:00 0
b7d7b000-b7e8f000 r-xp 00000000 fd:00 2395243 /usr/lib/libcrypto.so.0.9.8
b7e8f000-b7ea4000 rw-p 00113000 fd:00 2395243 /usr/lib/libcrypto.so.0.9.8
b7ea4000-b7ea7000 rw-p b7ea4000 00:00 0
b7ea7000-b7ee0000 r-xp 00000000 fd:00 2394977 /usr/lib/libssl.so.0.9.8
b7ee0000-b7ee4000 rw-p 00038000 fd:00 2394977 /usr/lib/libssl.so.0.9.8
b7ee4000-b7eeb000 r-xp 00000000 03:03 164190 /lib/libpam.so.0.78
b7eeb000-b7eec000 rw-p 00006000 03:03 164190 /lib/libpam.so.0.78
b7f02000-b7f0b000 r-xp 00000000 fd:00 2395284 /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcc_s.so.1
b7f0b000-b7f0c000 rw-p 00008000 fd:00 2395284 /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcc_s.so.1
b7f0c000-b7f0d000 rw-p b7f0c000 00:00 0
b7f0d000-b7f12000 r-xp 00000000 fd:00 2395255 /usr/lib/libsandbox.so.0.0.0
b7f12000-b7f13000 rw-p 00005000 fd:00 2395255 /usr/lib/libsandbox.so.0.0.0
b7f13000-b7f16000 rw-p b7f13000 00:00 0
b7f16000-b7f17000 r-xp b7f16000 00:00 0 [vdso]
b7f17000-b7f30000 r-xp 00000000 03:03 164156 /lib/ld-2.4.so
b7f30000-b7f31000 r--p 00019000 03:03 164156 /lib/ld-2.4.so
b7f31000-b7f32000 rw-p 0001a000 03:03 164156 /lib/ld-2.4.so
bffd8000-bfff0000 rw-p bffd8000 00:00 0 [stack]
no
configure: error:
*** Thread test program failed. Your platform is not thread-safe.
*** Check the file 'config.log'for the exact reason.
***
*** You can use the configure option --enable-thread-safety-force
*** to force threads to be enabled. However, you must then run
*** the program in src/tools/thread and add locking function calls
*** to your applications to guarantee thread safety.
!!! ERROR: dev-db/libpq-8.1.5 failed.
Call stack:
ebuild.sh, line 1546: Called dyn_compile
ebuild.sh, line 937: Called src_compile
libpq-8.1.5.ebuild, line 70: Called die
!!! configure failed
!!! If you need support, post the topmost build error, and the call stack if relevant. |
_________________ Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper! |
|
| Back to top |
|
 |
Junkyboy n00b

Joined: 06 Jul 2002 Posts: 33
|
Posted: Mon Dec 18, 2006 10:02 pm Post subject: |
|
|
| Same thing happened to me, fails citing 'cant find -lpthread'. I unmasked 8.15 and it emerged fine. |
|
| Back to top |
|
 |
Cinquero Apprentice

Joined: 24 Jun 2004 Posts: 249
|
Posted: Fri Jan 05, 2007 5:38 pm Post subject: |
|
|
| Do these problems occur only on multi-core machines or also on single-core ones? |
|
| Back to top |
|
 |
Junkyboy n00b

Joined: 06 Jul 2002 Posts: 33
|
Posted: Fri Jan 19, 2007 6:33 pm Post subject: |
|
|
| Single core system here. 'Intel(R) Pentium(R) 4 CPU 3.00GHz'. I noticed that somehow I had libpq 8.0.1 and 8.1.5 at the same time. I removed 8.0.1 and tried to re-emerge 8.1.5 and got the error again. |
|
| Back to top |
|
 |
Junkyboy n00b

Joined: 06 Jul 2002 Posts: 33
|
Posted: Fri Jan 19, 2007 6:59 pm Post subject: |
|
|
Ok. I cd'd to src/tools/thread and compiled it the old fashioned way:
| Code: |
barry thread # gcc -I/usr/include/postgresql/server -l pthread thread_test.c
barry thread # ls
a.out Makefile README thread_test.c
barry thread # ./a.out
Your errno is thread-safe.
Your system has sterror_r(); it does not need strerror().
Your system has getpwuid_r(); it does not need getpwuid().
Your system has getaddrinfo(); it does not need gethostbyname()
or gethostbyname_r().
Your platform is thread-safe. |
and it works fine..hmm |
|
| Back to top |
|
 |
ali3nx l33t


Joined: 21 Sep 2003 Posts: 722 Location: Winnipeg, Canada
|
Posted: Thu Feb 22, 2007 3:28 am Post subject: |
|
|
Just wanted to mention this is still a persistant issue. The current stable builds of libpq fail with the threadsafe warning but will compile without sandbox! Maybe chriswhite could comment on his findings from december? _________________ Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper! |
|
| Back to top |
|
 |
numpf n00b

Joined: 17 May 2004 Posts: 4
|
Posted: Wed Feb 28, 2007 11:09 pm Post subject: |
|
|
I have had the problem described in this bug with both 8.0.9 and 8.0.12
I just fixed it for my system. All I did was change -mcpu=i686 to -mtune=i686 in my make.conf CFLAGS. They are supposedly synonyms so I don't get it. Here's the diff from good to bad of build.log (if someone could tell me how to turn off wrapping in code blocks that'd be nice... since these are diffs the wrapped compiler options look like removed lines):
| Code: |
--- build.log 2007-02-28 17:26:41.000000000 -0500
+++ build.log.bad 2007-02-28 17:20:09.000000000 -0500
@@ -29,7 +29,7 @@
checking if i686-pc-linux-gnu-gcc supports -Wdeclaration-after-statement... yes
checking if i686-pc-linux-gnu-gcc supports -Wendif-labels... yes
checking if i686-pc-linux-gnu-gcc supports -fno-strict-aliasing... yes
-configure: using CFLAGS=-O2 -mtune=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
+configure: using CFLAGS=-O2 -mcpu=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
checking whether the C compiler still works... yes
checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E
checking allow thread-safe client libraries... yes
@@ -278,12 +278,13 @@
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
-checking whether pthreads work with -pthread... yes
+checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
-checking for the pthreads library -lpthread... yes
+checking for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
+checking for pthread-config... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
@@ -332,29 +333,25 @@
checking for DocBook stylesheets... no
checking for collateindex.pl... no
checking for sgmlspl... no
-checking thread safety of required library functions... yes
-configure: creating ./config.status
-config.status: creating GNUmakefile
-config.status: creating src/Makefile.global
-config.status: creating src/include/pg_config.h
-config.status: linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s
-config.status: linking ./src/backend/port/dynloader/linux.c to src/backend/port/dynloader.c
-config.status: linking ./src/backend/port/sysv_sema.c to src/backend/port/pg_sema.c
-config.status: linking ./src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
-config.status: linking ./src/backend/port/dynloader/linux.h to src/include/dynloader.h
-config.status: linking ./src/include/port/linux.h to src/include/pg_config_os.h
-config.status: linking ./src/makefiles/Makefile.linux to src/Makefile.port
-msgfmt -o po/af.mo po/af.po
-msgfmt -o po/cs.mo po/cs.po
-msgfmt -o po/de.mo po/de.po
-msgfmt -o po/es.mo po/es.po
-msgfmt -o po/fr.mo po/fr.po
-msgfmt -o po/hr.mo po/hr.po
-msgfmt -o po/it.mo po/it.po
-msgfmt -o po/ko.mo po/ko.po
-msgfmt -o po/nb.mo po/nb.po
-make: *** [po/nb.mo] Interrupt
+checking thread safety of required library functions... no
+configure: error:
+*** Thread test program failed. Your platform is not thread-safe.
+*** Check the file 'config.log'for the exact reason.
+***
+*** You can use the configure option --enable-thread-safety-force
+*** to force threads to be enabled. However, you must then run
+*** the program in src/tools/thread and add locking function calls
+*** to your applications to guarantee thread safety.
-/usr/portage/dev-db/libpq/libpq-8.0.12.ebuild: src_compile aborted; exiting.
-sandbox: Caught signal 2 in pid 5083
+!!! ERROR: dev-db/libpq-8.0.12 failed.
+Call stack:
+ ebuild.sh, line 1614: Called dyn_compile
+ ebuild.sh, line 971: Called qa_call 'src_compile'
+ environment, line 3299: Called src_compile
+ libpq-8.0.12.ebuild, line 71: Called die
+
+!!! configure failed
+!!! If you need support, post the topmost build error, and the call stack if relevant.
+!!! A complete build log is located at '/var/tmp/portage/dev-db/libpq-8.0.12/temp/build.log'.
+ | The bit at the end in the good build is where I did ctrl-c after config was over. The config.log diff is huge since every compiler cmd is different. Here are what I think are the relevant parts: | Code: | --- config.log 2007-02-28 17:26:41.000000000 -0500
+++ config.log.bad 2007-02-28 17:20:09.000000000 -0500
@@ -2554,7 +2722,8 @@
}
configure:14155: result: no
configure:14019: checking whether pthreads work with -pthread
-configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mtune=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mcpu=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
configure: In function 'main':
configure:14101: warning: null argument where non-null required (argument 1)
configure:14102: warning: null argument where non-null required (argument 1)
@@ -2416,19 +2580,20 @@
}
configure:14155: result: no
configure:14019: checking whether pthreads work with -pthread
-configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mtune=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mcpu=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
configure: In function 'main':
configure:14101: warning: null argument where non-null required (argument 1)
configure:14102: warning: null argument where non-null required (argument 1)
@@ -2563,23 +2732,49 @@
configure:14113: $? = 0
configure:14116: test -s conftest
configure:14119: $? = 0
-configure:14155: result: yes
+configure:14155: result: no
configure:14019: checking whether pthreads work with -pthreads
-configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mtune=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread -pthreads -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mcpu=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthreads -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
i686-pc-linux-gnu-gcc: unrecognized option '-pthreads'
+`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
configure: In function 'main':
configure:14101: warning: null argument where non-null required (argument 1)
configure:14102: warning: null argument where non-null required (argument 1)
configure:14102: warning: null argument where non-null required (argument 3)
configure:14100: warning: 'th' is used uninitialized in this function
-configure:14113: $? = 0
-configure:14116: test -s conftest
-configure:14119: $? = 0
+/var/tmp/portage/dev-db/libpq-8.0.12/temp/ccy8BjDo.o: In function `main':
+conftest.c:(.text+0x1b): undefined reference to `pthread_join'
+conftest.c:(.text+0x46): undefined reference to `__pthread_register_cancel'
+conftest.c:(.text+0x64): undefined reference to `pthread_create'
+conftest.c:(.text+0x6b): undefined reference to `__pthread_unregister_cancel'
+collect2: ld returned 1 exit status
+distcc[4185] ERROR: compile conftest.c on localhost failed
+configure:14113: $? = 1
+configure: failed program was:
+#line 14089 "configure"
+#include "confdefs.h"
+#include <pthread.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+pthread_t th; pthread_join(th, 0);
+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+ ;
+ return 0;
+}
configure:14155: result: no
configure:14019: checking whether pthreads work with -mthreads
-configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mtune=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread -mthreads -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mcpu=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -mthreads -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
cc1: error: unrecognized command line option "-mthreads"
-distcc[9126] ERROR: compile conftest.c on localhost failed
+distcc[4198] ERROR: compile conftest.c on localhost failed
configure:14113: $? = 1
configure: failed program was:
#line 14089 "configure"
@@ -2602,7 +2797,8 @@
}
configure:14155: result: no
configure:14069: checking for the pthreads library -lpthread
-configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mtune=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread -D_GNU_SOURCE conftest.c -lpthread -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mcpu=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -D_GNU_SOURCE conftest.c -lpthread -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
configure: In function 'main':
configure:14101: warning: null argument where non-null required (argument 1)
configure:14102: warning: null argument where non-null required (argument 1)
@@ -2611,11 +2807,12 @@
configure:14113: $? = 0
configure:14116: test -s conftest
configure:14119: $? = 0
-configure:14155: result: yes
+configure:14155: result: no
configure:14019: checking whether pthreads work with --thread-safe
-configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mtune=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread --thread-safe -D_GNU_SOURCE conftest.c -lpthread -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mcpu=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing --thread-safe -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
cc1: error: unrecognized command line option "-fthread-safe"
-distcc[9161] ERROR: compile conftest.c on localhost failed
+distcc[4233] ERROR: compile conftest.c on localhost failed
configure:14113: $? = 1
configure: failed program was:
#line 14089 "configure"
@@ -2638,9 +2835,10 @@
}
configure:14155: result: no
configure:14019: checking whether pthreads work with -mt
-configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mtune=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread -mt -D_GNU_SOURCE conftest.c -lpthread -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+configure:14110: i686-pc-linux-gnu-gcc -o conftest -O2 -mcpu=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -mt -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
cc1: error: unrecognized command line option "-mt"
-distcc[9171] ERROR: compile conftest.c on localhost failed
+distcc[4243] ERROR: compile conftest.c on localhost failed
configure:14113: $? = 1
configure: failed program was:
#line 14089 "configure"
@@ -2662,8 +2860,11 @@
return 0;
}
configure:14155: result: no
+configure:14029: checking for pthread-config
+configure:14056: result: no
configure:14395: checking pthread.h usability
-configure:14404: i686-pc-linux-gnu-gcc -c -O2 -mtune=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE conftest.c >&5
+configure:14404: i686-pc-linux-gnu-gcc -c -O2 -mcpu=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE conftest.c >&5
+`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
configure:14407: $? = 0
configure:14410: test -s conftest.o
configure:14413: $? = 0
@@ -3132,45 +3366,31 @@
configure:18906: checking for sgmlspl
configure:18935: result: no
configure:18962: checking thread safety of required library functions
-configure:18987: i686-pc-linux-gnu-gcc -o conftest -O2 -mtune=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -DIN_CONFIGURE -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd -lpthread >&5
-configure:18990: $? = 0
-configure:18992: ./conftest
-Your errno is thread-safe.
-Your system has sterror_r(); it does not need strerror().
-Your system has getpwuid_r(); it does not need getpwuid().
-Your system has getaddrinfo(); it does not need gethostbyname()
- or gethostbyname_r().
-
-Your platform is thread-safe.
-configure:18995: $? = 0
-configure:18997: result: yes
-configure:19148: creating ./config.status
-
-## ---------------------- ##
-## Running config.status. ##
-## ---------------------- ##
-
-This file was extended by PostgreSQL config.status 8.0.12, which was
-generated by GNU Autoconf 2.53. Invocation command line was
-
- CONFIG_FILES =
- CONFIG_HEADERS =
- CONFIG_LINKS =
- CONFIG_COMMANDS =
- $ ./config.status
-
-on tamalach
-
-config.status:664: creating GNUmakefile
-config.status:664: creating src/Makefile.global
-config.status:767: creating src/include/pg_config.h
-config.status:1239: linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s
-config.status:1239: linking ./src/backend/port/dynloader/linux.c to src/backend/port/dynloader.c
-config.status:1239: linking ./src/backend/port/sysv_sema.c to src/backend/port/pg_sema.c
-config.status:1239: linking ./src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
-config.status:1239: linking ./src/backend/port/dynloader/linux.h to src/include/dynloader.h
-config.status:1239: linking ./src/include/port/linux.h to src/include/pg_config_os.h
-config.status:1239: linking ./src/makefiles/Makefile.linux to src/Makefile.port
+configure:18987: i686-pc-linux-gnu-gcc -o conftest -O2 -mcpu=i686 -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -DIN_CONFIGURE -D_GNU_SOURCE conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
+`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
+/var/tmp/portage/dev-db/libpq-8.0.12/temp/cc1KF22G.o: In function `main':
+conftest.c:(.text+0x38d): undefined reference to `pthread_create'
+conftest.c:(.text+0x3ae): undefined reference to `pthread_create'
+conftest.c:(.text+0x3f1): undefined reference to `pthread_join'
+conftest.c:(.text+0x403): undefined reference to `pthread_join'
+collect2: ld returned 1 exit status
+distcc[4805] ERROR: compile conftest.c on localhost failed
+configure:18990: $? = 1
+configure: program exited with status 1
+configure: failed program was:
+#line 18981 "configure"
+#include "confdefs.h"
+#include "./src/tools/thread/thread_test.c"
+configure:19004: result: no
+configure:19014: error:
+*** Thread test program failed. Your platform is not thread-safe.
+*** Check the file 'config.log'for the exact reason.
+***
+*** You can use the configure option --enable-thread-safety-force
+*** to force threads to be enabled. However, you must then run
+*** the program in src/tools/thread and add locking function calls
+*** to your applications to guarantee thread safety.
+
## ---------------- ##
## Cache variables. ##
@@ -3186,7 +3406,7 @@
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
-ac_cv_env_CFLAGS_value='-O2 -mtune=i686 -fomit-frame-pointer'
+ac_cv_env_CFLAGS_value='-O2 -mcpu=i686 -fomit-frame-pointer'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
@@ -3348,6 +3568,7 @@
ac_cv_prog_STRIP=i686-pc-linux-gnu-strip
ac_cv_prog_XGETTEXT=xgettext
ac_cv_prog_YACC='bison -y'
+ac_cv_prog_acx_pthread_config=no
ac_cv_prog_cc_g=yes
ac_cv_prog_gnu_ld=yes
ac_cv_search_crypt=-lcrypt
@@ -3550,4 +3771,4 @@
#define USE_SYSV_SHARED_MEMORY 1
#define LOCALEDIR "/usr/share/locale"
-configure: exit 0
+configure: exit 1
| If you view this with "thread" highlighted it's clear that first "-pthread" then "-lpthread" disappear from the compiler options. There are a few more instances of this between the last one and the epilogue that I just didn't bother to paste.
emerge --info (with mtune rather than mcpu): | Code: | Portage 2.1.2-r9 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.5-r0, 2.6.17-gentoo-r4 i686)
=================================================================
System uname: 2.6.17-gentoo-r4 i686 Pentium II (Deschutes)
Gentoo Base System release 1.12.9
Timestamp of tree: Wed, 28 Feb 2007 08:00:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python: 2.3.5-r3, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.61
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils: 2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -mtune=i686 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distro.ibiblio.org/pub/linux/distributions/gentoo/"
LC_ALL="en_US.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_exclude --timeout=600"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X509 acpi alsa apache2 apm arts berkdb bitmap-fonts bzip2 cli cracklib crypt cscope cups curl dri eds emboss encode esd fastcgi foomaticdb fortran freetype gd gdbm gif gmp gpm gstreamer iconv imap imlib innodb isdnlog java jikes jpeg junit libg++ libwww mad maildir mbox memlimit midi mikmod mmx mp3 mpeg ncurses nls nptl nptlonly offensive ogg opengl oss pam pcre pdflib pear-db perl pg-hier pic pie png ppds pppd pthreads python qt3 qt4 quicktime readline reflection session slp spell spl ssl tcpd threads tiff truetype truetype-fonts type1-fonts usb vhosts vorbis wmf x86 xml xml2 xorg xv zlib" ALSA_CARDS="sb16" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mga neomagic nsc nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, PORTDIR_OVERLAY | Someone who wishes less than a slow painful death for everyone that's ever had anything to do with an autotool might want to look at postgres's configure(.in) and maybe ACX_PTHREAD
-numpf |
|
| Back to top |
|
 |
taiger Tux's lil' helper

Joined: 25 Nov 2003 Posts: 112
|
|
| Back to top |
|
 |
wargand n00b

Joined: 25 Aug 2004 Posts: 40
|
Posted: Mon May 07, 2007 8:04 pm Post subject: |
|
|
Hi, just had the same bug with postgresql 8.0.13 when I made an 'emerge -uD system'.
For some reason this bug vanished when I did an 'emerge -uD --newuse system'. One of the things, which got recompiled was openssl. Don't know what else was recompiled. |
|
| Back to top |
|
 |
steveL Watchman

Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Tue Feb 19, 2008 10:20 pm Post subject: |
|
|
Moderators: is this a dupe topic?
And is this still not fixed?! I'd really like to see postgres more up to date in Gentoo; any ideas? The pthread thing looks promising, but I'm not very good on auto-hell\Wtools. |
|
| Back to top |
|
 |
johnnyboyro n00b


Joined: 19 Sep 2003 Posts: 57 Location: Iasi, Romania
|
Posted: Thu Apr 24, 2008 2:15 pm Post subject: |
|
|
Had the same problem.
Solved by running:
env-update
source /etc/profile |
|
| Back to top |
|
 |
Hamsterkill Tux's lil' helper


Joined: 01 Apr 2006 Posts: 81
|
Posted: Tue Jul 08, 2008 7:34 pm Post subject: |
|
|
| I just had libpq fail an emerge. It worked on the second try though. Nothing changed in between. The test may be a little sketchy? |
|
| Back to top |
|
 |
RayDude Advocate


Joined: 29 May 2004 Posts: 2073 Location: San Jose, CA
|
Posted: Fri Aug 15, 2008 7:44 pm Post subject: |
|
|
I just had this problem with 8.0.15 and I had to do this to get it to work:
| Code: | | FEATURES="-sandbox" emerge libpq -v |
It was suggested above but not spelled out, I wanted to help other folks who have the problem find the solution faster.
Raydude _________________ Some day there will only be free software. |
|
| Back to top |
|
 |
iandoug l33t


Joined: 11 Feb 2005 Posts: 840 Location: Cape Town, South Africa
|
Posted: Wed Sep 23, 2009 10:02 am Post subject: |
|
|
Came to this thread from a more recent similar one.
Had the same not-thread-safe issue on AMD64. Switching to ~amd64 did not solve it.
tried the env-update / source /etc/profile suggestion without success.
tried FEATURES="-sandbox" emerge libpq -v which got the lib compiled, and then postgresql emerged okay.
I thought the problem was solved in the 8.x series ... guess not everywhere.
cheers, Ian _________________ Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|