Skip to content

[Bioc-devel] GLX extension missing on petty

9 messages · Jiří Hon, Dan Tenenbaum

#
Hi Jirka,
On Wed, Apr 3, 2013 at 9:06 AM, Ji?? Hon <xhonji01 at stud.fit.vutbr.cz> wrote:
This is a build system problem, and I am looking into it.
The build system runs under Xvfb, but I have no problem building your
package when logged into the console of petty.

However,  do get a segfault when running R CMD check on the triplex
source tarball:

$ R CMD check --no-vignettes --timings triplex_0.99.0.tar.gz
[...]
* checking examples ...sh: line 1: 41089 Segmentation fault
LANGUAGE=en _R_CHECK_INTERNALS2_=1
'/Library/Frameworks/R.framework/Resources/bin/R' --vanilla >
'triplex-Ex.Rout' 2>&1 < triplex-Ex.R
 ERROR
Running examples in ?~@~Xtriplex-Ex.R?~@~Y failed
The error most likely occurred in:
Searching for triplex type 0...
Searching for triplex type 1...
Searching for triplex type 2...
Searching for triplex type 3...
Searching for triplex type 4...
Searching for triplex type 5...
Searching for triplex type 6...
Searching for triplex type 7...
A DNAStringSet instance of length 4
    width seq                                               names
[1]     8 CCCTGCCT                                          minus
[2]     8 GGGACGGA                                          plus
[3]     8 CCTTTCGT                                          para-minus
[4]     5 GGCAT                                             loop
*** caught segfault ***
address 0x0, cause 'memory not mapped'

Traceback:
 1: .C(rgl_material, success = FALSE, idata, cdata, ddata)
 2: rgl.material(color = color, back = back, ...)
 3: rgl.bg(color = bgr.col)
 4: triplex.3D(t[1])
aborting ...

Dan
#
Thank you a lot for your immediate reaction and please let me know if I  
could help with anything.

Jirka

Dne Wed, 03 Apr 2013 18:45:31 +0200 Dan Tenenbaum <dtenenba at fhcrc.org>  
napsal(a):
1 day later
#
On Wed, Apr 3, 2013 at 9:45 AM, Dan Tenenbaum <dtenenba at fhcrc.org> wrote:
A little more info on this.

There are two problems. The first is that as mentioned before, our
builds do not run physically logged into the console; they use a
virtual frame buffer (Xvfb).

We could look into changing this, but at present triplex seems to be
the only package having this problem.

Xvfb apparently does not have the OpenGL extensions compiled in. I
will check with the XQuartz people. They have been responsive before.

The second problem is if I do log into the actual physical console of
the machine, I am able to build triplex but I get the following
segfault when trying to run R CMD check on triplex:
This turns out to be reproducible simply like this:

library(rgl)
example(rgl.material)

And it's caused by the following line (Material.cpp:39) in the rgl package:

  const char* version = (const char*)glGetString(GL_VERSION);

glGetString() is a function in the OpenGL library and it is segfaulting.


Obviously that should not be happening. I'll try to track that down.

In the short term, you can disable all vignette code chunks that use
rgl (with eval=FALSE), and do the same with examples that use rgl
(with \dontrun{}).

The problem as far as I can tell is just on Snow Leopard which is what
we use on our build systems.
The package builds, checks, installs and runs OK on my Mountain Lion laptop.

Dan
#
On Thu, Apr 4, 2013 at 4:22 PM, Dan Tenenbaum <dtenenba at fhcrc.org> wrote:
Duncan Murdoch has pointed me towards a workaround. If you call
another rgl function first (probably one that opens a window), this
segfault won't happen, suggesting some intiialization problem in rgl.

For example, if you do:

example(plot3d)

before the call to rgl.material() there will be no segfault.

However, because of the problem with rgl extensions not being compiled
into Xvfb, this will not totally solve your problem. You'll still need
to disable all vignette chunks and examples that call rgl code.

Hopefully a fix is forthcoming in the rgl package which will at least
take care of the segfault issue.

Thanks,
Dan
#
Thank you a lot for tracking that down. Unfortunately all vignette code  
chunks that use rgl have been always disabled with eval=FALSE. That  
probably means we have no way to workaround this problem on petty.

Dne Fri, 05 Apr 2013 01:22:52 +0200 Dan Tenenbaum <dtenenba at fhcrc.org>  
napsal(a):
#
On Fri, Apr 5, 2013 at 2:11 AM, Ji?? Hon <xhonji01 at stud.fit.vutbr.cz> wrote:
Turns out the real problem was unescaped accented characters in the
vignette. Fixing that  along with two dontrun tags in example sections
allows the package to build and check on Mac. I've made the changes in
release and devel.

Dan
1 day later
#
Dne Fri, 05 Apr 2013 19:07:12 +0200 Dan Tenenbaum <dtenenba at fhcrc.org>  
napsal(a):
Thanks a lot for that, still it didn't pass check on Mac. So I removed the  
work around of rgl segfault on Mac that is probably unnecessary and I hope  
it helps. With dontrun tags around triplex.3D call no other rgl code  
should be executed during check.

Jirka
#
On Sat, Apr 6, 2013 at 10:39 AM, Ji?? Hon <xhonji01 at stud.fit.vutbr.cz> wrote:
Thank you. I did not mean to check that in. I can confirm that the
latest version passes check on petty.

Dan
#
On Sat, Apr 6, 2013 at 11:32 AM, Dan Tenenbaum <dtenenba at fhcrc.org> wrote:
Incidentally, the latest version of rgl is now available on CRAN. It
does not segfault in
example(rgl.material)
anymore. This means Snow Leopard users will be able to run triplex.

Dan