Overv / vramfs

VRAM based file system for Linux
1.26k stars 65 forks source link

compile error #10

Closed ric96 closed 7 years ago

ric96 commented 7 years ago

ubuntu 16.04 gcc 4.9 nvidia gtx 960 clinfo: http://paste.ubuntu.com/23541229/ compile error: http://paste.ubuntu.com/23541234/

thnx!

Overv commented 7 years ago

Hi,

Could you change these Makefile lines:

ifeq ($(OPENCL_1_1), 1)
    CFLAGS += -DOPENCL_1_1
endif

to:

ifeq ($(OPENCL_1_1), 1)
    CFLAGS += -DOPENCL_1_1
    CFLAGS += -DCL_USE_DEPRECATED_OPENCL_1_2_APIS
endif

and see if that resolves the problem?

ric96 commented 7 years ago

It got rid of the "is depreciated" errors but these errors are still present: http://paste.ubuntu.com/23545452/

Overv commented 7 years ago

Try adding #undef CL_VERSION_1_2 at the top of memory.cpp, right below #include "memory.hpp".

ric96 commented 7 years ago

same errors still remain...

ric96 commented 7 years ago

so its the same as https://github.com/Overv/vramfs/issues/4

ric96 commented 7 years ago

okay so reverting back to https://github.com/Overv/vramfs/commit/1bdcab10ff572059bc33cfc7568f7ce66d616130

and adding CFLAGS += -DCL_USE_DEPRECATED_OPENCL_1_2_APIS th the makefile solves the issue for me.

Awesome project btw!!!

Overv commented 7 years ago

@Oblomov Do you know why your changes are still causing errors?

Oblomov commented 7 years ago

The issue seems to arise from using the local cl_1_1.hpp when the system cl.h does support CL_VERSION_1_2. I cannot think of a sensible way to handle this relying on the hpp headers (mostly because they are really bad overall, particularly the old ones).

One way would be to ship our own cl.hpp, up to date and able to properly discriminate between OpenCL versions, without even the need to call make OPENCL_1_1 in the first place. The other way would be to not use the C++ interface (see my opinion on it above). And of course the real question is whether we still want to support compiling with the long obsolete 1.1 headers, considering even NVIDIA has finally introduced 1.2 support in the last year or so. If we really must still support using the old headers.

I can implement whichever approach you prefer, let me know and I'll issue a pull request in that sense.

Overv commented 7 years ago

NVIDIA was the only reason we were using < 2.0 in the first place, so it would be best to upgrade to 1.2.

Oblomov commented 7 years ago

OK, I'll submit a pull request to expunge the 1.1 support then.

Oblomov commented 7 years ago

I'm guessing this can be closed now that the 1.1 support removal has been merged in.