Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Oracle compiler (likely Solaris only) #3285

Closed
mattdowle opened this issue Jan 14, 2019 · 6 comments · Fixed by #3294
Closed

Error with Oracle compiler (likely Solaris only) #3285

mattdowle opened this issue Jan 14, 2019 · 6 comments · Fixed by #3294

Comments

@mattdowle
Copy link
Member

Email received from Prof Ripley :


As you will see from the CRAN results page, this newly fails to install
with the Oracle compiler. It does install with gcc but many of the
packages depending on segfault in their checks, in function gforce.

(This seems not to be showing currently: the nub is

/home/ripley/developerstudio12.6/bin/cc -xc99 
-I"/home/ripley/R/cc/include" -DNDEBUG   -I/usr/local/include  -xopenmp 
-KPIC  -O -xlibmieee -xlibmil -xtarget=native -xcache=generic -nofstore 
-c froll.c -o froll.o
"froll.c", line 114: left operand must be modifiable lvalue: op "="
"froll.c", line 149: left operand must be modifiable lvalue: op "="

which are inside OpenMP sections. Using a parallel install shows similar
issues in frollR, frolladaptive at least.)

@mattdowle mattdowle added this to the 1.12.2 milestone Jan 14, 2019
@mattdowle
Copy link
Member Author

mattdowle commented Jan 14, 2019

I didn't even know Oracle had a compiler let alone that CRAN uses it.

@mattdowle
Copy link
Member Author

It might be Solaris. The flavors spec shows Oracle compiler just for Solaris.
https://cran.r-project.org/web/checks/check_flavors.html#r-patched-solaris-x86

@mattdowle mattdowle changed the title Error with Oracle compiler Error with Oracle compiler (likely Solaris only) Jan 14, 2019
@jangorecki
Copy link
Member

jangorecki commented Jan 15, 2019

Is this compiler freely available for project like our? Do we have access to it somewhere? What version of that compiler is in use for that CRAN check? It seems there was one false positive like that in the past: https://community.oracle.com/thread/2492099
Lines reported in error for froll.c looks pretty OK.
Also this very much related: https://blogs.oracle.com/d/the-pains-of-preprocessing
Mybe this compiler doesn't like we declare const thread number in own line.

@mattdowle
Copy link
Member Author

Yes free: https://en.wikipedia.org/wiki/Oracle_Developer_Studio
Yes: https://www.oracle.com/technetwork/server-storage/developerstudio/downloads/index-jsp-141149.html
CRAN uses Oracle Developer Studio 12.6. See https://cran.r-project.org/web/checks/check_flavors.html, and https://www.stats.ox.ac.uk/pub/bdr/Rconfig/r-patched-solaris-x86 for settings.
Those compiler bug reports indeed seem related. Might also be use of volatile. Might be ans->ans[i]= (the same 'ans' symbol repeated)? The fact every other compiler (windows / gcc / clang) are ok kind of suggests a compiler glitch.

@mattdowle
Copy link
Member Author

On Ubuntu 18.04 (bionic)
I downloaded OracleDeveloperStudio12.6-linux-x86-rpm.tar.bz2
$ tar xvjf OracleDeveloperStudio12.6-linux-x86-rpm.tar.bz2
$ cd OracleDeveloperStudio12.6-linux-x86-rpm
$ ls -lrth
total 457M
-r--r--r-- 1 mdowle mdowle 3.8K Aug 16 2017 README.txt
-rwxr-xr-x 1 mdowle mdowle 457M Aug 16 2017 developerstudio.sh
drwxr-xr-x 2 mdowle mdowle 4.0K Aug 18 2017 LEGAL
$ sudo ./developerstudio.sh
Configuring the installer...
Searching for JVM on the system...
This machine has an open source distribution of java (OpenJDK) installed. OpenJDK is not supported. Please install Oracle JDK to proceed.
To download Java installation bundle (JDK or JRE), visit http://www.oracle.com/technetwork/java/javase/downloads/index.html
$
Going to that site presents me with. I've no idea about these license restrictions and what's changed. It's just way too much work given we don't know anyone who uses Solaris. I'll ask CRAN if we are able to opt out of Solaris.
image

@mattdowle
Copy link
Member Author

Reply from Prof Ripley :


The problem is the 'const' in

  const int threads = MIN(getDTthreads(), nx);
  #pragma omp parallel num_threads(threads) shared(truehasna)

If you remove it and similar instances elsewhere, the package compiles and passes its checks. See the attached patch.

patch.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants