ThirdParty/libJPG/jpgd.cpp:569:266: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]

I solved this installing libjpeg-dev.