Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to make pkg-config

Tags:

macos

When I try to make pkg-config, I get an error. I want to install a bioinformatic tool on my mac. I am fairly new to this so I might be making a fatal mistake. Would appreciate any help! thanks!

make logs

/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in glib
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in .
Making all in m4macros
/Library/Developer/CommandLineTools/usr/bin/make all-am
make[5]: Nothing to be done for all-am'. Making all in glib GEN glibconfig-stamp config.status: executing glib/glibconfig.h commands config.status: glib/glibconfig.h is unchanged /Library/Developer/CommandLineTools/usr/bin/make all-recursive Making all in libcharset /Library/Developer/CommandLineTools/usr/bin/make all-am make[7]: Nothing to be done forall-am'.
Making all in .
echo > glib-public-headers.txt.tmp && mv glib-public-headers.txt.tmp glib-public-headers.txt
Making all in .
CCLD pkg-config
Undefined symbols for architecture x86_64:
"_CFRelease", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_CFStringGetCString", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_CFStringGetCStringPtr", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_CFStringGetLength", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_CFURLCopyFileSystemPath", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_CFURLCreateFromFSRef", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_FSFindFolder", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_kCFAllocatorSystemDefault", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [pkg-config] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
like image 967
Mohamed Samour Avatar asked Oct 05 '15 01:10

Mohamed Samour


People also ask

Can not find pkg-config?

It looks like you're compiling on Linux and also targeting Linux. Currently this requires the `pkg-config` utility to find OpenSSL but unfortunately `pkg-config` could not be found. If you have OpenSSL installed you can likely fix this by installing `pkg-config`.

What is pkg-config Mac?

pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the correct compiler options on the command line so an application can use gcc -o test test.

How do I find my pkg-config?

On most systems, pkg-config looks in /usr/lib/pkgconfig , /usr/share/pkgconfig , /usr/local/lib/pkgconfig and /usr/local/share/pkgconfig for these files. It will additionally look in the colon-separated (on Windows, semicolon-separated) list of directories specified by the PKG_CONFIG_PATH environment variable.

What is pkg-config in Python?

pkgconfig is a Python module to interface with the pkg-config command line tool for Python 3.3+. It can be used to. find all pkg-config packages >>> packages = pkgconfig.list_all() check if a package exists >>> pkgconfig.exists('glib-2.0') True.


1 Answers

I guess you’re trying to build pkg-config with option --with-internal-glib enabled. If so, then you’ll have to add the following linker (in LDFLAGS) options to the configure script -framework CoreFoundation and -framework Carbon, so you will build glib static and then pgk-config can make use of it.

In resume: env LDFLAGS="-framework CoreFoundation -framework Carbon" ./configure --with-internal-glib.

PS: Considere to edit your problem description and insert more context to your problem.

PPS: Pkg-Config version 0.29.1 has fixed this problem.

like image 154
Rudá Moura Avatar answered Oct 02 '22 10:10

Rudá Moura