Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Make errors #1

Open
guerrerocarlos opened this issue Nov 14, 2014 · 5 comments
Open

Make errors #1

guerrerocarlos opened this issue Nov 14, 2014 · 5 comments

Comments

@guerrerocarlos
Copy link

Hello Pitzer,

Just trying to compile SiftGPU on a iMac (late 2013), with this error output after just running 'make':

Seems like errors in the code, but I guess the code worked elsewhere, so what is that I'm doing wrong?

~/R/SiftGPU $ make
mkdir -p build
mkdir -p bin
sed -i -e 's/\\/\//g' demos/*.bat
ar rcs bin/libsiftgpu.a build/FrameBufferObject.o build/GlobalUtil.o build/GLTexImage.o  build/ProgramGLSL.o build/ProgramGPU.o build/ShaderMan.o build/SiftGPU.o build/SiftPyramid.o build/PyramidGL.o build/SiftMatch.o
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: bin/libsiftgpu.a(ProgramGPU.o) has no symbols
g++ -o bin/libsiftgpu.so build/FrameBufferObject.o build/GlobalUtil.o build/GLTexImage.o build/ProgramGLSL.o build/ProgramGPU.o build/ShaderMan.o build/SiftGPU.o build/SiftPyramid.o  build/PyramidGL.o build/SiftMatch.o -lGLEW -framework GLUT -framework OpenGL  -lIL -Iinclude - fPIC  -L/usr/lib -L./bin -L./lib -Wall -Wno-deprecated -pthread   -DWINDOW_PREFER_GLUT - L/Users/prb2pal/Development/Resources/lib   -shared -fPIC
clang: warning: argument unused during compilation: '-pthread'
ld: warning: directory not found for option '-L./lib'
ld: warning: directory not found for option '-L/Users/prb2pal/Development/Resources/lib'
g++ -o bin/TestWinGlut src/TestWin/TestWinGlut.cpp src/TestWin/BasicTestWin.cpp   bin/libsiftgpu.a -lGLEW -framework GLUT -framework OpenGL  -lIL  -Iinclude -fPIC  -L/usr/lib -L./bin -L./lib -Wall -Wno-deprecated -pthread   -DWINDOW_PREFER_GLUT -L/Users/prb2pal/Development/Resources/lib
In file included from src/TestWin/BasicTestWin.cpp:43:
In file included from src/TestWin/BasicTestWin.h:34:
src/TestWin/GLTransform.h:105:3: error: use of undeclared identifier 'glTranslated'; did you mean 'translate'?
            glTranslated(cx*es, cy*es, 0.0);
            ^~~~~~~~~~~~
            translate
src/TestWin/GLTransform.h:89:8: note: 'translate' declared here
     void translate(int dx, int dy, int dz =0)
          ^
src/TestWin/GLTransform.h:106:3: error: use of undeclared identifier 'glTranslated'; did you mean 'translate'?
            glTranslated(t[0] ,t[1] ,t[2]);
            ^~~~~~~~~~~~
            translate
src/TestWin/GLTransform.h:89:8: note: 'translate' declared here
     void translate(int dx, int dy, int dz =0)
          ^
src/TestWin/GLTransform.h:107:3: error: use of undeclared identifier 'glScaled'
            glScaled(s,s,s);
            ^
src/TestWin/GLTransform.h:108:3: error: use of undeclared identifier 'glTranslated'; did you mean 'translate'?
            glTranslated(-cx, - cy, 0);
            ^~~~~~~~~~~~
            translate
src/TestWin/GLTransform.h:89:8: note: 'translate' declared here
     void translate(int dx, int dy, int dz =0)
          ^
src/TestWin/BasicTestWin.cpp:75:15: error: use of undeclared identifier 'GL_MODELVIEW'
    glMatrixMode(GL_MODELVIEW);
                 ^
src/TestWin/BasicTestWin.cpp:76:2: error: use of undeclared identifier 'glLoadIdentity'
    glLoadIdentity();
    ^
src/TestWin/BasicTestWin.cpp:77:10: error: use of undeclared identifier 'GL_COLOR_BUFFER_BIT'
    glClear(GL_COLOR_BUFFER_BIT);
            ^
src/TestWin/BasicTestWin.cpp:80:2: error: use of undeclared identifier 'glFlush'
    glFlush();
    ^
src/TestWin/BasicTestWin.cpp:81:2: error: use of undeclared identifier 'glFinish'
    glFinish();
    ^
src/TestWin/BasicTestWin.cpp:189:2: error: use of undeclared identifier 'glViewport'
    glViewport(0, 0, w, h);
    ^
src/TestWin/BasicTestWin.cpp:190:18: error: use of undeclared identifier 'GL_PROJECTION'
glMatrixMode(GL_PROJECTION);
             ^
src/TestWin/BasicTestWin.cpp:191:5: error: use of undeclared identifier 'glLoadIdentity'
glLoadIdentity();
^
src/TestWin/BasicTestWin.cpp:192:2: error: use of undeclared identifier 'glOrtho'
    glOrtho(0, w, h, 0,0,1);
    ^
src/TestWin/BasicTestWin.cpp:193:18: error: use of undeclared identifier 'GL_MODELVIEW'
glMatrixMode(GL_MODELVIEW);
             ^
src/TestWin/BasicTestWin.cpp:194:5: error: use of undeclared identifier 'glLoadIdentity'
glLoadIdentity();
^
15 errors generated.
@jsalva
Copy link

jsalva commented Nov 19, 2014

I'm having the same issue

@jsalva
Copy link

jsalva commented Nov 19, 2014

mkdir -p build
mkdir -p bin
sed -i -e 's////g' demos/_.bat
ar rcs bin/libsiftgpu.a build/FrameBufferObject.o build/GlobalUtil.o build/GLTexImage.o build/ProgramGLSL.o build/ProgramGPU.o build/ShaderMan.o build/SiftGPU.o build/SiftPyramid.o build/PyramidGL.o build/SiftMatch.o
/opt/local/bin/ranlib: file: bin/libsiftgpu.a(ProgramGPU.o) has no symbols
g++ -o bin/libsiftgpu.so build/FrameBufferObject.o build/GlobalUtil.o build/GLTexImage.o build/ProgramGLSL.o build/ProgramGPU.o build/ShaderMan.o build/SiftGPU.o build/SiftPyramid.o build/PyramidGL.o build/SiftMatch.o -lGLEW -framework GLUT -framework OpenGL -lIL -Iinclude -fPIC -L/usr/lib -L./bin -L./lib -Wall -Wno-deprecated -pthread -march=core2 -mfpmath=sse -DWINDOW_PREFER_GLUT -L/opt/local/lib -shared -fPIC
clang: warning: argument unused during compilation: '-pthread'
ld: warning: directory not found for option '-L./lib'
g++ -o bin/TestWinGlut src/TestWin/TestWinGlut.cpp src/TestWin/BasicTestWin.cpp bin/libsiftgpu.a -lGLEW -framework GLUT -framework OpenGL -lIL -Iinclude -fPIC -L/usr/lib -L./bin -L./lib -Wall -Wno-deprecated -pthread -march=core2 -mfpmath=sse -DWINDOW_PREFER_GLUT -L/opt/local/lib
In file included from src/TestWin/BasicTestWin.cpp:43:
In file included from src/TestWin/BasicTestWin.h:34:
src/TestWin/GLTransform.h:105:3: error: use of undeclared identifier 'glTranslated'; did you mean 'translate'?
glTranslated(cx_es, cy*es, 0.0);
^~~~~~~~~~~~
translate
src/TestWin/GLTransform.h:89:8: note: 'translate' declared here
void translate(int dx, int dy, int dz =0)
^
src/TestWin/GLTransform.h:106:3: error: use of undeclared identifier 'glTranslated'; did you mean 'translate'?
glTranslated(t[0] ,t[1] ,t[2]);
^~~~~~~~~~~~
translate
src/TestWin/GLTransform.h:89:8: note: 'translate' declared here
void translate(int dx, int dy, int dz =0)
^
src/TestWin/GLTransform.h:107:3: error: use of undeclared identifier 'glScaled'
glScaled(s,s,s);
^
src/TestWin/GLTransform.h:108:3: error: use of undeclared identifier 'glTranslated'; did you mean 'translate'?
glTranslated(-cx, - cy, 0);
^~~~~~~~~~~~
translate
src/TestWin/GLTransform.h:89:8: note: 'translate' declared here
void translate(int dx, int dy, int dz =0)
^
src/TestWin/BasicTestWin.cpp:75:15: error: use of undeclared identifier 'GL_MODELVIEW'
glMatrixMode(GL_MODELVIEW);
^
src/TestWin/BasicTestWin.cpp:76:2: error: use of undeclared identifier 'glLoadIdentity'
glLoadIdentity();
^
src/TestWin/BasicTestWin.cpp:77:10: error: use of undeclared identifier 'GL_COLOR_BUFFER_BIT'
glClear(GL_COLOR_BUFFER_BIT);
^
src/TestWin/BasicTestWin.cpp:80:2: error: use of undeclared identifier 'glFlush'
glFlush();
^
src/TestWin/BasicTestWin.cpp:81:2: error: use of undeclared identifier 'glFinish'
glFinish();
^
src/TestWin/BasicTestWin.cpp:189:2: error: use of undeclared identifier 'glViewport'
glViewport(0, 0, w, h);
^
src/TestWin/BasicTestWin.cpp:190:18: error: use of undeclared identifier 'GL_PROJECTION'
glMatrixMode(GL_PROJECTION);
^
src/TestWin/BasicTestWin.cpp:191:5: error: use of undeclared identifier 'glLoadIdentity'
glLoadIdentity();
^
src/TestWin/BasicTestWin.cpp:192:2: error: use of undeclared identifier 'glOrtho'
glOrtho(0, w, h, 0,0,1);
^
src/TestWin/BasicTestWin.cpp:193:18: error: use of undeclared identifier 'GL_MODELVIEW'
glMatrixMode(GL_MODELVIEW);
^
src/TestWin/BasicTestWin.cpp:194:5: error: use of undeclared identifier 'glLoadIdentity'
glLoadIdentity();
^
15 errors generated.

@jsalva
Copy link

jsalva commented Nov 19, 2014

ok i got it to work:

change src/TestWin/BasicTestWin.cpp:

#ifdef __APPLE__
#    include "OpenGL/OpenGL.h"
#else
#   include "GL/gl.h"
#endif

to

#include "GL/gl.h"

Then, I ran into a problem in my (symlinked) src/TestWin/GL/gl.h (grabbed from macports):

In file included from src/TestWin/BasicTestWin.cpp:41:
src/TestWin/GL/gl.h:2085:10: fatal error: 'GL/glext.h' file not found
#include <GL/glext.h>

so i saw that it glext.h was a sibling and changed it to

include "glext.h"

and then, another issue:

In file included from src/TestWin/BasicTestWin.cpp:41:
In file included from src/TestWin/GL/gl.h:2085:
src/TestWin/GL/glext.h:5340:22: error: typedef redefinition with different types ('unsigned int' vs 'void *')
typedef unsigned int GLhandleARB;
^
/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:65:15: note: previous definition is here
typedef void *GLhandleARB;

so in src/TestWin/GL/gl.h, line 5340 I declare a void *

typedef void *GLhandleARB;

It compiled! (with some warnings about string literal to char * conversions)
src/TestWin/MultiThreadSIFT.cpp:145:26: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]

but not a single fuq was given. Hope that helps

John

@rasmi
Copy link

rasmi commented May 25, 2016

@jsalva, you're awesome. Thanks!

@jsalva
Copy link

jsalva commented May 25, 2016

np ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants