Closed markosjal closed 5 years ago
I am not entirely sure what you are trying to achieve. AFAICS you want to install it, right? Have you run cmake already?
trying to install according to your own documentation. Problems look like they begin at
make
[ 5%] Building CXX object CMakeFiles/airsaned.dir/imageformats/pngencoder.cpp.o
/usr/src/AirSane/imageformats/pngencoder.cpp: In member function ‘virtual void PngEncoder::onWriteLine(const void*)’:
/usr/src/AirSane/imageformats/pngencoder.cpp:122:47: error: ‘png_const_bytep’ does not name a type
::png_write_row(p->mpPng, static_cast
either your instructions are wrong or incomplete , or there is a problem. I have tried multiple times now.
still fails
make
Scanning dependencies of target airsaned
[ 5%] Building CXX object CMakeFiles/airsaned.dir/server/main.cpp.o
[ 11%] Building CXX object CMakeFiles/airsaned.dir/server/scanserver.cpp.o
[ 16%] Building CXX object CMakeFiles/airsaned.dir/server/scanner.cpp.o
[ 22%] Building CXX object CMakeFiles/airsaned.dir/server/scanjob.cpp.o
[ 27%] Building CXX object CMakeFiles/airsaned.dir/server/scannerpage.cpp.o
[ 33%] Building CXX object CMakeFiles/airsaned.dir/sanecpp/sanecpp.cpp.o
[ 38%] Building CXX object CMakeFiles/airsaned.dir/basic/uuid.cpp.o
[ 44%] Building CXX object CMakeFiles/airsaned.dir/basic/dictionary.cpp.o
[ 50%] Building CXX object CMakeFiles/airsaned.dir/basic/fdbuf.cpp.o
[ 55%] Building CXX object CMakeFiles/airsaned.dir/web/httpserver.cpp.o
[ 61%] Building CXX object CMakeFiles/airsaned.dir/web/webpage.cpp.o
[ 66%] Building CXX object CMakeFiles/airsaned.dir/imageformats/imageencoder.cpp.o
[ 72%] Building CXX object CMakeFiles/airsaned.dir/imageformats/jpegencoder.cpp.o
[ 77%] Building CXX object CMakeFiles/airsaned.dir/imageformats/pdfencoder.cpp.o
[ 83%] Building CXX object CMakeFiles/airsaned.dir/imageformats/pngencoder.cpp.o
/home/kodi/AirSane/imageformats/pngencoder.cpp: In member function ‘virtual void PngEncoder::onWriteLine(const void*)’:
/home/kodi/AirSane/imageformats/pngencoder.cpp:122:47: error: ‘png_const_bytep’ does not name a type
::png_write_row(p->mpPng, static_cast
I have determined that this is due to lack of PNG support in SANE that was corrected only recently in Ubuntu 16.04 (and at least one other version) . If someone encounters this, try completely removing and re-installing SANE
You need to install libpng16-dev for compiling airsaned. On Ubuntu 16.04, libpng12 is the default when running
sudo apt install libpng-dev
Instead, run
sudo apt install libpng16-dev
and re-try the build.
sudo make install [ 5%] Building CXX object CMakeFiles/airsaned.dir/imageformats/pngencoder.cpp.o /usr/src/AirSane/imageformats/pngencoder.cpp: In member function ‘virtual void PngEncoder::onWriteLine(const void*)’: /usr/src/AirSane/imageformats/pngencoder.cpp:122:47: error: ‘png_const_bytep’ does not name a type ::png_write_row(p->mpPng, static_cast(data));
^
/usr/src/AirSane/imageformats/pngencoder.cpp:127:52: error: ‘png_const_bytep’ does not name a type
::png_write_row(p->mpPng, reinterpret_cast(p->mLineBuf
^
CMakeFiles/airsaned.dir/build.make:398: recipe for target 'CMakeFiles/airsaned.dir/imageformats/pngencoder.cpp.o' failed
make[2]: [CMakeFiles/airsaned.dir/imageformats/pngencoder.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/airsaned.dir/all' failed
make[1]: [CMakeFiles/airsaned.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2