a2flo / oclraster

Flexible Rasterizer in OpenCL
GNU General Public License v2.0
49 stars 5 forks source link

Trouble compiling oclraster #1

Open ginkgo opened 10 years ago

ginkgo commented 10 years ago

Hi, I'm really interested in trying out oclraster, but so far I had little success compiling it.

My system is Arch Linux(non-testing). I got floor to compile and install. (This required me to check out the pre C++14 version and add a -I.. to the include dirs so the correct headers are found)

With oclraster itself I could fix issues with floor headers not being found by adding -I/usr/local/floor to the makefiles. Now I get the error message that 'tccpp/libtcc.h' cannot be found. I see this is included in floor as a submodule but it's mentioned nowhere else and Arch does not have this as a package(tcc doesn't seem to work here)

I guess you develop floor etc. directly in /usr/local?

a2flo commented 10 years ago

Hi,

I didn't expect anyone to actually try this until I made at least a 0.1 release, but okay ;) So, yes, I expect everything to be in /usr/local/{include,lib} which I usually just symlink from my home folder. When building floor, have you cloned/checked out the tccpp submodule and then executed the premake.sh script again? If not, please do so, otherwise it won't compile the tccpp files and/or it might not find the tccpp headers. When you run the premake.sh script, it should even mention these steps. Sorry about the C++14 part, but I expect the clang 3.4 package to be available in arch at the end of December or early January (depending on the actual release).

Best regards, Florian Ziesche

On 30 Nov 2013, at 00:18, Thomas Weber notifications@github.com wrote:

Hi, I'm really interested in trying out oclraster, but so far I had little success compiling it.

My system is Arch Linux(non-testing). I got floor to compile and install. (This required me to check out the pre C++14 version and add a -I.. to the include dirs so the correct headers are found)

With oclraster itself I could fix issues with floor headers not being found by adding -I/usr/local/floor to the makefiles. Now I get the error message that 'tccpp/libtcc.h' cannot be found. I see this is included in floor as a submodule but it's mentioned nowhere else and Arch does not have this as a package(tcc doesn't seem to work here)

I guess you develop floor etc. directly in /usr/local?

— Reply to this email directly or view it on GitHub.

ginkgo commented 10 years ago

Yeah, I guess it may be a bit early. I'm mainly interested in it since I have a sorta similar project going on (https://github.com/ginkgo/micropolis).

I was a bit more successful by linking the floor and oclraster stuff into /usr/local like suggested in your READMEs. install.sh doesn't seem to copy tccpp over, so that seemed to be the source of that problem.

I'm still having trouble getting oclraster to compile. 'core/cpp_headers.hpp' can't be found for some reason. I guess that's still some include path issue. I'm going to look at this tomorrow.

Best, Thomas

a2flo commented 10 years ago

Hi,

does this help? In /usr/local/include: lrwxrwxrwx 1 root root 15 Sep 15 10:52 floor -> /home/flo/floor lrwxrwxrwx 1 root root 23 Aug 10 23:10 oclraster -> /home/flo/oclraster/lib lrwxrwxrwx 1 root root 27 Aug 10 23:14 oclraster_support -> /home/flo/oclraster/support

And in /usr/local/lib: lrwxrwxrwx 1 root root 31 Sep 15 10:52 libfloor.so -> /home/flo/floor/bin/libfloor.so lrwxrwxrwx 1 root root 32 Sep 15 10:52 libfloord.so -> /home/flo/floor/bin/libfloord.so lrwxrwxrwx 1 root root 39 Aug 10 23:10 liboclraster.so -> /home/flo/oclraster/bin/liboclraster.so lrwxrwxrwx 1 root root 47 Aug 10 23:14 liboclraster_support.so -> /home/flo/oclraster/bin/liboclraster_support.so lrwxrwxrwx 1 root root 48 Aug 10 23:15 liboclraster_supportd.so -> /home/flo/oclraster/bin/liboclraster_supportd.so lrwxrwxrwx 1 root root 40 Aug 10 23:10 liboclrasterd.so -> /home/flo/oclraster/bin/liboclrasterd.so

And yeah, I forgot to add the tccpp path in the install.sh (just fixed that, thx ;)).

Best regards, Florian Ziesche

On 30 Nov 2013, at 02:10, Thomas Weber notifications@github.com wrote:

Yeah, I guess it may be a bit early. I'm mainly interested in it since I have a sorta similar project going on (https://github.com/ginkgo/micropolis).

I was a bit more successful by linking the floor and oclraster stuff into /usr/local like suggested in your READMEs. install.sh doesn't seem to copy tccpp over, so that seemed to be the source of that problem.

I'm still having trouble getting oclraster to compile. 'core/cpp_headers.hpp' can't be found for some reason. I guess that's still some include path issue. I'm going to look at this tomorrow.

Best, Thomas

— Reply to this email directly or view it on GitHub.

ginkgo commented 10 years ago

Hello again, sorry to get back to you so late.

I got a bit farther to the point where floor compiles, liboclraster compiles and oclr_simple compiles and links. Still no luck with the more advanced applications.

I had to add libfloor to the include- and lib-dirs in premake4.lua. I don't really know premake, so IDK if this is the right way to do it.

Patch here: https://gist.github.com/ginkgo/7832685

Building liboclraster_support fails with the following error:

==== Building liboclraster_support (release64) ====
Running pre-build commands
./build_version.sh
gui.cpp
gui/gui.cpp:434:71: error: member reference type 'vector<framebuffer>' is not a pointer
        const auto default_fb_size = oclr_pipeline->get_default_framebuffer()->get_size();
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

oclr_simple compiles, but it just hangs and gives no output when I start it.

What system are you using for development on your end?

Thomas

a2flo commented 10 years ago

Sorry, my fault. I thought I updated the premake file when I migrated oclraster to floor, but I didn't :/ I've updated the premake file now and updated the oclraster lib code to the latest floor changes. I'm currently having issues with differences in clang 3.4 on OS X and Linux, where I can't compile any of the samples in Linux (I need a destructor for all constexpr literal types in the OS X version, but I get an error because of that in the Linux version ...). Probably have to wait until the final clang 3.4 version then.

If you're still compiling this with clang 3.3 in c++11 mode, just changes this line to c++11: https://github.com/a2flo/floor/blob/master/premake4.lua#L106

Concerning the liboclraster_support error: I haven't updated that code in a while and won't do so for now, since I'm probably going to integrate that into another project at some point and then remove it from the oclraster repos. But using the code from before I made the default framebuffer changes should help: https://github.com/a2flo/oclraster/commit/bede27194e68b2f5490127ef567d3a477df3c4fc

No idea why oclr_simple just fails. What OpenCL implementation are you using? I've only ever tested the Intel, AMD and POCL CPU implementations on Linux. Also have a look at the data/config.xml and change it to the OpenCL platform you want.