r-hub / rhub2

The 'R-hub' package builder, v2
Other
41 stars 3 forks source link

Platform macos has disappeared. #12

Closed rolfTurner closed 10 months ago

rolfTurner commented 11 months ago

I need to build a Mac OSX binary for a user of the deldir package. But there is no longer any trace of "macos" when I execute platforms().

Earlier today (NZ time) I thought I saw mention of this problem on github, indicating that macos builds were suspended because they were not working, But I can no longer find anything about this. There is nothing that I can see in "Issues".

Did I imagine seeing this mention?

Will macos builds come back to life?

gaborcsardi commented 11 months ago

You can try the https://github.com/r-hub/rhub2 package.

rolfTurner commented 11 months ago

I was able to install rhub2 using

remotes::install_github("r-hub/rhub2",lib="/home/rolf/Rlib")

but was unable to comprehend the syntax.

I tried

rhub_check("deldir_1.0-11.tar.gz",platform=NULL)

hoping to be offered a choice of platforms, but got an error:

Error in lapply(text, glue_cmd, .envir = .envir) at bullets.R:55:3: ! Could not evaluate cli {} expression: x. Caused by error in eval(expr, envir = envir) at inline.R:311:7: ! object 'x' not found Type .Last.error to see the more details.

Typing ".Last.error" produced output that was completely opaque to me.

Any other suggestions?

gaborcsardi commented 11 months ago

Please read the docs at https://github.com/r-hub/rhub2#readme

rolfTurner commented 11 months ago

I'd like to make sure that I am understanding the docs correctly. It would appear that in order for me to build a package binary, using rhub2, I must create a github repository to hold the package in question, and upload the package to that repository.

Is this correct?

That is I CANNOT build a binary from a source tarball that is located on my own computer. Correct?

rolfTurner commented 11 months ago

Well, I just ploughed on ahead and created a github repository (at least I think did!) and placed (via "git push") all of the content of the deldir package in this repository.

The URL is https://github.com/rolfTurner/deldir

I believe that anyone who is interested can look at this repository, and tell me what I have done wrong.

I then started R on my laptop, loaded the library rhub2 and executed

rhub_check("https://github.com/rolfTurner/deldir")

I was given a list of platforms, and selected "2" ("macos"). The response I got was

Error in rhub_check("https://github.com/rolfTurner/deldir"): ! :( Failed to start check: Not Found. ℹ If you think this is a bug in the rhub2 package, please open an issues at https://github.com/r-hub/rhub/issues. Type .Last.error to see the more details.

One is inclined to wonder: what was Not Found? The contents of .Last.error were:

Backtrace:

  1. rhub2::rhub_check("https://github.com/rolfTurner/deldir")
  2. rhub2:::throw(pkg_error(":( Failed to start check: {resp$content$message}.", … at check.R:111:5

Clearly I am completely misunderstanding the protocol. I haven't a clue as to what I should be doing. Can anyone enlighten me?

gaborcsardi commented 11 months ago

You need to follow the Setup section in the README.

rolfTurner commented 11 months ago

Whoops. I did indeed neglect to do that. That was stupid.

I think I have now followed the Setup instructions correctly. I next did

git add .github/workflows/rhub.yaml.

and then did

git push

To my complete frustration I then got the prompt

Username for 'https://github.com': 

This did not happen before (i.e. before I did the setup procedure). And of course it will not log me in with my username and github password. The system is supposed to use the "Git Credential Manager", is it not? That's what it seemed to be doing previously.

Fortunately I had saved my "Personal Access Token" that I had needed to create, yesterday, in a file, and I was able to copy and paste that in, in response to the password prompt. Mirabile dictu, that seemed to work!!! I then did the rhub2::rhub_doctor() bit, which said I was good to go, and then rhub2::rhub_check(). I then found my way (can't actually remember how) to a page where progress seemed to get reported.

After a nerve-wracking wait, where nothing seemed to be happening, it appeared to announce that the job was ("all jobs" were) completed. "Success" was indicated at the top of the page.

But where is the binary package that I wanted to build? Going by previous experience with the rhub package, I might have guessed that it would be found under "Artifacts", but there is nothing under Artifacts.

What do I do now?

gaborcsardi commented 11 months ago

You can run rhub2::rhub_doctor() to check if everything is set up correctly.

You can also try gitcreds::gitcreds_get() to see if your personal access token is set up.

If you are on Linux, then you may need to set a credential helper, e.g.

git config --global credential.helper store

and then from R

gitcreds::gitcreds_set()

to add the token.

rolfTurner commented 11 months ago

Where, if anywhere, can I find the macos binary package that I was trying to create?

rolfTurner commented 11 months ago

I repeat: Where, if anywhere, can I find the macos binary package that I was trying to create? If this is not possible, can you confirm that it is not possible?

rolfTurner commented 11 months ago

Why am I not getting a response to the foregoing question? Is the question just too stupid to contemplate? If so, I am sorry, but I really don't understand.

Gabor, please answer.

rolfTurner commented 10 months ago

Apparently it is not possible to produce a binary package using rhub2.

A friend guided me through a rather complicated procedure, using "Github Actions". rather than using rhub2. The procedure creates a binary that runs under x86_64 architecture.

If one wants a binary that runs under arm64 architecture, then life is much simpler. It turns out that macOS builder kindly provided by Simon Urbanek

    <https://mac.r-project.org/macbuilder/submit.html>

works just like Win-Builder: it takes a source package, checks it and gives a binary package back.