Fix libtorrent-rasterbar for gcc 4.9 on -rOPENBSD_6_3 (tested on OpenBSD/Loongson)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Fix libtorrent-rasterbar for gcc 4.9 on -rOPENBSD_6_3 (tested on OpenBSD/Loongson)

manphiz
The patch attached fixes building libtorrent-rasterbar on
OpenBSD/Loongson for -rOPENBSD_6_3. It added several missing includes,
added "-std=gnu++14" to CXXFLAGS as it is now default for newer compiler
and the code uses those new features, and another patch from -current.
I'm not sure whether this is the correct way to update ports for a
-stable branch so let me know.

Thanks.

libtorrent-rasterbar_6_3_stable.patch (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fix libtorrent-rasterbar for gcc 4.9 on -rOPENBSD_6_3 (tested on OpenBSD/Loongson)

manphiz
On 4/15/18 1:25 PM, [hidden email] wrote:
> The patch attached fixes building libtorrent-rasterbar on
> OpenBSD/Loongson for -rOPENBSD_6_3. It added several missing includes,
> added "-std=gnu++14" to CXXFLAGS as it is now default for newer compiler
> and the code uses those new features, and another patch from -current.
> I'm not sure whether this is the correct way to update ports for a
> -stable branch so let me know.
>
> Thanks.

It seems that there is another problem with the setup.py of python
binding that relies on existence of environment variable CXX to be
defined, otherwise it will use "cc" instead of "c++" to build the
binding, which then lead to another problem: the main library would be
built using C++14 that enabled using std::chrono, while the bindings
would not and used boost::chrono instead, and the bindings will fail to
load due to missing symbols (actually symbol mismatch). The fix is to
define CXX=c++ in Makefile.am of python binding.

The revised patch against -rOPENBSD_6_3 is attached.

libtorrent-rasterbar_6_3_stable.patch (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fix libtorrent-rasterbar for gcc 4.9 on -rOPENBSD_6_3 (tested on OpenBSD/Loongson)

manphiz
On 4/22/18 4:39 AM, [hidden email] wrote:

> On 4/15/18 1:25 PM, [hidden email] wrote:
>> The patch attached fixes building libtorrent-rasterbar on
>> OpenBSD/Loongson for -rOPENBSD_6_3. It added several missing includes,
>> added "-std=gnu++14" to CXXFLAGS as it is now default for newer
>> compiler and the code uses those new features, and another patch from
>> -current. I'm not sure whether this is the correct way to update ports
>> for a -stable branch so let me know.
>>
>> Thanks.
>
> It seems that there is another problem with the setup.py of python
> binding that relies on existence of environment variable CXX to be
> defined, otherwise it will use "cc" instead of "c++" to build the
> binding, which then lead to another problem: the main library would be
> built using C++14 that enabled using std::chrono, while the bindings
> would not and used boost::chrono instead, and the bindings will fail to
> load due to missing symbols (actually symbol mismatch). The fix is to
> define CXX=c++ in Makefile.am of python binding.
>
> The revised patch against -rOPENBSD_6_3 is attached.
And it turns out it's a bad idea to patch configure.ac and Makefile.am
which will require "autoreconf". Attaching the patch dropping those
parts. 1.1.7 on -current has similar issue and I'll provide a separate
patch and also try to incorporate upstream.

libtorrent-rasterbar_6_3_stable.patch (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fix libtorrent-rasterbar for gcc 4.9 on -rOPENBSD_6_3 (tested on OpenBSD/Loongson)

Stuart Henderson
On 2018/04/22 15:54, [hidden email] wrote:

> On 4/22/18 4:39 AM, [hidden email] wrote:
> > On 4/15/18 1:25 PM, [hidden email] wrote:
> > > The patch attached fixes building libtorrent-rasterbar on
> > > OpenBSD/Loongson for -rOPENBSD_6_3. It added several missing
> > > includes, added "-std=gnu++14" to CXXFLAGS as it is now default for
> > > newer compiler and the code uses those new features, and another
> > > patch from -current. I'm not sure whether this is the correct way to
> > > update ports for a -stable branch so let me know.
> > >
> > > Thanks.
> >
> > It seems that there is another problem with the setup.py of python
> > binding that relies on existence of environment variable CXX to be
> > defined, otherwise it will use "cc" instead of "c++" to build the
> > binding, which then lead to another problem: the main library would be
> > built using C++14 that enabled using std::chrono, while the bindings
> > would not and used boost::chrono instead, and the bindings will fail to
> > load due to missing symbols (actually symbol mismatch). The fix is to
> > define CXX=c++ in Makefile.am of python binding.
> >
> > The revised patch against -rOPENBSD_6_3 is attached.
>
> And it turns out it's a bad idea to patch configure.ac and Makefile.am which
> will require "autoreconf". Attaching the patch dropping those parts. 1.1.7
> on -current has similar issue and I'll provide a separate patch and also try
> to incorporate upstream.

No loongson here so I can't test any of this, but a few things:

- we work on -current primarily, sometimes things can be backported but if
this is broken on -current at the moment, that needs fixing first

- compilers should come from the environment rather than hardcoded, maybe
try something like:

MAKE_ENV =              CC="${CC}" CXX="${CXX}"
CXXFLAGS +=             --std=gnu++14

Reply | Threaded
Open this post in threaded view
|

Re: Fix libtorrent-rasterbar for gcc 4.9 on -rOPENBSD_6_3 (tested on OpenBSD/Loongson)

manphiz
Hi Stuart,

On 4/23/18 10:48 AM, Stuart Henderson wrote:

> On 2018/04/22 15:54, [hidden email] wrote:
>> On 4/22/18 4:39 AM, [hidden email] wrote:
>>> On 4/15/18 1:25 PM, [hidden email] wrote:
>>>> The patch attached fixes building libtorrent-rasterbar on
>>>> OpenBSD/Loongson for -rOPENBSD_6_3. It added several missing
>>>> includes, added "-std=gnu++14" to CXXFLAGS as it is now default for
>>>> newer compiler and the code uses those new features, and another
>>>> patch from -current. I'm not sure whether this is the correct way to
>>>> update ports for a -stable branch so let me know.
>>>>
>>>> Thanks.
>>>
>>> It seems that there is another problem with the setup.py of python
>>> binding that relies on existence of environment variable CXX to be
>>> defined, otherwise it will use "cc" instead of "c++" to build the
>>> binding, which then lead to another problem: the main library would be
>>> built using C++14 that enabled using std::chrono, while the bindings
>>> would not and used boost::chrono instead, and the bindings will fail to
>>> load due to missing symbols (actually symbol mismatch). The fix is to
>>> define CXX=c++ in Makefile.am of python binding.
>>>
>>> The revised patch against -rOPENBSD_6_3 is attached.
>>
>> And it turns out it's a bad idea to patch configure.ac and Makefile.am which
>> will require "autoreconf". Attaching the patch dropping those parts. 1.1.7
>> on -current has similar issue and I'll provide a separate patch and also try
>> to incorporate upstream.
>
> No loongson here so I can't test any of this, but a few things:
>
> - we work on -current primarily, sometimes things can be backported but if
> this is broken on -current at the moment, that needs fixing first
>

Agreed.

> - compilers should come from the environment rather than hardcoded, maybe
> try something like:
>
> MAKE_ENV =              CC="${CC}" CXX="${CXX}"
> CXXFLAGS +=             --std=gnu++14
>

I'm currently working with upstream to incorporate those patches as
well. Once the patches are incorporated I'll backport them to -current
and then -stable.

Reply | Threaded
Open this post in threaded view
|

Re: Fix libtorrent-rasterbar for gcc 4.9 on -rOPENBSD_6_3 (tested on OpenBSD/Loongson)

manphiz
Hi,

On 4/23/18 10:32 PM, [hidden email] wrote:

> Hi Stuart,
>
> On 4/23/18 10:48 AM, Stuart Henderson wrote:
>> On 2018/04/22 15:54, [hidden email] wrote:
>>> On 4/22/18 4:39 AM, [hidden email] wrote:
>>>> On 4/15/18 1:25 PM, [hidden email] wrote:
>>>>> The patch attached fixes building libtorrent-rasterbar on
>>>>> OpenBSD/Loongson for -rOPENBSD_6_3. It added several missing
>>>>> includes, added "-std=gnu++14" to CXXFLAGS as it is now default for
>>>>> newer compiler and the code uses those new features, and another
>>>>> patch from -current. I'm not sure whether this is the correct way to
>>>>> update ports for a -stable branch so let me know.
>>>>>
>>>>> Thanks.
>>>>
>>>> It seems that there is another problem with the setup.py of python
>>>> binding that relies on existence of environment variable CXX to be
>>>> defined, otherwise it will use "cc" instead of "c++" to build the
>>>> binding, which then lead to another problem: the main library would be
>>>> built using C++14 that enabled using std::chrono, while the bindings
>>>> would not and used boost::chrono instead, and the bindings will fail to
>>>> load due to missing symbols (actually symbol mismatch). The fix is to
>>>> define CXX=c++ in Makefile.am of python binding.
>>>>
>>>> The revised patch against -rOPENBSD_6_3 is attached.
>>>
>>> And it turns out it's a bad idea to patch configure.ac and
>>> Makefile.am which
>>> will require "autoreconf". Attaching the patch dropping those parts.
>>> 1.1.7
>>> on -current has similar issue and I'll provide a separate patch and
>>> also try
>>> to incorporate upstream.
>>
>> No loongson here so I can't test any of this, but a few things:
>>
>> - we work on -current primarily, sometimes things can be backported
>> but if
>> this is broken on -current at the moment, that needs fixing first
>>
>
> Agreed.
>
>> - compilers should come from the environment rather than hardcoded, maybe
>> try something like:
>>
>> MAKE_ENV =              CC="${CC}" CXX="${CXX}"
>> CXXFLAGS +=             --std=gnu++14
>>
>
> I'm currently working with upstream to incorporate those patches as
> well. Once the patches are incorporated I'll backport them to -current
> and then -stable.
This is the corresponding patch for -stable similar to the one against
-current in my other mail[1].

[1] https://marc.info/?l=openbsd-ports&m=152474002010011&w=2

libtorrent-rasterbar-stable-fix.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fix libtorrent-rasterbar for gcc 4.9 on -rOPENBSD_6_3 (tested on OpenBSD/Loongson)

manphiz
Hi,

Emergent fix below.

On 4/26/18 4:17 AM, [hidden email] wrote:

> Hi,
>
> On 4/23/18 10:32 PM, [hidden email] wrote:
>> Hi Stuart,
>>
>> On 4/23/18 10:48 AM, Stuart Henderson wrote:
>>> On 2018/04/22 15:54, [hidden email] wrote:
>>>> On 4/22/18 4:39 AM, [hidden email] wrote:
>>>>> On 4/15/18 1:25 PM, [hidden email] wrote:
>>>>>> The patch attached fixes building libtorrent-rasterbar on
>>>>>> OpenBSD/Loongson for -rOPENBSD_6_3. It added several missing
>>>>>> includes, added "-std=gnu++14" to CXXFLAGS as it is now default for
>>>>>> newer compiler and the code uses those new features, and another
>>>>>> patch from -current. I'm not sure whether this is the correct way to
>>>>>> update ports for a -stable branch so let me know.
>>>>>>
>>>>>> Thanks.
>>>>>
>>>>> It seems that there is another problem with the setup.py of python
>>>>> binding that relies on existence of environment variable CXX to be
>>>>> defined, otherwise it will use "cc" instead of "c++" to build the
>>>>> binding, which then lead to another problem: the main library would be
>>>>> built using C++14 that enabled using std::chrono, while the bindings
>>>>> would not and used boost::chrono instead, and the bindings will
>>>>> fail to
>>>>> load due to missing symbols (actually symbol mismatch). The fix is to
>>>>> define CXX=c++ in Makefile.am of python binding.
>>>>>
>>>>> The revised patch against -rOPENBSD_6_3 is attached.
>>>>
>>>> And it turns out it's a bad idea to patch configure.ac and
>>>> Makefile.am which
>>>> will require "autoreconf". Attaching the patch dropping those parts.
>>>> 1.1.7
>>>> on -current has similar issue and I'll provide a separate patch and
>>>> also try
>>>> to incorporate upstream.
>>>
>>> No loongson here so I can't test any of this, but a few things:
>>>
>>> - we work on -current primarily, sometimes things can be backported
>>> but if
>>> this is broken on -current at the moment, that needs fixing first
>>>
>>
>> Agreed.
>>
>>> - compilers should come from the environment rather than hardcoded,
>>> maybe
>>> try something like:
>>>
>>> MAKE_ENV =              CC="${CC}" CXX="${CXX}"
>>> CXXFLAGS +=             --std=gnu++14
>>>
>>
>> I'm currently working with upstream to incorporate those patches as
>> well. Once the patches are incorporated I'll backport them to -current
>> and then -stable.
>
> This is the corresponding patch for -stable similar to the one against
> -current in my other mail[1].
>
> [1] https://marc.info/?l=openbsd-ports&m=152474002010011&w=2
Sorry my previous patch was missing a line. This revised patch should
work and attached.

libtorrent-rasterbar-stable-fix.patch (3K) Download Attachment