GC does not detect R (Linux)

174 views
Skip to first unread message

holop...@gmail.com

unread,
Dec 4, 2016, 3:18:51 AM12/4/16
to golden-cheetah-users
Hi Everyone,

On my Arch Linux computer,  GC v.3.4GC fails to detect R (R Studio detects it fine).

 

I tried to see in Rembed how the detection was done, but this is above my skill level..


If this helps, export returns no R-related environment variables.


Thanks!


Liam

Mark Liversedge

unread,
Dec 4, 2016, 3:27:11 AM12/4/16
to golden-cheetah-users
Check of R is enabled in options since it gets disabled if R is not found the first time you run.

If that doesn't work (after a restart) then you will need to specify R home. In R studio console (bottom left) type:
> R.home

The returned result can be used in options to specify the R installation.

Mark

On Sunday, 4 December 2016 08:18:51 UTC:

holop...@gmail.com

unread,
Dec 4, 2016, 6:05:32 AM12/4/16
to golden-cheetah-users
Hi Mark,

I'm running build 3950 on both windows and linux, per the Help/About GC menus. The options windoes seem different.

In the options window on linux, there is only one lign to be checked or unckecked ("warn unsaved activities"), whereas on windows you have 2 more: "enable API webservices" and "Enable R". At the botth, the last field is for the R Installation Directory on Windows, but for the "workout and videosync library".

I can see from the screencast you're on Gnome and therefore most likely linux, so one explanation is that I'm not pulling the right source files or build files?

Liam

Mark Liversedge

unread,
Dec 4, 2016, 6:09:40 AM12/4/16
to golden-cheetah-users
Not sure what the problem is, this hasn't changed for a month or so.
Should look like this:


Make sure R is enabled before specifing an installation location (leave that blank).
If it doesn't find R (its in a non-standard location) then you will need to set it (above is my example on OSX).

Mark

holop...@gmail.com

unread,
Dec 4, 2016, 6:37:26 AM12/4/16
to golden-cheetah-users
Hi Mark - here is what I see in the options windows. Is it possible I don't have the most recent version?
Screenshot from 2016-12-04 20-36-06.png

Mark Liversedge

unread,
Dec 4, 2016, 6:52:28 AM12/4/16
to golden-cheetah-users
You build your own?

You need to enable R in the builds (it is optional). You need to add:

DEFINES += GC_WANT_R


You will also need R_HOME set in the shell environment when building as qmake (via src.pro) invokes the R executable to set other settings for make. For example, on my MBP:

export R_HOME=/Library/Frameworks/R.framework/Resources
 
Mark

holop...@gmail.com

unread,
Dec 4, 2016, 7:21:21 AM12/4/16
to golden-cheetah-users
Yes, Arch Linux does not use debian packages.

I did:
export R_HOME=/usr/lib64/R
echo
"DEFINES +=GC_WANT_R" >> gcconfig.pri

The build fails with:
RTool.o: In function `RTool::pageSize(SEXPREC*, SEXPREC*)':
RTool.cpp:(.text+0x24): undefined reference to `rtool'
RTool.o: In function `RTool::athlete()':
RTool.cpp:(.text+0x214): undefined reference to `rtool'
RTool.o: In function `RTool::cancel()':
RTool.cpp:(.text+0x9a3): undefined reference to `rtool'
RTool.o: In function `RTool::configChanged()':
RTool.cpp:(.text+0xb48): undefined reference to `rtool'
RTool.o: In function `RTool::RTool()':
RTool.cpp:(.text+0xc67): undefined reference to `rtool'
RTool.o:RTool.cpp:(.text+0x148b): more undefined references to `rtool' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:1733: GoldenCheetah] Error 1

Rtools seems to be a windows package? https://cran.r-project.org/bin/windows/Rtools/

I need to sign off until tomorrow, and will return to this then.

Many thanks for your help.

Liam

Ale Martinez

unread,
Dec 4, 2016, 8:00:40 AM12/4/16
to golden-cheetah-users
El domingo, 4 de diciembre de 2016, 9:21:21 (UTC-3), holop...@gmail.com escribió:
Yes, Arch Linux does not use debian packages.

I did:
export R_HOME=/usr/lib64/R
echo
"DEFINES +=GC_WANT_R" >> gcconfig.pri

The build fails with:
RTool.o: In function `RTool::pageSize(SEXPREC*, SEXPREC*)':
RTool.cpp:(.text+0x24): undefined reference to `rtool'
RTool.o: In function `RTool::athlete()':
RTool.cpp:(.text+0x214): undefined reference to `rtool'
RTool.o: In function `RTool::cancel()':
RTool.cpp:(.text+0x9a3): undefined reference to `rtool'
RTool.o: In function `RTool::configChanged()':
RTool.cpp:(.text+0xb48): undefined reference to `rtool'
RTool.o: In function `RTool::RTool()':
RTool.cpp:(.text+0xc67): undefined reference to `rtool'
RTool.o:RTool.cpp:(.text+0x148b): more undefined references to `rtool' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:1733: GoldenCheetah] Error 1

Rtools seems to be a windows package? https://cran.r-project.org/bin/windows/Rtools/
rtool is a global variable defined on main.cpp conditional to  GC_WANT_R, probably you need to force main.cpp recompilation or just make clean;qmake;make on src folder.

holop...@gmail.com

unread,
Dec 4, 2016, 5:39:02 PM12/4/16
to golden-cheetah-users
Thanks ! Passing "--always-make" to make to ignore timestamps did the trick.

Thanks again for the help.

Liam

Mark Liversedge

unread,
Dec 4, 2016, 5:44:10 PM12/4/16
to golden-cheetah-users
On Sunday, 4 December 2016 22:39:02 UTC, holop...@gmail.com wrote:
Thanks ! Passing "--always-make" to make to ignore timestamps did the trick.

I tend to do something like:

$ touch `grep -l GC_WANT_R src/*/*.{cpp,h}`

To update the timestamps on source that references the symbol.

Mark 
Reply all
Reply to author
Forward
0 new messages