This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: global variables within library __thread


Hi all

I don't know what is the difficulty to uncomment
src/ags/ags_thread-posix.c the line containing:

//__thread AgsThread *ags_thread_self = NULL;

to:

__thread AgsThread *ags_thread_self = NULL;

or may be even to modify it, although semaphores are global static:

static __thread AgsThread *ags_thread_self = NULL;

Usually I'm using debian GNU/Linux but on this system I have
linuxfromscratch.org I just want
to know what it exactly means and how to fix it:

/usr/bin/ld: ags_thread_self: TLS definition in
/home/minos/gsequencer/.libs/libags_thread.so section .tbss mismatches
non-TLS reference in .libs/gsequencerS.o
/home/minos/gsequencer/.libs/libags_thread.so: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:1977: recipe for target 'gsequencer' failed
make[1]: *** [gsequencer] Error 1
make[1]: Leaving directory '/home/minos/gsequencer'
Makefile:1820: recipe for target 'all' failed
make: *** [all] Error 2

for the second one:

.libs/gsequencerS.o:(.rodata+0x17068): warning: Warning:
snd_names_list is deprecated, use snd_device_name_hint
.libs/gsequencerS.o:(.rodata+0x17078): warning: Warning:
snd_names_list_free is deprecated, use snd_device_name_free_hint
.libs/gsequencerS.o:(.rodata+0x15658): warning: Warning:
snd_ctl_elem_info_is_indirect is deprecated, do not use it
.libs/gsequencerS.o:(.rodata+0x17c88): warning: Warning:
snd_pcm_hwsync() is deprecated, consider to use snd_pcm_avail()
.libs/gsequencerS.o:(.rodata+0x182a8): warning: Warning: start_mode is
deprecated, consider to use start_threshold
.libs/gsequencerS.o:(.rodata+0x18658): warning: Warning: xrun_mode is
deprecated, consider to use stop_threshold
.libs/gsequencerS.o:(.rodata+0x18588): warning: Warning: start_mode is
deprecated, consider to use start_threshold
.libs/gsequencerS.o:(.rodata+0x18508): warning: Warning: start_mode is
deprecated, consider to use start_threshold
.libs/gsequencerS.o:(.rodata+0x185d8): warning: Warning: xrun_mode is
deprecated, consider to use stop_threshold
.libs/gsequencerS.o:(.rodata+0x18518): warning: Warning: xrun_mode is
deprecated, consider to use stop_threshold
.libs/gsequencerS.o:(.rodata+0x19d58): warning: Warning:
snd_timer_info_get_ticks is deprecated
/usr/bin/ld: _glapi_tls_Dispatch: TLS reference in /usr/lib/libGL.so
mismatches non-TLS reference in .libs/gsequencerS.o
/usr/lib/libGL.so: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:1977: recipe for target 'gsequencer' failed
make[1]: *** [gsequencer] Error 1
make[1]: Leaving directory '/home/minos/gsequencer'
Makefile:1820: recipe for target 'all' failed
make: *** [all] Error 2

I did some researches and I guess there some incompatible libraries
with TLS support enabled for
GSequencer. That's why I assume theoretically its not my problem
rather someone else did the
fault. Do I have to leave it static and fix _glapi_tls_Dispatch to be
static as well?

Before you feel totally pissed-off Manfred was right but it doesn't
work for me. But if you would understand my problem
of having a per thread semaphore, it is just non-sense. Further at my
opinion compilation shouldn't vary its behavior if
your doing a static build or not. Prior I didn't had any static build
but as debugging became hard I did so. So I just basically
got:

.libs/gsequencerS.o:(.rodata+0x17068): warning: Warning:
snd_names_list is deprecated, use snd_device_name_hint
.libs/gsequencerS.o:(.rodata+0x17078): warning: Warning:
snd_names_list_free is deprecated, use snd_device_name_free_hint
.libs/gsequencerS.o:(.rodata+0x15658): warning: Warning:
snd_ctl_elem_info_is_indirect is deprecated, do not use it
.libs/gsequencerS.o:(.rodata+0x17c88): warning: Warning:
snd_pcm_hwsync() is deprecated, consider to use snd_pcm_avail()
.libs/gsequencerS.o:(.rodata+0x182a8): warning: Warning: start_mode is
deprecated, consider to use start_threshold
.libs/gsequencerS.o:(.rodata+0x18658): warning: Warning: xrun_mode is
deprecated, consider to use stop_threshold
.libs/gsequencerS.o:(.rodata+0x18588): warning: Warning: start_mode is
deprecated, consider to use start_threshold
.libs/gsequencerS.o:(.rodata+0x18508): warning: Warning: start_mode is
deprecated, consider to use start_threshold
.libs/gsequencerS.o:(.rodata+0x185d8): warning: Warning: xrun_mode is
deprecated, consider to use stop_threshold
.libs/gsequencerS.o:(.rodata+0x18518): warning: Warning: xrun_mode is
deprecated, consider to use stop_threshold
.libs/gsequencerS.o:(.rodata+0x19d58): warning: Warning:
snd_timer_info_get_ticks is deprecated
/usr/bin/ld: _glapi_tls_Dispatch: TLS reference in /usr/lib/libGL.so
mismatches non-TLS reference in .libs/gsequencerS.o
/usr/lib/libGL.so: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:1959: recipe for target 'gsequencer' failed
make[1]: *** [gsequencer] Error 1
make[1]: Leaving directory '/home/minos/gsequencer'
Makefile:1802: recipe for target 'all' failed
make: *** [all] Error 2

The static build makes my non-static ags_thread_self variable static
what causes the compilation to fail. What is at my opinion
is not applicable because semaphores are global static. On debian I
didn't get the error with libGL.so so it just compiled as
doing non static build.

FYI remove anything related to static build in Makefile.am to achieve
a non static build. Further run `autoreconf -fi && ./configure &&
make`.
For now I rebuild OpenGL for my system minos-one because debian won't
do any display manager, at the moment.

bests,
JoÃl

On Mon, Oct 19, 2015 at 8:35 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On 19 Oct 2015 20:01, JoÃl KrÃhemann wrote:
>> Hi Manfred
>
> please do not top post
>
>> What you suggested is what I had first but gcc 4.9 complains with:
>>
>> /usr/bin/ld: ags_thread_self: TLS definition in
>> /home/minos/gsequencer/.libs/libags_thread.so section .tbss mismatches
>> non-TLS reference in .libs/gsequencerS.o
>> /home/minos/gsequencer/.libs/libags_thread.so: error adding symbols: Bad value
>> collect2: error: ld returned 1 exit status
>> Makefile:1963: recipe for target 'gsequencer' failed
>> make[1]: *** [gsequencer] Error 1
>> make[1]: Leaving directory '/home/minos/gsequencer'
>> Makefile:1806: recipe for target 'all' failed
>> make: *** [all] Error 2
>
> your vague references to source code we cannot see aren't helping.  afaict,
> your code is broken, and we've told you how to fix it, but you (for whatever
> reason) aren't doing it.  please post the code somewhere for us to check, or
> seek assistence elsewhere.  this isn't really a glibc question at all, so maybe
> someone on a site like StackOverflow would be more willing to invest time in
> trying to help you.
> -mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]