-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#9047) boost: Bump build_requires of 'b2' to '4.7.1' (was '4.5.0') #9069
(#9047) boost: Bump build_requires of 'b2' to '4.7.1' (was '4.5.0') #9069
Conversation
This change seemed to fix the issue but I'm not sure if there could be other breakages as a result. Any opinions? I'm very much a Conan noob so please do double check me (or tell me what I should do to very this isn't gonna break stuff). I did test with Visual Studio 2019 and Visual Studio 2022. |
This comment has been minimized.
This comment has been minimized.
I detected other pull requests that are modifying boost/all recipe:
This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there. |
Hmm, I guess I didn't consider that the formula needs to keep working on older Boost versions. How do other formulae solve these types of issues? Would it be okay for newer versions to have a newer b2 build_requires but older ones retain older? Not sure if that's kosher. Edit: had another idea. I suppose I could try to figure out the problem with older boost versions and write patch files for them? Would appreciate feedback on the direction I should take. |
I suppose you could use a conditional build requirement, like the following:
this will use |
Ok, thanks for the feedback; wasn't sure if that's acceptable. Before I do that, let me tinker a little with the various boost versions to try to figure out A. why the build precisely breaks and B. what boost versions(s) do and don't work with newer b2. Give me a day or 2. |
Upgrading the b2 version to latest for Boost should work all the way back to Boost 1.66.0. It's a use case I test for all B2 changes. I just started a fresh CI run of those tests you can take a look here https://dev.azure.com/bfgroup/B2/_build/results?buildId=408&view=results. I definitely do not see the same error you are seeing on this. I will be very curious at to what @accwebs finds out. |
Trying the build locally I get similar output about numpy and the 'rules are limited to 19 arguments' error:
|
Hmm, I think perhaps this change is related to the problem? (change happened between 4.5.0 and 4.7.1) Likely before it was still broken, just not failing, thus hiding the error. Any thoughts @grafikrobot ? Likely conan formula resulting in a large number of parameters or something? Still getting my bearings. |
Additional info: Only Boost 1.78.0 works. All prior versions fail with the same error when trying to build the Conan recipe. So something changed between 1.77.0 -> 1.78.0 in boost that - combined with Conan recipe - triggers the problem. |
Right.
Right. Since it works fine in the B2 building Boost Ci tests. |
Ok, I've dug into it for a while and still am stuck. Its like b2 + boost prior to 1.78.0 is getting confused and thus somehow exceeds the parameter limit in the early pre-processing steps that b2 is doing. If I simply change to the extracted boost source directory (extracted there by Conan) and run 'b2.exe' without any args I get the same error. At this point I'm pretty stumped so would welcome any ideas people have. One thing I need to still look at is the patches Conan is applying to boost post extraction. I did a quick eyeball for anything obvious and nothing jumped out at me. Still, I should dig deeper there. |
there is |
Yeah, I was trying that last night. I was really struggling to understand what b2 is doing at the time that the processing stops. To be honest I think I'd have to be considerably more familiar with boost and b2 in order to make further progress with that route. Instead, in order to make further progress, I might have to focus on the deltas between Conan vs not and also Boost 1.78 / prev versions. I'll try that either tonight or tomorrow night. |
Ok, I made some progress. The difference is that the Azure builds of b2 where it's building boost as part of the tests supply the I'm having trouble finding any documentation for that argument and why you might need it. But my guess would be that possibly the b2 executable and various related script files are intended to be tightly coupled. Thus Conan's pairing of b2.exe from v4.7.1 with older versions of boost (that have older b2 scripts inside) is the problem; however, up till now the Boost Conan formula has used an old enough version of b2 that this didn't matter (when combined with newer Boost sources having newer build scripts). @grafikrobot sorry to bug you again, but guessing you can confirm this diagnosis (or set me straight if it's wrong :-P ) Even if this is correct, I'm not sure yet if the current b2 conan formula is packaging up all the files into a location that |
That argument is not part of B2. It's part of Boost https://github.com/boostorg/boost/blob/master/boost-build.jam#L15. Hence why it's not documented in B2. It controls where to find the B2 build files, i.e. the *.jam files. And it makes sense now why having it on my Azure CI would circumvent the problem. As it means that, yes, something in the older B2 files included with the Boost releases is causing the error when used with the newer B2 engine exe.
All the needed files are included in the B2 package, see
|
Gotcha; thanks for the info @grafikrobot ! I guess this begs the question of 'should all older B2 files be compatible with newer B2 versions'? i.e. does B2 even really aim to support that? Or are you supposed to only build Boost with the B2 version that matches w it?
Indeed. I'm not sure if I'm really solving the issue correctly by taking this path. Maybe I should be instead trying to create .patch files for all the older boost versions to fix up their .jam file(s) in the right places to work with newer B2? |
Although not explicitly mentioned, the aim is for the B2 engine (exe) to only work with the B2 build system (*.jam) that is the same version. But for that to support building existing versions of project Jamfiles.
Boost itself is only tested with the B2 version that comes with it. But I do the additional testing of using the newest B2 release with old Boost versions.
Not sure since I don't know what changes it would take. Another option is for me to also support old B2 build system files with the newest B2 engine exe. But that will make for significant complexity in B2 itself. |
Hey, All useful thoughts and information, thanks! I think the next steps are is for me to try:
Regarding:
Yeah, IMO that seems excessive and unnecessary given the current scope/objectives of B2. Sounds to me like this is more a bug in older Boost build files brought to the front by newer B2, a stance which is reinforced somewhat by the fact that current Boost version works just fine :-) |
0471a18
to
2100132
Compare
This comment has been minimized.
This comment has been minimized.
Odd, the build failed with 1.74.0 but I don't see any way to get the detailed error message. I did now just re-test with 1.74.0 (albeit on Windows not MacOS) and it seems okay. @SSE4 any ideas? Do I just need to re-run the build job? Or is there some way to review the error log (and I'm just being dense and missing it)? |
….5.0'). Add patches to fix bugs in Boost<=1.77.0 so they build with newer b2 This fixes conan-io#9047 ('build from source fails with MSVC 2022 due to outdated b2 dep')
2100132
to
10c1bea
Compare
it's an internal CI error and has nothing to do with the recipe/library itself (might be a network error, for instance). but as I can see, you already have restarted a build. |
All green in build 3 (
|
Ok, looks like everything passes now ( finally ;-) ). In the end I simply created .patch files for each of the supported older Boost versions to fix up their build scripts to work with newer B2. The patches were all very minor and basically the same. I ended up including 3 different .patch file versions to account for slight differences in the original files. @grafikrobot thank you very much for your guidance; thanks to you I was able to avoid going down the wrong rabbit holes on multiple occasions. I'm very much a Boost and B2 noob. @SSE4 thank you for your help as well. |
This fixes #9047 ('build from source fails with MSVC 2022 due to outdated b2 dep')
conan-center hook activated.