Operating System - HP-UX
1827283 Members
3623 Online
109717 Solutions
New Discussion

SIGSEGV error with OpenGL

 
SOLVED
Go to solution
AdRao
Occasional Advisor

SIGSEGV error with OpenGL

We have compiled and uid our 64-bit application with OpenGL on HP-UX 11.23 Itanium. As soon as we try to run it, getting Program received signal SIGSEGV, Segmentation fault (si_code: 1). Here the stack trace:
#0 0x9fffffffbeee0760:1 in _hpOGL_dispatchInit+0x51() from
/opt/graphics/OpenGL/lib/hpux64/libGL.so.2

#1 0x9fffffffbeefa830:0 in _hpOGL_libInit+0x140() from
/opt/graphics/OpenGL/lib/hpux64/libGL.so.2

#2 0x9fffffffbf77fb60:0 in EM_mark_BOS+0x50 () from /usr/lib/hpux64/dld.so

This runs perfectly on several systems (in 32 bit form) including HP-UX 11.11(PA-RISC), AIX,IRIX,Linux (gcc),Windows, Linux (gcc) 64-bit and Windows (Vista). We are using aCC compiler version 5.55. Any help would be appreciated.
9 REPLIES 9
Dennis Handly
Acclaimed Contributor

Re: SIGSEGV error with OpenGL

What do you get with:
(gdb) bt
(gdb) info reg
(gdb) disas $pc-16*8 $pc+16*4
AdRao
Occasional Advisor

Re: SIGSEGV error with OpenGL

attached file contains the output from the requested commands
Dennis Handly
Acclaimed Contributor

Re: SIGSEGV error with OpenGL

>attached file contains the output

gr13: 0
gr48: 0xfffffffffffffffd

0x9fffffffbeee0750:0 <+0x40>: shladd r8=r48,3,r13 -3 * 8 + 0
0x9fffffffbeee0750:1 <+0x41>: cmp.lt.unc p1,p6=0,r48;;
0x9fffffffbeee0760:1 <+0x51>: (p6) ld8 r8=[r8] << signal

This is aborting because TP (r13) is 0.
What is your link line for C_GL_noopt, in particular what does "chatr C_GL_noopt" show?

You probably have -lc somewhere on your link line.
AdRao
Occasional Advisor

Re: SIGSEGV error with OpenGL

Hi Dennins,

Thnkx for ypur response. Here is the link line...

/opt/aCC/bin/aCC +DD64 -DHP_IA64=1 -D_HPUX_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 -g -L/usr/local/src/lib/hpux64 -L/opt/graphics/OpenGL/lib/hpux64 -L/usr/contrib/X11R6/lib -g +noeh -D_LARGEFILE64_SOURCE=1
-DFoxUI=1 +DD64 -DHP_IA64=1 -D_HPUX_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1
-I/vault/public/fox/fox-1.0.51-64/include -I/usr/include/X11R6
-I/opt/graphics/OpenGL/include -I/usr/local/src/include -I/usr/contrib/X11R6/include
-I/vault/public/fox/fox-1.0.51-64/include -I../include -I../lib/include -Iicons ../ar/hp_ia64/libvisui_noopt.a
../ar/hp_ia64/libVisionGL_noopt.a ../ar/hp_ia64/liblrc_noopt.a
../ar/hp_ia64/libslim_noopt.a -L/vault/public/fox/fox-1.0.51-64/src/.libs
-lFOX ../it64_hp11/tmpauth.o ../it64_hp11/lm_new.o ../it64_hp11/liblmgr_nomt.a
../it64_hp11/libcrvs.a ../it64_hp11/libsb.a
-lm -lc -lpng -lz -ljpeg -lGLU -lGL -lXt -lXext -lXmu -lX11 -lm -o ../bin/hp_ia64/C_GL_noopt
Dennis Handly
Acclaimed Contributor

Re: SIGSEGV error with OpenGL

>-lm -lc -lpng -lz -ljpeg -lGLU -lGL -lXt -lXext -lXmu -lX11 -lm

It is illegal to specify -lc on your driver link line. The latest version of aCC/cc will warn about that.

The latest versions of the linker/dld.so patch will work around the TP ordering issue.
AdRao
Occasional Advisor

Re: SIGSEGV error with OpenGL

Hi Dennis,

We have installed the latest linker patch 39093. Still aborts at same location.
AdRao
Occasional Advisor

Re: SIGSEGV error with OpenGL

Hi Dennis,

We have installed the latest linker patch PHSS_39093. Still aborts at same location.
Dennis Handly
Acclaimed Contributor
Solution

Re: SIGSEGV error with OpenGL

>Still aborts at same location.

>Me: It is illegal to specify -lc on your driver link line.

Have you tried removing that -lc?
AdRao
Occasional Advisor

Re: SIGSEGV error with OpenGL

Problem resolved, Thanx for your help