Mohamed Samour
Mohamed Samour

Reputation: 51

Unable to make pkg-config

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

Upvotes: 5

Views: 2675

Answers (1)

RSTM
RSTM

Reputation: 1301

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.

Upvotes: 8

Related Questions