Welcome to Fractal Forums

Fractal Software => Others => Topic started by: p014k on January 06, 2015, 08:19:30 PM




Title: Installing mandelbulber-opencl-1.21-2.orig
Post by: p014k on January 06, 2015, 08:19:30 PM
Hello,

I am trying to install mandelbulber-opencl-1.21-2.orig from source. When I try to make, I get the following error:

Code:
Building target: mandelbulber-opencl
Invoking: GCC C++ Linker
g++ -o"mandelbulber-opencl" -L/usr/lib/x86_64-linux-gnu/     ./src/Render3D.o ./src/algebra.o ./src/callbacks.o ./src/cimage.o ./src/common_math.o ./src/database.o ./src/files.o ./src/fractal.o ./src/image.o ./src/interface.o ./src/morph.o ./src/primitives.o ./src/settings.o ./src/shaders.o ./src/texture.o ./src/timeline.o ./src/undo.o ./src/cl_support.o ./src/netrender.o  -lgthread-2.0 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lrt -lpng -lOpenCL -ljpeg
./src/settings.o: In function `LoadOneSetting(char const*, char const*, sParamRender&, bool)':
settings.cpp:(.text+0xa810): undefined reference to `WriteLog(char const*)'
settings.cpp:(.text+0xa818): undefined reference to `WriteLog(char const*)'
./src/settings.o: In function `LoadSettings2(char const*, sParamRender&, bool)':
settings.cpp:(.text+0xca88): undefined reference to `WriteLog(char const*)'
settings.cpp:(.text+0xca91): undefined reference to `WriteLog(char const*)'
./src/settings.o: In function `LoadAppSettings(char*, sAppSettings&)':
settings.cpp:(.text+0xd408): undefined reference to `WriteLog(char const*)'
./src/settings.o:settings.cpp:(.text+0xd410): more undefined references to `WriteLog(char const*)' follow
./src/Render3D.o: In function `MainThread(void*)':
Render3D.cpp:(.text+0x6c7): undefined reference to `WriteLogDouble(char const*, double)'
Render3D.cpp:(.text+0x1a09): undefined reference to `WriteLogDouble(char const*, double)'
Render3D.cpp:(.text+0x2cf8): undefined reference to `WriteLogDouble(char const*, double)'
./src/Render3D.o: In function `InitMainParameters(sParamRender*)':
Render3D.cpp:(.text+0x6aba): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0x6afd): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0x6b58): undefined reference to `WriteLog(char const*)'
./src/Render3D.o: In function `InitMainImage(cImage*, int, int, double, _GtkWidget*)':
Render3D.cpp:(.text+0x6b89): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0x6bbc): undefined reference to `WriteLog(char const*)'
./src/Render3D.o:Render3D.cpp:(.text+0x6bcf): more undefined references to `WriteLog(char const*)' follow
./src/Render3D.o: In function `Render(sParamRender, cImage*, _GtkWidget*)':
Render3D.cpp:(.text+0xbb38): undefined reference to `WriteLogDouble(char const*, double)'
Render3D.cpp:(.text+0xc1ea): undefined reference to `WriteLogDouble(char const*, double)'
Render3D.cpp:(.text+0xc264): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0xc2ab): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0xc321): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0xc970): undefined reference to `WriteLogDouble(char const*, double)'
Render3D.cpp:(.text+0xc9b1): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0xca10): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0xca22): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0xca47): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0xca5c): undefined reference to `WriteLog(char const*)'
./src/Render3D.o:Render3D.cpp:(.text+0xcc81): more undefined references to `WriteLog(char const*)' follow
./src/Render3D.o: In function `MainRender()':
Render3D.cpp:(.text+0xe3e1): undefined reference to `WriteLogDouble(char const*, double)'
Render3D.cpp:(.text+0xe499): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0xe694): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0xe6b2): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0xe6d0): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0xe702): undefined reference to `WriteLog(char const*)'
./src/Render3D.o:Render3D.cpp:(.text+0xea93): more undefined references to `WriteLog(char const*)' follow
./src/Render3D.o: In function `MainRender()':
Render3D.cpp:(.text+0x104e1): undefined reference to `WriteLogDouble(char const*, double)'
Render3D.cpp:(.text+0x10782): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0x107ff): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0x118a9): undefined reference to `WriteLogDouble(char const*, double)'
Render3D.cpp:(.text+0x1192a): undefined reference to `WriteLogDouble(char const*, double)'
Render3D.cpp:(.text+0x11e70): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0x11ec8): undefined reference to `WriteLog(char const*)'
./src/Render3D.o: In function `ThumbnailRender2(sParamRender, cImage*)':
Render3D.cpp:(.text+0x12ec7): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0x12eed): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text+0x12f13): undefined reference to `WriteLog(char const*)'
./src/Render3D.o:Render3D.cpp:(.text.startup+0x17a): more undefined references to `WriteLog(char const*)' follow
./src/Render3D.o: In function `main':
Render3D.cpp:(.text.startup+0x199): undefined reference to `WriteLogDouble(char const*, double)'
Render3D.cpp:(.text.startup+0x1c5): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text.startup+0x1fa): undefined reference to `WriteLogDouble(char const*, double)'
Render3D.cpp:(.text.startup+0x21d): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text.startup+0x265): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text.startup+0x2c0): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text.startup+0x342): undefined reference to `WriteLog(char const*)'
Render3D.cpp:(.text.startup+0x3a8): undefined reference to `WriteLog(char const*)'
./src/Render3D.o:Render3D.cpp:(.text.startup+0x40e): more undefined references to `WriteLog(char const*)' follow
collect2: error: ld returned 1 exit status
make: *** [mandelbulber-opencl] Error 1

