Gentoo Archives: gentoo-user

From: Bob Young <BYoung@××××××××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Build error in threads.c, maybe related to nptlonly use flag.
Date: Fri, 12 May 2006 17:32:43
Message-Id: FAEEIJPAOFEMBBLKPMJEGENIFMAA.BYoung@NuCORETech.com
1 Hi all,
2
3 In advance please pardon the long post.
4
5 I'm trying to do a stage 1/3 install as described here:
6 http://forums.gentoo.org/viewtopic-t-345229.html
7
8 I've successfully rebuilt the tool chain and am at the stage of rebuilding
9 the system with the new toolchain. Unfortunately I've encountered a build
10 error with krb5-1.4.3 that I don't know how to solve. The following is what
11 I believe to be the relevent output from #emerge -e system
12
13
14
15 >>> Unpacking source...
16 >>> Unpacking krb5-1.4.3-signed.tar to /var/tmp/portage/mit-krb5-1.4.3/work
17 Applying mit-krb5-lazyldflags.patch ...
18 >>> Source unpacked.
19 * econf: updating krb5-1.4.3/src/config/config.guess with
20 /usr/share/gnuconfig/config.guess
21 * econf: updating krb5-1.4.3/src/config/config.sub with
22 /usr/share/gnuconfig/config.sub
23 ./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
24 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localsta
25 tedir=/var/lib --without-krb4 --without-tcl --enable-ipv6 --disable-static -
26 -with-system-db --localstatedir=/etc --enable-shared --with-system-et --with
27 -system-ss --enable-dns-for-realm --libdir=/usr/lib64 --build=x86_64-pc-linu
28 x-gnu
29 configure: creating cache ./config.cache
30 checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
31 checking for C compiler default output... a.out
32 checking whether the C compiler works... yes
33 checking whether we are cross compiling... no
34 checking for suffix of executables...
35 checking for suffix of object files... o
36 checking whether we are using the GNU C compiler... yes
37 checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
38 .
39 .
40 .
41 .
42 configure: enabling thread support
43 checking for the pthreads library -lpthreads... no
44 checking whether pthreads work without any flags... no
45 checking whether pthreads work with -Kthread... no
46 checking whether pthreads work with -kthread... no
47 checking for the pthreads library -llthread... no
48 checking whether pthreads work with -pthread... yes
49 checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
50 checking if more special flags are required for pthreads... no
51 checking for cc_r... x86_64-pc-linux-gnu-gcc
52 configure: PTHREAD_CC = x86_64-pc-linux-gnu-gcc
53 configure: PTHREAD_CFLAGS = -pthread
54 configure: PTHREAD_LIBS =
55 checking for pthread_once... no
56 checking for pthread_mutexattr_setrobust_np... no
57 checking for pthread_rwlock_init... no
58 configure: rechecking with PTHREAD_... options
59 checking for pthread_mutexattr_setrobust_np in -lc... yes
60 checking for pthread_rwlock_init in -lc... yes
61 configure: disabling static libraries
62 configure: enabling shared libraries
63 checking for ANSI C header files... yes
64 .
65 .
66 .
67 .
68 make[1]: Entering directory
69 `/var/tmp/portage/mit-krb5-1.4.3/work/krb5-1.4.3/src/util'
70 making all in util/support...
71 make[2]: Entering directory
72 `/var/tmp/portage/mit-krb5-1.4.3/work/krb5-1.4.3/src/util/support'
73 x86_64-pc-linux-gnu-gcc -fPIC -DSHARED -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME
74 =\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\"
75 -DKRB5_PRIVATE=1 -DKRB5_DEPRECATED=1 -DKRB5_DNS_LOOKUP_KDC=1 -DKRB5_DNS_LOOK
76 UP_REALM=1 -DKRB5_DNS_LOOKUP=1 -DHAVE_LIBRESOLV=1 -DHAVE_RES_NINIT=1 -DHAVE_
77 RES_NCLOSE=1 -DHAVE_RES_NSEARCH=1 -DHAVE_DN_SKIPNAME=1 -DHAVE_RES_SEARCH=1 -
78 DHAVE_PRAGMA_WEAK_REF=1 -DDELAY_INITIALIZER=1 -DCONSTRUCTOR_ATTR_WORKS=1 -DD
79 ESTRUCTOR_ATTR_WORKS=1 -DENABLE_THREADS=1 -DHAVE_PTHREAD=1 -DHAVE_PTHREAD_MU
80 TEXATTR_SETROBUST_NP_IN_THREAD_LIB=1 -DHAVE_PTHREAD_RWLOCK_INIT_IN_THREAD_LI
81 B=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_
82 H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H
83 =1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MEMMOVE=1 -DHAVE_REGCOMP=1 -DG
84 ETSOCKNAME_ARG2_TYPE=struct\
85 sockaddr -DGETSOCKNAME_ARG3_TYPE=socklen_t -DGETPEERNAME_ARG2_TYPE=GETSOCKNA
86 ME_ARG2_TYPE -DGETPEERNAME_ARG3_TYPE=GETSOCKNAME_ARG3_TYPE -DHAVE_LIBUTIL=1
87 -DHAVE_SYSLOG_H=1 -DHAVE_STDARG_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_IFADDRS_H=1
88 -DHAVE_UNISTD_H=1 -DHAVE_OPENLOG=1 -DHAVE_SYSLOG=1 -DHAVE_CLOSELOG=1 -DHAVE
89 _STRFTIME=1 -DHAVE_VSPRINTF=1 -DNEED_SWAB_PROTO=1 -DHAVE_STRUCT_SOCKADDR_STO
90 RAGE=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_NETINET_IN_H=1 -DHA
91 VE_NETDB_H=1 -DHAVE_INET_NTOP=1 -DHAVE_INET_PTON=1 -DHAVE_GETNAMEINFO=1 -DHA
92 VE_GETADDRINFO=1 -DKRB5_USE_INET6=1 -DPOSIX_SIGNALS=1 -DUSE_RCACHE=1 -DRETSI
93 GTYPE=void -DHAVE_GETHOSTBYNAME_R=1 -DHAVE_GETSERVBYNAME_R=1 -DHAVE_GMTIME_R
94 =1 -DHAVE_LOCALTIME_R=1 -I../../include -I./../../include -I../../include/
95 krb5 -I./../../include/krb5 -I. -I. -march=opteron -O3 -pipe -fomit-frame-p
96 ointer -ftracer -pthread -c threads.c -o threads.so.o && mv -f threads.so.o
97 threads.so
98 threads.c: In function `krb5int_pthread_loaded':
99 threads.c:145: error: `pthread_mutexattr_setrobust_np' undeclared (first use
100 in this function)
101 threads.c:145: error: (Each undeclared identifier is reported only once
102 threads.c:145: error: for each function it appears in.)
103 make[2]: *** [threads.so] Error 1
104 make[2]: Leaving directory
105 `/var/tmp/portage/mit-krb5-1.4.3/work/krb5-1.4.3/src/util/support'
106 make[1]: *** [all-recurse] Error 1
107 make[1]: Leaving directory
108 `/var/tmp/portage/mit-krb5-1.4.3/work/krb5-1.4.3/src/util'
109 make: *** [all-recurse] Error 1
110
111 !!! ERROR: app-crypt/mit-krb5-1.4.3 failed.
112 !!! Function src_compile, Line 53, Exitcode 2
113 !!! (no error message)
114 !!! If you need support, post the topmost build error, NOT this status
115 message.
116
117 >>> original instance of package unmerged safely.
118 >>> sys-apps/tcp-wrappers-7.6-r8 merged.
119
120 >>> clean: No packages selected for removal.
121
122 >>> emerge (143 of 189) app-crypt/mit-krb5-1.4.3 to /
123 >>> md5 files ;-) mit-krb5-1.4.1-r2.ebuild
124
125
126 ***** make.conf **********************
127
128 CHOST="x86_64-pc-linux-gnu"
129 CFLAGS="-march=opteron -O3 -pipe -fomit-frame-pointer -ftracer"
130 CXXFLAGS="${CFLAGS}"
131
132
133 USE="amd64 a52 acl acpi adns alsa arts audiofile avi bash-completion berkdb
134 bonobo bzip2 caps
135 cdparanoia cdr crypt cscope ctype curl curlwrappers cups dbus dbx dio
136 directfb divx4linux doc
137 dvd dvdr dvdread emacs emacs-w3 emul-linux-x86 encode ethereal evo
138 examples exif fam fastcgi
139 fbcon ffmpeg fftw flash foomaticdb fortran ftp gb gdbm gif glx -gnome
140 gnutls glut gmp gphoto2
141 gpm gstreamer gpm -gtk -gtk2 gtkhtml hal idn ieee1394 imlib
142 imagemagick jack java jbig javascript
143 jikes joystick jpeg junit -kde -kdeenablefinal kerberos -krb4 -ldap
144 libwww mad maildir mbox mikmod
145 mime ming mng mono mozilla mp3 mpeg mpi multilib mysql ncurses nis
146 nocardbus nptl nptlonly
147 offensive ogg oggvorbis opengl pcntl pcre pdflib perl php png posix
148 python -qt quicktime readline
149 samba sasl session simplexml slp snmp sndfile sockets source spell spl
150 ssl svga tcpd tidy tiff truetype
151 truetype-fonts type1-fonts usb verbose videos wmf wxwindows -X xml
152 xml2 xmms xpm xv xvid zlib"
153
154
155 ***********************************
156
157 I think the "nptl nptlonly " use flags are relevant to this, but am not
158 sure. I know the "kerberos" flag is related, but since the box will be
159 interacting with an Active Directory domain controler kerberos seems
160 appropiate to have.
161
162 I'd prefer not to give up nptlonly flag to solve this, but if that's the
163 only way to avoid this error, I guess I'll have no choice, but most of all I
164 would like to understand exactly what and where the problem is. If it's
165 something moderately simple, like threads.c not "paying attention to a
166 define" or something similar, I might try and fix it, but either way I'd
167 like to understand it more than I currently do.
168
169 Output that seems particularly interesting:
170
171 Output: "threads.c:145: error: `pthread_mutexattr_setrobust_np' undeclared
172 (first use in this function)"
173
174 Comment: Okay that's the error pthread_mutexattr_setrobust_np is undeclared.
175
176 Output "checking for pthread_mutexattr_setrobust_np... no" (<- From
177 configure)
178
179 Comment: Hmmm....Configure knows it's not available in the "normal" way.
180
181 Output: "-DHAVE_PTHREAD_MUTEXATTR_SETROBUST_NP_IN_THREAD_LIB=1" (<- From
182 gcc )
183
184 Comment: What is this supposed to signify?
185
186 Output: checking for pthread_mutexattr_setrobust_np in -lc... yes (<- From
187 configure)
188
189 Comment: Okay...It's available in "-lc" what does that mean? and if it's
190 available why is it causing a build error?
191 Comment: What does "-lc" mean? Would declaring
192 pthread_mutexattr_setrobust_np as "external" on the condition of some define
193 solve the problem?
194
195 Again sorry for the long post, TIA to anyone who can share some insight.
196
197 Regards,
198 Bob Young
199
200
201
202
203 --
204 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Build error in threads.c, maybe related to nptlonly use flag. Richard Fish <bigfish@××××××××××.org>