Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 604580 - net-misc/pavuk-0.9.36_pre20120215-r2: Cannot compile with --disable-threads
Summary: net-misc/pavuk-0.9.36_pre20120215-r2: Cannot compile with --disable-threads
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard: Pending removal: 2018-04-17
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2017-01-04 01:10 UTC by segmentation fault
Modified: 2018-04-29 17:59 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description segmentation fault 2017-01-04 01:10:44 UTC
Trying to debug my own reported bug

https://bugs.gentoo.org/show_bug.cgi?id=604556

I thought I might try to compile pavuk without threads. The package does offer the --disable-threads configure option. I thus added 'threads' to the IUSE variable:

IUSE="debug gtk hammer ipv6 nls pcre profile ssl threads"

and replaced

--enable-threads

with

$(use_enable threads)

inside the myeconfargs array in the ebuild. I also added '-threads' to the USE flags for pavuk in my /etc/portage/package.use.

I then re-merged as usual (I had of course already put the ebuild in a local overlay).

I saw that the package got the right configure options, i.e. it called configure with '--disable-threads', among others.

However...it kept checking for pthreads:

checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
...
checking for pthread_equal... yes
checking for pthread_sigmask... no

and then told me that

checking for gtk configuration using pkg-config script ...
...
gtk CFLAGS=-pthread -I/usr/include/gtk-2.0...etc.

and:

CPPFLAGS =  -pthread -I/usr/include/gtk-2.0...etc.

while, at the same time, there was no value for 'multithreading support' in the 'PAVUK options' summary:

  multithreading support:                  

NOTE: My CFLAGS variable in /etc/portage/make.conf does NOT contain '-pthread'!

As soon as 'make' started, it used threads support:

i686-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..   -pthread -I/usr/include/gtk-2.0...etc.

which of course broke compilation with:

ainterface.c: In function 'absi_restart_as_thread':
ainterface.c:269:40: error: '_config_struct_t' has no member named 'thrnr_key'
     VERIFY(0 == pthread_setspecific(cfg.thrnr_key, cast_int2voidptr(thrnr)));


Desired behaviour
===========

It should be possible to be able to compile pavuk without thread support, preferably with the '-threads' USE flag as above. The CFLAGS and CPPFLAGS variables should not be 'tainted' with '-pthread', if no threading support is configured.


Some info
======

Portage 2.2.28 (python 3.4.3-final-0, hardened/linux/x86, gcc-4.9.3, glibc-2.22-r4, 3.18.25-gentoo-r1 i686)
=================================================================
System uname: Linux-3.18.25-gentoo-r1-i686-Intel-R-_Pentium-R-_4_CPU_3.40GHz-with-gentoo-2.2
KiB Mem:    XXX  total,    156540 free
KiB Swap:   YYY  total,   2251108 free
Timestamp of repository gentoo: Mon, 10 Oct 2016 14:15:01 +0000
sh bash 4.3_p48
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.4_p6-r2::gentoo, 1.5-r2::gentoo, 1.6.3-r2::gentoo, 1.7.9-r3::gentoo, 1.8.5-r5::gentoo, 1.9.6-r4::gentoo, 1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.24-r3::gentoo, 2.25.1-r1::gentoo
sys-devel/gcc:            4.3.6-r1::gentoo, 4.4.7::gentoo, 4.8.5::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Comment 1 Pacho Ramos gentoo-dev 2018-04-29 17:59:21 UTC
removed