It looks like a problem in compiling Render3D.cpp. In the README file it says to run
Code:
sudo apt-get install libgtk2.0-dev libjpeg8-dev
which I've done and it's successfully installed.

This is a brand new, clean copy of Ubuntu 14.10.


Title: Re: Installing mandelbulber-opencl-1.21-2.orig
Post by: claude on January 06, 2015, 11:00:39 PM
Hi, it's not a problem in compiling, it's a problem in linking.  WriteLog() is declared in files.h but not implemented anywhere.

Perhaps change lines 59 and 60 of files.h from:

Code:
void WriteLog(const char *text);
void WriteLogDouble(const char *text, double value);

to

Code:
#define WriteLog(text) if(0)
#define WriteLogDouble(text,value) if(0)

This should make it compile, though there won't be any logging.  A better fix would be to make them do something useful.



I don't even get that far: I get errors like this:

Code:
/usr/include/CL/cl.hpp: In function ‘cl_int cl::UnloadCompiler()’:
/usr/include/CL/cl.hpp:1606:12: error: ‘::clUnloadCompiler’ has not been declared
/usr/include/CL/cl.hpp: In constructor ‘cl::Image2D::Image2D(const cl::Context&, cl_mem_flags, cl::ImageFormat, size_t, size_t, size_t, void*, cl_int*)’:
/usr/include/CL/cl.hpp:2365:19: error: ‘::clCreateImage2D’ has not been declared
/usr/include/CL/cl.hpp: In constructor ‘cl::Image2DGL::Image2DGL(const cl::Context&, cl_mem_flags, GLenum, GLint, GLuint, cl_int*)’:
/usr/include/CL/cl.hpp:2410:19: error: ‘::clCreateFromGLTexture2D’ has not been declared
/usr/include/CL/cl.hpp: In constructor ‘cl::Image3D::Image3D(const cl::Context&, cl_mem_flags, cl::ImageFormat, size_t, size_t, size_t, size_t, size_t, void*, cl_int*)’:
/usr/include/CL/cl.hpp:2464:19: error: ‘::clCreateImage3D’ has not been declared
/usr/include/CL/cl.hpp: In constructor ‘cl::Image3DGL::Image3DGL(const cl::Context&, cl_mem_flags, GLenum, GLint, GLuint, cl_int*)’:
/usr/include/CL/cl.hpp:2510:19: error: ‘::clCreateFromGLTexture3D’ has not been declared
/usr/include/CL/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueMarker(cl::Event*) const’:
/usr/include/CL/cl.hpp:3745:13: error: ‘::clEnqueueMarker’ has not been declared
/usr/include/CL/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueWaitForEvents(const std::vector<cl::Event>&) const’:
/usr/include/CL/cl.hpp:3752:13: error: ‘::clEnqueueWaitForEvents’ has not been declared
/usr/include/CL/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueBarrier() const’:
/usr/include/CL/cl.hpp:3867:13: error: ‘::clEnqueueBarrier’ has not been declared

which means my installed OpenCL implementation must be kinda hosed (those errors are internal to CL/cl.hpp and probably nothing to do with mandelbulber).


Title: Re: Installing mandelbulber-opencl-1.21-2.orig
Post by: p014k on January 07, 2015, 02:57:57 PM
Code:
#define WriteLog(text) if(0)
#define WriteLogDouble(text,value) if(0)
This allowed mandelbulber to compile correctly and install. We'll see how it runs.

Ideally I would like to fix this issue rather than using this work around. Is there a way to get WriteLog to link correctly?