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

4.0.0 does not produce pkgconfig file #13154

Open
ekudritski opened this Issue Nov 13, 2018 · 9 comments

Comments

7 participants
@ekudritski
Copy link

ekudritski commented Nov 13, 2018

System information (version)
  • OpenCV => 4.0.0-rc
  • Operating System / Platform => Ubuntu 18.10
  • Compiler => gcc 8.2.0 / gcc 6
Detailed description

I did cmake ...Then make and then make install
and it does not generate opencv.pc file.

If I use same commands for version 3.4.3 then the file is created.

Another thing
if I link with pkgconfig then it links to librarys with no version numbers.
so installing 4.0.0-rc after 3.4.3 makes pkgconfig unusable.
it would be nice if there were multiple opencv.pc files like opencv3.4.pc opencv4.pc

@alalek

This comment has been minimized.

Copy link
Contributor

alalek commented Nov 13, 2018

Pkg-config has very limited functionality, so this support has been dropped.

Use CMake with find_package(OpenCV) instead (with multiple version selection, "on the fly" configuration via script language, etc).

Changes are here:

@dustsigns

This comment has been minimized.

Copy link

dustsigns commented Nov 14, 2018

Is there a way to reintroduce pkg-config support? The .pc files that are currently generated seem to work for most settings and not everyone is using cmake. It seems to me that just having a list of libraries that OpenCV depends on as well as the information where the header and .so files are is already sufficient for most use cases with pkg-config. Or is there any limitation in this regard?

@ekudritski

This comment has been minimized.

Copy link

ekudritski commented Nov 16, 2018

Option OPENCV_GENERATE_PKGCONFIG=ON generates the '.pc' file. I think also it should be generated by default in *nix systems where pkg-config is used. I tested my binary files with ldd and they are linked right. It is just development time when conflicts can occur. And I think same problems can occur with cmake also. It is possible to be more specific than just -llib. its possible to specify libs exactly by .so file.

@codenoid

This comment has been minimized.

Copy link

codenoid commented Dec 21, 2018

CMakeLists.txt :

OCV_OPTION(OPENCV_GENERATE_PKGCONFIG  "Generate .pc file for pkg-config build tool (deprecated)" ON)

it doesn't work

@pathouse

This comment has been minimized.

Copy link

pathouse commented Jan 10, 2019

@codenoid i believe the argument for that option is actually YES

@rdp

This comment has been minimized.

Copy link

rdp commented Jan 11, 2019

ffmpeg relies on .pc files for opencv library dependency, FWIW...

@rdp

This comment has been minimized.

Copy link

rdp commented Jan 13, 2019

Also as a note "make install" doesn't install the .pc file, even if it's generated :|

@Favi0

This comment has been minimized.

Copy link

Favi0 commented Jan 15, 2019

Also as a note "make install" doesn't install the .pc file, even if it's generated :|

have you managed to install the .pc file?

@rdp

This comment has been minimized.

Copy link

rdp commented Jan 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment