JetPack - Compiling oceanFFT on TX2

Hello,

I have followed documentation and installed JetPack from my host computer to the TX2.

The directory ~/NVIDIA_CUDA-8.0_Samples/bin/aarch64/linux/release contains the binaries, but does not include oceanFFT and many others, especially samples from 5_Simulations.

So I tried to compile it by issuing the command:

SMS=53 EXTRA_LDFLAGS=--unresolved-symbols=ignore-in-shared-libs TARGET_ARCH=aarch64 make

And unfortunately I get the following output with an error:

nvidia@tegra-ubuntu:~/NVIDIA_CUDA-8.0_Samples/5_Simulations/oceanFFT$ SMS=53 EXTRA_LDFLAGS=--unresolved-symbols=ignore-in-shared-libs TARGET_ARCH=aarch64 make
/usr/local/cuda-8.0/bin/nvcc -ccbin g++ -I../../common/inc  -m64    -gencode arch=compute_53,code=sm_53 -gencode arch=compute_53,code=compute_53 -o oceanFFT.o -c oceanFFT.cpp
oceanFFT.cpp: In function ‘void display()’:
oceanFFT.cpp:522:5: error: reference to ‘glClientActiveTexture’ is ambiguous
     glClientActiveTexture(GL_TEXTURE0);
     ^
In file included from ../../common/inc/helper_gl.h:23:0,
                 from oceanFFT.cpp:37:
/usr/include/GL/gl.h:1825:23: note: candidates are: void glClientActiveTexture(GLenum)
 GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
                       ^
In file included from oceanFFT.cpp:37:0:
../../common/inc/helper_gl.h:107:17: note:                 void (* __HelperGL::glClientActiveTexture)(GLenum)
     USE_GL_FUNC(glClientActiveTexture, PFNGLACTIVETEXTUREPROC);
                 ^
../../common/inc/helper_gl.h:45:44: note: in definition of macro ‘USE_GL_FUNC’
     #define USE_GL_FUNC(name, proto) proto name = (proto) glXGetProcAddress ((c
                                            ^
oceanFFT.cpp:527:5: error: reference to ‘glClientActiveTexture’ is ambiguous
     glClientActiveTexture(GL_TEXTURE1);
     ^
In file included from ../../common/inc/helper_gl.h:23:0,
                 from oceanFFT.cpp:37:
/usr/include/GL/gl.h:1825:23: note: candidates are: void glClientActiveTexture(GLenum)
 GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
                       ^
In file included from oceanFFT.cpp:37:0:
../../common/inc/helper_gl.h:107:17: note:                 void (* __HelperGL::glClientActiveTexture)(GLenum)
     USE_GL_FUNC(glClientActiveTexture, PFNGLACTIVETEXTUREPROC);
                 ^
../../common/inc/helper_gl.h:45:44: note: in definition of macro ‘USE_GL_FUNC’
     #define USE_GL_FUNC(name, proto) proto name = (proto) glXGetProcAddress ((c
                                            ^
oceanFFT.cpp:579:5: error: reference to ‘glClientActiveTexture’ is ambiguous
     glClientActiveTexture(GL_TEXTURE0);
     ^
In file included from ../../common/inc/helper_gl.h:23:0,
                 from oceanFFT.cpp:37:
/usr/include/GL/gl.h:1825:23: note: candidates are: void glClientActiveTexture(GLenum)
 GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
                       ^
In file included from oceanFFT.cpp:37:0:
../../common/inc/helper_gl.h:107:17: note:                 void (* __HelperGL::glClientActiveTexture)(GLenum)
     USE_GL_FUNC(glClientActiveTexture, PFNGLACTIVETEXTUREPROC);
                 ^
../../common/inc/helper_gl.h:45:44: note: in definition of macro ‘USE_GL_FUNC’
     #define USE_GL_FUNC(name, proto) proto name = (proto) glXGetProcAddress ((c
                                            ^
oceanFFT.cpp:581:5: error: reference to ‘glClientActiveTexture’ is ambiguous
     glClientActiveTexture(GL_TEXTURE1);
     ^
In file included from ../../common/inc/helper_gl.h:23:0,
                 from oceanFFT.cpp:37:
/usr/include/GL/gl.h:1825:23: note: candidates are: void glClientActiveTexture(GLenum)
 GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
                       ^
In file included from oceanFFT.cpp:37:0:
../../common/inc/helper_gl.h:107:17: note:                 void (* __HelperGL::glClientActiveTexture)(GLenum)
     USE_GL_FUNC(glClientActiveTexture, PFNGLACTIVETEXTUREPROC);
                 ^
../../common/inc/helper_gl.h:45:44: note: in definition of macro ‘USE_GL_FUNC’
     #define USE_GL_FUNC(name, proto) proto name = (proto) glXGetProcAddress ((c
                                            ^
Makefile:270: recipe for target 'oceanFFT.o' failed
make: *** [oceanFFT.o] Error 1

Any ideas, help or reccomendations greatly appreciated.

Best regards,
C.

Hi,

I am also having the same issue.

$ make TARGET_ARCH=aarch64

…results with the same error as OP’s.

Hi,

Thanks for your quick test.
Please help us do the following modification:

In common/inc/helper_gl.h

line105: --- #if !defined(GLX_EXTENSION_NAME) || defined(__arm__) || defined(__aarch64__)
line105: +++ #if !defined(GLX_EXTENSION_NAME) || !defined(GL_VERSION_1_3)

Please also let us know the results.
Thanks.

Hi AastaLLL,

Thanks for help, this change fixed the issue for me. oceanFFT example now builds successfully and I am able to run the simulation.

Regards,
Bojan

Hello All,

Yes this fixed the problem.

Thanks,
C.

Thank you.
this worked out the problem
one more question:
of this is know to Nvidia team, why the distribution is not fixed once and for all

Since days I am insisting to install and run the Jetson for the TX2 and I am stumbling of so many similar problems that I dropped the good abitude to take notes…

Hi,

This issue is fixed in our next release.
Please pay attention to our announcement and update.

Thanks.

I patched the helper_gl.h file but I still cannot compile, I get the following messages:

/usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/bin/ld: warning: libnvidia-tls.so.27.1.0, needed by /usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/lib/../lib/libGL.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/bin/ld: warning: libnvidia-glcore.so.27.1.0, needed by /usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/lib/../lib/libGL.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/lib/../lib/libGL.so: undefined reference to `_nv017glcore'
makefile:59: recipe for target 'display-arm' failed

Please advise!!

Hi,

Just confirmed that oceanFFT sample works well after applying the patch mentioned in #3.

Here is my steps:

  1. Flash with JetPack3.0
  2. Apply the patch in comment #3
  3. Compile and run

Thanks.