Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 460248 - dev-db/postgresql-base fails to configure with USE="threads"
Summary: dev-db/postgresql-base fails to configure with USE="threads"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: Normal normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: broken-system
  Show dependency tree
 
Reported: 2013-03-04 11:03 UTC by Dmitri Bogomolov
Modified: 2013-10-03 08:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info '=dev-db/postgresql-base-9.2.3-r1' (emerge.info,4.27 KB, text/plain)
2013-03-04 11:03 UTC, Dmitri Bogomolov
Details
build.log (build.log,16.80 KB, text/plain)
2013-03-04 11:04 UTC, Dmitri Bogomolov
Details
config.log (config.log,342.72 KB, text/plain)
2013-03-04 11:04 UTC, Dmitri Bogomolov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitri Bogomolov 2013-03-04 11:03:55 UTC
Created attachment 340924 [details]
emerge --info '=dev-db/postgresql-base-9.2.3-r1'

configure script cannot compile thread safety test. emerge dev-db/postgresql-base dies on configure phase. The tail of the output is:


checking thread safety of required library functions... no
configure: error: thread test program failed
This platform is not thread-safe.  Check the file 'config.log' or compile
and run src/test/thread/thread_test for the exact reason.
Use --disable-thread-safety to disable thread safety.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-db/postgresql-base-9.2.3-r1/work/postgresql-9.2.3/config.log
 * ERROR: dev-db/postgresql-base-9.2.3-r1 failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *          ebuild.sh, line   93:  Called src_configure
 *        environment, line 3363:  Called econf '--prefix=/usr/lib/postgresql-9.2' '--datadir=/usr/share/postgresql-9.2' '--docdir=/usr/share/doc/postgresql-9.2' '--sysconfdir=/etc/postgresql-9.2' '--includedir=/usr/include/postgresql-9.2' '--mandir=/usr/share/postgresql-9.2/man' '--without-tcl' '--without-perl' '--without-python' '--with-readline' '--without-krb5' '--without-gssapi' '--enable-nls=en ru' '--with-pam' '--enable-integer-datetimes' '--without-openssl' '--enable-thread-safety' '--with-zlib' '--without-ldap'
 *   phase-helpers.sh, line  511:  Called die
 * The specific snippet of code:
 *   			die "econf failed"
 * 
 * If you need support, post the output of `emerge --info '=dev-db/postgresql-base-9.2.3-r1'`,
 * the complete build log and the output of `emerge -pqv '=dev-db/postgresql-base-9.2.3-r1'`.
 * The complete build log is located at '/var/tmp/portage/dev-db/postgresql-base-9.2.3-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/postgresql-base-9.2.3-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-db/postgresql-base-9.2.3-r1/work/postgresql-9.2.3'
 * S: '/var/tmp/portage/dev-db/postgresql-base-9.2.3-r1/work/postgresql-9.2.3'

In config.log a lot of fragments such as following:

configure:12095: checking for the pthreads library -lpthreads
configure:12128: i686-gentoo-freebsd9.1-gcc -o conftest -O2 -march=i686 -mtune=core2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard       conftest.c -lpthreads  -lpam -lz -lreadline -lcrypt -lm  >&5
conftest.c: In function 'main':
conftest.c:154:27: warning: 'th' is used uninitialized in this function [-Wuninitialized]
/usr/lib/gcc/i686-gentoo-freebsd9.1/4.6.3/../../../../i686-gentoo-freebsd9.1/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status

