boost.python: tss_cleanup_implemented link error windows 64 bit

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

boost.python: tss_cleanup_implemented link error windows 64 bit

Jon Wright
Hello,

I have been trying to build pyopencl and pycuda on windows using the
subset of boost in those packages on windows 64 bit. The problem is a
link error due to missing tss_cleanup_implemented. The codes seem to run
without problem if the link error is suppressed:

http://thread.gmane.org/gmane.comp.python.cuda/2516

Does anyone know what the tss issue is about and whether it is likely to
cause a problem? Any advice would be welcome.

Many thanks,

Jon
_______________________________________________
Cplusplus-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/cplusplus-sig
Reply | Threaded
Open this post in threaded view
|

Re: boost.python: tss_cleanup_implemented link error windows 64 bit

Niall Douglas
Generally when I see that missing symbol it means mismatched C
runtimes. Usually in my experience it's safe to declare that symbol
as weak to make the link error go away while handling if it's present
correctly.

Niall

On 20 Feb 2012 at 20:02, Jon Wright wrote:

> Hello,
>
> I have been trying to build pyopencl and pycuda on windows using the
> subset of boost in those packages on windows 64 bit. The problem is a
> link error due to missing tss_cleanup_implemented. The codes seem to run
> without problem if the link error is suppressed:
>
> http://thread.gmane.org/gmane.comp.python.cuda/2516
>
> Does anyone know what the tss issue is about and whether it is likely to
> cause a problem? Any advice would be welcome.
>
> Many thanks,
>
> Jon
> _______________________________________________
> Cplusplus-sig mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/cplusplus-sig


--
Technology & Consulting Services - ned Productions Limited.
http://www.nedproductions.biz/. VAT reg: IE 9708311Q. Company no:
472909.



_______________________________________________
Cplusplus-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/cplusplus-sig
Reply | Threaded
Open this post in threaded view
|

Re: boost.python: tss_cleanup_implemented link error windows 64 bit

Jon Wright
Many thanks for the quick response. I think I am OK for the runtime as I
am using the msvc compiler from the platform SDK. Depends.exe only picks
up MSVCP90.dll and MSVCR90.dll and KERNEL32.dll.

What is unusual in this package is that boost.python is being linked
into the pyd file by adding all the .cpp files in distutils. It seems
the link error can be suppressed by defining either:

BOOST_THREAD_BUILD_DLL or BOOST_THREAD_BUILD_LIB

...but which one is better, or does it make no difference?
We have already defined BOOST_ALL_NO_LIB to disable auto-linking.

I guess I am really wondering what on earth is behind the tss issue and
whether there is a simple test case to see if we are doing it right.
Would something like a little function which creates and destroys
threads show a memory leak if the tss is not right?

Thanks,

Jon


On 20/02/2012 23:42, Niall Douglas wrote:

> Generally when I see that missing symbol it means mismatched C
> runtimes. Usually in my experience it's safe to declare that symbol
> as weak to make the link error go away while handling if it's present
> correctly.
>
> Niall
>
> On 20 Feb 2012 at 20:02, Jon Wright wrote:
>
>> Hello,
>>
>> I have been trying to build pyopencl and pycuda on windows using the
>> subset of boost in those packages on windows 64 bit. The problem is a
>> link error due to missing tss_cleanup_implemented. The codes seem to run
>> without problem if the link error is suppressed:
>>
>> http://thread.gmane.org/gmane.comp.python.cuda/2516
>>
>> Does anyone know what the tss issue is about and whether it is likely to
>> cause a problem? Any advice would be welcome.
>>
>> Many thanks,
>>
>> Jon
>> _______________________________________________
>> Cplusplus-sig mailing list
>> [hidden email]
>> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
>
_______________________________________________
Cplusplus-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/cplusplus-sig
Reply | Threaded
Open this post in threaded view
|

Re: boost.python: tss_cleanup_implemented link error windows 64 bit

Niall Douglas
Are you saying that you're statically linking BPL into your PYD? If
you are, you shouldn't do that. BPL should live in its own DLL,
*especially* when not on Linux/FreeBSD.

Niall


On 21 Feb 2012 at 9:35, Jonathan WRIGHT wrote:

> Many thanks for the quick response. I think I am OK for the runtime as I
> am using the msvc compiler from the platform SDK. Depends.exe only picks
> up MSVCP90.dll and MSVCR90.dll and KERNEL32.dll.
>
> What is unusual in this package is that boost.python is being linked
> into the pyd file by adding all the .cpp files in distutils. It seems
> the link error can be suppressed by defining either:
>
> BOOST_THREAD_BUILD_DLL or BOOST_THREAD_BUILD_LIB
>
> ...but which one is better, or does it make no difference?
> We have already defined BOOST_ALL_NO_LIB to disable auto-linking.
>
> I guess I am really wondering what on earth is behind the tss issue and
> whether there is a simple test case to see if we are doing it right.
> Would something like a little function which creates and destroys
> threads show a memory leak if the tss is not right?
>
> Thanks,
>
> Jon
>
>
> On 20/02/2012 23:42, Niall Douglas wrote:
> > Generally when I see that missing symbol it means mismatched C
> > runtimes. Usually in my experience it's safe to declare that symbol
> > as weak to make the link error go away while handling if it's present
> > correctly.
> >
> > Niall
> >
> > On 20 Feb 2012 at 20:02, Jon Wright wrote:
> >
> >> Hello,
> >>
> >> I have been trying to build pyopencl and pycuda on windows using the
> >> subset of boost in those packages on windows 64 bit. The problem is a
> >> link error due to missing tss_cleanup_implemented. The codes seem to run
> >> without problem if the link error is suppressed:
> >>
> >> http://thread.gmane.org/gmane.comp.python.cuda/2516
> >>
> >> Does anyone know what the tss issue is about and whether it is likely to
> >> cause a problem? Any advice would be welcome.
> >>
> >> Many thanks,
> >>
> >> Jon
> >> _______________________________________________
> >> Cplusplus-sig mailing list
> >> [hidden email]
> >> http://mail.python.org/mailman/listinfo/cplusplus-sig
> >
> >
> _______________________________________________
> Cplusplus-sig mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/cplusplus-sig


