Bug 1223378

Summary: rstudio fails to build against boost 1.85
Product: [openSUSE] openSUSE Tumbleweed Reporter: Ana Guerrero <ana.guerrero>
Component: OtherAssignee: Aaron Puchert <aaronpuchert>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: aaronpuchert, aschnell, pujos.michael
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ana Guerrero 2024-04-25 09:19:25 UTC
rstudio failed to build in openSUSE:Factory after boost had been updated to version 1.85, see

https://build.opensuse.org/package/live_build_log/openSUSE:Factory/rstudio/standard/x86_64
Comment 1 Arvin Schnell 2024-04-26 07:06:44 UTC
rstudio is using functions that were marked as deprecated and have been
removed in bootst 1.85. Can be see in last good build:

https://build.opensuse.org/public/build/openSUSE:Factory/standard/x86_64/rstudio/_log?lastsucceeded
Comment 2 Michael Pujos 2024-04-26 09:15:40 UTC
Maybe it would be best to report that failure to compile with boost 1.85 to the rstudio issue tracker on github.
Comment 3 Arvin Schnell 2024-04-26 10:54:32 UTC
Seems to be fixed upstream already, see:

https://github.com/rstudio/rstudio/issues/13695
Comment 4 Ana Guerrero 2024-04-29 11:54:57 UTC
(In reply to Arvin Schnell from comment #3)
> Seems to be fixed upstream already, see:
> 
> https://github.com/rstudio/rstudio/issues/13695

I tested it, that patch is not enough.

(In reply to Michael Pujos from comment #2)
> Maybe it would be best to report that failure to compile with boost 1.85 to
> the rstudio issue tracker on github.

That would required first building against the HEAD version in github or at least against the last released version 2023.12.1+402. Current rstudio package in openSUSE is behind a couple of releases.
Comment 5 Ana Guerrero 2024-04-29 14:49:46 UTC
Aaron, I have seen you have updated rstudio in the past. Adding you here in case you are interested in updating it again. Thank you.
Comment 6 Michael Pujos 2024-04-30 17:52:45 UTC
I had a go at fixing it, updating it in the process to the latest update v2024.04.0+735.tar.gz.

Due to the complexity of this package and the time it takes to compile, it was not exactly a piece of cake and required a few hours of digging.
Interestingly, even git rstudio does not compile with boost 1.85: it required a trivial 1 line patch.

The new version starts but I am not a rstudio user nor familiar with R, so it would be great if someone familiar with it could test it a bit and report before I submit it to the devel project:

https://build.opensuse.org/package/show/home:bobbie424242:branches:openSUSE:Factory/rstudio

Note that this version does not compile on Leap 15.5 because it has older boost 1.66 and it would require conditionally reverting https://github.com/rstudio/rstudio/commit/251e441e1034950db8a054652dffb6348194f231, which I may do later.
Comment 7 Aaron Puchert 2024-05-01 00:35:57 UTC
(In reply to Michael Pujos from comment #6)
> I had a go at fixing it, updating it in the process to the latest update
> v2024.04.0+735.tar.gz.

Sorry, I should have said that I was working on it. (https://build.opensuse.org/package/show/home:aaronpuchert:branches:devel:languages:R:released/rstudio)

Maybe you can have a look. I solved some parts differently, but I copied your approach towards Leap. (With a minor adjustment: copy_options is already available with Boost 1.75.)

> Due to the complexity of this package and the time it takes to compile, it
> was not exactly a piece of cake and required a few hours of digging.

Yes, unfortunately we had to patch out some stuff.

> Interestingly, even git rstudio does not compile with boost 1.85: it
> required a trivial 1 line patch.

Upstream seems to target Boost 1.83 for now, the relevant change is only in Boost 1.85. (https://github.com/boostorg/function/commit/af8e66d03b4366c7039a138306470567c2243130)

> The new version starts but I am not a rstudio user nor familiar with R, so
> it would be great if someone familiar with it could test it a bit and report
> before I submit it to the devel project:
> 
> https://build.opensuse.org/package/show/home:bobbie424242:branches:openSUSE:
> Factory/rstudio

I don't use RStudio a lot, but most of the stuff I've been doing in the past continues to work.

> Note that this version does not compile on Leap 15.5 because it has older
> boost 1.66 and it would require conditionally reverting
> https://github.com/rstudio/rstudio/commit/
> 251e441e1034950db8a054652dffb6348194f231, which I may do later.

Interestingly, SLE has Boost 1.75 since SP3 (https://build.opensuse.org/package/show/SUSE:SLE-15-SP3:GA/boost.175), but instead of libboost_*-devel it provides libboost_*-devel-impl. And it conflicts with Boost 1.66, which we transitively require via e.g. soci-devel.

So I think patching it as you did is our only option.

I think we shouldn't do

BuildRequires:  openSUSE-release

Because it might cause frequent rebuilds (at least in the devel project) and it doesn't sound right. RStudio being a part of the distribution shouldn't depend on it. I'd propose to just patch this out. There is nothing SUSE-specific at the moment in the CMake files, and if there is it might not work for Tumbleweed anyway.
Comment 8 Michael Pujos 2024-05-01 08:26:41 UTC
Understood, no worries.
It still was a good learning experience for me, modifying such complex package.
Comment 9 Aaron Puchert 2024-05-02 23:59:57 UTC
Should be fixed with https://build.opensuse.org/request/show/1171310.

(In reply to Michael Pujos from comment #8)
> Understood, no worries.
> It still was a good learning experience for me, modifying such complex
> package.

Good to hear you're seeing the positive side. For what it's worth, your patch for older Boost was quite valuable, and I basically just copied it (with attribution).
Comment 10 Ana Guerrero 2024-05-03 11:11:38 UTC
Michael, Aaron, thank you for your help!