octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44478] test __osmesa_print__.cc-tst crashes w


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #44478] test __osmesa_print__.cc-tst crashes with Nvidia drivers
Date: Thu, 12 May 2016 04:57:24 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0 Iceweasel/44.0

Follow-up Comment #100, bug #44478 (project octave):

As I understand it, OpenGL functions all work by reading or writing to the
"current context".  The current context is just some data structure that can
be accessed through a pointer.  There is no guarantee that the context will be
laid out in the same way for all implementations.  So I don't think there is
any reason to expect functions from the nvidia library to work with a context
allocated by Mesa.  And that assumes that the context is even shared properly
between the implementations.  I see no reason to expect that to be true
either.

And yes, the link order matters.  You can create a simple example to show
that:


$ cat a.cc 
#include <iostream>

void
fcn (void)
{
  std::cerr << "a" << std::endl;
}
$ cat b.cc
#include <iostream>

void
fcn (void)
{
  std::cerr << "b" << std::endl;
}
$ cat main.cc
extern void fcn (void);

int
main (void)
{
  fcn ();
  return 0;
}
$ g++ -fPIC -shared -o libba.so a.cc
$ g++ -fPIC -shared -o libbb.so b.cc
$ g++ -fPIC main.cc -L. -la -lb
$ ldd a.out
        linux-vdso.so.1 (0x00007ffc53486000)
        liba.so => not found
        libb.so => not found
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007fe7b195f000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe7b165a000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 
(0x00007fe7b1444000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe7b109f000)
        /lib64/ld-linux-x86-64.so.2 (0x000055a83cb52000)
$ LD_LIBRARY_PATH=. ./a.out
a
$ g++ -fPIC main.cc -L. -lb -la
$ ldd a.out
        linux-vdso.so.1 (0x00007ffdec1dc000)
        libb.so => not found
        liba.so => not found
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007f1e07536000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1e07231000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 
(0x00007f1e0701b000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1e06c76000)
        /lib64/ld-linux-x86-64.so.2 (0x0000555b62265000)
$ LD_LIBRARY_PATH=. ./a.out
b



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44478>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]