# emerge -pqv '=dev-db/postgresql-base-9.2.3-r1'
[ebuild   R   ] dev-db/postgresql-base-9.2.3-r1  USE="nls pam readline threads* zlib -doc (-kerberos) -ldap -pg_legacytimestamp -ssl" LINGUAS="en ru -af -cs -de -es -fa -fr -hr -hu -it -ko -nb -pl -pt_BR -ro -sk -sl -sv -tr -zh_CN -zh_TW"
Comment 1 Dmitri Bogomolov 2013-03-04 11:04:15 UTC
Created attachment 340926 [details]
build.log
Comment 2 Dmitri Bogomolov 2013-03-04 11:04:43 UTC
Created attachment 340928 [details]
config.log
Comment 3 Aaron W. Swenson gentoo-dev 2013-03-04 21:45:44 UTC
Which version of sys-apps/sandbox are you running?
Comment 4 Dmitri Bogomolov 2013-03-04 22:36:43 UTC
(In reply to comment #3)
> Which version of sys-apps/sandbox are you running?

There is no sys-apps/sandbox. It masked:

# eix sys-apps/sandbox
* sys-apps/sandbox
     Available versions:  *1.6-r2 *2.3-r1 *2.4 *2.5 ~*2.6 {multilib}
     Homepage:            http://www.gentoo.org/
     Description:         sandbox'd LD_PRELOAD hack
Comment 5 Dmitri Bogomolov 2013-03-04 23:07:46 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Which version of sys-apps/sandbox are you running?
> 
> There is no sys-apps/sandbox. It masked:

The bug 374425 is probably the reason.
Comment 6 Yuta SATOH 2013-03-05 15:15:12 UTC
-lpthread is set in my environment (amd64-fbsd).
And, compile was successful.

Is exists libpthread.so in your environment ?

# equery b libpthread.so
 * Searching for libpthread.so ...
sys-freebsd/freebsd-lib-9.1 (/usr/lib/libpthread.so -> libthr.so)
Comment 7 Dmitri Bogomolov 2013-03-05 15:18:54 UTC
(In reply to comment #6)
> -lpthread is set in my environment (amd64-fbsd).
> And, compile was successful.
> 
> Is exists libpthread.so in your environment ?
> 
> # equery b libpthread.so
>  * Searching for libpthread.so ...
> sys-freebsd/freebsd-lib-9.1 (/usr/lib/libpthread.so -> libthr.so)

Yes. I got the same output.
Comment 8 Yuta SATOH 2013-03-05 16:46:34 UTC
(In reply to comment #2)
> Created attachment 340928 [details]
> config.log

configure:12095: checking for the pthreads library -lpthread
configure:12128: i686-gentoo-freebsd9.1-gcc -o conftest -O2 -march=i686 -mtune=core2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard       conftest.c -lpthread  -lpam -lz -lreadline -lcrypt -lm  >&5
conftest.c: In function 'main':
conftest.c:154:27: warning: 'th' is used uninitialized in this function [-Wuninitialized]
/usr/lib/gcc/i686-gentoo-freebsd9.1/4.6.3/../../../../i686-gentoo-freebsd9.1/bin/ld: error in /usr/lib/gcc/i686-gentoo-freebsd9.1/4.6.3/../../../crt1.o(.eh_frame); no .eh_frame_hdr table will be created.
configure:12128: $? = 0
configure:12163: result: no


I've added patch to the overlay to fix "no .eh_frame_hdr table will be created" error.
Would you try this patch ?

http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=blob_plain;f=sys-freebsd/freebsd-lib/files/freebsd-lib-9.1-.eh_frame_hdr-fix.patch;h=fdb7e16f6e0859fb55383111241314b3e6dfc399;hb=8cf162ecaebe22da2f59c2c7c914ff5072e60c18
Comment 9 Dmitri Bogomolov 2013-03-07 22:27:23 UTC
(In reply to comment #8)
> (In reply to comment #2)
> > Created attachment 340928 [details]

> I've added patch to the overlay to fix "no .eh_frame_hdr table will be
> created" error.
> Would you try this patch ?
> 
> http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=blob_plain;
> f=sys-freebsd/freebsd-lib/files/freebsd-lib-9.1-.eh_frame_hdr-fix.patch;
> h=fdb7e16f6e0859fb55383111241314b3e6dfc399;
> hb=8cf162ecaebe22da2f59c2c7c914ff5072e60c18

I have tried this patch and it helped to emerge dev-db/postgresql-base with USE="threads". Thank you.
Comment 11 Naohiro Aota gentoo-dev 2013-10-03 08:30:58 UTC
Closing then.