crossbridge-community / crossbridge

C/C++ Compiler for the ActionScript Virtual Machine (AVM2)
http://sourceforge.net/projects/crossbridge-community/
Other
151 stars 35 forks source link

pkgconfig fails due to drop of embedded glib from pkgconfig v0.26 #83

Open jasonsturges opened 9 years ago

jasonsturges commented 9 years ago

Mac OS X build is failing at target pkgconfig:

~/dev/crossbridge/pkg-config-0.26/configure: line 13540: --exists: command not found configure: error: pkg-config and glib-2.0 not found, please set GLIB_CFLAGS and GLIB_LIBS to the correct values Makefile:1163: recipe for target 'pkgconfig' failed make[2]: *\ [pkgconfig] Error 127

pkgconfig v0.26 dropped embedded glib, now expecting glib as an external dependency.

jasonsturges commented 9 years ago

pkgconfig can be upgraded to v0.27, then configured with --with-internal-glib

pkgconfig:
    rm -rf $(BUILD)/pkgconfig
    mkdir -p $(BUILD)/pkgconfig
    cd $(BUILD)/pkgconfig && CFLAGS="-I$(SRCROOT)/avm2_env/misc" $(SRCROOT)/$(DEPENDENCY_PKG_CFG)/configure \
        --prefix=$(SDK)/usr --build=$(BUILD_TRIPLE) --host=$(HOST_TRIPLE) --target=$(TRIPLE) --disable-shared \
        --disable-dependency-tracking \
        --disable-option-checking \
        --with-internal-glib
    cd $(BUILD)/pkgconfig && $(MAKE) && $(MAKE) install

This introduces a dependency on gettext.

How has this been handled? Are pkg-config and glib expected as dependencies?

jasonsturges commented 9 years ago

Maybe this is moot given the new build tool in development.

I can install gettext and glib:

$ brew install gettext
$ brew install glib

Then, execute the equivalent output of:

export GLIB_CFLAGS="$(pkg-config --cflags glib-2.0)" 
export GLIB_LIBS="$(pkg-config --libs glib-2.0)"

Which for me is:

export GLIB_CFLAGS="-I/usr/local/Cellar/glib/2.44.0/include/glib-2.0 -I/usr/local/Cellar/glib/2.44.0/lib/glib-2.0/include -I/usr/local/opt/gettext/include "
export GLIB_LIBS="-L/usr/local/Cellar/glib/2.44.0/lib -L/usr/local/opt/gettext/lib -lglib-2.0 -lintl "
jasonsturges commented 9 years ago

Actually, I'm going to reopen this to reference issues while I rework the makefile and build.