In preparation for the alpha release, I'm trying to apply the normal
build scripts I've used for 1.6 releases to 2.0 so that the resulting
binary will run on any Mac, system 10.4 or higher. The difference is
that I do the following:

BuildSystem=`${LyxSourceDir}/config/config.guess`
HostSystemIntel="i686-apple-darwin8"
HostSystemPPC="powerpc-apple-darwin8"

MACOSX_DEPLOYMENT_TARGET="10.4"; export MACOSX_DEPLOYMENT_TARGET
SDKROOT="/Developer/SDKs/MacOSX10.4u.sdk"; export SDKROOT

CFLAGS="-isysroot ${SDKROOT} -arch ppc "; export CFLAGS
LDFLAGS="-isysroot ${SDKROOT} -Wl,-syslibroot,${SDKROOT}
-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:${SDKROOT}/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
-arch ppc "; export LDFLAGS
CPPFLAGS="-isysroot ${SDKROOT} -arch ppc "; export CPPFLAGS

./configure --with-qt4-dir="$QtInstallDir" --without-aspell
--enable-optimization=-O3 --with-included-gettext
--host="$HostSystemPPC" --build="$BuildSystem"
--enable-build-type=rel --with-extra-prefix=/usr/local

(And similarly for Intel.)

At this point, I get a configure warning (for both PPC and Intel):

checking stddef.h usability... no
checking stddef.h presence... yes
configure: WARNING: stddef.h: present but cannot be compiled
configure: WARNING: stddef.h:     check for missing prerequisite headers?
configure: WARNING: stddef.h: see the Autoconf documentation
configure: WARNING: stddef.h:     section "Present But Cannot Be Compiled"
configure: WARNING: stddef.h: proceeding with the preprocessor's result
configure: WARNING: stddef.h: in the future, the compiler will take precedence
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to lyx-devel@lists.lyx.org ##
configure: WARNING:     ## -------------------------------------- ##


config.log says:

configure:7468: gcc -c -O3 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-arch ppc  -I/usr/local/include  conftest.c >&5
conftest.c: In function 'main':
conftest.c:56: error: size of array 'test_array' is negative
configure:7475: $? = 1


The result is the following compile error:

Making all in intl
gcc -c 
-DLOCALEDIR=\"/Users/bennett/Desktop/LyX2alpha.app/Contents/Resources/locale\"
-DLOCALE_ALIAS_PATH=\"/Users/bennett/Desktop/LyX2alpha.app/Contents/Resources/locale\"
-DLIBDIR=\"/Users/bennett/Desktop/LyX2alpha.app/Contents/Resources\"
-DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1
-DIN_LIBRARY 
-DINSTALLDIR=\"/Users/bennett/Desktop/LyX2alpha.app/Contents/Resources\"
-DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix
-Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H
-I. -I. -I.. -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc
-I/usr/local/include  -O3 -fvisibility=hidden  bindtextdom.c
In file included from bindtextdom.c:23:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stddef.h:74: error: two or
more data types in declaration specifiers
make[2]: *** [bindtextdom.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


Further testing reveals that it's only the setting of CPPFLAGS that
causes the configure warning,
and this is true whether I compile for ppc or for i686.

Am I doing something wrong?

BH

Reply via email to