danielgtaylor / jpeg-archive

Utilities for archiving JPEGs for long term storage.
1.16k stars 122 forks source link

cc: error: /opt/mozjpeg/lib/libjpeg.a: No such file or directory #80

Closed csdougliss closed 6 years ago

csdougliss commented 6 years ago

Build system is Ubuntu 16.04, 64-bit.

uname -m

x86_64

/opt/mozjpeg/lib64 is installed but not in lib as below, hence the error?

I only recently had this error, but I haven't rebuilt in a long time.

make
cc -std=c99 -Wall -O3 -I/opt/mozjpeg/include -c -o src/util.o src/util.c
cc -std=c99 -Wall -O3 -I/opt/mozjpeg/include -c -o src/edit.o src/edit.c
cc -std=c99 -Wall -O3 -I/opt/mozjpeg/include -c -o src/smallfry.o src/smallfry.c
cc -std=c99 -Wall -O3 -I/opt/mozjpeg/include -c -o src/commander.o src/commander.c
cd src/iqa; RELEASE=1 make
make[1]: Entering directory '/usr/local/src/jpeg-archive/src/iqa'
gcc -I./include -O2 -Wall -c source/convolve.c -o source/convolve.o
gcc -I./include -O2 -Wall -c source/decimate.c -o source/decimate.o
gcc -I./include -O2 -Wall -c source/math_utils.c -o source/math_utils.o
gcc -I./include -O2 -Wall -c source/mse.c -o source/mse.o
gcc -I./include -O2 -Wall -c source/psnr.c -o source/psnr.o
gcc -I./include -O2 -Wall -c source/ssim.c -o source/ssim.o
In file included from source/ssim.c:37:0:
./include/math_utils.h:62:27: warning: inline function ‘_matrix_cmp’ declared but never defined
 IQA_EXPORT IQA_INLINE int _matrix_cmp(const float *a, const float *b, int w, int h, int digits);
                           ^
./include/math_utils.h:54:27: warning: inline function ‘_cmp_float’ declared but never defined
 IQA_EXPORT IQA_INLINE int _cmp_float(float a, float b, int digits);
                           ^
./include/math_utils.h:47:27: warning: inline function ‘_min’ declared but never defined
 IQA_EXPORT IQA_INLINE int _min(int x, int y);
                           ^
./include/math_utils.h:45:27: warning: inline function ‘_max’ declared but never defined
 IQA_EXPORT IQA_INLINE int _max(int x, int y);
                           ^
./include/math_utils.h:43:27: warning: inline function ‘_round’ declared but never defined
 IQA_EXPORT IQA_INLINE int _round(float a);
                           ^
gcc -I./include -O2 -Wall -c source/ms_ssim.c -o source/ms_ssim.o
mkdir -p ./build/release
ar rcs ./build/release/libiqa.a ./source/convolve.o ./source/decimate.o ./source/math_utils.o ./source/mse.o ./source/psnr.o ./source/ssim.o ./source/ms_ssim.o
mv ./source/convolve.o ./source/decimate.o ./source/math_utils.o ./source/mse.o ./source/psnr.o ./source/ssim.o ./source/ms_ssim.o ./build/release
make[1]: Leaving directory '/usr/local/src/jpeg-archive/src/iqa'
cc -std=c99 -Wall -O3 -I/opt/mozjpeg/include -o jpeg-recompress jpeg-recompress.c src/util.o src/edit.o src/smallfry.o src/commander.o src/iqa/build/release/libiqa.a /opt/mozjpeg/lib/libjpeg.a -lm
cc: error: /opt/mozjpeg/lib/libjpeg.a: No such file or directory
Makefile:37: recipe for target 'jpeg-recompress' failed
make: *** [jpeg-recompress] Error 1
shanemhansen commented 6 years ago

I symlinked lib64-> lib and it solved my problem.

renanreis commented 6 years ago

Thanks to @shanemhansen You just need run sudo ln -s /opt/mozjpeg/lib64/ /opt/mozjpeg/lib

lfos commented 6 years ago

Should be fixed by 2764fca (Link against lib64 mozjpeg on multi-arch systems, 2018-05-15).