[Expat-bugs] [ expat-Bugs-1647805 ] Expat 2.0 does not build on Mac OS X 10.4 / intel

SourceForge.net noreply at sourceforge.net
Tue May 8 12:38:29 CEST 2007


Bugs item #1647805, was opened at 2007-01-30 11:25
Message generated for change (Comment added) made by hmaldonado
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1647805&group_id=10127

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build control
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Matthias Wiesmann (wiesmann)
Assigned to: Greg Stein (gstein)
Summary: Expat 2.0 does not build on Mac OS X 10.4 / intel

Initial Comment:
Installing expat 2.0.0 on Mac OS X (i386-apple-darwin8.8.2) fails with the following error:

/bin/sh ./libtool --silent --mode=compile gcc -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H   -o lib/xmlparse.lo -c lib/xmlparse.c
lib/xmlparse.c:77:2: error: #error memmove does not exist on this platform, nor is a substitute available
make: *** [lib/xmlparse.lo] Error 1

Output of configure script:

checking build system type... i686-apple-darwin8.8.2
checking host system type... i686-apple-darwin8.8.2
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm -p output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common
checking if gcc PIC flag -fno-common works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin8.8.2 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin8.8.2 dyld
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether gcc accepts -fexceptions... yes
checking for ANSI C header files... (cached) yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for memmove... no
checking for bcopy... no
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for off_t... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... no
checking for working mmap... no
checking for an ANSI C99-conforming __func__... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating expat_config.h
config.status: expat_config.h is unchanged


----------------------------------------------------------------------

Comment By: Hazael (hmaldonado)
Date: 2007-05-08 10:38

Message:
Logged In: YES 
user_id=1788089
Originator: NO

I have the same problem on a combination of Mac OS X 10.4.9 + expat
(Macport version) + Intel C/C++ Compiler fo Mac.

I really don't know who this error concerns to but it seems it is related
with the Intecl C/C++ compilers more than anything else. The problem arises
because the configure script can not find memmove and bcopy. I have
extracted the code generated by autoconf to test for the presence of
memmove and tried to compile it with gcc and icc. GCC has not problems
compiling it which as expected means that expat can be compiled with gcc
without any trouble.

However, ICC (Intel compiler) can not compile the code which means that
the configure test will fail and memmove is considered as not present in
the system which in turn triggers compilation errors.

autoconf uses the following compiler options to compile the test code:

icc -o conftest -Wall -Wmissing-prototypes -Wstrict-prototypes
-fexceptions ac_check_memmove.c

And according to my research -fexceptions is the option making icc to
fail. According to gcc documentation the -fexceptions option can make gcc
to link the code to libstdc++ even when it is not a C++ program. However,
it seems that icc does not do the same and outputs the following messages:
ac_check_memmove.c(49): warning #310: old-style parameter list
(anachronism)
  char memmove ();
       ^

ac_check_memmove.c(49): warning #1419: external declaration in primary
source file
  char memmove ();
       ^

ac_check_memmove.c(67): remark #111: statement is unreachable
    return 0;
    ^

ld: Undefined symbols:
___gxx_personality_v0


The undefined symbol ___gxx_personality_v0 is, not surprisely, found at
the libstdc++ library which is automatically included by gcc (trigger by
the -fexceptions option) but not included by icc. If the option -lstdc++ is
given manually to icc then the compilation succeeds.

I think this explains the error and a quick solution for compiling expat
will be adding -lstdc++ to the LDFLAGS environment variable at
configuration time.

LDFLAGS="-lstdc++" ./configure --prefix=/path/to/


----------------------------------------------------------------------

Comment By: Sebastian Pipping (hartwork)
Date: 2007-05-02 18:55

Message:
Logged In: YES 
user_id=1022691
Originator: NO

 
 
wiesmann, please let us know if it was your
build environment's fault so we know if we
can close the bug. Thank you!



Sebastian
 
 

----------------------------------------------------------------------

Comment By: Elias Pipping (pipping)
Date: 2007-05-02 13:20

Message:
Logged In: YES 
user_id=1697847
Originator: NO

> I am using Mac ports (MacPorts 1.320). I know that expat builds
correctly
> on PPC machines, as I use it on my G4 Powerbook.

I'm on an intel mac, too (see above).

----------------------------------------------------------------------

Comment By: Elias Pipping (pipping)
Date: 2007-05-02 13:17

Message:
Logged In: YES 
user_id=1697847
Originator: NO

You might want to consider running a selfupdate via 'sudo port selfupdate'
to get MacPorts 1.4.3. The portfile itself basically hasn't changed for
nearly a year, but the base-code has (significantly).

Also, make sure you have the latest version of the Developer Tools
installed, (on an intel mac the output of 'gcc --version' should be:
i686-apple-darwin8-gcc-4.0.1 ... build 5367)


----------------------------------------------------------------------

Comment By: Matthias Wiesmann (wiesmann)
Date: 2007-05-02 13:08

Message:
Logged In: YES 
user_id=117374
Originator: YES

I am using Mac ports (MacPorts 1.320). I know that expat builds correctly
on PPC machines, as I use it on my G4 Powerbook.

----------------------------------------------------------------------

Comment By: Elias Pipping (pipping)
Date: 2007-05-02 12:55

Message:
Logged In: YES 
user_id=1697847
Originator: NO

works fine on my mac (Mac OS X 10.4.9, i386-apple-darwin8.9.1, latest
version from cvs, developer tools 2.4.1)

/bin/sh ./libtool --silent --mode=compile gcc -std=gnu99 -I./lib -I. -g
-O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions 
-DHAVE_EXPAT_CONFIG_H -o lib/xmlparse.lo -c lib/xmlparse.c
/bin/sh ./libtool --silent --mode=compile gcc -std=gnu99 -I./lib -I. -g
-O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions 
-DHAVE_EXPAT_CONFIG_H -o lib/xmltok.lo -c lib/xmltok.c
...



----------------------------------------------------------------------

Comment By: Sebastian Pipping (hartwork)
Date: 2007-04-27 09:56

Message:
Logged In: YES 
user_id=1022691
Originator: NO

Have you tried the MacPorts port for Expat?
http://trac.macports.org/projects/macports/browser/trunk/dports/textproc/expat/Portfile



Sebastian


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1647805&group_id=10127


More information about the Expat-bugs mailing list