--
Technology & Consulting Services - ned Productions Limited.
http://www.nedproductions.biz/. VAT reg: IE 9708311Q. Company no:
472909.



_______________________________________________
Cplusplus-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/cplusplus-sig
Reply | Threaded
Open this post in threaded view
|

Re: boost.python: tss_cleanup_implemented link error windows 64 bit

Jon Wright
Boost python is being compiled in .obj files and then the whole lot is
linked into a .pyd.

Do you have some unit tests we could use to check our builds for
problems? I've not understood how the dll linking requirement works.
Where should the dll live and how do you then cope with other people's
boost based modules, which might link to a different boost dll version?

Many thanks for your help!

Jon


On 21/02/2012 14:49, Niall Douglas wrote:

> Are you saying that you're statically linking BPL into your PYD? If
> you are, you shouldn't do that. BPL should live in its own DLL,
> *especially* when not on Linux/FreeBSD.
>
> Niall
>
>
> On 21 Feb 2012 at 9:35, Jonathan WRIGHT wrote:
>
>> Many thanks for the quick response. I think I am OK for the runtime as I
>> am using the msvc compiler from the platform SDK. Depends.exe only picks
>> up MSVCP90.dll and MSVCR90.dll and KERNEL32.dll.
>>
>> What is unusual in this package is that boost.python is being linked
>> into the pyd file by adding all the .cpp files in distutils. It seems
>> the link error can be suppressed by defining either:
>>
>> BOOST_THREAD_BUILD_DLL or BOOST_THREAD_BUILD_LIB
>>
>> ...but which one is better, or does it make no difference?
>> We have already defined BOOST_ALL_NO_LIB to disable auto-linking.
>>
>> I guess I am really wondering what on earth is behind the tss issue and
>> whether there is a simple test case to see if we are doing it right.
>> Would something like a little function which creates and destroys
>> threads show a memory leak if the tss is not right?
>>
>> Thanks,
>>
>> Jon
>>
>>
>> On 20/02/2012 23:42, Niall Douglas wrote:
>>> Generally when I see that missing symbol it means mismatched C
>>> runtimes. Usually in my experience it's safe to declare that symbol
>>> as weak to make the link error go away while handling if it's present
>>> correctly.
>>>
>>> Niall
>>>
>>> On 20 Feb 2012 at 20:02, Jon Wright wrote:
>>>
>>>> Hello,
>>>>
>>>> I have been trying to build pyopencl and pycuda on windows using the
>>>> subset of boost in those packages on windows 64 bit. The problem is a
>>>> link error due to missing tss_cleanup_implemented. The codes seem to run
>>>> without problem if the link error is suppressed:
>>>>
>>>> http://thread.gmane.org/gmane.comp.python.cuda/2516
>>>>
>>>> Does anyone know what the tss issue is about and whether it is likely to
>>>> cause a problem? Any advice would be welcome.
>>>>
>>>> Many thanks,
>>>>
>>>> Jon
>>>> _______________________________________________
>>>> Cplusplus-sig mailing list
>>>> [hidden email]
>>>> http://mail.python.org/mailman/listinfo/cplusplus-sig
>>>
>>>
>> _______________________________________________
>> Cplusplus-sig mailing list
>> [hidden email]
>> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
>
_______________________________________________
Cplusplus-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/cplusplus-sig
Reply | Threaded
Open this post in threaded view
|

Re: boost.python: tss_cleanup_implemented link error windows 64 bit

Niall Douglas
On 21 Feb 2012 at 16:30, Jonathan WRIGHT wrote:

> Boost python is being compiled in .obj files and then the whole lot is
> linked into a .pyd.
>
> Do you have some unit tests we could use to check our builds for
> problems? I've not understood how the dll linking requirement works.
> Where should the dll live and how do you then cope with other people's
> boost based modules, which might link to a different boost dll version?

There is plenty of information about the pros and cons and what to do
in the archives of this mailing list which is google searchable. In
short, static linking means BPL based python extension modules must
not interact outside of python or it'll go tits up due to their type
registries not knowing about one another. That means you can't have
extension A and extension B working together directly, only through
python.

If it's working for you right now I wouldn't worry.

Niall

--
Technology & Consulting Services - ned Productions Limited.
http://www.nedproductions.biz/. VAT reg: IE 9708311Q. Company no:
472909.



_______________________________________________
Cplusplus-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/cplusplus-sig