tmeiczin / opendcp

Created digital cinemas packages (DCP)
http://www.opendcp.org
GNU General Public License v3.0
122 stars 52 forks source link

build error - opendcp_image.c #293

Closed motypas closed 7 years ago

motypas commented 7 years ago

Ubuntu 16.04LTS BUILD ERROR.

I download the source from git... and here is the result... any idea to fix this?

[ 67%] Building C object libopendcp/CMakeFiles/opendcp-lib.dir/opendcp_image.c.o /home/motypas/opendcp-master/libopendcp/opendcp_image.c: In function ‘opendcp_image_float_create’: /home/motypas/opendcp-master/libopendcp/opendcp_image.c:105:44: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] image->component[x].float_data = (int )malloc((w h) * sizeof(int)); ^ /home/motypas/opendcp-master/libopendcp/opendcp_image.c: In function ‘opendcp_image_readline_float’: /home/motypas/opendcp-master/libopendcp/opendcp_image.c:257:49: error: expected ‘;’ before ‘)’ token dbuffer[d + 1] = (pixel0_b & 0x0f) << 4 ) | ((pixel0_g >> 8) & 0x0f); ^ /home/motypas/opendcp-master/libopendcp/opendcp_image.c:257:49: error: expected statement before ‘)’ token /home/motypas/opendcp-master/libopendcp/opendcp_image.c:257:51: error: expected expression before ‘|’ token dbuffer[d + 1] = (pixel0_b & 0x0f) << 4 ) | ((pixel0_g >> 8) & 0x0f); ^ /home/motypas/opendcp-master/libopendcp/opendcp_image.c:260:49: error: expected ‘;’ before ‘)’ token dbuffer[d + 4] = (pixel0_r & 0x0f) << 4 ) | ((pixel1_b >> 8) & 0x0f); ^ /home/motypas/opendcp-master/libopendcp/opendcp_image.c:260:49: error: expected statement before ‘)’ token /home/motypas/opendcp-master/libopendcp/opendcp_image.c:260:51: error: expected expression before ‘|’ token dbuffer[d + 4] = (pixel0_r & 0x0f) << 4 ) | ((pixel1_b >> 8) & 0x0f); ^ /home/motypas/opendcp-master/libopendcp/opendcp_image.c:263:61: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses] dbuffer[d + 7] = (pixel1_g << 4 ) | (pixel1_r >> 8) & 0x0f);


/home/motypas/opendcp-master/libopendcp/opendcp_image.c:263:67: error: expected ‘;’ before ‘)’ token
         dbuffer[d + 7] = (pixel1_g << 4 ) | (pixel1_r >> 8) & 0x0f);
                                                                   ^
/home/motypas/opendcp-master/libopendcp/opendcp_image.c:263:67: error: expected statement before ‘)’ token
/home/motypas/opendcp-master/libopendcp/opendcp_image.c: At top level:
/home/motypas/opendcp-master/libopendcp/opendcp_image.c:387:7: error: conflicting types for ‘dci_transfer’
 float dci_transfer(float p) {
       ^~~~~~~~~~~~
/home/motypas/opendcp-master/libopendcp/opendcp_image.c:376:5: note: previous definition of ‘dci_transfer’ was here
 int dci_transfer(float p) {
     ^~~~~~~~~~~~
/home/motypas/opendcp-master/libopendcp/opendcp_image.c:405:7: error: conflicting types for ‘dci_transfer_inverse’
 float dci_transfer_inverse(float p) {
       ^~~~~~~~~~~~~~~~~~~~
/home/motypas/opendcp-master/libopendcp/opendcp_image.c:398:5: note: previous definition of ‘dci_transfer_inverse’ was here
 int dci_transfer_inverse(float p) {
     ^~~~~~~~~~~~~~~~~~~~
/home/motypas/opendcp-master/libopendcp/opendcp_image.c: In function ‘rgb_to_xyz_float’:
/home/motypas/opendcp-master/libopendcp/opendcp_image.c:431:14: warning: implicit declaration of function ‘rgb_to_xyz_calculate_float’ [-Wimplicit-function-declaration]
     result = rgb_to_xyz_calculate_float(image, index);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/motypas/opendcp-master/libopendcp/opendcp_image.c: In function ‘rgb_to_xyz_calculate_float’:
/home/motypas/opendcp-master/libopendcp/opendcp_image.c:516:45: warning: implicit declaration of function ‘dci_transfer_float’ [-Wimplicit-function-declaration]
         image->component[0].float_data[i] = dci_transfer_float(d.x);
                                             ^~~~~~~~~~~~~~~~~~
/home/motypas/opendcp-master/libopendcp/opendcp_image.c: In function ‘resize_float’:
/home/motypas/opendcp-master/libopendcp/opendcp_image.c:772:32: warning: implicit declaration of function ‘opendcp_image_create_float’ [-Wimplicit-function-declaration]
     opendcp_image_t *d_image = opendcp_image_create_float(num_components, w, h);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/motypas/opendcp-master/libopendcp/opendcp_image.c:772:32: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
libopendcp/CMakeFiles/opendcp-lib.dir/build.make:206: recipe for target 'libopendcp/CMakeFiles/opendcp-lib.dir/opendcp_image.c.o' failed
make[2]: *** [libopendcp/CMakeFiles/opendcp-lib.dir/opendcp_image.c.o] Error 1
CMakeFiles/Makefile2:251: recipe for target 'libopendcp/CMakeFiles/opendcp-lib.dir/all' failed
make[1]: *** [libopendcp/CMakeFiles/opendcp-lib.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
motypas commented 7 years ago

All error for OPENEXR fixed here: https://github.com/motypas/opendcp