Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libjpeg dependency error #51

Open
evawebb opened this issue Apr 20, 2017 · 3 comments
Open

libjpeg dependency error #51

evawebb opened this issue Apr 20, 2017 · 3 comments

Comments

@evawebb
Copy link

evawebb commented Apr 20, 2017

Whenever I compile, I get an error with the libjpeg dependency. My system has libjpeg 9 installed by default, so when I try to compile I get lots of errors like this:

In file included from /usr/local/include/jpeglib.h:27:0,
                 from LoadJPEG.cpp:23:
/usr/local/include/jpeglib.h:704:3: error: expected identifier before ‘*’ token
   JMETHOD(noreturn_t, error_exit, (j_common_ptr cinfo));
   ^
/usr/local/include/jpeglib.h:704:3: error: ‘noreturn_t’ declared as function returning a function
   JMETHOD(noreturn_t, error_exit, (j_common_ptr cinfo));
   ^
LoadJPEG.cpp: In function ‘void GetJPEGDimensions(const char*, int&, int&)’:
LoadJPEG.cpp:32:37: error: too many arguments to function ‘jpeg_error_mgr* jpeg_std_error()’
     cinfo.err = jpeg_std_error(&jerr);
                                     ^
In file included from LoadJPEG.cpp:23:0:
/usr/local/include/jpeglib.h:948:33: note: declared here
 EXTERN(struct jpeg_error_mgr *) jpeg_std_error
                                 ^~~~~~~~~~~~~~
LoadJPEG.cpp:33:5: error: too many arguments to function ‘void jpeg_CreateDecompress()’
     jpeg_create_decompress(&cinfo);
     ^
/usr/local/include/jpeglib.h:966:14: note: declared here
 EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo,

...

Next I commented out the libjpeg.h dependency in LoadJPEG.cpp and replaced it with the libjpeg.h included in bundler_sfm:

// #include <jpeglib.h>
#include "../lib/jpeg/src/jpeglib.h"

Then this gives me this error:

Wrong JPEG library version: library is 90, caller expects 62

Finally, I tried replacing all of the -ljpegs in the makefile with a direct path to /usr/lib64/libjpeg.so.62.2.0, and I get this error:

JPEG parameter struct mismatch: library thinks size is 632, caller expects 600

I'm totally at a loss here. Any help would be really appreciated.

@snavely
Copy link
Owner

snavely commented Apr 20, 2017 via email

@evawebb
Copy link
Author

evawebb commented Apr 21, 2017

I'm on Fedora 25, using g++.

$ g++ --version
g++ (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)

My /usr/local/include/jpeglib.h does have extern "C" { at the top, but I think it should still be using g++ to compile, right?

This is the Makefile output just before the errors:

g++ -c -o LoadJPEG.o -O3 -Wall -Wno-unused-result -std=gnu++0x \
-I../lib/imagelib -I../lib/sfm-driver -I../lib/matrix -I../lib/5point \
-I../lib/sba-1.5 -I../lib/ann_1.1_char/include -I../include  \
-D__NO_UI__ -D__BUNDLER__ -D__BUNDLER_DISTR__ LoadJPEG.cpp

@Jorff
Copy link

Jorff commented Jun 27, 2022

Maybe the version of jpeglib.h isn't matched with gstreamer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants