On 2016-10-06 at 21:46:46 -0700, Brian Manning wrote:
> On Thu, Oct 6, 2016 at 8:24 PM, Zakariyya Mughal <zaki.mug...@gmail.com> 
> wrote:
> > Hello everyone,
> >
> > I have been running my Gtk3 application under continuous integration and
> > started seeing issues with building Glib on macOS with Homebrew's 
> > libglib-2.0.
> >
> > After looking at the compilation flags, I noticed that ccflags contained
> > `-arch x86_64 -arch i386`. Removing `-arch i386` fixed the static
> > assertion and the build continued.
> >
> > My solution was to set `ARCHFLAGS`
> >
> >     ARCHFLAGS="-arch x86_64" cpanm --verbose Glib
> 
> FWIW, I don't need to set ARCHFLAGS like you're doing in order to
> build the Gtk3 stack.  The only environment variables that I'm setting
> before building is PKG_CONFIG_PATH, to point to Homebrew and XQuartz
> *.pc files in /usr/local/lib/pkgconfig and /opt/local/lib/pkgconfig
> respectively.
> 
> Any chance you could be a little bit more specific about how your
> system is set up, and how you're building your Gtk3 stack, so we can
> try and locate the differences?  Right now, I'm suspecting something
> in your environment is causing you grief.
> 
> Thanks,
> 
> Brian
> 
> My setup:
> 
> OS X El Capitan version 10.11.6
> Perl 5.24.0 from plenv installed into ~/.plenv
> glib/gtk+3/pango/cairo from Homebrew
> Pango/Cairo/Glib/Gtk3, latest tarballs installed from CPAN
> 
> $ for PKG in glib pango cairo gtk+3; do brew info $PKG 2>/dev/null | head -n 
> 1; done
> glib: stable 2.50.0 (bottled)
> pango: stable 1.40.3 (bottled)
> cairo: stable 1.14.6 (bottled)
> gtk+3: stable 3.22.1 (bottled)
> 
> Darwin foo.example.com 15.6.0 Darwin Kernel Version 15.6.0: Mon Aug 29
> 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64

Sure, I'm using both

- the Travis-CI Mac OS X build workers (OS X 10.11.6 and Xcode 7.3.1 by 
default) and
- a Vagrant VM with Yosemite (OS X 10.10.4 and Xcode 6.4)

    vagrant-osx:~ vagrant$ sw_vers
    ProductName:    Mac OS X
    ProductVersion: 10.10.4
    BuildVersion:   14E46

    vagrant-osx:~ vagrant$ uname -a
    Darwin vagrant-osx.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 
11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64

On the Vagrant VM, I am currently using the system Perl:

    This is perl 5, version 18, subversion 2 (v5.18.2) built for 
darwin-thread-multi-2level
    (with 2 registered patches, see perl -V for more detail)

With these Homebrew packages:

    vagrant-osx:~ vagrant$ for PKG in glib pango cairo gtk+3; do brew info $PKG 
2>/dev/null | head -n 1; done
    glib: stable 2.50.0 (bottled)
    qpango: stable 1.40.3 (bottled), HEAD
    cairo: stable 1.14.6 (bottled), devel 1.15.2, HEAD
    gtk+3: stable 3.22.1 (bottled)

I see that the problem is that I am using the system Perl. I installed
5.24.0 using plenv just now and see that Glib installs fine under that
Perl. The difference in ccflags is:

    vagrant-osx:~ vagrant$ plenv shell system; perl -MConfig -E 'say 
$Config{ccflags}'
    -arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN 
-fno-strict-aliasing -fstack-protector

    vagrant-osx:~ vagrant$ plenv shell 5.24.0; perl -MConfig -E 'say 
$Config{ccflags}'
    -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe 
-fstack-protector-strong -I/usr/local/include

Regards,
- Zaki Mughal


P.S. Another thing that someone mentioned is that I could use
--universal with homebrew to build glib myself.
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to