VMD-L Mailing List
From: sperez14_at_us.es
Date: Mon Feb 19 2018 - 13:17:11 CST
- Next message: Vermaas, Joshua: "Re: Re: problem compiling vmd from source."
- Previous message: Axel Kohlmeyer: "Re: salvation of heavy water"
- In reply to: Vermaas, Joshua: "Re: Re: problem compiling vmd from source."
- Next in thread: Vermaas, Joshua: "Re: Re: problem compiling vmd from source."
- Reply: Vermaas, Joshua: "Re: Re: problem compiling vmd from source."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hello Josh,
Thank you very much for your help. I did not replace g++ with either. I
don't have access to icc or icpc which if I am not mistaken are not
free. The test code compiles with both compilers, g++ and gcc. I have
looked into the Makefile and I am pretty sure it is using g++ to try to
compile it. I have attached it to the email. I there are more solutions
than buying icc or icpc.
Sergio
El 19/02/2018 06:41, Vermaas, Joshua escribió:
> Hi Sergio,
>
> Did you replace g++ with icc or icpc? Consider the following test code:
>
> #include <cstdio>
> int main (int argc, char **argv) {
> int i;
> for (int i = 0; i <10 ; i++) {
> printf("%d\n", i);
> }
> }
>
> gcc will refuse to compile it, since "i" is redefined, and that doesn't comply with the old c standards. g++ will compile it just fine. icpc will compile it just fine too. icc, however, will also complain about i being redefined again, since again, it is using the c standards. The moral of the story is that your correct or incorrect installation of the OSPRayRenderer is a red herring. The real problem is likely your makefile adjustments to switch from the gnu to intel compiler toolchain, and accidentally compiling with a C compiler rather than a C++ compiler.
>
> Josh Vermaas
>
> Director's Postdoctoral Fellow
> National Renewable Energy Laboratory
> joshua.vermaas_at_nrel.gov<mailto:joshua.vermaas_at_nrel.gov>
>
> On Feb 18, 2018, at 1:10 PM, sperez14_at_us.es<mailto:sperez14_at_us.es> wrote:
>
> Dear vmd comunity,
>
> When I try to compile vmd from the source I get this error:
>
> 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:578: recipe for target 'OSPRayRenderer.o' failed
> make: *** [OSPRayRenderer.o] Error 1
>
> I think I have installed OSPRay correctly (v1.1.1) I do not understand why it fails. My configure options are:
>
> LINUXAMD64 OPENGL OPENGLPBUFFER FLTK TK ACTC IMD LIBSBALL XINERAMA XINPUT LIBOPTIX LIBOSPRAY LIBTACHYON VRPN NETCDF COLVARS TCL PYTHON PTHREADS NUMPY SILENT GCC
>
> The same as linux.amd64.opengl but chaning GCC to ICC.
>
> Thank you very much for your help,
>
> Sergio
- text/x-makefile attachment: Makefile__size_18044
- Next message: Vermaas, Joshua: "Re: Re: problem compiling vmd from source."
- Previous message: Axel Kohlmeyer: "Re: salvation of heavy water"
- In reply to: Vermaas, Joshua: "Re: Re: problem compiling vmd from source."
- Next in thread: Vermaas, Joshua: "Re: Re: problem compiling vmd from source."
- Reply: Vermaas, Joshua: "Re: Re: problem compiling vmd from source."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]