[CWB] Installing cwb from SVN in Mac OS Sierra

Hardie, Andrew a.hardie at lancaster.ac.uk
Mon Oct 24 12:15:18 CEST 2016


This is an error in Glib configuration not in CWB.

I googled a bit for similar error reports and found a number of different reports that all seem to do with 32 bit vs. 64 bit compilation of GLIb.

This seems to follow from the fact that compilation of GLib fails here:

G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64))

That is, Glib is checking the integer size, and forcing compilation to abort because it isn’t the expected size.

Examples of people getting this error when compiling software other than CWB:
http://stackoverflow.com/questions/37935605/32-bit-compilation-failing-on-64-bit-ubuntu-16-04
http://mazurov.eu/blog/ubuntu/32-bit-compilation-failing-on-64-bit-ubuntu-16-04.html
https://github.com/madler/zlib/issues/109

One particularly informative thread is:
https://lists.freedesktop.org/archives/gstreamer-devel/2015-December/055711.html

Note especially this reply
https://lists.freedesktop.org/archives/gstreamer-devel/2015-December/055712.html


“Are you sure the compiler is creating 64 bit binaries there? Maybe you
call the wrong one or -m64 has to be passed to the compiler.

The error looks like using a 32 bit compiler with 64 bit headers of
glib.”


Similar problems have been reported to us before:

This problem in 2012, part of a long thread on Mac compilation:
http://liste.sslmit.unibo.it/pipermail/cwb/2012-August/001121.html
(click on [thread] at the bottom to see the whole conversation…)

Stefan’s solution in that mail may be relevant to you. I see “-arch x86_64 -arch i386” in your gcc calls which suggests you are targeting the Universal binary. But maybe you did not install Glib as universal when you added it using homebrew?

best

Andrew.

From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of José Manuel Martínez Martínez
Sent: 23 October 2016 17:38
To: Open source development of the Corpus WorkBench
Subject: [CWB] Installing cwb from SVN in Mac OS Sierra


Dear all,

I am trying to install in my Mac the last version in trunk (903).

I managed to do it in the past. However, this time it seems there is an error.

I am using a MacOS Sierra 10.12

I am using homebrew and I have installed:

- pkg-config: stable 0.29.1
- glib: stable 2.50.1
- pcre: stable 8.39
- readline: stable 7.0

I run the shell commands. But `make all` ends with an error. See below.

Any ideas? Is this a know issue? Which version from SVN could I take that is know to work with MacOS Sierra?

Best!

jmm

## Error message



$ make all
--------------------------------- BUILDING CORPUS LIBRARY (CL)
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C cl
rm -f globals.o
/usr/bin/gcc -c  -o globals.o -Wall -O3 -arch x86_64 -arch i386 -march=core2 -mtune=core2   -DUSE_TERMCAP -DUSE_READLINE -DREGISTRY_DEFAULT_PATH=\""/usr/local/cwb-3.4.10/share/cwb/registry"\" -DCOMPILE_DATE=\""Sun Oct 23 18:35:28 CEST 2016"\" -DVERSION=\"3.4.10\" -I/usr/local/Cellar/glib/2.50.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.50.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/pcre/8.39/include -I'/usr/local/Cellar/readline/7.0/include'  globals.c
rm -f macros.o
/usr/bin/gcc -c  -o macros.o -Wall -O3 -arch x86_64 -arch i386 -march=core2 -mtune=core2   -DUSE_TERMCAP -DUSE_READLINE -DREGISTRY_DEFAULT_PATH=\""/usr/local/cwb-3.4.10/share/cwb/registry"\" -DCOMPILE_DATE=\""Sun Oct 23 18:35:28 CEST 2016"\" -DVERSION=\"3.4.10\" -I/usr/local/Cellar/glib/2.50.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.50.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/pcre/8.39/include -I'/usr/local/Cellar/readline/7.0/include'  macros.c
macros.c:404:12: warning: format string is not a string literal
      (potentially insecure) [-Wformat-security]
    printf(label);
           ^~~~~
macros.c:404:12: note: treat the string as an argument to avoid this
    printf(label);
           ^
           "%s",
1 warning generated.
macros.c:404:12: warning: format string is not a string literal
      (potentially insecure) [-Wformat-security]
    printf(label);
           ^~~~~
macros.c:404:12: note: treat the string as an argument to avoid this
    printf(label);
           ^
           "%s",
1 warning generated.
rm -f list.o
/usr/bin/gcc -c  -o list.o -Wall -O3 -arch x86_64 -arch i386 -march=core2 -mtune=core2   -DUSE_TERMCAP -DUSE_READLINE -DREGISTRY_DEFAULT_PATH=\""/usr/local/cwb-3.4.10/share/cwb/registry"\" -DCOMPILE_DATE=\""Sun Oct 23 18:35:29 CEST 2016"\" -DVERSION=\"3.4.10\" -I/usr/local/Cellar/glib/2.50.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.50.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/pcre/8.39/include -I'/usr/local/Cellar/readline/7.0/include'  list.c
rm -f lexhash.o
/usr/bin/gcc -c  -o lexhash.o -Wall -O3 -arch x86_64 -arch i386 -march=core2 -mtune=core2   -DUSE_TERMCAP -DUSE_READLINE -DREGISTRY_DEFAULT_PATH=\""/usr/local/cwb-3.4.10/share/cwb/registry"\" -DCOMPILE_DATE=\""Sun Oct 23 18:35:29 CEST 2016"\" -DVERSION=\"3.4.10\" -I/usr/local/Cellar/glib/2.50.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.50.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/pcre/8.39/include -I'/usr/local/Cellar/readline/7.0/include'  lexhash.c
rm -f ngram-hash.o
/usr/bin/gcc -c  -o ngram-hash.o -Wall -O3 -arch x86_64 -arch i386 -march=core2 -mtune=core2   -DUSE_TERMCAP -DUSE_READLINE -DREGISTRY_DEFAULT_PATH=\""/usr/local/cwb-3.4.10/share/cwb/registry"\" -DCOMPILE_DATE=\""Sun Oct 23 18:35:29 CEST 2016"\" -DVERSION=\"3.4.10\" -I/usr/local/Cellar/glib/2.50.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.50.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/pcre/8.39/include -I'/usr/local/Cellar/readline/7.0/include'  ngram-hash.c
rm -f bitfields.o
/usr/bin/gcc -c  -o bitfields.o -Wall -O3 -arch x86_64 -arch i386 -march=core2 -mtune=core2   -DUSE_TERMCAP -DUSE_READLINE -DREGISTRY_DEFAULT_PATH=\""/usr/local/cwb-3.4.10/share/cwb/registry"\" -DCOMPILE_DATE=\""Sun Oct 23 18:35:29 CEST 2016"\" -DVERSION=\"3.4.10\" -I/usr/local/Cellar/glib/2.50.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.50.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/pcre/8.39/include -I'/usr/local/Cellar/readline/7.0/include'  bitfields.c
rm -f storage.o
/usr/bin/gcc -c  -o storage.o -Wall -O3 -arch x86_64 -arch i386 -march=core2 -mtune=core2   -DUSE_TERMCAP -DUSE_READLINE -DREGISTRY_DEFAULT_PATH=\""/usr/local/cwb-3.4.10/share/cwb/registry"\" -DCOMPILE_DATE=\""Sun Oct 23 18:35:29 CEST 2016"\" -DVERSION=\"3.4.10\" -I/usr/local/Cellar/glib/2.50.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.50.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/pcre/8.39/include -I'/usr/local/Cellar/readline/7.0/include'  storage.c
rm -f fileutils.o
/usr/bin/gcc -c  -o fileutils.o -Wall -O3 -arch x86_64 -arch i386 -march=core2 -mtune=core2   -DUSE_TERMCAP -DUSE_READLINE -DREGISTRY_DEFAULT_PATH=\""/usr/local/cwb-3.4.10/share/cwb/registry"\" -DCOMPILE_DATE=\""Sun Oct 23 18:35:30 CEST 2016"\" -DVERSION=\"3.4.10\" -I/usr/local/Cellar/glib/2.50.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.50.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/pcre/8.39/include -I'/usr/local/Cellar/readline/7.0/include'  fileutils.c
rm -f special-chars.o
/usr/bin/gcc -c  -o special-chars.o -Wall -O3 -arch x86_64 -arch i386 -march=core2 -mtune=core2   -DUSE_TERMCAP -DUSE_READLINE -DREGISTRY_DEFAULT_PATH=\""/usr/local/cwb-3.4.10/share/cwb/registry"\" -DCOMPILE_DATE=\""Sun Oct 23 18:35:30 CEST 2016"\" -DVERSION=\"3.4.10\" -I/usr/local/Cellar/glib/2.50.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.50.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/pcre/8.39/include -I'/usr/local/Cellar/readline/7.0/include'  special-chars.c
In file included from special-chars.c:24:
In file included from /usr/local/Cellar/glib/2.50.1/include/glib-2.0/glib.h:30:
In file included from /usr/local/Cellar/glib/2.50.1/include/glib-2.0/glib/galloca.h:32:
/usr/local/Cellar/glib/2.50.1/include/glib-2.0/glib/gtypes.h:423:3: error:
      '_GStaticAssertCompileTimeAssertion_0' declared as an array with a
      negative size
  G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.50.1/include/glib-2.0/glib/gmacros.h:232:103: note:
      expanded from macro 'G_STATIC_ASSERT'
  ...(_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GN...
                                                        ^~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [special-chars.o] Error 1
make: *** [all] Error 2






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20161024/87ff7a8d/attachment-0001.html>


More information about the CWB mailing list