Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766294 - sci-mathematics/rstudio: restore package
Summary: sci-mathematics/rstudio: restore package
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 7 votes (vote)
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords:
: 833952 879355 (view as bug list)
Depends on:
Blocks: 775545
  Show dependency tree
 
Reported: 2021-01-20 18:14 UTC by Silvio
Modified: 2022-12-20 18:52 UTC (History)
27 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
First ebuild not working yet (rstudio-1.4.1106.ebuild,6.37 KB, text/plain)
2021-03-09 10:50 UTC, Silvio
Details
build.log (build.log,396.33 KB, text/x-log)
2021-06-01 20:56 UTC, Silvio
Details
build.log with new patch (build.log,511.54 KB, text/x-log)
2021-06-03 16:47 UTC, Silvio
Details
rstudio-2022.07.2.576.ebuild (rstudio-2022.07.2.576.ebuild,11.14 KB, text/plain)
2022-10-27 07:54 UTC, Mark Wright
Details
rstudio-2022.07.2.576.ebuild (rstudio-2022.07.2.576.ebuild,11.17 KB, text/plain)
2022-10-27 09:56 UTC, Mark Wright
Details
rstudio-2022.07.2.576-resource-paths.patch (rstudio-2022.07.2.576-resource-paths.patch,692 bytes, patch)
2022-10-27 09:57 UTC, Mark Wright
Details | Diff
rstudio-2022.07.2.576-ant-system-node.patch (rstudio-2022.07.2.576-ant-system-node.patch,1.56 KB, patch)
2022-10-27 09:58 UTC, Mark Wright
Details | Diff
rstudio-2022.07.2.576-cmake-bundled-dependencies.patch (rstudio-2022.07.2.576-cmake-bundled-dependencies.patch,2.72 KB, patch)
2022-10-27 09:58 UTC, Mark Wright
Details | Diff
rstudio-1.2.1335-linker_flags.patch (rstudio-1.2.1335-linker_flags.patch,505 bytes, patch)
2022-10-27 10:00 UTC, Mark Wright
Details | Diff
rstudio-2022.07.2.576-qtsingleapplication.patch (rstudio-2022.07.2.576-qtsingleapplication.patch,2.25 KB, patch)
2022-10-27 10:01 UTC, Mark Wright
Details | Diff
rstudio-2022.07.2.576-fmt.patch (rstudio-2022.07.2.576-fmt.patch,1.10 KB, patch)
2022-10-27 10:02 UTC, Mark Wright
Details | Diff
rstudio-2022.07.2.576-systemd.patch (rstudio-2022.07.2.576-systemd.patch,1.13 KB, patch)
2022-10-27 10:02 UTC, Mark Wright
Details | Diff
rstudio-2022.07.2.576-soci-cmake-find_library.patch (rstudio-2022.07.2.576-soci-cmake-find_library.patch,1.07 KB, patch)
2022-10-27 10:03 UTC, Mark Wright
Details | Diff
rstudio-2022.07.2.576-qtwebengine-5.15.7_p20221122-stack-trace.txt (rstudio-2022.07.2.576-qtwebengine-5.15.7_p20221122-stack-trace.txt,12.77 KB, text/plain)
2022-12-07 11:13 UTC, Mark Wright
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Silvio 2021-01-20 18:14:48 UTC
It is out the new (long awaited) version since yesterday

https://blog.rstudio.com/2021/01/19/announcing-rstudio-1-4/

it is an important version because it integrates Python inside the IDE.

I hope to have it in portage soon.


