Kagami/go-face

libjpeg centos 7

Closed this issue · 1 comments

Get the following when compiling on CentOS 7 using dlib 19.16 and libjpeg-turbo-devel-1.2.90-6.el7.x86_64

jpeg_mem_loader.cc: In function 'void load_mem_jpeg(dlib::matrix<dlib::rgb_pixel>&, const uint8_t*, int)':
jpeg_mem_loader.cc:45:36: error: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'unsigned char*' [-fpermissive]
  jpeg_mem_src(&cinfo, img_data, len);
                                    ^
In file included from jpeg_mem_loader.cc:3:0:
/usr/include/jpeglib.h:1008:14: note:   initializing argument 2 of 'void jpeg_mem_src(j_decompress_ptr, unsigned char*, long unsigned int)'
 EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
              ^~~~~~~~~~~~
# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-7/root/usr --mandir=/opt/rh/devtoolset-7/root/usr/share/man --infodir=/opt/rh/devtoolset-7/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --with-default-libstdcxx-abi=gcc4-compatible --with-isl=/builddir/build/BUILD/gcc-7.3.1-20180303/obj-x86_64-redhat-linux/isl-install --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC) 

Please try now.