metrumresearchgroup / mrgsolve

Simulate from ODE-based population PK/PD and QSP models in R
https://mrgsolve.org
GNU General Public License v2.0
131 stars 36 forks source link

Old/New System Issue - can't find 'make' #1226

Closed AndrewHeitmanSagerRx closed 2 months ago

AndrewHeitmanSagerRx commented 3 months ago

Running R v4.4 - I get the following error when I try to compile the code for simulation:

---:: stderr ::--------------------------------------------- Error in system(paste(MAKE, p1(paste("-f", shQuote(makefiles))), "compilers"), : 'make' not found Calls: -> .shlib_internal -> system Execution halted

Error: the model build step failed.

I have tried previous suggestions and getting the PATH redone, and it doesn't seem to work with the RTools fix.

kylebaron commented 3 months ago

Hi @AndrewHeitmanSagerRx -

It looks like it still can't find Rtools. Can you let me know what happens with

pkgbuild::has_build_tools()

You'd have to install pkgbuild if not already there.

Thanks, Kyle

AndrewHeitmanSagerRx commented 3 months ago

Hi Kyle,

I installed pkgbuild and ran the code. I get the output:

[1] TRUE

-A


From: Kyle Baron @.> Sent: Thursday, August 29, 2024 11:23 AM To: metrumresearchgroup/mrgsolve @.> Cc: Andrew Heitman @.>; Mention @.> Subject: Re: [metrumresearchgroup/mrgsolve] Old/New System Issue - can't find 'make' (Issue #1226)

Hi @AndrewHeitmanSagerRxhttps://github.com/AndrewHeitmanSagerRx -

It looks like it still can't find Rtools. Can you let me know what happens with

pkgbuild::has_build_tools()

You'd have to install pkgbuild if not already there.

Thanks, Kyle

— Reply to this email directly, view it on GitHubhttps://github.com/metrumresearchgroup/mrgsolve/issues/1226#issuecomment-2318106275, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BK4D7WV6NXIGR5MCYNEUYCDZT44GXAVCNFSM6AAAAABNKUQOKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJYGEYDMMRXGU. You are receiving this because you were mentioned.Message ID: @.***>

Notice of Confidentiality

This communication is intended only for use by authorized recipients and may be confidential, legally protected, or privileged. If you are not the intended recipient or have no authorized use of this information, please delete it. You are hereby notified that any disclosure, copying, distribution or action in relation to the contents of this information is strictly prohibited and may be unlawful.

kylebaron commented 3 months ago

Thanks; I wonder if that's just telling us that the tools are there (we know that already). But I think the problem is really path-related.

If you want to start back and forth to try to figure this out, I'd be happy to do it with you. Stuff like

Sys.getenv("PATH")
Sys.which("make")

That sort of thing; if we surface enough info might be able to figure it out.

AndrewHeitmanSagerRx commented 3 months ago

That would be great.

Sys.getenv("PATH") looks like its pointed at my rtools44 directory.

But Im not sure this is right:

Sys.which("make") make ""

@.***

Andrew Heitman, Ph.D.

Associate Director, Clinical Pharmacology

o: (617) 500-7212

215 First Street, Suite 220, Cambridge, MA 02142

(He/Him)

www.sagerx.comhttp://www.sagerx.com/


From: Kyle Baron @.> Sent: Thursday, August 29, 2024 1:15 PM To: metrumresearchgroup/mrgsolve @.> Cc: Andrew Heitman @.>; Mention @.> Subject: Re: [metrumresearchgroup/mrgsolve] Old/New System Issue - can't find 'make' (Issue #1226)

Thanks; I wonder if that's just telling us that the tools are there (we know that already). But I think the problem is really path-related.

If you want to start back and forth to try to figure this out, I'd be happy to do it with you. Stuff like

Sys.getenv("PATH") Sys.which("make")

That sort of thing; if we surface enough info might be able to figure it out.

— Reply to this email directly, view it on GitHubhttps://github.com/metrumresearchgroup/mrgsolve/issues/1226#issuecomment-2318415959, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BK4D7WQUEPW57UKE73MO7RDZT5JJXAVCNFSM6AAAAABNKUQOKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJYGQYTKOJVHE. You are receiving this because you were mentioned.

Notice of Confidentiality

This communication is intended only for use by authorized recipients and may be confidential, legally protected, or privileged. If you are not the intended recipient or have no authorized use of this information, please delete it. You are hereby notified that any disclosure, copying, distribution or action in relation to the contents of this information is strictly prohibited and may be unlawful.

kylebaron commented 3 months ago

I think that's the rub; Sys.getenv("PATH") might be including the rtools44 install, but R can't find make; this is why the build is not working. Can you share $PATH up to the rtools location? I don't know where else to go with this except that either (1) the path is wrong or (2) the path is getting overwritten when you send out to run a system command.

AndrewHeitmanSagerRx commented 3 months ago

"c:/rtools44/x86_64-w64-mingw32.static.posix/bin;c:/rtools44/usr/bin;..."

Is this enough?

@.***

Andrew Heitman, Ph.D.

Associate Director, Clinical Pharmacology

o: (617) 500-7212

215 First Street, Suite 220, Cambridge, MA 02142

(He/Him)

www.sagerx.comhttp://www.sagerx.com/


From: Kyle Baron @.> Sent: Thursday, August 29, 2024 3:14 PM To: metrumresearchgroup/mrgsolve @.> Cc: Andrew Heitman @.>; Mention @.> Subject: Re: [metrumresearchgroup/mrgsolve] Old/New System Issue - can't find 'make' (Issue #1226)

I think that's the rub; Sys.getenv("PATH") might be including the rtools44 install, but R can't find make; this is why the build is not working. Can you share $PATH up to the rtools location? I don't know where else to go with this except that either (1) the path is wrong or (2) the path is getting overwritten when you send out to run a system command.

— Reply to this email directly, view it on GitHubhttps://github.com/metrumresearchgroup/mrgsolve/issues/1226#issuecomment-2318674902, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BK4D7WQCZOFZZESVNHQJCSDZT5XH7AVCNFSM6AAAAABNKUQOKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJYGY3TIOJQGI. You are receiving this because you were mentioned.Message ID: @.***>

Notice of Confidentiality

This communication is intended only for use by authorized recipients and may be confidential, legally protected, or privileged. If you are not the intended recipient or have no authorized use of this information, please delete it. You are hereby notified that any disclosure, copying, distribution or action in relation to the contents of this information is strictly prohibited and may be unlawful.

kylebaron commented 3 months ago

Yeah; as far as I can tell, the tools should be in c:/rtools44/usr/bin; if make.exe is in that folder (along with gcc etc) I think that should be correct.

This is from an older Rtools version, but it seems like the PATH information should still be valid. https://cloud.r-project.org/bin/windows/Rtools/rtools40.html

And Sys.which("make") should be an mrgsolve-independent way of checking R and the toolchain.

Screenshot 2024-08-29 at 14 29 50

I think if make.exe is under rtools44/usr/bin then you have to start looking into why R isn't finding that, despite being in the $PATH.

AndrewHeitmanSagerRx commented 2 months ago

Hey Kyle,

The RTools appears to be in the correct directory - I created a textfile (.Renviron) per the screenshot. MRGsolve still isnt finding the "make" comman.


From: Kyle Baron @.> Sent: Thursday, August 29, 2024 3:32 PM To: metrumresearchgroup/mrgsolve @.> Cc: Andrew Heitman @.>; Mention @.> Subject: Re: [metrumresearchgroup/mrgsolve] Old/New System Issue - can't find 'make' (Issue #1226)

Yeah; as far as I can tell, the tools should be in c:/rtools44/usr/bin; if make.exe is in that folder (along with gcc etc) I think that should be correct.

This is from an older Rtools version, but it seems like the PATH information should still be valid. https://cloud.r-project.org/bin/windows/Rtools/rtools40.html

And Sys.which("make") should be an mrgsolve-independent way of checking R and the toolchain.

Screenshot.2024-08-29.at.14.29.50.png (view on web)https://github.com/user-attachments/assets/2dfe56c9-182a-4715-a29f-62ff0488c167

I think if make.exe is under rtools44/usr/bin then you have to start looking into why R isn't finding that.

— Reply to this email directly, view it on GitHubhttps://github.com/metrumresearchgroup/mrgsolve/issues/1226#issuecomment-2318729318, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BK4D7WWUDZI5TNGYLFOD6ITZT5ZMTAVCNFSM6AAAAABNKUQOKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJYG4ZDSMZRHA. You are receiving this because you were mentioned.Message ID: @.***>

Notice of Confidentiality

This communication is intended only for use by authorized recipients and may be confidential, legally protected, or privileged. If you are not the intended recipient or have no authorized use of this information, please delete it. You are hereby notified that any disclosure, copying, distribution or action in relation to the contents of this information is strictly prohibited and may be unlawful.

AndrewHeitmanSagerRx commented 2 months ago

Actually! I got it to work! I just needed to create the .Renviron (correctly...whoops) and the reboot R.

Thank you, Kyle!


From: Kyle Baron @.> Sent: Thursday, August 29, 2024 3:32 PM To: metrumresearchgroup/mrgsolve @.> Cc: Andrew Heitman @.>; Mention @.> Subject: Re: [metrumresearchgroup/mrgsolve] Old/New System Issue - can't find 'make' (Issue #1226)

Yeah; as far as I can tell, the tools should be in c:/rtools44/usr/bin; if make.exe is in that folder (along with gcc etc) I think that should be correct.

This is from an older Rtools version, but it seems like the PATH information should still be valid. https://cloud.r-project.org/bin/windows/Rtools/rtools40.html

And Sys.which("make") should be an mrgsolve-independent way of checking R and the toolchain.

Screenshot.2024-08-29.at.14.29.50.png (view on web)https://github.com/user-attachments/assets/2dfe56c9-182a-4715-a29f-62ff0488c167

I think if make.exe is under rtools44/usr/bin then you have to start looking into why R isn't finding that.

— Reply to this email directly, view it on GitHubhttps://github.com/metrumresearchgroup/mrgsolve/issues/1226#issuecomment-2318729318, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BK4D7WWUDZI5TNGYLFOD6ITZT5ZMTAVCNFSM6AAAAABNKUQOKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJYG4ZDSMZRHA. You are receiving this because you were mentioned.

Notice of Confidentiality

This communication is intended only for use by authorized recipients and may be confidential, legally protected, or privileged. If you are not the intended recipient or have no authorized use of this information, please delete it. You are hereby notified that any disclosure, copying, distribution or action in relation to the contents of this information is strictly prohibited and may be unlawful.

kylebaron commented 2 months ago

Thanks for following up, @AndrewHeitmanSagerRx. Glad you got it working.

For future reference: mrgsolve doesn't need to find make or anything else in that toolchain. mrgsolve calls R CMD SHLIB and R needs to find that stuff. So what we need to do in this case is connect R and the toolchain. None of this runs through mrgsolve. None.