On Fri, 13 Dec 2013, Niels Möller wrote:
Joachim Strömbergson joachim@secworks.se writes:
I'm trying to get nettle to build in OSX but are having some problems. If i simply do the bootstrap-configure-make I get problems in the assembly phase:
I don't use osx myself, and I'm not very familiar with it.
Just for what it's worth - I've been using nettle on OS X and it has worked just fine up including the 2.7 release.
gcc -I. -DHAVE_CONFIG_H -g -O2 -ggdb3 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT gcm-hash8.o -MD -MP -MF gcm-hash8.o.d -fPIC -c gcm-hash8.s gcm-hash8.s:220:18: error: unexpected token in '.section' directive .section .rodata
What does the assembler/linker expect? What do you get from a C file containing
static const uint16_t t[4] = {1,2,3,4};
?
This seems to output something like this: .section __TEXT,__const
and as being: Apple Inc version cctools-846.2.4, GNU assembler version 1.38
That sounds like an ancient version of gas. Searching for it turns up a fred fish CD from 1994. I most likely had it installed back in the days. See http://ftp.back2roots.org/back2roots/cds/fred_fish/freshfish_vol05_9407/gnu/...
But it must have been patched heavily by Apple if it supports x86_64...
It's indeed an old version forked from binutils, heavily patched and maintained by Apple since, but it's diverged pretty much from most things that have been added since.
I'd strongly suggest first trying to build with modern gcc and binutils, before trying to find workarounds for apple's tools.
Well - this is the stock compiler toolchain that you get with the system - the vast majority of developers on OS X use that instead of building their own toolchains. As said before, all previous releases of nettle have worked just fine on OS X.
// Martin