[MacPorts] #36321: Package glib-2.0 was not found in the pkg-config search path
#36321: Package glib-2.0 was not found in the pkg-config search path ---------------------------+-------------------------------- Reporter: diogowbrito@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: | Port: ---------------------------+-------------------------------- Hello, I've successfully installed glib2 trough MacPorts but can't still compile my program. Installed, as seen: sudo port install glib2 ---> Computing dependencies for glib2 ---> Cleaning glib2 ---> Scanning binaries for linking errors: 100.0% ---> No broken files found. sudo port install pkgconfig ---> Cleaning pkgconfig ---> Scanning binaries for linking errors: 100.0% ---> No broken files found. And compiling... eg: gcc -o main main.c `pkg-config --libs --cflags glib-2.0` Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found main.c:17:18: error: glib.h: No such file or directory I tried, as the error says, to add the glib2 to PKG_CONFIG_PATH but wasn't able to find it in /opt/local/bin The only folders found: glib-compile-resources glib-compile-schemas glib-genmarshal glib-gettextize glib-mkenums Does anyone know what is not working or missing? ..A friend of mine was able to put it running doing the same things as I did. Thank you in advance. -- Ticket URL: <https://trac.macports.org/ticket/36321> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36321: Package glib-2.0 was not found in the pkg-config search path ----------------------------+-------------------------------- Reporter: diogowbrito@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: invalid | Keywords: Port: | ----------------------------+-------------------------------- Changes (by cal@…): * status: new => closed * resolution: => invalid Old description:
Hello,
I've successfully installed glib2 trough MacPorts but can't still compile my program.
Installed, as seen:
sudo port install glib2 ---> Computing dependencies for glib2 ---> Cleaning glib2 ---> Scanning binaries for linking errors: 100.0% ---> No broken files found.
sudo port install pkgconfig ---> Cleaning pkgconfig ---> Scanning binaries for linking errors: 100.0% ---> No broken files found.
And compiling...
eg: gcc -o main main.c `pkg-config --libs --cflags glib-2.0` Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found main.c:17:18: error: glib.h: No such file or directory
I tried, as the error says, to add the glib2 to PKG_CONFIG_PATH but wasn't able to find it in /opt/local/bin
The only folders found: glib-compile-resources glib-compile-schemas glib-genmarshal glib-gettextize glib-mkenums
Does anyone know what is not working or missing? ..A friend of mine was able to put it running doing the same things as I did.
Thank you in advance.
New description: Hello, I've successfully installed glib2 trough MacPorts but can't still compile my program. Installed, as seen: {{{ sudo port install glib2 ---> Computing dependencies for glib2 ---> Cleaning glib2 ---> Scanning binaries for linking errors: 100.0% ---> No broken files found. sudo port install pkgconfig ---> Cleaning pkgconfig ---> Scanning binaries for linking errors: 100.0% ---> No broken files found. }}} And compiling... eg: {{{ gcc -o main main.c `pkg-config --libs --cflags glib-2.0` Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found main.c:17:18: error: glib.h: No such file or directory }}} I tried, as the error says, to add the glib2 to PKG_CONFIG_PATH but wasn't able to find it in /opt/local/bin The only folders found: glib-compile-resources glib-compile-schemas glib-genmarshal glib-gettextize glib-mkenums Does anyone know what is not working or missing? ..A friend of mine was able to put it running doing the same things as I did. Thank you in advance. -- Comment: Please remember to use WikiFormatting and preview your post when writing in Trac. What does `pkg-config --cflags --libs glib-2.0` print for you? It is different from `/opt/local/bin/pkg-config --cflags --libs glib-2.0`? If yes, what does `which pkg-config` print? Do you have `$PKG_CONFIG_PATH` set? Can you try setting it to `/opt/local/lib/pkgconfig` and re-trying? I don't think this is a bug in MacPorts or the glib port. If you need support you should have asked on the macports-users mailinglist. -- Ticket URL: <https://trac.macports.org/ticket/36321#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts