google / guetzli

Perceptual JPEG encoder
Apache License 2.0
12.9k stars 977 forks source link

Ubuntu 14:04 Compile Error #90

Open sunatthegilddotcom opened 7 years ago

sunatthegilddotcom commented 7 years ago

501 sudo apt-get install libpng-dev libgflags-dev 502 git clone https://github.com/google/guetzli.git 511 sudo aptitude install build-essential 512 aptitude show g++ | grep State: State: installed 516 make make make ==== Building guetzli (release) ==== Linking guetzli /bin/sh: 1: pkg-config: not found /bin/sh: 1: pkg-config: not found obj/Release/guetzli.o: In function ReadPNG': /home/wsun/guetzli/guetzli/guetzli.cc:52: undefined reference topng_create_read_struct' /home/wsun/guetzli/guetzli/guetzli.cc:57: undefined reference to png_create_info_struct' /home/wsun/guetzli/guetzli/guetzli.cc:70: undefined reference topng_init_io' /home/wsun/guetzli/guetzli/guetzli.cc:80: undefined reference to png_read_png' /home/wsun/guetzli/guetzli/guetzli.cc:82: undefined reference topng_get_rows' /home/wsun/guetzli/guetzli/guetzli.cc:84: undefined reference to png_get_image_width' /home/wsun/guetzli/guetzli/guetzli.cc:85: undefined reference topng_get_image_height' /home/wsun/guetzli/guetzli/guetzli.cc:88: undefined reference to png_get_channels' /home/wsun/guetzli/guetzli/guetzli.cc:145: undefined reference topng_destroy_read_struct' /home/wsun/guetzli/guetzli/guetzli.cc:142: undefined reference to png_destroy_read_struct' /home/wsun/guetzli/guetzli/guetzli.cc:59: undefined reference topng_destroy_read_struct' obj/Release/guetzli.o: In function main': /home/wsun/guetzli/guetzli/guetzli.cc:195: undefined reference togoogle::SetUsageMessage(std::string const&)' /home/wsun/guetzli/guetzli/guetzli.cc:196: undefined reference to google::ParseCommandLineFlags(int*, char***, bool)' /home/wsun/guetzli/guetzli/guetzli.cc:199: undefined reference togoogle::ShowUsageWithFlags(char const)' obj/Release/guetzli.o: In function __static_initialization_and_destruction_0': /home/wsun/guetzli/guetzli/guetzli.cc:38: undefined reference togoogle::FlagRegisterer::FlagRegisterer(char const, char const, char const, char const, void, void)' /home/wsun/guetzli/guetzli/guetzli.cc:40: undefined reference to `google::FlagRegisterer::FlagRegisterer(char const, char const, char const, char const, void, void*)' collect2: error: ld returned 1 exit status make[1]: [bin/Release/guetzli] Error 1 make: [guetzli] Error 2

ghost commented 7 years ago

Same issue on Ubuntu 16.04 and Centos 7, although no pkg-config errors. The suggestion in this issue fixes it - #85

Eg:

git reset --hard 95ba42158eb46153944d5abc3bcb62f40e384186
make
robryk commented 7 years ago

@david-poirier-csn:

Same issue on Ubuntu 16.04 and Centos 7, although no pkg-config errors.

This sounds then like a different issue. If this still persists after #97, please open a new issue and paste a complete log of the failing build.

robryk commented 7 years ago

@sunatthegilddotcom

First, please try the current version (after #97 was merged). If that doesn't work, please try running pkg-config. If that command is not found, please see if installing as follows helps:

sudo apt-get install pkg-config
ghost commented 7 years ago

Current version (post-#97) works for me now, on Ubuntu 16.04 and Centos 7.

sunatthegilddotcom commented 7 years ago

@david-poirier-csn your solution is working. Thank you very much! @robryk, I followed your direction as well after David. Thank you

JuStTheDev commented 7 years ago

Thanks, @robryk this solution works for me too!