Reproducible: Always
Comment 1 Silvio 2021-01-23 19:37:21 UTC
Any news? It would be great to have this new version available asap.
Comment 2 Silvio 2021-01-24 17:52:44 UTC Comment hidden (obsolete)
Comment 3 Silvio 2021-01-24 20:48:13 UTC Comment hidden (obsolete)
Comment 4 François Valenduc 2021-01-25 17:19:47 UTC Comment hidden (obsolete)
Comment 5 Silvio 2021-01-25 20:23:33 UTC
Unfortunately there is no overlays that have an alternative rstudio ebuild.
Comment 6 Silvio 2021-01-28 19:47:35 UTC
I think the maintainer is very busy. A pity for such an important package.
If I may help in some ways...
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-28 19:52:51 UTC
(In reply to Silvio from comment #2)
> I see that the bug is still in "unconfirmed".
> Please, at least, put it in "confirmed" status.
> 

The status doesn't actually matter.

> Moreover in gentoo official packages site there is a warning about the new
> version:
> 
> https://packages.gentoo.org/packages/sci-mathematics/rstudio
> 
> Version 1.4.1103 is available upstream. Please consider updating!
> It seems that version 1.4.1103 is available upstream, while the latest
> version in the Gentoo tree is 1.3.1093.
> You think this warning is false? Read more about it here.

This is just saying there's a new version, as your bug has.

(In reply to Silvio from comment #6)
> I think the maintainer is very busy. A pity for such an important package.
> If I may help in some ways...

File a pull request with a draft which you've tested. Rebase the patch or drop it if it looks irrelevant now?
Comment 8 Silvio 2021-02-02 21:44:31 UTC
(In reply to Sam James from comment #7)

> File a pull request with a draft which you've tested. Rebase the patch or
> drop it if it looks irrelevant now?

I'm not able to prepare an ebuild. But I can make all the needed test.

Is there anyone able to make an initial draft?
Comment 9 Silvio 2021-02-06 14:14:59 UTC
Any news about this new package?
Comment 10 Silvio 2021-02-09 20:28:50 UTC
(In reply to Sam James from comment #7)
> (In reply to Silvio from comment #2)

> > Moreover in gentoo official packages site there is a warning about the new
> > version:
> > 
> > https://packages.gentoo.org/packages/sci-mathematics/rstudio
> > 
> > Version 1.4.1103 is available upstream. Please consider updating!
> > It seems that version 1.4.1103 is available upstream, while the latest
> > version in the Gentoo tree is 1.3.1093.
> > You think this warning is false? Read more about it here.
> 
> This is just saying there's a new version, as your bug has.

It was just the quote of the message, not my words. :)
Comment 11 Silvio 2021-02-27 11:48:14 UTC
A pity, I'm installing Windows on Virtualbox to use Rstudio 1.4.
But it is quite crazy ;)

Any idea of the time when it will be available on portage?

thanks a lot
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-02-27 11:55:43 UTC
(In reply to Silvio from comment #11)
> A pity, I'm installing Windows on Virtualbox to use Rstudio 1.4.
> But it is quite crazy ;)
> 
> Any idea of the time when it will be available on portage?
> 
> thanks a lot

I assume gienah is too busy, your best bet would be copying the existing one, seeing what breaks, and learn on IRC (#gentoo-dev-help)?

The patch may not be needed anymore, so you could try dropping it temporarily.
Comment 13 Silvio 2021-03-09 09:29:21 UTC
(In reply to Sam James from comment #12)
> (In reply to Silvio from comment #11)
> > A pity, I'm installing Windows on Virtualbox to use Rstudio 1.4.
> > But it is quite crazy ;)
> > 
> > Any idea of the time when it will be available on portage?
> > 
> > thanks a lot
> 
> I assume gienah is too busy, your best bet would be copying the existing
> one, seeing what breaks, and learn on IRC (#gentoo-dev-help)?
> 
> The patch may not be needed anymore, so you could try dropping it
> temporarily.

I tried at the beginning but it doesn't work.
I'll try again if no skilled people have time to do it :)
Comment 14 Silvio 2021-03-09 10:49:58 UTC
I tried but it exits with this error, not findint Mathjack which is regularly installed.


- Found R: /usr/lib64/R
-- Found Qt: /usr/lib64/qt5/bin/qmake
CMake Error at src/cpp/session/CMakeLists.txt:26 (message):
  Mathjax 2.7 not found (re-run install-dependencies script to install)

Probably it has to be patched so that it look for it in the right place.

I'll send my ebuild immediatly
Comment 15 Silvio 2021-03-09 10:50:24 UTC Comment hidden (obsolete)
Comment 16 wolfgang 2021-03-09 14:24:50 UTC
Silvio - Sam pinged me in IRC, I'll work on trying to update this package. I'll let you know when it is ready for testing.
Comment 17 wolfgang 2021-03-10 11:44:14 UTC
PR opened on github, https://github.com/gentoo/gentoo/pull/19865

The ebuild is not fully ready yet (I haven't tested the install, I'm pretty sure it is open), but I will keep this bug updated on my progress.
Comment 18 Silvio 2021-03-12 21:02:28 UTC
(In reply to wolfgang from comment #16)
> Silvio - Sam pinged me in IRC, I'll work on trying to update this package.
> I'll let you know when it is ready for testing.

Thanks Wolfgang. I'm trying to use your files.
I'll let you know the results.
:)
Comment 19 Silvio 2021-03-12 21:16:16 UTC Comment hidden (obsolete)
Comment 20 Silvio 2021-03-12 21:16:35 UTC Comment hidden (obsolete)
Comment 21 Silvio 2021-03-27 10:45:26 UTC
Hi  Wolfgang, any news?
Do you think you got an installable version?
thanks a lot
Comment 22 Silvio 2021-03-30 13:03:35 UTC
If you want me to do other tests, feel free do ask.
I'd love to help.
Thanks
Comment 23 Silvio 2021-04-01 21:29:05 UTC
Well, I'll wait for news. Files are 22 days old. So I think they are still the ones I tested.
Let me know.
bye
Comment 24 Silvio 2021-04-13 14:08:45 UTC
Any news? When will I be able to test a new ebuild?
Comment 25 wolfgang 2021-04-30 00:08:16 UTC
@silvio: so sorry for being so quiet!

I must have missed your emails, there's been a flood of emails related to guru overlay lately and I think yours got lost in the maelstrom (or more likely - I'm just not good about checking this email account...)

YES! rstudio is ready for test. Here's what you will have to do to test:

1) install the gwt ebuild located in [this][1] pull request
2) install the soci ebuild located in [this]2[] pull request
3) finally, install rstudio located in [this][3] pull request

you should probably uninstall all three of those if they are already present on your system, just to be safe.

I'll work through your backlog of messages here to see if I'm missing anything: I did notice that you mentioned a newer version of rstudio: yikes! Lol, let's see how this 1.4.1106 goes first and then I'll think about upgrading the ebuild.

Regarding things to test - not really sure! I'm not really familiar with rstudio or its functionality.

Some things that come to mind:

- How does rstudio use pandoc? It was a dependency on the previous ebuild, but I did not include it in this version and things seem to compile fine.
- Do you use rserver at all? you can install it with USE=server

[1]: https://github.com/gentoo/gentoo/pull/20222
[2]: https://github.com/gentoo/gentoo/pull/20575
[3]: https://github.com/gentoo/gentoo/pull/19865#issuecomment-828640359
Comment 26 Silvio 2021-06-01 20:09:55 UTC Comment hidden (obsolete)
Comment 27 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-01 20:17:40 UTC Comment hidden (obsolete)
Comment 28 Silvio 2021-06-01 20:29:13 UTC Comment hidden (obsolete)
Comment 29 Silvio 2021-06-01 20:53:09 UTC Comment hidden (obsolete)
Comment 30 Silvio 2021-06-01 20:56:37 UTC Comment hidden (obsolete)
Comment 31 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-01 20:57:36 UTC Comment hidden (obsolete)
Comment 32 Silvio 2021-06-01 21:10:55 UTC Comment hidden (obsolete)
Comment 33 Silvio 2021-06-01 21:18:34 UTC Comment hidden (obsolete)
Comment 34 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-01 21:49:45 UTC Comment hidden (obsolete)
Comment 35 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-01 21:54:31 UTC Comment hidden (obsolete)
Comment 36 wolfgang 2021-06-01 22:35:45 UTC Comment hidden (obsolete)
Comment 37 Silvio 2021-06-02 06:29:08 UTC Comment hidden (obsolete)
Comment 38 Silvio 2021-06-02 06:36:13 UTC Comment hidden (obsolete)
Comment 39 Silvio 2021-06-02 09:37:45 UTC Comment hidden (obsolete)
Comment 40 Silvio 2021-06-02 10:26:55 UTC Comment hidden (obsolete)
Comment 41 Silvio 2021-06-02 20:50:34 UTC Comment hidden (obsolete)
Comment 42 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-02 20:55:53 UTC Comment hidden (obsolete)
Comment 43 wolfgang 2021-06-03 12:30:54 UTC Comment hidden (obsolete)
Comment 44 wolfgang 2021-06-03 13:09:57 UTC
Ok, [new patch][1] added which should resolve the boost signals issue. I'll probably submit this one upstream, as they've just made an error in how they're comparing the boost version.

[1]: https://github.com/gentoo/gentoo/pull/19865/files#diff-b26b796806c0981574cc996d77e7db0f32c260a561c587f4cf378ef563659c5d
Comment 45 Silvio 2021-06-03 16:45:17 UTC Comment hidden (obsolete)
Comment 46 Silvio 2021-06-03 16:47:43 UTC Comment hidden (obsolete)
Comment 47 wolfgang 2021-06-03 17:16:15 UTC
(In reply to Silvio from comment #45)
> I tried with it. The boost problem disappeared but there are other error.

Are you sure you downloaded the updated ebuild? From the build.log you attached, I don't see the new patch being applied. Also, it looks like the old boost behaviour is still present "-- Using Boost.Signals version 1". This should say "version 2" instead.

Please try the following:

1. Download the entire contents of [this][1] directory. It may be easier to use a service such as[downgit][2]
2. Place the downloaded "rstudio" folder into your local overlay: something like "mv rstudio /path/to/local/overlay/sci-mathematics/" (make sure the sci-mathematics directory exists first)
3. emerge =sci-mathematics/rstudio-1.4.1106

please let me know if you need help with this.

[1]: https://github.com/ezzieyguywuf/gentoo/tree/rstudio_bump/sci-mathematics/rstudio
[2]: https://downgit.github.io/#/home?url=https://github.com/ezzieyguywuf/gentoo/tree/rstudio_bump/sci-mathematics/rstudio
Comment 48 Silvio 2021-06-03 21:32:55 UTC
(In reply to wolfgang from comment #47)

> Are you sure you downloaded the updated ebuild? From the build.log you
> attached, I don't see the new patch being applied. Also, it looks like the
> old boost behaviour is still present "-- Using Boost.Signals version 1".
> This should say "version 2" instead.

I've downloaded the file but probably I messed up something.
I followed your advice: I downloaded everything from scratch and compilation went fine.

I got rstudio 1.4 compiled and working. I performed few tests even using cuda and everything works fine (just a crash but it could be a random event).

The only thing is that it doesn't create the menu voice and it dowsn't appear in the list of application when you have to choose the app to open *.R files (it removed association).

It is not a big problem but should be fixed.

However, thank you a lot for the great job.

Silvio
Comment 49 wolfgang 2021-06-04 00:09:19 UTC
(In reply to Silvio from comment #48)
I downloaded everything from scratch and compilation
> went fine.

That's excellent! I'm glad to hear you got it up and running.

> I got rstudio 1.4 compiled and working. I performed few tests even using
> cuda and everything works fine (just a crash but it could be a random event).

I'm very interested in learning more about this crash - if you're up for it, can you walk me through what I can do to reproduce it? (I'm not at all familiar with how rstudio works, lol)

> The only thing is that it doesn't create the menu voice and it dowsn't
> appear in the list of application when you have to choose the app to open
> *.R files (it removed association).

Could you elaborate on this a bit? I'm a bit lost

> It is not a big problem but should be fixed.
> 
> However, thank you a lot for the great job.
> 
> Silvio
Comment 50 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-04 00:45:31 UTC
(In reply to wolfgang from comment #49)
> (In reply to Silvio from comment #48)
> I downloaded everything from scratch and compilation
> > went fine.
> 
> That's excellent! I'm glad to hear you got it up and running.
> 
> > I got rstudio 1.4 compiled and working. I performed few tests even using
> > cuda and everything works fine (just a crash but it could be a random event).
> 
> I'm very interested in learning more about this crash - if you're up for it,
> can you walk me through what I can do to reproduce it? (I'm not at all
> familiar with how rstudio works, lol)
> 
> > The only thing is that it doesn't create the menu voice and it dowsn't
> > appear in the list of application when you have to choose the app to open
> > *.R files (it removed association).
> 
> Could you elaborate on this a bit? I'm a bit lost
> 

I took it to mean desktop file and/or the xdg stuff we need to install to make “open with” work in file explorers. See the atom(?) and VS Code ebuilds for examples.


> > It is not a big problem but should be fixed.
> > 
> > However, thank you a lot for the great job.
> > 
> > Silvio
Comment 51 wolfgang 2021-06-04 00:52:08 UTC
(In reply to Sam James from comment #50)
> I took it to mean desktop file and/or the xdg stuff we need to install to
> make “open with” work in file explorers. See the atom(?) and VS Code ebuilds
> for examples.

Ah, the last version of the ebuild had this stuff, I just never added it.
Comment 52 Silvio 2021-06-04 11:40:48 UTC
> > The only thing is that it doesn't create the menu voice and it dowsn't
> > appear in the list of application when you have to choose the app to open
> > *.R files (it removed association).
> 
> Could you elaborate on this a bit? I'm a bit lost

I use KDE and Rstudio disappeared from the "application" K menu.
Moreover if I try to open a *.R file (file created with Rstudio) Rstudio doesn't appear in the possibile choices.
Comment 53 Silvio 2021-06-04 11:42:47 UTC
(In reply to Sam James from comment #50)

> > > I got rstudio 1.4 compiled and working. I performed few tests even using
> > > cuda and everything works fine (just a crash but it could be a random event).
> > 
> > I'm very interested in learning more about this crash - if you're up for it,
> > can you walk me through what I can do to reproduce it? (I'm not at all
> > familiar with how rstudio works, lol)

I'm trying to use my code in a Convolutionary Neural Netowork using CUDA to use my GPU and everything hangs. It could be CUDA or R not just rstudio.
Moreover I cannot reproduce the crash, so I'm not worried.
Comment 54 wolfgang 2021-06-04 13:40:41 UTC
(In reply to Silvio from comment #52)
> I use KDE and Rstudio disappeared from the "application" K menu.
> Moreover if I try to open a *.R file (file created with Rstudio) Rstudio
> doesn't appear in the possibile choices.

Understood, I think I know how to fix this. I'll let you know when I have something ready.
Comment 55 wolfgang 2021-06-04 13:42:10 UTC
(In reply to Silvio from comment #53)
> I'm trying to use my code in a Convolutionary Neural Netowork using CUDA to
> use my GPU and everything hangs. It could be CUDA or R not just rstudio.
> Moreover I cannot reproduce the crash, so I'm not worried.

Got it - if you experience any other crashes please let me know.

One thing I am very interested in: previous version of this ebuild (and even upstream itself) talks about a dependency on pandoc. However, I have not added this dependency to the ebuild itself - it compiles fine without it.

But I'm not sure how exactly pandoc is used during runtime. So, two questions:

1) Do you have pandoc installed on your system?
2) Do you know how pandoc is used within rstudio?
Comment 56 Silvio 2021-06-04 13:53:39 UTC
(In reply to wolfgang from comment #55)
> (In reply to Silvio from comment #53)
> > I'm trying to use my code in a Convolutionary Neural Netowork using CUDA to
> > use my GPU and everything hangs. It could be CUDA or R not just rstudio.
> > Moreover I cannot reproduce the crash, so I'm not worried.
> 
> Got it - if you experience any other crashes please let me know.
> 
> One thing I am very interested in: previous version of this ebuild (and even
> upstream itself) talks about a dependency on pandoc. However, I have not
> added this dependency to the ebuild itself - it compiles fine without it.
> 
> But I'm not sure how exactly pandoc is used during runtime. So, two
> questions:
> 
> 1) Do you have pandoc installed on your system?
> 2) Do you know how pandoc is used within rstudio?

1) I do have pandoc on my system
2) I think it is used to manage Markdown documents (and conversions)

https://rmarkdown.rstudio.com/authoring_pandoc_markdown.html
Comment 57 Neil 2021-06-10 13:55:01 UTC
Just to throw a spanner in the works a new version was announced/released yesterday.

I've not been able to build the linked version bump of gwt yet but haven't had much time to dedicate to pulling information together and reporting back.
Comment 58 Silvio 2021-06-10 16:10:29 UTC
(In reply to Neil from comment #57)
> Just to throw a spanner in the works a new version was announced/released
> yesterday.

New version of what?
Comment 59 Neil 2021-06-10 16:39:05 UTC
Sorry I got distracted and should have included the following link announcing a new release of RStudio which supports the recent release of R-4.1...

https://blog.rstudio.com/2021/06/09/rstudio-v1-4-update-whats-new/

Support for the new pipe (|>) is included.
Comment 60 wolfgang 2021-06-14 12:39:17 UTC
(In reply to Neil from comment #57)
> I've not been able to build the linked version bump of gwt yet but haven't
> had much time to dedicate to pulling information together and reporting back.

gwt version bump is in ::gentoo now, so if you update world you should get it.

(In reply to Neil from comment #59)
> Sorry I got distracted and should have included the following link
> announcing a new release of RStudio which supports the recent release of
> R-4.1...
> 
> https://blog.rstudio.com/2021/06/09/rstudio-v1-4-update-whats-new/
> 
> Support for the new pipe (|>) is included.

I can look into updating my PR to use this newer version, though I may not get a chance to work on it for a week or two.
Comment 61 Silvio 2021-06-26 21:24:26 UTC
I tried to start the server version and it crashes at the startup.
In syslog I got

Jun 26 23:20:27 titanium rserver[18686]: ERROR Could not update database to latest schema; LOGGED FROM: rstudio::core::Error rstudio::server_core::database::initialize(const string&, bool, const boost::optional<rstudio::core::system::User>&) src/cpp/server_core/ServerDatabase.cpp:275
Jun 26 23:20:27 titanium rserver[18686]: ERROR system error 2 (No such file or directory) [path: /usr/db]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::getChildren(std::vector<rstudio::core::FilePath>&) const src/cpp/shared_core/FilePath.cpp:894; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:673
Jun 26 23:20:31 titanium /etc/init.d/rstudio-server[18712]: status: crashed
Comment 62 Silvio 2021-06-27 08:10:25 UTC
I found that the previous version has two files in 

/etc/rstudio

I'll upload now in this thread.

However they don't specify the db directory. It seems to me that the problem is this.

No such file or directory) [path: /usr/db]

I haven't this directory in my system (not I had in the previous version).

Probably we have just to specify the correct version.


However we have a problem: the server doesn't start at all.
Comment 63 Silvio 2021-06-30 19:57:33 UTC
Any idea on how to test and/or to solve this issue? 
The server doesn't start at all :(
Comment 64 wolfgang 2021-06-30 21:52:13 UTC
i have a feeling the issue is associated with some hard-coded paths in the rstudio code base. i've patched most of them but perhaps i'm missing a few.

this is on my list just need to find time to work on it.
Comment 65 Silvio 2021-06-30 21:56:51 UTC
Well I can create a virtual link to the right directory for /usr/db as temporary workaround.
Do you know what it is?
Comment 66 Silvio 2021-06-30 22:00:16 UTC
I tried with /var/db

# ln -s /var/db/ /usr/db


but it crashed with another error

ERROR database error 7 (sqlite3_statement_backend::prepare: no such table: revoked_cookie) [description: Could not delete expired revoked cookies from the database, description: Could not read revoked cookies from the database]; OCCURRED AT virtual rstudio::core::Error rstudio::core::database::Connection::execute(rstudio::core::database::Query&, bool*) src/cpp/core/Database.cpp:464; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:729
Jun 30 23:58:34 titanium /etc/init.d/rstudio-server[31083]: status: crashed
Comment 67 wolfgang 2021-06-30 22:15:59 UTC
Hm, it looks like it's trying to open a db that doesn't exist or that it can't find 

I may be missing a dependency or else it is getting confused between the hard codes paths and my patched ones.

Another possibility is that i have forgotten to include a file in the new version that was installed with the previous ebuild.

This is all guesswork at the moment, though, until i have a chance to dig in to it.
Comment 68 Silvio 2021-07-01 17:20:21 UTC
(In reply to wolfgang from comment #67)
> Hm, it looks like it's trying to open a db that doesn't exist or that it
> can't find 

Well, I forced the db putting a virtual link from /usr/db to /var/db. Sureley it is not correct.

> 
> I may be missing a dependency or else it is getting confused between the
> hard codes paths and my patched ones.

If I can test something let me know.

> 
> Another possibility is that i have forgotten to include a file in the new
> version that was installed with the previous ebuild.

well there are to packages you have to put in dependencies to have the correct users:

acct-group/rstudio-server
acct-user/rstudio-server

> 
> This is all guesswork at the moment, though, until i have a chance to dig in
> to it.

Let me know.
Comment 69 Silvio 2021-07-09 22:37:26 UTC
Hi Wolfgang any news for a new update with the last release and the server that works?
thank you a lot
Comment 70 wolfgang 2021-07-11 19:42:16 UTC
(In reply to Silvio from comment #69)
> Hi Wolfgang any news for a new update with the last release and the server
> that works?
> thank you a lot

Sylvio,

Thank you for checking in. Unfortunately i have not had time to work on this lately. I will provide an update here once i have had a chance to look at it
Comment 71 Adam Wenocur 2021-08-09 16:19:02 UTC
FYI, I have based a new ebuild on this pull request.

It is for version 1.4.1717 of rstudio, and it is in my personal overlay.

You are welcome to use it, or to guide me through the process of making this ready for production.

It relies on the soci PR that is on this ticket, which has not been added to my personal repo yet. I have _not_ used the gwt PR on this ticket, and it is working on my machine.

https://github.com/awenocur/asw-custom-software-gentoo/tree/master/sci-mathematics/rstudio
Comment 72 Silvio 2021-08-10 22:58:23 UTC
(In reply to Adam Wenocur from comment #71)
> FYI, I have based a new ebuild on this pull request.
> 
> It is for version 1.4.1717 of rstudio, and it is in my personal overlay.
> 
> You are welcome to use it, or to guide me through the process of making this
> ready for production.
> 
> It relies on the soci PR that is on this ticket, which has not been added to
> my personal repo yet. I have _not_ used the gwt PR on this ticket, and it is
> working on my machine.
> 
> https://github.com/awenocur/asw-custom-software-gentoo/tree/master/sci-
> mathematics/rstudio

I got this error

>>> Emerging (1 of 1) sci-mathematics/rstudio-1.4.1717::local
 * rstudio-1.4.1717.tar.gz BLAKE2B SHA512 size ;-) ...                                 [ ok ]
 * rstudio-1.4.1717-core-dictionaries.zip BLAKE2B SHA512 size ;-) ...                  [ ok ]
 * Using: openjdk-8
>>> Unpacking source...
>>> Unpacking rstudio-1.4.1717.tar.gz to /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work
>>> Unpacking rstudio-1.4.1717-core-dictionaries.zip to /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/dictionaries
>>> Source unpacked in /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work
>>> Preparing source in /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717 ...
 * Applying rstudio-1.4.1717-ant-system-node.patch ...
/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/temp/environment: line 1281: /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-ant-system-node.patch: Permission denied
/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/temp/environment: line 1284: /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-ant-system-node.patch: Permission denied                                                                                   [ !! ]
 * ERROR: sci-mathematics/rstudio-1.4.1717::local failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-ant-system-node.patch
 * 
 * Call stack:
 *               ebuild.sh, line  127:  Called src_prepare
 *             environment, line 4143:  Called cmake_src_prepare
 *             environment, line 1077:  Called default_src_prepare
 *      phase-functions.sh, line  923:  Called __eapi6_src_prepare
 *             environment, line  350:  Called eapply '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-ant-system-node.patch' '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-boost-imports-and-namespaces.patch' '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-cmake-bundled-dependencies.patch' '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-fix-boost-version-check.patch' '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1106-resource-path.patch' '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1106-server-paths.patch' '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1106-soci-cmake-find_library.patch'
 *             environment, line 1349:  Called _eapply_patch '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-ant-system-node.patch'
 *             environment, line 1287:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-ant-system-node.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=sci-mathematics/rstudio-1.4.1717::local'`,
 * the complete build log and the output of `emerge -pqv '=sci-mathematics/rstudio-1.4.1717::local'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=openjdk-8  CLASSPATH="" JAVA_HOME="/usr/lib64/openjdk-8"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER=""
and of course, the output of emerge --info =rstudio-1.4.1717
 * The complete build log is located at '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717'
 * S: '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717'

>>> Failed to emerge sci-mathematics/rstudio-1.4.1717, Log file:

>>>  '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/temp/build.log'

 * Messages for package sci-mathematics/rstudio-1.4.1717:

 * ERROR: sci-mathematics/rstudio-1.4.1717::local failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-ant-system-node.patch
 * 
 * Call stack:
 *               ebuild.sh, line  127:  Called src_prepare
 *             environment, line 4143:  Called cmake_src_prepare
 *             environment, line 1077:  Called default_src_prepare
 *      phase-functions.sh, line  923:  Called __eapi6_src_prepare
 *             environment, line  350:  Called eapply '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-ant-system-node.patch' '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-boost-imports-and-namespaces.patch' '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-cmake-bundled-dependencies.patch' '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-fix-boost-version-check.patch' '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1106-resource-path.patch' '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1106-server-paths.patch' '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1106-soci-cmake-find_library.patch'
 *             environment, line 1349:  Called _eapply_patch '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-ant-system-node.patch'
 *             environment, line 1287:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/files/rstudio-1.4.1717-ant-system-node.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=sci-mathematics/rstudio-1.4.1717::local'`,
 * the complete build log and the output of `emerge -pqv '=sci-mathematics/rstudio-1.4.1717::local'`.
 * The complete build log is located at '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717'
 * S: '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717'
Comment 73 Adam Wenocur 2021-08-11 00:07:55 UTC
(In reply to Silvio from comment #72)
> I got this error

It looks as though emerge had a permissions error reading a patch from within the $PORTAGE_TMPDIR directory, during the prepare phase. Have you checked the permissions of files in /var/tmp/portage/sci-mathematics/rstudio-1.4.171 or of the overlay itself? Maybe removing the build directory before merging is necessary.
Comment 74 Adam Wenocur 2021-08-11 00:14:18 UTC
Looking at how the files directory is a symlink, be sure that the portage user has read access to the overlay.
Comment 75 Silvio 2021-08-11 05:56:40 UTC
You are right there wasn't "x" for all in "files" subdir.

now it starts but exits in this way:


>>> Emerging (1 of 1) sci-mathematics/rstudio-1.4.1717::local
 * rstudio-1.4.1717.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                    [ ok ]
 * rstudio-1.4.1717-core-dictionaries.zip BLAKE2B SHA512 size ;-) ...                                                                     [ ok ]
 * Using: openjdk-8
>>> Unpacking source...
>>> Unpacking rstudio-1.4.1717.tar.gz to /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work
>>> Unpacking rstudio-1.4.1717-core-dictionaries.zip to /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/dictionaries
>>> Source unpacked in /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work
>>> Preparing source in /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717 ...
 * Applying rstudio-1.4.1717-ant-system-node.patch ...                                                                                    [ ok ]
 * Applying rstudio-1.4.1717-boost-imports-and-namespaces.patch ...
patching file src/cpp/core/HtmlUtils.cpp
Hunk #1 succeeded at 17 with fuzz 1.
patching file src/cpp/core/system/PosixChildProcessTracker.cpp
Hunk #1 succeeded at 22 with fuzz 2 (offset 2 lines).
patching file src/cpp/core/system/PosixOutputCapture.cpp
Hunk #1 succeeded at 33 with fuzz 2 (offset 2 lines).                                                                                     [ ok ]
 * Applying rstudio-1.4.1717-cmake-bundled-dependencies.patch ...
patch unexpectedly ends in middle of line
patch unexpectedly ends in middle of line                                                                                                 [ ok ]
 * Applying rstudio-1.4.1717-fix-boost-version-check.patch ...                                                                            [ ok ]
 * Applying rstudio-1.4.1106-resource-path.patch ...
patching file CMakeGlobals.txt
Hunk #1 succeeded at 234 with fuzz 2 (offset 55 lines).
patching file src/cpp/session/SessionOptions.cpp                                                                                          [ ok ]
 * Applying rstudio-1.4.1106-server-paths.patch ...                                                                                       [ ok ]
 * Applying rstudio-1.4.1106-soci-cmake-find_library.patch ...                                                                            [ ok ]
 * Working in BUILD_DIR: "/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717_build"
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717 ...
 * Working in BUILD_DIR: "/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717_build"
cmake -C /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DRSTUDIO_INSTALL_SUPPORTING=/usr/share/rstudio -DRSTUDIO_TARGET=Development -DRSTUDIO_UNIT_TESTS_DISABLED=ON -DRSTUDIO_USE_SYSTEM_BOOST=ON -DGWT_BUILD=OFF -DGWT_COPY=ON -DRSTUDIO_USE_SYSTEM_YAML_CPP=TRUE -DQT_QMAKE_EXECUTABLE=/usr/lib64/qt5/bin/qmake -DRSTUDIO_INSTALL_FREEDESKTOP=ON -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717_build/gentoo_toolchain.cmake  /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717
loading initial cache file /var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717_build/gentoo_common_config.cmake
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Machine architecture: x86_64
-- CMake build type: Gentoo
fatal: not a git repository (or any of the parent directories): .git
-- Using RStudio tools root: /opt/rstudio-tools/x86_64
-- Configured to install GWT
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
CMake Error at src/cpp/CMakeLists.txt:222 (message):
  yaml-cpp not found (re-run dependencies script to install)


-- Configuring incomplete, errors occurred!
See also "/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717_build/CMakeFiles/CMakeOutput.log".
 * ERROR: sci-mathematics/rstudio-1.4.1717::local failed (configure phase):
 *   cmake failed
 * 
 * Call stack:
 *     ebuild.sh, line  127:  Called src_configure
 *   environment, line 4147:  Called cmake_src_configure
 *   environment, line 1076:  Called die
 * The specific snippet of code:
 *       "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
 * 
 * If you need support, post the output of `emerge --info '=sci-mathematics/rstudio-1.4.1717::local'`,
 * the complete build log and the output of `emerge -pqv '=sci-mathematics/rstudio-1.4.1717::local'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=openjdk-8  CLASSPATH="" JAVA_HOME="/usr/lib64/openjdk-8"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER=""
and of course, the output of emerge --info =rstudio-1.4.1717
 * The complete build log is located at '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717_build'
 * S: '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717'

>>> Failed to emerge sci-mathematics/rstudio-1.4.1717, Log file:

>>>  '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/temp/build.log'

 * Messages for package sci-mathematics/rstudio-1.4.1717:

 * ERROR: sci-mathematics/rstudio-1.4.1717::local failed (configure phase):
 *   cmake failed
 * 
 * Call stack:
 *     ebuild.sh, line  127:  Called src_configure
 *   environment, line 4147:  Called cmake_src_configure
 *   environment, line 1076:  Called die
 * The specific snippet of code:
 *       "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
 * 
 * If you need support, post the output of `emerge --info '=sci-mathematics/rstudio-1.4.1717::local'`,
 * the complete build log and the output of `emerge -pqv '=sci-mathematics/rstudio-1.4.1717::local'`.
 * The complete build log is located at '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717_build'
 * S: '/var/tmp/portage/sci-mathematics/rstudio-1.4.1717/work/rstudio-1.4.1717'
Comment 76 Adam Wenocur 2021-08-11 13:30:14 UTC
(In reply to Silvio from comment #75)
> You are right there wasn't "x" for all in "files" subdir.
> 
> now it starts but exits in this way:
> 

Silvio,

Can you pull the latest master branch from my repo and try again? It was working for me with CMake 3.18.5, but perhaps your version is different.

In the latest ebuild, I have changed the RSTUDIO_USE_SYSTEM_YAML_CPP flag to be in better compliance.
Comment 77 Silvio 2021-08-11 14:08:42 UTC
Same error, even with the new version:

As far as I can see you changed from
-DRSTUDIO_USE_SYSTEM_YAML_CPP=TRUE
to
-DRSTUDIO_USE_SYSTEM_YAML_CPP=ON

But the error seems to say something different:

CMake Error at src/cpp/CMakeLists.txt:222 (message):
  yaml-cpp not found (re-run dependencies script to install)

He seems to want to use yaml-cpp but it could not find it.

I reinstalled yaml-cpp packages but nothing changes.







I put here my emerge --info:

Portage 3.0.20 (python 3.9.6-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-11.2.0, glibc-2.33-r5, 5.13.1-gentoo x86_64)
=================================================================
System uname: Linux-5.13.1-gentoo-x86_64-Intel-R-_Core-TM-_i7-8565U_CPU_@_1.80GHz-with-glibc2.33
KiB Mem:    16240740 total,   2354720 free
KiB Swap:   16777212 total,  15257340 free
Timestamp of repository gentoo: Tue, 10 Aug 2021 17:00:01 +0000
Head commit of repository gentoo: 8bc9e9a394444ab179757f85c5dd3ad974af9f95
sh bash 5.1_p8
ld ld di GNU (Gentoo 2.36.1 p5) 2.36.1
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.34.0-r1::gentoo
dev-lang/python:          2.7.18_p11::gentoo, 3.8.11::gentoo, 3.9.6_p1::gentoo, 3.10.0_rc1_p1::gentoo
dev-lang/rust:            1.54.0::gentoo
dev-util/cmake:           3.21.1::gentoo
sys-apps/baselayout:      2.7-r3::gentoo
sys-apps/openrc:          0.43.3::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo, 2.71-r1::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.4::gentoo
sys-devel/binutils:       2.36.1-r2::gentoo
sys-devel/gcc:            10.3.0-r2::gentoo, 11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

local
    location: /usr/portage.local
    masters: gentoo

rion
    location: /var/lib/layman/rion
    sync-type: laymansync
    sync-uri: https://github.com/rion-overlay/rion-overlay.git
    masters: gentoo
    priority: 50

salfter
    location: /var/lib/layman/salfter
    sync-type: laymansync
    sync-uri: https://gitlab.com/salfter/portage.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="it_IT.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="it en it_IT en_US"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dri3 dts dvd dvdr egl elogind emboss encode exif ffmpeg fftw flac fortran gdbm gif gpm gtk gui hidpi iconv icu id3tag ipv6 javafx jpeg kde kdesu kipi kwallet lcms libglvnd libinput libnotify libtirpc mad mng mp3 mp4 mpeg mtp multilib ncurses networkmanager nls nptl ntfs objc ogg opengl openmp opus pam pango pcre pcsc-lite pdf phonon plasma png policykit ppds pulseaudio python qml qt5 readline s3tc sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg tcpd theora tiff touchpad truetype udev udisks unicode upower usb uxa v4l vaapi vdpau vorbis vpx widgets wxwidgets x264 xattr xcb xml xv xvid xvmc zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="snd_hda_intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3 glamor" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="joystick wacom synaptics evdev libinput" KERNEL="linux" L10N="it en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9 python3_7 python3_8" RUBY_TARGETS="ruby26 ruby27" SANE_BACKENDS="*" USERLAND="GNU" VIDEO_CARDS="intel i965 i915 nvidia vesa v4l v4l2 modesetting fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 78 Adam Wenocur 2021-08-11 14:37:20 UTC
(In reply to Silvio from comment #77)
> Same error, even with the new version:


It looks as though you're using an unstable version of CMake. Do you get the same error with the latest stable version?

I will try with 3.21.1 and see what happens on my end.
Comment 79 Silvio 2021-08-11 14:45:48 UTC
My system is ~ and I'm using

dev-util/cmake
     Available versions:  3.18.5^t 3.20.5^t (~)3.21.1^t {doc emacs ncurses qt5 test}
     Installed versions:  3.21.1^t(23:39:43 10/08/2021)(ncurses -doc -emacs -qt5 -test)
     Homepage:            https://cmake.org/
     Description:         Cross platform Make

Tha is not "unstable" but "testing" now.

I'm compiling all my system now and I don't want to mess up compilation.

As soon as it finished I'll downgrade cmake to 3.20.5 and I'll try to recompile rstudio.
Comment 80 Silvio 2021-08-11 14:47:57 UTC
Just a question: did you solve the server issue? I mean, with your last ebuild does the rstudio-server works?
Comment 81 Adam Wenocur 2021-08-11 15:18:32 UTC
(In reply to Adam Wenocur from comment #78)
> I will try with 3.21.1 and see what happens on my end.

The source is configuring correctly with CMake 3.21.1 on my system. I guess something else is breaking it. It continues on to build correctly.

(In reply to Silvio from comment #80)
> Just a question: did you solve the server issue? I mean, with your last
> ebuild does the rstudio-server works?

I don't have it running, due to some configuration problems. I'm still using the old systemd service, which will have to be upgraded. I haven't yet added the user/group ebuilds as deps, but I could do that.

However, it does build when I enable the server flag. From what I can tell, on my system, all the binaries are correct, and we just have to figure out config and parameters.
Comment 82 Silvio 2021-08-11 15:38:26 UTC
Can you pleas put the oupt of eix yaml command? Just to see if I need some extra packages:

This is mine

# eix yaml
* app-emacs/yaml-mode
     Available versions:  (~)0.0.13 (~)0.0.14 (~)0.0.15
     Homepage:            https://github.com/yoshiki/yaml-mode
     Description:         A major mode for GNU Emacs for editing YAML files

[I] dev-cpp/yaml-cpp
     Available versions:  0.6.3-r3(0/0.6)^t (~)0.6.3-r4(0/0.6)^t (~)0.7.0(0/0.7)^t {test ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  0.7.0(0/0.7)^t(07:49:08 11/08/2021)(-test ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
     Homepage:            https://github.com/jbeder/yaml-cpp
     Description:         YAML parser and emitter in C++

* dev-erlang/fast_yaml
     Available versions:  1.0.25 (~)1.0.27 1.0.31
     Homepage:            https://github.com/processone/fast_yaml
     Description:         Fast Yaml native library for Erlang and Elixir

[I] dev-haskell/hsyaml
     Available versions:  (~)0.2.1.0(0/0.2.1.0)^t {doc hscolour profile test}
     Installed versions:  0.2.1.0(0/0.2.1.0)^t(15:09:58 11/08/2021)(-doc -hscolour -profile -test)
     Homepage:            https://github.com/hvr/HsYAML
     Description:         Pure Haskell YAML 1.2 parser

* dev-haskell/hsyaml-aeson
     Available versions:  (~)0.2.0.0(0/0.2.0.0) {doc hscolour profile}
     Homepage:            https://hackage.haskell.org/package/HsYAML-aeson
     Description:         JSON to YAML Adapter

* dev-haskell/libyaml
     Available versions:  (~)0.1.2(0/0.1.2) {doc hscolour no-unicode profile system-libyaml}
     Homepage:            https://github.com/snoyberg/yaml#readme
     Description:         Low-level, streaming YAML interface

* dev-haskell/yaml
     Available versions:  (~)0.11.5.0(0/0.11.5.0)^t {doc hscolour +no-examples +no-exe profile test}
     Homepage:            https://github.com/snoyberg/yaml#readme
     Description:         Support for parsing and rendering YAML documents

* dev-java/jvyaml
     Available versions:  0.2.1-r2 {doc source ELIBC="FreeBSD"}
     Homepage:            https://jvyaml.dev.java.net/
     Description:         Java YAML parser and emitter

* dev-java/snakeyaml
     Available versions:  1.28-r1^t {doc source test ELIBC="FreeBSD"}
     Homepage:            https://bitbucket.org/asomov/snakeyaml
     Description:         YAML 1.1 parser and emitter for Java

[I] dev-libs/libyaml
     Available versions:  0.2.2^t 0.2.5^t {doc static-libs test}
     Installed versions:  0.2.5^t(15:07:23 11/08/2021)(-doc -static-libs -test)
     Homepage:            https://github.com/yaml/libyaml
     Description:         YAML 1.1 parser and emitter written in C

* dev-perl/Test-YAML
     Available versions:  1.60.0
     Homepage:            https://metacpan.org/release/Test-YAML
     Description:         Testing Module for YAML Implementations

[I] dev-perl/YAML
     Available versions:  1.150.0^t 1.260.0-r1^t {test}
     Installed versions:  1.260.0-r1^t(15:08:01 11/08/2021)(-test)
     Homepage:            https://metacpan.org/release/YAML
     Description:         YAML Ain't Markup Language (tm)

* dev-perl/YAML-LibYAML
     Available versions:  0.690.0
     Homepage:            https://metacpan.org/release/YAML-LibYAML
     Description:         Perl YAML Serialization using XS and libyaml

* dev-perl/YAML-PP
     Available versions:  (~)0.18.0-r1^t 0.27.0^t {test}
     Homepage:            https://metacpan.org/release/YAML-PP
     Description:         YAML 1.2 processor in perl

* dev-perl/YAML-Syck
     Available versions:  1.300.0 1.310.0^t {test}
     Homepage:            https://metacpan.org/release/YAML-Syck
     Description:         Fast, lightweight YAML loader and dumper

[I] dev-perl/YAML-Tiny
     Available versions:  1.690.0^t 1.730.0^t {minimal test}
     Installed versions:  1.730.0^t(01:44:28 29/05/2021)(-minimal -test)
     Homepage:            https://metacpan.org/release/YAML-Tiny
     Description:         Read/Write YAML files with as little code as possible

* dev-php/YAML
     Available versions:  1.0.6-r3
     Homepage:            http://pear.symfony-project.com/
     Description:         The Symfony YAML Component

* dev-php/pecl-yaml
     Available versions:  (7) (~)2.2.0 (~)2.2.1
       {PHP_TARGETS="php7-2 php7-3 php7-4 php8-0"}
     Homepage:            https://pecl.php.net/yaml
     Description:         YAML 1.1 (YAML Ain't Markup Language) serialization for PHP

* dev-php/symfony-yaml
     Available versions:  2.1.0^t {test}
     Homepage:            https://github.com/symfony/yaml
     Description:         Symfony YAML Component

* dev-python/pretty-yaml
     Available versions:  20.4.0^t (~)21.8.3^t {test PYTHON_TARGETS="python3_8 python3_9 python3_10"}
     Homepage:            https://github.com/mk-fg/pretty-yaml
     Description:         PyYAML-based module to produce pretty and readable YAML-serialized data

[I] dev-python/pyyaml
     Available versions:  5.3.1-r1^t 5.4.1^t {examples +libyaml test PYTHON_TARGETS="pypy3 python3_8 python3_9 python3_10"}
     Installed versions:  5.4.1^t(15:11:17 11/08/2021)(libyaml -examples -test PYTHON_TARGETS="python3_8 python3_9 -pypy3 -python3_10")
     Homepage:            https://pyyaml.org/wiki/PyYAML https://pypi.org/project/PyYAML/ https://github.com/yaml/pyyaml
     Description:         YAML parser and emitter for Python

* dev-python/pyyaml_env_tag
     Available versions:  0.1^t {test PYTHON_TARGETS="python3_8 python3_9 python3_10"}
     Homepage:            https://github.com/waylan/pyyaml-env-tag
     Description:         A custom YAML tag for referencing environment variables in YAML files

* dev-python/ruamel-yaml
     Available versions:  0.17.10^t {test PYTHON_TARGETS="pypy3 python3_8 python3_9 python3_10"}
     Homepage:            https://pypi.org/project/ruamel.yaml/ https://sourceforge.net/p/ruamel-yaml/
     Description:         YAML parser/emitter that supports roundtrip comment preservation

* dev-python/ruamel-yaml-clib
     Available versions:  0.2.2-r1 (~)0.2.4 0.2.6 {PYTHON_TARGETS="pypy3 python3_8 python3_9 python3_10"}
     Homepage:            https://pypi.org/project/ruamel.yaml.clib/ https://sourceforge.net/p/ruamel-yaml-clib/
     Description:         C-based reader/scanner and emitter for dev-python/ruamel-yaml

* dev-python/yamlpath
     Available versions:  (~)3.6.0^t {test PYTHON_TARGETS="python3_8 python3_9 python3_10"}
     Homepage:            https://github.com/wwkimball/yamlpath https://github.com/wwkimball/yamlpath/wiki
     Description:         Command-line processors for YAML/JSON/Compatible data.

* dev-ruby/hiera-eyaml
     Available versions:  (3) (~)3.1.1^t
       {test RUBY_TARGETS="ruby25 ruby26 ruby27"}
     Homepage:            https://github.com/TomPoulton/hiera-eyaml
     Description:         Encrypted YAML backend for hiera

* dev-ruby/hiera-eyaml-gpg
     Available versions:  (~)0.7.4^t {test RUBY_TARGETS="ruby25 ruby26 ruby27"}
     Homepage:            https://github.com/sihil/hiera-eyaml-gpg
     Description:         A GPG backend for hiera-eyaml

* dev-ruby/hiera-eyaml-plaintext
     Available versions:  (~)0.6-r1^t {test RUBY_TARGETS="ruby25 ruby26 ruby27"}
     Homepage:            https://github.com/gtmtechltd/hiera-eyaml-plaintext
     Description:         A plaintext backend for hiera-eyaml

* dev-ruby/safe_yaml
     Available versions:  1.0.5-r1^t {doc test RUBY_TARGETS="ruby25 ruby26 ruby27"}
     Homepage:            https://dtao.github.com/safe_yaml
     Description:         Parse YAML safely, alternative implementation of YAML.load

[I] virtual/perl-CPAN-Meta-YAML
     Available versions:  0.18.0-r7
     Installed versions:  0.18.0-r7(01:20:45 29/05/2021)
     Description:         Virtual for CPAN-Meta-YAML

Found 30 matches
Comment 83 Adam Wenocur 2021-08-11 15:48:37 UTC
Whatever the problem is, the failure seems to be that find_package(yaml-cpp REQUIRED) on line 218 of the patched src/cpp/CMakeLists.txt is not setting the correct YAML_CPP_INCLUDE_DIR, or that the yaml-cpp headers are not present where CMake's find_package routine is expecting them.

It may help to check that all headers for yaml-cpp are present in /usr/include/yaml-cpp/ and that /usr/lib64/pkgconfig/yaml-cpp.pc is valid.


Here's my eix yaml output for one of my systems where the build is succeeding:

* dev-R/yaml [2]
     Available versions:  ~2.2.1
     Homepage:            https://cran.r-project.org/package=yaml
     Description:         Methods to Convert R Data to YAML and Back

* dev-haskell/aeson-yaml [3]
     Available versions:  ~1.1.0.0(0/1.1.0.0)^t {build-binaries doc hoogle hscolour profile test}
     Homepage:            https://github.com/clovyr/aeson-yaml
     Description:         Output any Aeson value as YAML (pure Haskell library)

[I] dev-haskell/hsyaml [3]
     Available versions:  ~0.1.2.0(0/0.1.2.0) (~)0.2.1.0(0/0.2.1.0)^t{tbz2} {doc hoogle hscolour profile test}
     Installed versions:  0.2.1.0(0/0.2.1.0)^t{tbz2}(12:11:15 AM 06/27/2021)(-doc -hoogle -hscolour -profile -test)
     Homepage:            https://github.com/hvr/HsYAML
     Description:         Pure Haskell YAML 1.2 parser

[I] dev-haskell/hsyaml-aeson
     Available versions:  0.2.0.0(0/0.2.0.0){tbz2}[1] ~0.2.0.0(0/0.2.0.0){tbz2}[3] {doc hoogle hscolour profile}
     Installed versions:  0.2.0.0(0/0.2.0.0){tbz2}[1](10:59:26 PM 07/01/2021)(-doc -hscolour -profile)
     Homepage:            https://hackage.haskell.org/package/HsYAML-aeson
     Description:         JSON to YAML Adapter

[I] dev-haskell/libyaml [3]
     Available versions:  (~)0.1.2(0/0.1.2){tbz2} {doc hoogle hscolour no-unicode profile system-libyaml}
     Installed versions:  0.1.2(0/0.1.2){tbz2}(01:19:01 AM 06/27/2021)(-doc -hoogle -hscolour -no-unicode -profile -system-libyaml)
     Homepage:            https://github.com/snoyberg/yaml#readme
     Description:         Low-level, streaming YAML interface

[I] dev-haskell/yaml [3]
     Available versions:  (~)0.11.5.0(0/0.11.5.0)^t{tbz2} {doc hoogle hscolour +no-examples +no-exe profile test}
     Installed versions:  0.11.5.0(0/0.11.5.0)^t{tbz2}(11:00:02 PM 07/01/2021)(no-examples no-exe -doc -hoogle -hscolour -profile -test)
     Homepage:            https://github.com/snoyberg/yaml#readme
     Description:         Support for parsing and rendering YAML documents

* dev-haskell/yaml-light [3]
     Available versions:  ~0.1.4-r1(0/0.1.4) {doc hoogle hscolour profile}
     Homepage:            https://hackage.haskell.org/package/yaml-light
     Description:         A light-weight wrapper with utility functions around HsSyck

* dev-python/strictyaml [2]
     Available versions:  ~1.3.2 {PYTHON_TARGETS="pypy3 python3_8 python3_9"}
     Homepage:            https://github.com/crdoconnor/strictyaml
     Description:         A type-safe YAML parser built atop ruamel.yaml

[1] "asw-custom-software" /software/gentoo
[2] "guru" /software/gentoo-guru
[3] "haskell" /software/gentoo-haskell

Found 8 matches
Comment 84 Silvio 2021-08-11 17:30:46 UTC
> /usr/lib64/pkgconfig/yaml-cpp.pc is valid.

I don't have this file. Perhaps this is the problem.


(I tried to install all "yaml" packages you have in the hope that it would fix the configuration, but it is not the solution)
Comment 85 Adam Wenocur 2021-08-11 17:33:28 UTC
(In reply to Silvio from comment #84)
> > /usr/lib64/pkgconfig/yaml-cpp.pc is valid.
> 
> I don't have this file. Perhaps this is the problem.
> 
> 
> (I tried to install all "yaml" packages you have in the hope that it would
> fix the configuration, but it is not the solution)


It's part of the yaml-cpp package. I have version 0.6.3-r3 installed.
Comment 86 Silvio 2021-08-11 17:42:05 UTC
(In reply to Adam Wenocur from comment #85)
> (In reply to Silvio from comment #84)
> > > /usr/lib64/pkgconfig/yaml-cpp.pc is valid.
> > 
> > I don't have this file. Perhaps this is the problem.
> > 
> > 
> > (I tried to install all "yaml" packages you have in the hope that it would
> > fix the configuration, but it is not the solution)
> 
> 
> It's part of the yaml-cpp package. I have version 0.6.3-r3 installed.

We got it! It is a problem of 

dev-cpp/yaml-cpp-0.7.0

with your version (0.6.3-r3) and the following one (0.6.3-r4) the compilation of rstudio goes on passing by the yalm-cpp control.

So I'm opening a new bug for yaml-cpp.

In the meantime rstudio is compiling so I'll keep you updated about the process as soon as it will finish.


I'll let you know if the server works or not.

Thank you Adam!
Comment 87 Silvio 2021-08-11 22:31:06 UTC
(In reply to Silvio from comment #86)

> with your version (0.6.3-r3) and the following one (0.6.3-r4) the
> compilation of rstudio goes on passing by the yalm-cpp control.

It has finished to compile. It works!


 
> 
> I'll let you know if the server works or not.

Well, this doesn't still work. A pity because it is very useful to access to rstudio via other devices (such as tablets).

Let me know if you understand the reason of the crashes of the daemon
Comment 88 Silvio 2021-08-12 08:18:21 UTC
Here the syslog with the error of rstudio-server when it tries to start:

rserver[18036]: ERROR Could not update database to latest schema; LOGGED FROM: rstudio::core::Error rstudio::server_core::database::initialize(const string&, bool, const boost::optional<rstudio::core::system::User>&) src/cpp/server_core/ServerDatabase.cpp:325

rserver[18036]: ERROR system error 2 (No such file or directory) [path: /usr/db]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::getChildren(std::vector<rstudio::core::FilePath>&) const src/cpp/shared_core/FilePath.cpp:897; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:694
Comment 89 Adam Wenocur 2021-08-12 14:57:43 UTC
(In reply to Silvio from comment #88)
> Here the syslog with the error of rstudio-server when it tries to start:

Thanks for the info. It looks different from the failures I'm getting, but of a similar nature: there are some directories that have to be created, and permissions that have to be set correctly. Any further investigation or solutions you share here can ultimately be incorporated into the ebuild.

I'll try a few things, but might not fix it alone.
Comment 90 Silvio 2021-08-13 20:59:38 UTC
(In reply to Adam Wenocur from comment #89)
> (In reply to Silvio from comment #88)
> > Here the syslog with the error of rstudio-server when it tries to start:
> 
> Thanks for the info. It looks different from the failures I'm getting, but
> of a similar nature: there are some directories that have to be created, and
> permissions that have to be set correctly. Any further investigation or
> solutions you share here can ultimately be incorporated into the ebuild.
> 
> I'll try a few things, but might not fix it alone.

Let me know what can I test. I'll do my best to identify how to make it run.
Comment 91 Silvio 2021-08-13 21:10:33 UTC
I tried to create the file:

/etc/rstudio/database.conf 

in this way:

####
provider=sqlite

# Directory in which the sqlite database will be written
directory=/var/lib/rstudio-server
####

but nothing changes, it doesn't start.
Comment 92 Silvio 2021-08-14 13:03:00 UTC
I made more investigation.

As in the error (the second one) says:

 ERROR system error 2 (No such file or directory) [path: /usr/db]

I tried to create the /usr/db directory

# mkdir /usr/db

than running 

# ./rstudio-server verify-installation

within the correct directory (it is not in the PATH) /usr/share/rstudio/bin, I got a new error:

[rserver] ERROR database error 7 (sqlite3_statement_backend::prepare: no such table: revoked_cookie) [description: Could not delete expired revoked cookies from the database, description: Could not read revoked cookies from the database]; OCCURRED AT virtual rstudio::core::Error rstudio::core::database::Connection::execute(rstudio::core::database::Query&, bool*) src/cpp/core/Database.cpp:494; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:763


Probably we need to prepare the db with the correct tables and it should be enough. But I don't know how to do it.
Comment 93 Silvio 2021-08-16 08:00:27 UTC
(In reply to Silvio from comment #86)
> (In reply to Adam Wenocur from comment #85)
> > It's part of the yaml-cpp package. I have version 0.6.3-r3 installed.
> 
> We got it! It is a problem of 
> 
> dev-cpp/yaml-cpp-0.7.0
> 
> with your version (0.6.3-r3) and the following one (0.6.3-r4) the
> compilation of rstudio goes on passing by the yalm-cpp control.
> 
> So I'm opening a new bug for yaml-cpp.

I opened and bug is fixed now:

https://bugs.gentoo.org/show_bug.cgi?id=807745

Now the only issue seems the server version that doesn't start yet.
Comment 94 Silvio 2021-08-16 11:31:34 UTC
(In reply to Silvio from comment #93)
> (In reply to Silvio from comment #86)
> > (In reply to Adam Wenocur from comment #85)
> > > It's part of the yaml-cpp package. I have version 0.6.3-r3 installed.
> > 
> > We got it! It is a problem of 
> > 
> > dev-cpp/yaml-cpp-0.7.0
> > 
> > with your version (0.6.3-r3) and the following one (0.6.3-r4) the
> > compilation of rstudio goes on passing by the yalm-cpp control.
> > 
> > So I'm opening a new bug for yaml-cpp.
> 
> I opened and bug is fixed now:
> 
> https://bugs.gentoo.org/show_bug.cgi?id=807745
> 
> Now the only issue seems the server version that doesn't start yet.

No, even if they fixed the lack of the 

/usr/lib64/pkgconfig/yaml-cpp.pc

it is not enough, even with yaml-cpp-0.7.0-r1 I got the same error.
I have to mask it for now.
Comment 95 Silvio 2021-09-04 20:17:28 UTC
(In reply to Silvio from comment #92)
> I made more investigation.
> 
> As in the error (the second one) says:
> 
>  ERROR system error 2 (No such file or directory) [path: /usr/db]
> 
> I tried to create the /usr/db directory
> 
> # mkdir /usr/db
> 
> than running 
> 
> # ./rstudio-server verify-installation
> 
> within the correct directory (it is not in the PATH) /usr/share/rstudio/bin,
> I got a new error:
> 
> [rserver] ERROR database error 7 (sqlite3_statement_backend::prepare: no
> such table: revoked_cookie) [description: Could not delete expired revoked
> cookies from the database, description: Could not read revoked cookies from
> the database]; OCCURRED AT virtual rstudio::core::Error
> rstudio::core::database::Connection::execute(rstudio::core::database::Query&,
> bool*) src/cpp/core/Database.cpp:494; LOGGED FROM: int main(int, char*
> const*) src/cpp/server/ServerMain.cpp:763
> 
> 
> Probably we need to prepare the db with the correct tables and it should be
> enough. But I don't know how to do it.

Is there any further version to test?
Comment 96 Silvio 2021-09-16 09:14:15 UTC
(In reply to Adam Wenocur from comment #89)
> (In reply to Silvio from comment #88)
> > Here the syslog with the error of rstudio-server when it tries to start:
> 
> Thanks for the info. It looks different from the failures I'm getting, but
> of a similar nature: there are some directories that have to be created, and
> permissions that have to be set correctly. Any further investigation or
> solutions you share here can ultimately be incorporated into the ebuild.
> 
> I'll try a few things, but might not fix it alone.

Did you managed to make some modifications I can test?
thanks!
Silvio
Comment 97 Robin Marlow 2021-09-19 20:08:07 UTC
Thank you so much - following the instructions in this thread and Adam's overlay it's working well for me (albeit not as a server) with dev-cpp/yaml-cpp-0.7.0 masked.

Robin
Comment 98 Silvio 2021-09-24 20:45:27 UTC
(In reply to Robin Marlow from comment #97)

> (albeit not as a server) with

I hope that soon there will be a version with the server working.
Comment 99 wolfgang 2021-09-24 21:00:56 UTC
(In reply to Silvio from comment #98)
> (In reply to Robin Marlow from comment #97)
> 
> > (albeit not as a server) with
> 
> I hope that soon there will be a version with the server working.

Not making any promises, but in case I get a chance to work on this can somebody please show me a sample of how I might use the server? Maybe just a few commands on how to get it up and running and then how to communicate to it?
Comment 100 Silvio 2021-09-25 06:40:02 UTC
(In reply to wolfgang from comment #99)
> (In reply to Silvio from comment #98)
> > (In reply to Robin Marlow from comment #97)
> > 
> > > (albeit not as a server) with
> > 
> > I hope that soon there will be a version with the server working.
> 
> Not making any promises, but in case I get a chance to work on this can
> somebody please show me a sample of how I might use the server? Maybe just a
> few commands on how to get it up and running and then how to communicate to
> it?


Well, first of all you have to test the starting services:

# /etc/init.d/rstudio-server start

now after this i get:

# /etc/init.d/rstudio-server status
 * status: crashed

When it will start correctly you will be able to connect to the web version in this way on your browser:

http://localhost:<IpPort>

The default IpPort should be 8787. If it works you should see the login page.
Comment 101 Silvio 2021-09-27 20:27:38 UTC
(In reply to Silvio from comment #100)
> (In reply to wolfgang from comment #99)
> > (In reply to Silvio from comment #98)
> > > (In reply to Robin Marlow from comment #97)
> > > 
> > > > (albeit not as a server) with
> > > 
> > > I hope that soon there will be a version with the server working.
> > 
> > Not making any promises, but in case I get a chance to work on this can
> > somebody please show me a sample of how I might use the server? Maybe just a
> > few commands on how to get it up and running and then how to communicate to
> > it?
> 
> 
> Well, first of all you have to test the starting services:
> 
> # /etc/init.d/rstudio-server start
> 
> now after this i get:
> 
> # /etc/init.d/rstudio-server status
>  * status: crashed
> 
> When it will start correctly you will be able to connect to the web version
> in this way on your browser:
> 
> http://localhost:<IpPort>
> 
> The default IpPort should be 8787. If it works you should see the login page.

Did you try this tests? Is everything clear?
Let me know if I can be of any help.
Comment 102 Silvio 2021-10-02 12:34:00 UTC
(In reply to wolfgang from comment #99)
> (In reply to Silvio from comment #98)
> > (In reply to Robin Marlow from comment #97)
> > 
> > > (albeit not as a server) with
> > 
> > I hope that soon there will be a version with the server working.
> 
> Not making any promises, but in case I get a chance to work on this can
> somebody please show me a sample of how I might use the server? Maybe just a
> few commands on how to get it up and running and then how to communicate to
> it?

Hi Wolfgang, did you succeed to make some tests?
Comment 103 wolfgang 2021-10-03 13:01:06 UTC
(In reply to Silvio from comment #102)
> (In reply to wolfgang from comment #99)
> > (In reply to Silvio from comment #98)
> > > (In reply to Robin Marlow from comment #97)
> > > 
> > > > (albeit not as a server) with
> > > 
> > > I hope that soon there will be a version with the server working.
> > 
> > Not making any promises, but in case I get a chance to work on this can
> > somebody please show me a sample of how I might use the server? Maybe just a
> > few commands on how to get it up and running and then how to communicate to
> > it?
> 
> Hi Wolfgang, did you succeed to make some tests?

No not yet. It is on my list however it is not very high on my list.
Comment 104 Silvio 2021-10-03 19:35:48 UTC
(In reply to wolfgang from comment #103)
> (In reply to Silvio from comment #102)
> > (In reply to wolfgang from comment #99)
> > > (In reply to Silvio from comment #98)
> > > > (In reply to Robin Marlow from comment #97)
> > > > 
> > > > > (albeit not as a server) with
> > > > 
> > > > I hope that soon there will be a version with the server working.
> > > 
> > > Not making any promises, but in case I get a chance to work on this can
> > > somebody please show me a sample of how I might use the server? Maybe just a
> > > few commands on how to get it up and running and then how to communicate to
> > > it?
> > 
> > Hi Wolfgang, did you succeed to make some tests?
> 
> No not yet. It is on my list however it is not very high on my list.

Thank you Wolfgang, I confirm I'm available for any test.
Comment 105 Silvio 2021-10-09 11:21:54 UTC
There is also a new version:

2021.09.0+351

https://www.rstudio.com/products/rstudio/download/#download
Comment 106 Silvio 2021-11-03 21:05:19 UTC
(In reply to Silvio from comment #105)
> There is also a new version:
> 
> 2021.09.0+351
> 
> https://www.rstudio.com/products/rstudio/download/#download

Any news to test?
Comment 107 Silvio 2021-11-07 17:06:34 UTC
Is there anyone of the mantainers who are working on the bump?

Now the 1.3 version in not fully compatible to the R proposed by portage.

It is becoming obsolete and it should be ready as soon as possibile.

Thanks to wolfgang I had a manual version (even if not fully functioning: no server mode for instance), but for Gentoo people it is important to have an official one.

Let me know how can I help.
Comment 108 Silvio 2021-11-16 22:46:28 UTC
I'm a bit confused. 

We have the good Adam work here:


https://github.com/awenocur/asw-custom-software-gentoo/tree/master/sci-mathematics/rstudio

And now there are also this version:

https://github.com/gentoo/gentoo/pull/19865

Does it mean that we will have an official one on portage?

It is quite a year old update. 

As I said several time, if I could do any test, I'm available.
Comment 109 Pacho Ramos gentoo-dev 2021-11-23 15:38:12 UTC
It seems the pull request is waiting since some months for some changes to be applied. The ebuild from the overlay looks newer and more maintained, I would probably suggest to try to work from overlay one and try to adapt it to the demands from the pull request :/
Comment 110 Silvio 2021-11-23 20:45:53 UTC
(In reply to Pacho Ramos from comment #109)
> It seems the pull request is waiting since some months for some changes to
> be applied. The ebuild from the overlay looks newer and more maintained, I
> would probably suggest to try to work from overlay one and try to adapt it
> to the demands from the pull request :/

I agree, I'm using Adam ebuild and it works fine.

The only problem I can see is that the server doesn't start.
(/etc/init.d/rstudio start)

It is not necessary to mask yaml (>=dev-cpp/yaml-cpp-0.7.0) anymore.

I think the needed fixes are very little.

Silvio
Comment 111 Silvio 2021-11-29 21:26:15 UTC
For one who wants to try adams version.

1. If you don't have install eselect repository command 
# emerge -u eselect-repository

2. If you dont' have one yet, create a local repository 
# eselect repository create localrepo

3. Create a directory for rstudio in your local repository
# mkdir -p /var/db/repos/localrepo/sci-mathematics/rstudio

4. Download the last Adam's version:
go to: https://downgit.github.io/#/home
and put in the form the url of the git repository:
https://github.com/awenocur/asw-custom-software-gentoo/tree/master/sci-mathematics/rstudio

5. Unzip the zip file in the directory created in point 3


6. Download the soci package here
https://github.com/gentoo/gentoo/pull/20575/files

7. Create dir in localrepo
mkdir -p /var/db/repos/localrepo/dev-db/soci

8. Copy all soci file in this directory

9. emerge rstudio
Comment 112 Silvio 2021-12-02 08:19:27 UTC
Just another bit of information.
Launching directly the command "rserver" as root it answers saying that it has to be launched as normal user.
Launching with my user it says two things:

$ rserver
02 Dec 2021 07:57:22 [rserver] ERROR Could not change permissions for specified 'server-data-dir' - the directory (/var/run/rstudio-server) must be writeable by all users and have the sticky bit set; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:659
02 Dec 2021 07:57:22 [rserver] ERROR system error 1 (Operation not permitted) [path: /var/run/rstudio-server]; OCCURRED AT rstudio::core::Error rstudio::core::{anonymous}::changeFileModeImpl(const string&, mode_t) src/cpp/shared_core/FilePath.cpp:311; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:662


I correct the first message making the directory:
/var/run/rstudio-server
writable (executable) for everyone
sticky

The first message disappears but still I got the second one

$ rserver
02 Dec 2021 08:11:07 [rserver] ERROR system error 13 (Permission denied) [path: /var/lib/rstudio-server, target-dir: ]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::createDirectory(const string&) const src/cpp/shared_core/FilePath.cpp:812; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:694



So I retried to launch as root (no message but it doesn't do nothing) and relaunching as user I got two messages this time, the second is the famous 

(No such file or directory) [path: /usr/db]


$ rserver
02 Dec 2021 08:12:05 [rserver] ERROR Could not update database to latest schema; LOGGED FROM: rstudio::core::Error rstudio::server_core::database::initialize(const string&, bool, const boost::optional<rstudio::core::system::User>&) src/cpp/server_core/ServerDatabase.cpp:325
02 Dec 2021 08:12:05 [rserver] ERROR system error 2 (No such file or directory) [path: /usr/db]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::getChildren(std::vector<rstudio::core::FilePath>&) const src/cpp/shared_core/FilePath.cpp:897; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:694
Comment 113 Neil 2021-12-08 06:52:27 UTC
Thanks for the step-by-step guide Silvio, I've successfully emerge RStudio-1.4.1717.

Not tried rserver yet beyond finding it doesn't start as root.
Comment 114 foufou33 2021-12-15 06:16:26 UTC
more over the current version dones't seem to like glibc-2.34
Comment 115 Silvio 2021-12-20 17:49:36 UTC
(In reply to foufou33 from comment #114)
> more over the current version dones't seem to like glibc-2.34

You are right. It doesn't compile.
It became important or to solve this or to jump to 1.4.
Comment 116 Silvio 2022-01-12 22:00:45 UTC
No news. dead package?
Comment 117 Adam Wenocur 2022-01-12 22:02:12 UTC
It's not dead on my end; I'll make sure it's usable to a bare minimum. I don't have time for frequent upgrades, though.
Comment 118 Silvio 2022-01-12 22:08:44 UTC
(In reply to Adam Wenocur from comment #117)
> It's not dead on my end; I'll make sure it's usable to a bare minimum. I
> don't have time for frequent upgrades, though.

Yes, but it is not in portage. Portage version doesn't compile. So it is crucial to have the 1.4 completed. And I think the server version it is fundamental.

I'm still available to make all necessary tests.
Comment 119 Silvio 2022-01-21 20:48:16 UTC
well, we have to decide if trasnfer 1.4 on portage.
1.3 is obsolete
Comment 120 Adam Wenocur 2022-01-21 22:48:45 UTC
At this point, it appears they've changed to a calendar-based versioning scheme. My upcoming goals are as follows:

update current ebuilds to version 2021.09.2+382 or later

resolve database dependencies

add directory structures during src_install

add config and initialization for local database


I don't have a timeline for this, as I have competing projects, but possibly the first step will be done this month.
Comment 121 Silvio 2022-01-23 21:52:18 UTC
(In reply to Adam Wenocur from comment #120)
> At this point, it appears they've changed to a calendar-based versioning
> scheme. My upcoming goals are as follows:
> 
> update current ebuilds to version 2021.09.2+382 or later
> 
> resolve database dependencies
> 
> add directory structures during src_install
> 
> add config and initialization for local database
> 
> 
> I don't have a timeline for this, as I have competing projects, but possibly
> the first step will be done this month.

Thank you adam.
Comment 122 Silvio 2022-02-04 16:44:14 UTC
(In reply to Adam Wenocur from comment #120)
> At this point, it appears they've changed to a calendar-based versioning
> scheme. My upcoming goals are as follows:
> 
> update current ebuilds to version 2021.09.2+382 or later
> 
> resolve database dependencies
> 
> add directory structures during src_install
> 
> add config and initialization for local database
> 
> 
> I don't have a timeline for this, as I have competing projects, but possibly
> the first step will be done this month.

Hi Adam, did you do any step?
Do you need help?
Comment 123 Silvio 2022-02-13 18:20:38 UTC
In the meantime that the new version will be on portage I update the "manual" to install the good Adam's version, as I realized that my explanation is not perfect.


1. If you don't have install eselect repository command 
# emerge -u eselect-repository

2. If you dont' have one yet, create a local repository 
# eselect repository create localrepo

3. Create a directory for rstudio in your local repository
# mkdir -p /var/db/repos/localrepo/sci-mathematics/rstudio

4. Download the last Adam's version:
go to: https://downgit.github.io/#/home
and put in the form the url of the git repository:
https://github.com/awenocur/asw-custom-software-gentoo/tree/master/sci-mathematics/rstudio

5. Unzip the zip file (downloaded in point 4) in the directory created in point 3

6.  Create dir in localrepo
# mkdir -p /var/db/repos/localrepo/dev-db/soci

7. Download the updated soci package.
go to: https://downgit.github.io/#/home
and put in the form the url of the git repository:
https://github.com/gentoo/gentoo/tree/81ace3bc1b2f8472b6606709287c34b40277eda3/dev-libs/soci

8. Unzip the zip file (downloaded in point 7) in the directory created in point 6

9. # emerge rstudio
Comment 124 Silvio 2022-02-13 18:38:58 UTC
Sorry for the spam, but soci changed, I update it:

1. If you don't have install eselect repository command 
# emerge -u eselect-repository

2. If you dont' have one yet, create a local repository 
# eselect repository create localrepo

3. Create a directory for rstudio in your local repository
# mkdir -p /var/db/repos/localrepo/sci-mathematics/rstudio

4. Download the last Adam's version:
go to: https://downgit.github.io/#/home
and put in the form the url of the git repository:
https://github.com/awenocur/asw-custom-software-gentoo/tree/master/sci-mathematics/rstudio

5. Unzip the zip file (downloaded in point 4) in the directory created in point 3

6.  Create dir in localrepo
# mkdir -p /var/db/repos/localrepo/dev-libs/soci

7. Download the updated soci package.
go to: https://downgit.github.io/#/home
and put in the form the url of the git repository:
https://github.com/gentoo/gentoo/tree/81ace3bc1b2f8472b6606709287c34b40277eda3/dev-libs/soci

8. Unzip the zip file (downloaded in point 7) in the directory created in point 6

9. Add "postgres" use to soci, editing the package.use e inserting this line:
dev-libs/soci postgres


10. # emerge rstudio
Comment 125 Silvio 2022-02-21 10:54:49 UTC
Hi to all.
This issue is opened from more than a year.
Is there something else to do to help maintainers to update to new version?
1.3 is absolutely obsolete.
Let me know.
Comment 126 Neil 2022-02-22 22:29:31 UTC
And to throw another spanner in the works RStudio have just announced a new release 2022.02.0

https://www.rstudio.com/blog/rstudio-2022-02-0-what-s-new/
Comment 127 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-24 02:25:55 UTC
*** Bug 833952 has been marked as a duplicate of this bug. ***
Comment 128 Silvio 2022-02-24 10:13:54 UTC
(In reply to Neil from comment #126)
> And to throw another spanner in the works RStudio have just announced a new
> release 2022.02.0
> 
> https://www.rstudio.com/blog/rstudio-2022-02-0-what-s-new/

Moreover it is a very important package nowadays. It is used by the majority of data science prototype projects.
Comment 129 Adam Wenocur 2022-03-10 15:33:46 UTC
I'm currently bumping to version 2022.02.0+443.

It introduces a new library called Quarto. I think it may make sense to make Quarto its own package, building against the system Pandoc, but I'm not sure yet.

The initial working ebuild will have Quarto disabled, and use system Pandoc directly.

Does anyone have ideas about this?
Comment 130 Silvio 2022-03-10 21:08:26 UTC
(In reply to Adam Wenocur from comment #129)
> I'm currently bumping to version 2022.02.0+443.
> 
> It introduces a new library called Quarto. I think it may make sense to make
> Quarto its own package, building against the system Pandoc, but I'm not sure
> yet.
> 
> The initial working ebuild will have Quarto disabled, and use system Pandoc
> directly.
> 
> Does anyone have ideas about this?

Probably it is better to have an independent package of Quarto
https://quarto.org/
as it could be embedded even in other solution as Jupyter.

What about the server daemon? Will it work in your new release?
Thank you Adam
Comment 131 Adam Wenocur 2022-03-11 01:27:38 UTC
I've pushed the commit to my personal overlay. I haven't tested the server yet with this version, but that's next. I'll deal with Quarto later, as it is intractable to create a separate ebuild for it; it's mostly Typescript and has no discernible self-contained build script.

I incorporated a patch from FreeBSD that allows RStudio to build against newer versions of yaml-cpp.
Comment 132 Adam Wenocur 2022-03-11 01:39:50 UTC
Currently, I'm handling an inconsistency between the install path and search path for resources, resulting in a blank window when opening.
Comment 133 François Valenduc 2022-03-12 15:13:41 UTC
I have tested the new ebuild and I find some problems. First, the patch rstudio- 2022.02.0.443-cmake-find_library.patch is missing. I managed to compile studio by replacing it by an older patch (rstudio-1.4.1106-soci-cmake-find_library.patch).
However, even the desktop app doesn't work at all. I only get a blank screen.
Could you check this and add the missing patch ?
Comment 134 Adam Wenocur 2022-03-12 21:30:34 UTC
(In reply to François Valenduc from comment #133)
> I have tested the new ebuild and I find some problems. First, the patch
> rstudio- 2022.02.0.443-cmake-find_library.patch is missing. I managed to
> compile studio by replacing it by an older patch
> (rstudio-1.4.1106-soci-cmake-find_library.patch).
> However, even the desktop app doesn't work at all. I only get a blank screen.
> Could you check this and add the missing patch ?

I've added the missing patch, and am continuing to debug the config path problem that's resulting in a blank window upon launch.
Comment 135 Alessandro Barbieri 2022-03-15 02:29:34 UTC
Is it possible to also address those issues before bumping?
update useflag description https://bugs.gentoo.org/696938
move to free json library and move from EAPI 5 for gwt dependency of gin dependency of rstudio https://bugs.gentoo.org/818658
Comment 136 Adam Wenocur 2022-03-25 05:10:50 UTC
I now have version 2022.02.0+443 working about as well as 1.4.1717 was working in my personal overlay. There was some copying and pasting in the code base where it looks for resources and scripts. In addition, the version number itself changed formats, and it was crashing partially because the ebuild needed a fourth minor version number.

I plan on making it use Quarto next.

I then plan on adding the missing configs to make the server function.

(In reply to Alessandro Barbieri from comment #135)
> Is it possible to also address those issues before bumping?
> update useflag description https://bugs.gentoo.org/696938
> move to free json library and move from EAPI 5 for gwt dependency of gin
> dependency of rstudio https://bugs.gentoo.org/818658

The builds for RStudio in my personal overlay have used EAPI 7 for awhile. Are you referring to another ebuild that needs to be upgraded?

Specifically, is there another way rstudio should list dependencies now? Is there a JSON library that should be listed directly?
Comment 137 Silvio 2022-04-02 15:40:06 UTC
rstudio-2022.02.0.443 fails to compile, with this output:

>>> Emerging (1 of 1) sci-mathematics/rstudio-2022.02.0.443::localrepo
 * rstudio-2022.02.0.443.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                                                                           [ ok ]
 * rstudio-2022.02.0.443-core-dictionaries.zip BLAKE2B SHA512 size ;-) ...                                                                                                                                                            [ ok ]
 * Using: openjdk-bin-11
>>> Unpacking source...
>>> Unpacking rstudio-2022.02.0.443.tar.gz to /var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/work
>>> Unpacking rstudio-2022.02.0.443-core-dictionaries.zip to /var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/work/dictionaries
>>> Source unpacked in /var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/work
>>> Preparing source in /var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/work/rstudio-2022.02.0-443 ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/work/rstudio-2022.02.0-443"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/work/rstudio-2022.02.0.443_build"
 * Applying rstudio-2022.02.0.443-ant-system-node.patch ...
/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/temp/environment: line 1297: /var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/files/rstudio-2022.02.0.443-ant-system-node.patch: Permission denied
/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/temp/environment: line 1300: /var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/files/rstudio-2022.02.0.443-ant-system-node.patch: Permission denied                       [ !! ]
 * ERROR: sci-mathematics/rstudio-2022.02.0.443::localrepo failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/files/rstudio-2022.02.0.443-ant-system-node.patch
 * 
 * Call stack:
 *               ebuild.sh, line  127:  Called src_prepare
 *             environment, line 4177:  Called cmake_src_prepare
 *             environment, line 1084:  Called default_src_prepare
 *      phase-functions.sh, line  923:  Called __eapi6_src_prepare
 *             environment, line  335:  Called eapply '/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/files/rstudio-2022.02.0.443-ant-system-node.patch' '/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/files/rstudio-1.4.1717-boost-imports-and-namespaces.patch' '/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/files/rstudio-2022.02.0.443-cmake-bundled-dependencies.patch' '/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/files/rstudio-1.4.1717-fix-boost-version-check.patch' '/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/files/rstudio-2022.02.0.443-resource-path.patch' '/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/files/rstudio-1.4.1106-server-paths.patch' '/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/files/rstudio-2022.02.0.443-cmake-find_library.patch'
 *             environment, line 1365:  Called _eapply_patch '/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/files/rstudio-2022.02.0.443-ant-system-node.patch'
 *             environment, line 1303:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/files/rstudio-2022.02.0.443-ant-system-node.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=sci-mathematics/rstudio-2022.02.0.443::localrepo'`,
 * the complete build log and the output of `emerge -pqv '=sci-mathematics/rstudio-2022.02.0.443::localrepo'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=openjdk-bin-11  CLASSPATH="" JAVA_HOME="/opt/openjdk-bin-11.0.14_p9"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER=""
and of course, the output of emerge --info =rstudio-2022.02.0.443
 * The complete build log is located at '/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/work/rstudio-2022.02.0-443'
 * S: '/var/tmp/portage/sci-mathematics/rstudio-2022.02.0.443/work/rstudio-2022.02.0-443'
Comment 138 Silvio 2022-04-02 15:44:14 UTC
It seems to me that in the repo there aren't patch files (neither patches directory)
Comment 139 Adam Wenocur 2022-04-02 17:23:15 UTC
(In reply to Silvio from comment #138)
> It seems to me that in the repo there aren't patch files (neither patches
> directory)

Have you checked the permissions? The ebuild directory should be readable by portage.

The patch files are present here:

https://github.com/awenocur/asw-custom-software-gentoo/tree/master/sci-mathematics/rstudio/files
Comment 140 Silvio 2022-04-02 20:24:38 UTC
(In reply to Adam Wenocur from comment #139)
> (In reply to Silvio from comment #138)
> > It seems to me that in the repo there aren't patch files (neither patches
> > directory)
> 
> Have you checked the permissions? The ebuild directory should be readable by
> portage.
> 
> The patch files are present here:
> 
> https://github.com/awenocur/asw-custom-software-gentoo/tree/master/sci-
> mathematics/rstudio/files

You're right, I don't know how but files directory didn't have the e(x)ecution authorisation for (g)roup and (o)ther.
Everything goes well. 
Thank you for your wonderful job.
When you'll have a server version to test I'm here.
Comment 141 Alessandro Barbieri 2022-04-02 21:10:44 UTC
> The builds for RStudio in my personal overlay have used EAPI 7 for awhile.
> Are you referring to another ebuild that needs to be upgraded?

some rstudio dependencies are stuck with EAPI 5
Comment 142 Adam Wenocur 2022-04-03 02:11:24 UTC
(In reply to Alessandro Barbieri from comment #141)
> > The builds for RStudio in my personal overlay have used EAPI 7 for awhile.
> > Are you referring to another ebuild that needs to be upgraded?
> 
> some rstudio dependencies are stuck with EAPI 5

OK; I can follow what you posted above; do you have a comprehensive list? I can start updating them in my personal overlay and work toward making them worthy of pull requests.
Comment 143 François Valenduc 2022-04-03 13:04:38 UTC
I managed to get the server working with the following steps:

I took the CreateTables.sqilte form the github tree (it is in this directory: src/cpp/server/db) and copied it to /usr/db. This allows the server to start but it doesn't work yet.

I created 3 symbolic in /usr/share/rstudio/bin: r_ldpath, rserver-pam and rsession (all these files are in /usr/bin).

After that, I can login to rstudio server and run R code.
Comment 144 Silvio 2022-04-03 16:45:52 UTC
(In reply to François Valenduc from comment #143)

> I took the CreateTables.sqilte form the github tree (it is in this
> directory: src/cpp/server/db) and copied it to /usr/db. This allows the
> server to start but it doesn't work yet.

Which github repo? Can you write the link?
Comment 145 François Valenduc 2022-04-03 18:28:39 UTC
The official git tree for rstudio here: https://github.com/rstudio/rstudio
Comment 146 Alessandro Barbieri 2022-04-03 18:46:00 UTC
In the meanwhile someone bumped the packages.
Major issue remains: https://bugs.gentoo.org/818658
Comment 147 jgenco 2022-04-03 19:14:33 UTC
I been working on a rstudio ebuild with server and quarto-cli support. I posted the ebuilds at https://github.com/jgenco/jgenco-overlay.
I kinda new to this so I hope it works
Comment 148 Silvio 2022-04-03 19:58:54 UTC
(In reply to François Valenduc from comment #143)
> I managed to get the server working with the following steps:
> 
> I took the CreateTables.sqilte form the github tree (it is in this
> directory: src/cpp/server/db) and copied it to /usr/db. This allows the
> server to start but it doesn't work yet.
> 
> I created 3 symbolic in /usr/share/rstudio/bin: r_ldpath, rserver-pam and
> rsession (all these files are in /usr/bin).
> 
> After that, I can login to rstudio server and run R code.

It worked as a charm for me.
Thanks a lot.
(I have not r_ldpath, so I skipped the ln -s for that one, and I had no problem)
Comment 149 Silvio 2022-04-03 20:10:37 UTC
(In reply to Silvio from comment #148)
> (In reply to François Valenduc from comment #143)
> > I managed to get the server working with the following steps:
> > 
> > I took the CreateTables.sqilte form the github tree (it is in this
> > directory: src/cpp/server/db) and copied it to /usr/db. This allows the
> > server to start but it doesn't work yet.
> > 
> > I created 3 symbolic in /usr/share/rstudio/bin: r_ldpath, rserver-pam and
> > rsession (all these files are in /usr/bin).
> > 
> > After that, I can login to rstudio server and run R code.
> 
> It worked as a charm for me.
> Thanks a lot.
> (I have not r_ldpath, so I skipped the ln -s for that one, and I had no
> problem)

Now it has to create all .conf files in /etc
Comment 150 Silvio 2022-04-04 06:20:33 UTC
(In reply to Silvio from comment #149)
> (In reply to Silvio from comment #148)
> > (In reply to François Valenduc from comment #143)
> > > I managed to get the server working with the following steps:
> > > 
> > > I took the CreateTables.sqilte form the github tree (it is in this
> > > directory: src/cpp/server/db) and copied it to /usr/db. This allows the
> > > server to start but it doesn't work yet.
> > > 
> > > I created 3 symbolic in /usr/share/rstudio/bin: r_ldpath, rserver-pam and
> > > rsession (all these files are in /usr/bin).
> > > 
> > > After that, I can login to rstudio server and run R code.
> > 
> > It worked as a charm for me.
> > Thanks a lot.
> > (I have not r_ldpath, so I skipped the ln -s for that one, and I had no
> > problem)
> 
> Now it has to create all .conf files in /etc

I created rserver.conf in /etc/rstudio as in:

https://support.rstudio.com/hc/en-us/articles/200552316-Configuring-RStudio-Workbench-RStudio-Server

but it ignores my configuration (even after restarting of course). 
In particular it doesn't bind to every IP but just on 127.0.0.1 (localhost)

I tried even to change the port to 80, but nothing changes. It answers always to 8787.
Comment 151 Adam Wenocur 2022-04-04 13:34:03 UTC
(In reply to François Valenduc from comment #143)
> I managed to get the server working with the following steps:

Thanks for looking into this. I can now make the ebuild fix those paths.
Comment 152 Adam Wenocur 2022-04-04 13:35:25 UTC
(In reply to Silvio from comment #150)
> but it ignores my configuration (even after restarting of course). 
> In particular it doesn't bind to every IP but just on 127.0.0.1 (localhost)
> 
> I tried even to change the port to 80, but nothing changes. It answers
> always to 8787.

This is something that should be traceable in the C++ code; I've had to do the same for fixing hard-coded pathnames; isolating where it reads the config parameters should be no different.
Comment 153 Silvio 2022-04-04 14:33:51 UTC
(In reply to Adam Wenocur from comment #152)
> (In reply to Silvio from comment #150)
> > but it ignores my configuration (even after restarting of course). 
> > In particular it doesn't bind to every IP but just on 127.0.0.1 (localhost)
> > 
> > I tried even to change the port to 80, but nothing changes. It answers
> > always to 8787.
> 
> This is something that should be traceable in the C++ code; I've had to do
> the same for fixing hard-coded pathnames; isolating where it reads the
> config parameters should be no different.

I tried with command line:

# rserver --www-address 0.0.0.0  --www-port 80

and it works perfectly. So I think it is something easy to fix.


To give you all  informations, I give you the output of the following command:

# rserver verify-installation

TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/home/silvio/.config/kdedefaults:/etc/xdg/rstudio/logging.conf'. Logging to '/var/log/rstudio/rstudio-server/rserver.log'.
too many positional options have been specified on the command line
WARNINGS: The option 'auth-pam-requires-priv' is deprecated and will be discarded.
Comment 154 Silvio 2022-05-24 09:51:32 UTC
Any news?
Comment 155 Larry the Git Cow gentoo-dev 2022-07-22 22:21:06 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9d5fc19de9f6ba9a6e9982f61f2c7518f058de1

commit a9d5fc19de9f6ba9a6e9982f61f2c7518f058de1
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-22 22:20:47 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-22 22:20:47 +0000

    profiles: last-rite sci-mathematics/rstudio, dev-haskell/pandoc-citeproc
    
    Bug: https://bugs.gentoo.org/766294
    Bug: https://bugs.gentoo.org/775545
    Bug: https://bugs.gentoo.org/855197
    Bug: https://bugs.gentoo.org/727912
    Bug: https://bugs.gentoo.org/831868
    Bug: https://bugs.gentoo.org/696938
    Bug: https://bugs.gentoo.org/531996
    Bug: https://bugs.gentoo.org/836111
    Bug: https://bugs.gentoo.org/818721
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 156 Silvio 2022-08-06 16:39:46 UTC
It needs to be finished.
Today I got this message:

!!! The following installed packages are masked:
- sci-mathematics/rstudio-2022.02.0.443::localrepo (masked by: package.mask)
/var/db/repos/gentoo/profiles/package.mask:
# Sam James <sam@gentoo.org> (2022-07-22)
# Severely broken, unbuildable with modern glibc, several versions out of date,
# needs a big rework. Bugs #766294, #775545, #855197, #727912, #831868, #696938,
# and #531996, #836111, #818721. Removal on 2022-08-22.

We cannot think not to have rstudio ... I'll be forced to change distro after more than 10 years ... :-(
Comment 157 Silvio 2022-08-06 16:40:34 UTC
Moreover this ebuild works fine ... why do not publish it?
Comment 158 John Dough 2022-08-18 06:53:28 UTC
has there been any attempt to find a new maintainer of rstudio. This is an important package yet the version in portage is masked and has not been updated in over 2 years.
Comment 159 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-19 04:04:18 UTC
(In reply to John Dough from comment #158)
> has there been any attempt to find a new maintainer of rstudio. This is an
> important package yet the version in portage is masked and has not been
> updated in over 2 years.

That's exactly what it being masked is for. But yes, I've asked some people a good few times.
Comment 160 Adam Wenocur 2022-08-19 13:09:31 UTC
I may be qualified to maintain this package in the future; that will happen only once I have an updated version ready for a PR, with full Quarto support.

At this time, I'm still on the learning curve for builds including Quarto, and need the time to clean up other cruft in the builds linked from this thread.
Comment 161 Larry the Git Cow gentoo-dev 2022-08-21 21:32:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07ccc989339f75ab648ede0419e498527901d463

commit 07ccc989339f75ab648ede0419e498527901d463
Author:     Jakov Smolić <jsmolic@gentoo.org>
AuthorDate: 2022-08-21 21:10:32 +0000
Commit:     Jakov Smolić <jsmolic@gentoo.org>
CommitDate: 2022-08-21 21:31:00 +0000

    sci-mathematics/rstudio: treeclean
    
    Closes: https://bugs.gentoo.org/766294
    Closes: https://bugs.gentoo.org/696938
    Closes: https://bugs.gentoo.org/531996
    Closes: https://bugs.gentoo.org/818721
    Closes: https://bugs.gentoo.org/727912
    Closes: https://bugs.gentoo.org/836111
    Closes: https://bugs.gentoo.org/831868
    Closes: https://bugs.gentoo.org/855197
    Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>

 profiles/package.mask                              |   6 -
 sci-mathematics/rstudio/Manifest                   |   2 -
 sci-mathematics/rstudio/files/rsession.conf        |  26 ---
 .../rstudio/files/rstudio-1.0.44-systemd.patch     |  21 --
 .../files/rstudio-1.2.1335-linker_flags.patch      |  11 -
 .../files/rstudio-1.2.5042-boost-1.73.0.patch      |  22 --
 .../rstudio/files/rstudio-1.3.1056-R-4.0.0.patch   |  58 -----
 .../files/rstudio-1.3.1056-boost-1.74.0.patch      |  30 ---
 .../files/rstudio-1.3.1093-boost-1.76.patch        |  55 -----
 .../rstudio/files/rstudio-1.3.959-core.patch       | 184 ----------------
 .../files/rstudio-1.3.959-pandoc-mathjax.patch     |  42 ----
 .../rstudio/files/rstudio-1.3.959-paths.patch      | 118 -----------
 .../rstudio/files/rstudio-1.3.959-prefs.patch      |  68 ------
 .../rstudio-1.3.959-qtsingleapplication.patch      |  60 ------
 sci-mathematics/rstudio/files/rstudio-server.conf  |  35 ----
 sci-mathematics/rstudio/files/rstudio-server.initd |  19 --
 .../rstudio/files/rstudio-server.service.in        |  11 -
 sci-mathematics/rstudio/metadata.xml               |  18 --
 sci-mathematics/rstudio/rstudio-1.3.1093-r1.ebuild | 233 ---------------------
 19 files changed, 1019 deletions(-)
Comment 162 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-21 21:36:01 UTC
Repurposing bug for restoration if/when an ebuild is done.
Comment 163 Neil 2022-08-22 19:49:11 UTC
Its not compiling for source but for those who need (or just really, really want to use RStudio under Gentoo) what about coming up with an rstudio-bin based on the provided deb/Fedora/OpenSUSE binaries?

I use RStudio occasionally for work (under Arch) but wouldn't mind playing/exploring with it a bit more at home where I run Gentoo.
Comment 164 Thomas Bettler 2022-08-22 20:18:03 UTC
(In reply to Neil from comment #163)
> Its not compiling for source but for those who need (or just really, really
> want to use RStudio under Gentoo) what about coming up with an rstudio-bin
> based on the provided deb/Fedora/OpenSUSE binaries?
> 
> I use RStudio occasionally for work (under Arch) but wouldn't mind
> playing/exploring with it a bit more at home where I run Gentoo.

it's compiling fine here...
using https://github.com/gentoo/gentoo/files/9299437/rstudio-2022.02.0.443.tar.gz
see https://github.com/gentoo/gentoo/pull/19865
Comment 165 John Dough 2022-09-15 03:55:14 UTC
This process is taking far too long to get this important package back into portage, so until we get a proper ebuild back into portage is it at least possible to adopt a binary build? Rstudio releases  debian and rpm binaries of the application. I know that it's not the Gentoo way but until we find a suitable replacement can we add the binary to portage? Doesn't gentoo have the ability to use rpms and or deb packages?

https://www.rstudio.com/products/rstudio/download/#download
Comment 166 Neil 2022-09-15 21:11:50 UTC
That is what I suggested two posts up, the post in response prior to yours suggests a working ebuild to compile from source is close.

If you are able to contribute to that (e.g. testing) great, if you want to write a rstudio-bin.ebuild you can do (I'm too busy with work/family to get stuck in and learn myself).
Comment 167 Mark Wright gentoo-dev 2022-10-27 07:54:10 UTC
Created attachment 825603 [details]
rstudio-2022.07.2.576.ebuild

I was working on trying to fix and bump rstudio when it was package masked. My dev machine, a first generation core i7, hung. I had to build another dev machine. I manage to compile it with no errors. Starting rstudio is briefly draws its workspace, then blanks the screen and hangs. There are over 94000 hits in google for rstudio blank screen linux. This happens with both wayland dwl and X11 xmonad. I have tried lots of things, I can not get it to work.
Comment 168 Mark Wright gentoo-dev 2022-10-27 09:56:00 UTC
Created attachment 825621 [details]
rstudio-2022.07.2.576.ebuild

Use rstudio-2022.07.2.576-resource-paths.patch,-DRSTUDIO_DESKTOP=TRUE
Comment 169 Mark Wright gentoo-dev 2022-10-27 09:57:20 UTC
Created attachment 825623 [details, diff]
rstudio-2022.07.2.576-resource-paths.patch
Comment 170 Mark Wright gentoo-dev 2022-10-27 09:58:00 UTC
Created attachment 825625 [details, diff]
rstudio-2022.07.2.576-ant-system-node.patch
Comment 171 Mark Wright gentoo-dev 2022-10-27 09:58:43 UTC
Created attachment 825627 [details, diff]
rstudio-2022.07.2.576-cmake-bundled-dependencies.patch
Comment 172 Mark Wright gentoo-dev 2022-10-27 10:00:52 UTC
Created attachment 825629 [details, diff]
rstudio-1.2.1335-linker_flags.patch
Comment 173 Mark Wright gentoo-dev 2022-10-27 10:01:33 UTC
Created attachment 825631 [details, diff]
rstudio-2022.07.2.576-qtsingleapplication.patch
Comment 174 Mark Wright gentoo-dev 2022-10-27 10:02:11 UTC
Created attachment 825633 [details, diff]
rstudio-2022.07.2.576-fmt.patch
Comment 175 Mark Wright gentoo-dev 2022-10-27 10:02:46 UTC
Created attachment 825635 [details, diff]
rstudio-2022.07.2.576-systemd.patch
Comment 176 Mark Wright gentoo-dev 2022-10-27 10:03:48 UTC
Created attachment 825637 [details, diff]
rstudio-2022.07.2.576-soci-cmake-find_library.patch
Comment 177 Mark Wright gentoo-dev 2022-10-27 10:29:56 UTC
dev-libs/soci-4.0.3 is in some overlays:
http://gpo.zugaina.org/dev-db/soci/RDep

Qt was removed in rstudio development in Sep 2022:

  https://github.com/rstudio/rstudio/issues/12050
  Crash on latest Rstudio startup with Arch-derivative Linux #12050
  Closed
  bshor opened this issue 12 days ago · 3 comments

  jmcphers commented 12 days ago
  RStudio doesn't officially support the IDE on Arch Linux, nor do we contribute
  to or maintain the Arch Linux RStudio packages. So we may not be able to help
  here.

  That said, I noticed that these errors are coming from Qt, which we have
  recently removed. Would you be willing to try one of the daily builds to see
  if the problem still occurs?

Since Qt is removed from the rstudio repo I assume it is not really supported anymore. It would be difficult to package the electron build of rstudio. There is no mention of electron in the RStudio 2022.07.2+576 release notes, hence I assume that electron is experimental.

rstudio-2022.07.2.576 draws the screen with workspaces for a fraction of a second then hangs on both wayland gui-wm/dwl and X11 x11-wm/xmonad.
Comment 178 Maksim Fomin 2022-10-27 19:13:29 UTC
If Qt is not supported and election is experimental, does it mean that RStudio GUI is essentially not supported on linux?
Comment 179 Thomas Bettler 2022-10-27 21:14:10 UTC
(In reply to Mark Wright from comment #167)
> Created attachment 825603 [details]
> rstudio-2022.07.2.576.ebuild
> 
> I was working on trying to fix and bump rstudio when it was package masked.
> My dev machine, a first generation core i7, hung. I had to build another dev
> machine. I manage to compile it with no errors. Starting rstudio is briefly
> draws its workspace, then blanks the screen and hangs. There are over 94000
> hits in google for rstudio blank screen linux. This happens with both
> wayland dwl and X11 xmonad. I have tried lots of things, I can not get it to
> work.


2022.02.0.443 is compiling and starting fine here...
give it a go using https://github.com/gentoo/gentoo/files/9299437/rstudio-2022.02.0.443.tar.gz
see https://github.com/gentoo/gentoo/pull/19865
Comment 180 Thomas Bettler 2022-10-28 06:18:55 UTC
it even works fine with rstudio-2022.07.2.576.ebuild
Comment 181 Maksim Fomin 2022-10-31 18:31:38 UTC
ebuild 2022.02.0.443 does not work for me if updated to recent version - I have some patch hunk fails. However, it may be easy to fix them ...
Comment 182 Silvio 2022-10-31 21:00:38 UTC
(In reply to Thomas Bettler from comment #180)
> it even works fine with rstudio-2022.07.2.576.ebuild

It works for me too.
Just this message on the bottom:
Quarto CLI version is installed, however RStudio requires version 0.9.230. Please update to the latest version at 
https://quarto.org/docs/getting-started/installation.html
Comment 183 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-03 16:25:05 UTC
*** Bug 879355 has been marked as a duplicate of this bug. ***
Comment 184 Silvio 2022-11-24 10:57:21 UTC
Is there any chance to have this ebuild soon in portage?
Comment 185 Mark Wright gentoo-dev 2022-11-29 06:10:06 UTC
(In reply to Silvio from comment #184)
> Is there any chance to have this ebuild soon in portage?
Based on the earlier rstudio ebuilds and the work done in:

  rstudio bump to 1.4.1106 #19865
  https://github.com/gentoo/gentoo/pull/19865

I created the rstudio-2022.07.2.576.ebuild, with the intent to merge
#19865 and bump it to 2022.07.2.576. rstudio 2022.07.2.576 appears to be
the last version with support for Qt. As Qt was removed from rstudio
in September 2022:

  https://github.com/rstudio/rstudio/issues/12050
  "Crash on latest Rstudio startup with Arch-derivative Linux #12050
  Closed
  bshor opened this issue on Sep 29 

  jmcphers commented on Sep 29
  RStudio doesn't officially support the IDE on Arch Linux, nor do we contribute
  to or maintain the Arch Linux RStudio packages. So we may not be able to help
  here.

  That said, I noticed that these errors are coming from Qt, which we have
  recently removed."

rstudio does not support building electron from the source code or using
a system installed version of electron:

  https://github.com/rstudio/rstudio/issues/9148
  "Support building to use system version of Electron #9148

  gtritchie commented on 14 Dec 2021
  Closing this; Electron is installed purely via npm/yarn, into the project tree
  just like any other npm-based package. So this issue doesn't really make
  sense."

This means that an electron binary is installed via npm/yarn. I can not fix
any security bugs or bugs in a binary.

There was brief glimmer of hope when a Tauri build of rstudio was added to the
Cherry Blossom rstudio milestone. As I believed I could build a Tauri build
of rstudio from the source code, there is good support in the cargo.eclass
for building Rust progams in Gentoo, where all the crates are added to
SRC_URI to build with FEATURES=network-sandbox, which is a requirement for
Gentoo.

However the Tauri build was then removed from the Cherry Blossom milestone
and the issue closed as completed, in reality it is rejected:

  Migrate RStudio from Electron to Tauri #12230
  https://github.com/rstudio/rstudio/issues/12230

In summary I assume:

There is no support from upstream for compiling with Qt 6 or Qt 5,
as Qt is removed from the rstudio source code.

There is no support from upstream for compiling electron from the
source code, using the system electron, or compiling or running rstudio
on anything other than the rstudio supported Linux distributions:

https://posit.co/about/platform-support/#linux

There is no intention from upstream to migrate rstudio from Electron to
Tauri.

rstudio has always been an extremely difficult ebuild to maintain on Gentoo.
Upstream's decision to make rstudio an electron app makes it even more
difficult.

If I managed to patch rstudio to compile with Qt 6 this might fix the
current problem: rstudio-2022.07.2.576 draws the screen with workspaces
for a fraction of a second then hangs on both wayland gui-wm/dwl and
X11 x11-wm/xmonad. My theory is this a problem in
dev-qt/qtwebengine-5.15.5_p20220618

But then I could not upstream the Qt 6 patch as upstream have removed
support for Qt. The Gentoo rstudio version could never be updated,
as it is too difficult, and no support from upstream, to build the
rstudio electron version from the source code.
Comment 186 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-29 06:38:10 UTC
Thanks for the summary. That's really unfortunate (and not very considerate of them :(. What about a binary package?
Comment 187 Silvio 2022-11-29 21:12:21 UTC
Is seems to me that for Electron there is the source code
https://github.com/electron/electron

And rstudio explains how to compile with Electron:
https://github.com/rstudio/rstudio/wiki/Electron-Desktop

but I'm not an Expert.

However for me rstudio-2022.07.2.576 works fine, so why we cannot put it on portage?
Comment 188 Thomas Bettler 2022-11-30 05:50:39 UTC
https://gpo.zugaina.org/dev-util/electron
Comment 189 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-30 06:04:46 UTC
(In reply to Silvio from comment #187)
> Is seems to me that for Electron there is the source code
> https://github.com/electron/electron
> 
> And rstudio explains how to compile with Electron:
> https://github.com/rstudio/rstudio/wiki/Electron-Desktop
> 
> but I'm not an Expert.
> 
> However for me rstudio-2022.07.2.576 works fine, so why we cannot put it on
> portage?

Because it's not *just* Electron and it has dependencies in node which you can't easily get while sandboxed. As for that version: because it's out of date and then we'll be in the same situation again.
Comment 190 Mark Wright gentoo-dev 2022-12-07 11:13:47 UTC
Created attachment 840597 [details]
rstudio-2022.07.2.576-qtwebengine-5.15.7_p20221122-stack-trace.txt

This is the stack trace from rstudio-2022.07.2.576 rstudio --single-process crashing on startup with dev-qt/qtwebengine-5.15.7_p20221122. The --single-process just makes it easier to obtain the stack trace. Without it, the qtwebengine process crashes and the rstudio process hangs. This occurs on both X11 and wayland. This stack trace is on X11 under xmonad, its the same on wayland under gui-wm/dwl from the guru overlay.

rstudio-2022.07.2.576 rstudio runs and seems to work with dev-qt/qtwebengine-5.15.7_p20221122 compiled with the debug USE flag. I do not know how to obtain the qtwebengine debug trace. There is a DCHECK on the line above the crash:

  for (wtf_size_t i = 0; i < cancel_running_animation_flags.size(); i++) {
    if (cancel_running_animation_flags[i]) {
      DCHECK(css_animations && !is_animation_style_change);
      update.CancelAnimation(
          i, *css_animations->running_animations_[i]->animation);
    }
  }

The attached stack trace is from the qtwebengine ebuild hacked to compile release mode with -g2 debug symbols.

https://fedoraproject.org/wiki/Electron
"Despite being open-source, electron is not in the official repositories of Fedora"

With no electron in Fedora, I wonder what they will do with the electron rstudio.

I prefer to build it from the source code, at least then it is possible to obtain a stack trace.
Comment 191 François Valenduc 2022-12-20 18:52:59 UTC
For those who are tired of waiting for the return of rstudio in portage, just use the jgenco repository (see comment #147). The latest version is available (2022.12.0-353) and work for both desktop (with electron) and server.