Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#36321 closed defect (invalid)

Package glib-2.0 was not found in the pkg-config search path

Reported by: diogowbrito@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: neverpanic (Clemens Lang), cooljeanius (Eric Gallager)
Port:

Description (last modified by neverpanic (Clemens Lang))

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.

Change History (3)

comment:1 Changed 12 years ago by neverpanic (Clemens Lang)

Description: modified (diff)
Resolution: invalid
Status: newclosed

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.

comment:2 Changed 12 years ago by neverpanic (Clemens Lang)

Cc: cal@… added

Cc Me!

comment:3 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.