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

pkg-config settings missing libs #27

Closed
chriscamacho opened this issue May 20, 2013 · 10 comments
Closed

pkg-config settings missing libs #27

chriscamacho opened this issue May 20, 2013 · 10 comments
Assignees
Labels
bug Bug reports and bugfix pull requests build Build file bugs and PRs (not compilation errors) verified Reproduced or otherwise verified bugs X11
Milestone

Comments

@chriscamacho
Copy link

I'm using pkg-config back ticked in a makefile, however I find I also have to do something like this...

opengl compiled glfw

#EXTRAGLFWLIBS=-lGL -lXrandr -lXi

GLESv2 compiled glfw

EXTRAGLFWLIBS=-lXxf86vm -lXrandr -lXi

LIBS= pkg-config --libs glfw3 $(EXTRAGLFWLIBS)

regardless how glfw's compile has been setup the pkg-config settings should reflect this

@elmindreda
Copy link
Member

Indeed it should. I added a dependency on the xi package. Thank you!

@ghost ghost assigned elmindreda May 20, 2013
@chriscamacho
Copy link
Author

did you commit you changes?

after pulling I still see linking error for the following libs
Xxf86vm Xrandr Xi
when using

pkg-config...

@elmindreda
Copy link
Member

583c8a8

@chriscamacho
Copy link
Author

sorry markdown is broken if you reply by mail... see next comment

@chriscamacho
Copy link
Author

it doesn't seem to be working...here is what I did...

 
 ~/development/glfw $ git pull
Already up-to-date.
 ~/development/glfw $ make clean
 ~/development/glfw $ cmake . -DGLFW_USE_EGL=true -DGLFW_CLIENT_LIBRARY=glesv2
-- NOTE: Examples and tests require OpenGL
-- Using X11 for window creation
-- Using EGL for context creation
-- Configuring done
-- Generating done
-- Build files have been written to: /home/chris/development/glfw
 ~/development/glfw $ make
[  5%] Building C object src/CMakeFiles/glfw.dir/clipboard.c.o
[ 94%] Building C object src/CMakeFiles/glfw.dir/egl_context.c.o
Linking C static library libglfw3.a
[ 94%] Built target glfw
[100%] Generating HTML documentation
warning: ignoring unsupported tag `AUTOLINK_SUPPORT       =' at line 260, file Doxyfile
warning: ignoring unsupported tag `EXTRA_SEARCH_MAPPINGS  =' at line 1287, file Doxyfile
[100%] Built target docs
 ~/development/glfw $ sudo make install
[sudo] password for chris:
[ 94%] Built target glfw
[100%] Generating HTML documentation
warning: ignoring unsupported tag `AUTOLINK_SUPPORT       =' at line 260, file Doxyfile
warning: ignoring unsupported tag `EXTRA_SEARCH_MAPPINGS  =' at line 1287, file Doxyfile
[100%] Built target docs
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/include/GL
-- Up-to-date: /usr/local/include/GL/glfw3.h
-- Up-to-date: /usr/local/include/GL/glfw3native.h
-- Up-to-date: /usr/local/lib/cmake/glfw/glfwConfig.cmake
-- Up-to-date: /usr/local/lib/cmake/glfw/glfwConfigVersion.cmake
-- Up-to-date: /usr/local/lib/cmake/glfw/glfwTargets.cmake
-- Installing: /usr/local/lib/cmake/glfw/glfwTargets-noconfig.cmake
-- Up-to-date: /usr/local/lib/pkgconfig/glfw3.pc
-- Installing: /usr/local/lib/libglfw3.a
 ~/development/glfw $ pkg-config glfw3 --libs
-L/usr/local/lib -lglfw3  

@chriscamacho
Copy link
Author

ah I see the problem, requires.private means you only get the libs when
compiling statically, would be nice to have the dependencies when compiling
shared too...

On 22 May 2013 00:14, Chris Camacho codifies@gmail.com wrote:

it doesn't seem to be working...here is what I did...

chris@chris-LIFEBOOK-AH532 ~/development/glfw $ git pull
Already up-to-date.
chris@chris-LIFEBOOK-AH532 ~/development/glfw $ make clean
chris@chris-LIFEBOOK-AH532 ~/development/glfw $ cmake .
-DGLFW_USE_EGL=true -DGLFW_CLIENT_LIBRARY=glesv2
-- NOTE: Examples and tests require OpenGL
-- Using X11 for window creation
-- Using EGL for context creation
-- Configuring done
-- Generating done
-- Build files have been written to: /home/chris/development/glfw
chris@chris-LIFEBOOK-AH532 ~/development/glfw $ make
[ 5%] Building C object src/CMakeFiles/glfw.dir/clipboard.c.o

[ 94%] Building C object src/CMakeFiles/glfw.dir/egl_context.c.o
Linking C static library libglfw3.a
[ 94%] Built target glfw
[100%] Generating HTML documentation
warning: ignoring unsupported tag AUTOLINK_SUPPORT =' at line 260, file Doxyfile <snip> warning: ignoring unsupported tagEXTRA_SEARCH_MAPPINGS =' at line 1287,
file Doxyfile
[100%] Built target docs
chris@chris-LIFEBOOK-AH532 ~/development/glfw $ sudo make install
[sudo] password for chris:
[ 94%] Built target glfw
[100%] Generating HTML documentation
warning: ignoring unsupported tag AUTOLINK_SUPPORT =' at line 260, file Doxyfile <snip> warning: ignoring unsupported tagEXTRA_SEARCH_MAPPINGS =' at line 1287,
file Doxyfile
[100%] Built target docs
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/include/GL
-- Up-to-date: /usr/local/include/GL/glfw3.h
-- Up-to-date: /usr/local/include/GL/glfw3native.h
-- Up-to-date: /usr/local/lib/cmake/glfw/glfwConfig.cmake
-- Up-to-date: /usr/local/lib/cmake/glfw/glfwConfigVersion.cmake
-- Up-to-date: /usr/local/lib/cmake/glfw/glfwTargets.cmake
-- Installing: /usr/local/lib/cmake/glfw/glfwTargets-noconfig.cmake
-- Up-to-date: /usr/local/lib/pkgconfig/glfw3.pc
-- Installing: /usr/local/lib/libglfw3.a
chris@chris-LIFEBOOK-AH532 ~/development/glfw $ pkg-config glfw3 --libs
*-L/usr/local/lib -lglfw3 *

On 22 May 2013 00:04, Camilla Berglund notifications@github.com wrote:

583c8a8583c8a8


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-18247466
.

Disclaimer:
By sending an email to ANY of my addresses you are agreeing that:

  1. I am by definition, "the intended recipient"
  2. All information in the email is mine to do with as I see fit and make such financial profit, political mileage, or good joke as it lends itself to. In particular, I may quote it where I please.
  3. I may take the contents as representing the views of your company.
  4. This overrides any disclaimer or statement of confidentiality that may be included on your message.

Disclaimer:
By sending an email to ANY of my addresses you are agreeing that:

  1. I am by definition, "the intended recipient"
  2. All information in the email is mine to do with as I see fit and
    make such financial profit, political mileage, or good joke as it
    lends itself to. In particular, I may quote it where I please.
  3. I may take the contents as representing the views of your company.
  4. This overrides any disclaimer or statement of confidentiality
    that may be included on your message.

@elmindreda
Copy link
Member

You don't need to link against libXi when using GLFW as a shared library, unless you're calling XInput directly. That's why it's in the private section.

@chriscamacho
Copy link
Author

It complains about not being able to link xranr Xi etc that I'm not
directly using (but glfw is) ...
On 22 May 2013 12:35, "Camilla Berglund" notifications@github.com wrote:

You don't need to link against libXi when using GLFW as a shared library,
unless you're calling XInput directly. That's why it's in the private
section.


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-18272608
.

@elmindreda
Copy link
Member

You're linking only against the GLFW shared library?

@chriscamacho
Copy link
Author

Yes but being as glfw's shared dependencies are different on different
platforms I was looking to pkg-config to provide a platform independent
method of specifying the correct libs needed for glfw on that platform
rather than needing a makefile with conditional clauses
On 22 May 2013 12:52, "Camilla Berglund" notifications@github.com wrote:

You're linking only against the GLFW shared library?


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-18273239
.

@elmindreda elmindreda added the build Build file bugs and PRs (not compilation errors) label Oct 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports and bugfix pull requests build Build file bugs and PRs (not compilation errors) verified Reproduced or otherwise verified bugs X11
Projects
None yet
Development

No branches or pull requests

2 participants