From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Jan 10 2017 - 08:54:18 CST

On Tue, Jan 10, 2017 at 9:32 AM, Vlad Cojocaru
<vlad.cojocaru_at_mpi-muenster.mpg.de> wrote:
> HI John,
>
> Thanks ...The ospray support compiles fine with the source you sent ...
> However, I get another issue (see error below) ...
>
> Thanks for any hints

the linker already *has* given you a (big) hint: you need to link to
librt.so, i.e. add -lrt to your linker libraries.
you can confirm this by looking at the manpage for shm_unlink

axel.

> Vlad
>
>
>
> /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:
> /apps/nvidia/cuda/8.0.44/lib64/libcudart_static.a(libcudart_static.a.o):
> undefined reference to symbol 'shm_unlink@@GLIBC_2.2.5'
> /lib64/librt.so.1: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> Makefile:620: recipe for target 'vmd_LINUXAMD64' failed
> make: *** [vmd_LINUXAMD64] Error 1
>
>
>
> On 01/10/2017 02:59 PM, John Stone wrote:
>>
>> Hi,
>> Please try using the attached source file in place of the original,
>> and let me know if you still have difficulties.
>>
>> Cheers,
>> John Stone
>> vmd_at_ks.uiuc.edu
>>
>> On Tue, Jan 10, 2017 at 02:25:10PM +0100, Vlad Cojocaru wrote:
>>>
>>> Dear VMDers,
>>>
>>> I am trying to compile VMD 1.9.3 with OSPRay support. However, I get
>>> the compilation error below:
>>>
>>> Some details:
>>> OS: openSUSE 42.2 (arch x86_64)
>>> GCC 4.8.5
>>> OSPRay 1.1.2 (downloaded and built successfully according to their
>>> instructions)
>>>
>>> Has anybody observed such an errror and has a fix for it ?
>>>
>>> Thanks for letting me know
>>>
>>> Best wishes
>>> Vlad
>>>
>>> Compiling OSPRayRenderer.C --> OSPRayRenderer.o ...
>>> OSPRayRenderer.C: In member function ???void
>>> OSPRayRenderer::render_compile_and_validate()???:
>>> OSPRayRenderer.C:662:12: error: redeclaration of ???int i???
>>> for (int i = 0; i < directional_lights.num(); ++i) {
>>> ^
>>> OSPRayRenderer.C:552:7: error: ???int i??? previously declared here
>>> int i;
>>> ^
>>> OSPRayRenderer.C: In member function ???void
>>> OSPRayRenderer::cylinder_array(Matrix4*, float, float*, int, float*,
>>> int)???:
>>> OSPRayRenderer.C:2027:38: warning: comparison between signed and
>>> unsigned integer expressions [-Wsign-compare]
>>> for (i=0,ind4=0,ind6=0,ind7=0; i<cylnum;
>>> i++,ind4+=4,ind6+=6,ind7+=7) {
>>> ^
>>> OSPRayRenderer.C:2035:38: warning: comparison between signed and
>>> unsigned integer expressions [-Wsign-compare]
>>> for (i=0,ind4=0,ind6=0,ind7=0; i<cylnum;
>>> i++,ind4+=4,ind6+=6,ind7+=7) {
>>> ^
>>> OSPRayRenderer.C: In member function ???void
>>> OSPRayRenderer::trimesh_c4u_n3f_v3f(Matrix4&, unsigned char*,
>>> float*, float*, int, int)???:
>>> OSPRayRenderer.C:2474:11: warning: unused variable ???norm???
>>> [-Wunused-variable]
>>> float norm[9];
>>> ^
>>> OSPRayRenderer.C:2472:15: warning: unused variable ???cn2f???
>>> [-Wunused-variable]
>>> const float cn2f = 1.0f / 127.5f;
>>> ^
>>> OSPRayRenderer.C: In member function ???void
>>> OSPRayRenderer::trimesh_n3f_v3f(Matrix4&, float*, float*, float*,
>>> int, int)???:
>>> OSPRayRenderer.C:2630:14: warning: unused variable ???c???
>>> [-Wunused-variable]
>>> const rgba c = { uniform_color[0],
>>> ^
>>> Makefile:595: recipe for target 'OSPRayRenderer.o' failed
>>> make: *** [OSPRayRenderer.o] Error 1
>>>
>>> --
>>> Vlad Cojocaru, Ph.D., Project Group Leader
>>> Department of Cell and Developmental Biology
>>> Max Planck Institute for Molecular Biomedicine
>>> Röntgenstrasse 20, 48149 Münster, Germany
>>> Tel: +49-251-70365-324; Fax: +49-251-70365-399
>>> Email: vlad.cojocaru[at]mpi-muenster.mpg.de
>>> http://www.mpi-muenster.mpg.de/43241/cojocaru
>
>
> --
> Vlad Cojocaru, Ph.D., Project Group Leader
> Department of Cell and Developmental Biology
> Max Planck Institute for Molecular Biomedicine
> Röntgenstrasse 20, 48149 Münster, Germany
> Tel: +49-251-70365-324; Fax: +49-251-70365-399
> Email: vlad.cojocaru[at]mpi-muenster.mpg.de
> http://www.mpi-muenster.mpg.de/43241/cojocaru
>

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.