Hi,
I just tried to build Xapian 1.0.15 on Snow Leopard and it sput out this
error:
g++ -DHAVE_CONFIG_H -I. -I./common -I./include -Wall -W -Wredundant-decls
-Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wformat-security
-fno-gnu-keywords -Woverloaded-virtual -Wundef -Wshadow
-Wstrict-null-sentinel -Wshadow -Wstrict-overflow=1 -fvisibility=hidden -g
-O2 -MT common/getopt.lo -MD -MP -MF common/.deps/getopt.Tpo -c
common/getopt.cc -fno-common -DPIC -o common/.libs/getopt.o
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61,
from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41,
from /usr/include/c++/4.2.1/cstring:50,
from common/getopt.cc:164:
common/getopt.cc:84: error: previous declaration of ?char* optarg? with
?C++? linkage
/usr/include/unistd.h:515: error: conflicts with new declaration with ?C?
linkage
common/getopt.cc:99: error: previous declaration of ?int optind? with ?C++?
linkage
/usr/include/unistd.h:516: error: conflicts with new declaration with ?C?
linkage
common/getopt.cc:119: error: previous declaration of ?int opterr? with ?C++?
linkage
/usr/include/unistd.h:516: error: conflicts with new declaration with ?C?
linkage
common/getopt.cc:125: error: previous declaration of ?int optopt? with ?C++?
linkage
/usr/include/unistd.h:516: error: conflicts with new declaration with ?C?
linkage
make[2]: *** [common/getopt.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Reproduce with:
- wget http://oligarchy.co.uk/xapian/1.0.15/xapian-core-1.0.15.tar.gz
- tar zxvf xapian-core-1.0.15.tar.gz
- cd xapian-core-1.0.15/
- ./configure --prefix=/usr/local
- make
Any advice/fixes?
Cheers,
Chris Lloyd
I am having the same issue when i try to rebuild my development
environment after upgrade to snow leopard.
Since a lot of mac user will upgrade and this will affect a lot of
people.
.deps/getopt.Tpo -c common/getopt.cc -fno-common -DPIC -o
common/.libs/getopt.o
In file included from /usr/include/c++/4.2.1/i686-apple-darwin10/
x86_64/bits/os_defines.h:61,
from /usr/include/c++/4.2.1/i686-apple-darwin10/
x86_64/bits/c++config.h:41,
from /usr/include/c++/4.2.1/cstring:50,
from common/getopt.cc:164:
common/getopt.cc:84: error: previous declaration of ?char* optarg?
with ?C++? linkage
/usr/include/unistd.h:515: error: conflicts with new declaration with
?C? linkage
common/getopt.cc:99: error: previous declaration of ?int optind? with
?C++? linkage
/usr/include/unistd.h:516: error: conflicts with new declaration with
?C? linkage
common/getopt.cc:119: error: previous declaration of ?int opterr? with
?C++? linkage
/usr/include/unistd.h:516: error: conflicts with new declaration with
?C? linkage
common/getopt.cc:125: error: previous declaration of ?int optopt? with
?C++? linkage
/usr/include/unistd.h:516: error: conflicts with new declaration with
?C? linkage
make[2]: *** [common/getopt.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
On Sun, Aug 30, 2009 at 01:55:22PM +1000, Chris Lloyd wrote:> I just tried to build Xapian 1.0.15 on Snow Leopard and it sput out this > error [...]Our Mac build machine will be upgraded to Snow Leopard at some point next weekend (Apple having foolishly released it just before a bank holiday in the UK, and then apparently shipped my copy via the Congo). If anyone can provide a patch that fixes it before then, please add it to ticket J -- James Aylett talktorex.co.uk - xapian.org - uncertaintydivision.org
On Sun, Aug 30, 2009 at 06:27:45PM +0100, James Aylett wrote:> > I just tried to build Xapian 1.0.15 on Snow Leopard and it sput out this > > error [...] > > Our Mac build machine will be upgraded to Snow Leopard at some point > next weekend (Apple having foolishly released it just before a bank > holiday in the UK, and then apparently shipped my copy via the > Congo). If anyone can provide a patch that fixes it before then, > please add it to ticketGah, hit the wrong key. Please add any patches or further details to ticket 396: <http://trac.xapian.org/ticket/396>. J -- James Aylett talktorex.co.uk - xapian.org - uncertaintydivision.org