doc-E-brown
Posts: 7
Joined: Thu Sep 14, 2017 1:25 am

Help building python3-libboost package

Thu Sep 14, 2017 1:37 am

Hey All,

I am specifically new to Solus package building but not package building in general.

I've started working on building a python 3 specific libboost package (python3-libboost) in the hope to submit to T3994, I am almost there, just having a slight issue getting the --python-buildid=3 to stick. I've uploaded the package.yml as a gist: https://gist.github.com/doc-E-brown/3d7 ... e156c3cb9d

If anyone has any thoughts it would be greatly appreciated, the package keeps building usr/lib64/libboost_python.so.1.62.0 and not usr/lib64/libboost_python3.so.1.62.0

Thanks!

P.S I have posted this comment in T3994 as I was unsure of the most appropriate place to ask, before finding this forum.

Thanks again.
Ben

User avatar
kyrios
Posts: 753
Joined: Thu Sep 22, 2016 4:20 pm

Re: Help building python3-libboost package

Thu Sep 14, 2017 8:53 am

doc-E-brown wrote:
Thu Sep 14, 2017 1:37 am
Hey All,

I am specifically new to Solus package building but not package building in general.

I've started working on building a python 3 specific libboost package (python3-libboost) in the hope to submit to T3994, I am almost there, just having a slight issue getting the --python-buildid=3 to stick. I've uploaded the package.yml as a gist: https://gist.github.com/doc-E-brown/3d7 ... e156c3cb9d

If anyone has any thoughts it would be greatly appreciated, the package keeps building usr/lib64/libboost_python.so.1.62.0 and not usr/lib64/libboost_python3.so.1.62.0

Thanks!

P.S I have posted this comment in T3994 as I was unsure of the most appropriate place to ask, before finding this forum.

Thanks again.
Ben
Hi Ben,

We should rather add the python3 bindings in the existing package because it doesn't really make sense to build the same application in 2 different packages. I might have a look at it during the coming days (probably next week).

doc-E-brown
Posts: 7
Joined: Thu Sep 14, 2017 1:25 am

Re: Help building python3-libboost package

Thu Sep 14, 2017 9:20 am

Hey mate,

No worries, could be an error on my part but one thing I found was that as the python3 libs are found in python3.5m boost was having issues finding the standard python headers, but I was able to point the build in the right direction with boost 1.65. If it helps here is a gist of what I had: https://gist.github.com/doc-E-brown/92b ... b3767ee983

It builds libboost_python-3.so.1.65.0

If you dont mind, I'd like to see how your build the combined python2/3 version in a package.yml when you are finished.
Let me know if I can be of any help!

Cheers,
Ben

User avatar
kyrios
Posts: 753
Joined: Thu Sep 22, 2016 4:20 pm

Re: Help building python3-libboost package

Thu Sep 14, 2017 11:39 am

doc-E-brown wrote:
Thu Sep 14, 2017 9:20 am
Hey mate,

No worries, could be an error on my part but one thing I found was that as the python3 libs are found in python3.5m boost was having issues finding the standard python headers, but I was able to point the build in the right direction with boost 1.65. If it helps here is a gist of what I had: https://gist.github.com/doc-E-brown/92b ... b3767ee983

It builds libboost_python-3.so.1.65.0

If you dont mind, I'd like to see how your build the combined python2/3 version in a package.yml when you are finished.
Let me know if I can be of any help!

Cheers,
Ben
Thanks!
fwiw, I already updated the boost package to 1.65.1 a few days ago, but it was just an update of the existing package as it is, so without python3 bindings.

I am not 100% sure if it was boost, but I think I had a quick glance at it some time ago and it wasn't as straightforward as other apps to build the python2 and 3 together but it should be doable. You can try if you want otherwise I'll look at it later because I'm busy with other stuffs at the moment.

doc-E-brown
Posts: 7
Joined: Thu Sep 14, 2017 1:25 am

Re: Help building python3-libboost package

Thu Sep 14, 2017 9:16 pm

Hey mate

Thanks for sending the patch link!

Yeah dual Python 2/3 is tricky! Who would have thought Python 2 and 3 would be so different? :-) . As an example the libboost library for Python 2 contains the PyClass_Type class while the Python 3 version does not. Without running ./b2 --clean I was unable to get them to bleed into each other and lead to issues during the Python import process.

I was also wondering if the package make process allows for conditional build dependencies. Say only build the Python 2 version if Python 3 is not installed otherwise build both. If we specify python3 as a buildep to allow building of both versions of libboost would the package manager always grab Python3 and install it on the users system?

User avatar
kyrios
Posts: 753
Joined: Thu Sep 22, 2016 4:20 pm

Re: Help building python3-libboost package

Fri Sep 15, 2017 8:19 am

doc-E-brown wrote:
Thu Sep 14, 2017 9:16 pm
Hey mate

Thanks for sending the patch link!

Yeah dual Python 2/3 is tricky! Who would have thought Python 2 and 3 would be so different? :-) . As an example the libboost library for Python 2 contains the PyClass_Type class while the Python 3 version does not. Without running ./b2 --clean I was unable to get them to bleed into each other and lead to issues during the Python import process.

I was also wondering if the package make process allows for conditional build dependencies. Say only build the Python 2 version if Python 3 is not installed otherwise build both. If we specify python3 as a buildep to allow building of both versions of libboost would the package manager always grab Python3 and install it on the users system?
I quickly updated the patch to add python3. It's dirty, inefficient and fu*k the standards, but I think it should work. If you want you can get the package.yml and try it with graph-tool.

doc-E-brown
Posts: 7
Joined: Thu Sep 14, 2017 1:25 am

Re: Help building python3-libboost package

Mon Sep 18, 2017 12:53 am

Hey mate,

Nice work! That build system certainly doesnt make life easy. I'd love to have a look graph-tool. I have a busy week at work this week. I was wondering if there is a way to specify in package.yml to build against your (possibly pre-release) version of libboost?

Cheers,
Ben

sunnyflunk
Development Team
Posts: 2388
Joined: Sun Mar 13, 2016 11:35 pm

Re: Help building python3-libboost package

Mon Sep 18, 2017 3:02 am

doc-E-brown wrote:
Mon Sep 18, 2017 12:53 am
Hey mate,

Nice work! That build system certainly doesnt make life easy. I'd love to have a look graph-tool. I have a busy week at work this week. I was wondering if there is a way to specify in package.yml to build against your (possibly pre-release) version of libboost?

Cheers,
Ben
You'd need to be the package and use a local repo https://solus-project.com/articles/pack ... sitory/en/

doc-E-brown
Posts: 7
Joined: Thu Sep 14, 2017 1:25 am

Re: Help building python3-libboost package

Tue Sep 19, 2017 4:56 am

Thanks sunnyflunk!

Return to “Engagement”