[Spice-devel] Spice-iOS
Darren Xiong
djxiong at gmail.com
Mon Feb 6 01:46:54 PST 2012
hi,all
Is there any further steps on spice-ios? These days I am porting glib
on iOS, but it always complains there is no gettext, but I have cross
compiled gettext successfully.
Any suggestion is appreciated.
The command to configure glib to iOS:
export DEVELOPER="/Developer"
export ROOTDIR=~
export PLATFORM="iPhoneOS"
export SDK="4.3"
export ARCH="armv7"
export PKG_CONFIG="/opt/local/bin/pkg-config"
export PKG_CONFIG_PATH="${ROOTDIR}/lib/pkgconfig"
export LD_LIBRARY_PATH="${ROOTDIR}/lib"
export DEVROOT="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer"
export SDKROOT="${DEVROOT}/SDKs/${PLATFORM}${SDK}.sdk"
export CC=${DEVROOT}/usr/bin/gcc
export LD=${DEVROOT}/usr/bin/ld
export CPP=${DEVROOT}/usr/bin/cpp
export CXX=${DEVROOT}/usr/bin/g++
unset AR
unset AS
export NM=${DEVROOT}/usr/bin/nm
export CXXCPP=${DEVROOT}/usr/bin/cpp
export RANLIB=${DEVROOT}/usr/bin/ranlib
export LDFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${SDKROOT}
-L${ROOTDIR}/lib"
export CFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${SDKROOT}
-I${ROOTDIR}/include"
export CXXFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${SDKROOT}
-I${ROOTDIR}/include"
#export LDFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${SDKROOT}
-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib"
#export CFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${SDKROOT}
-I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/include/"
#export CXXFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${SDKROOT}
-I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/include/"
if [ "${SDK}" == "3.2" ]
then
if [ "${PLATFORM}" == "iPhoneSimulator" ]
then
# Work around linker error "ld: library not found for -lcrt1.10.6.o" on
iPhone Simulator 3.2
export LDFLAGS="${LDFLAGS} -mmacosx-version-min=10.5"
export CFLAGS="${CFLAGS} -mmacosx-version-min=10.5"
export CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=10.5"
fi
fi
./configure --host=${ARCH}-apple-darwin --prefix=${ROOTDIR}
--enable-static=yes --enable-shared=no
the configure log file contents are:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for armv7-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for armv7-apple-darwin-gcc...
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc accepts -g...
yes
checking for /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc... gcc3
checking how to run the C preprocessor...
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp
checking build system type... i386-apple-darwin10.7.0
checking host system type... armv7-apple-darwin
checking for the BeOS... no
checking for Win32... no
checking for Mac OS X Carbon support... no
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether we are using the GNU C Library 2.1 or newer... no
checking whether to enable garbage collector friendliness... no
checking whether to disable memory pools... no
checking for armv7-apple-darwin-c++...
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++
checking whether we are using the GNU C++ compiler... yes
checking whether
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ accepts -g...
yes
checking dependency style of
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++... gcc3
checking for armv7-apple-darwin-gcc... (cached)
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc accepts -g...
(cached) yes
checking for /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
option to accept ISO C89... (cached) none needed
checking dependency style of
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc... (cached)
gcc3
checking whether
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc and cc
understand -c and -o together... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking pkg-config is at least version 0.16... yes
checking for gawk... (cached) awk
checking for perl5... no
checking for perl... perl
checking for indent... indent
checking for perl... /usr/bin/perl
checking for a Python interpreter with version >= 2.4... python
checking for python... /usr/bin/python
checking for python version... 2.6
checking for python platform... darwin
checking for python script directory...
${prefix}/lib/python2.6/site-packages
checking for python extension module directory...
${exec_prefix}/lib/python2.6/site-packages
checking for iconv_open... no
checking for libiconv_open in -liconv... yes
checking Whether to cache iconv descriptors... yes
checking for ZLIB... yes
checking for LIBFFI... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... no
checking for libintl.h... yes
checking for ngettext in libc... no
checking for bindtextdomain in -lintl... no
checking if -liconv is needed to use gettext...
checking for ngettext in -lintl... no
the contents print on screen are:
configure: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used
readlink: illegal option -- f
usage: readlink [-n] [file ...]
configure: WARNING: libintl.h: accepted by the compiler, rejected by the
preprocessor!
configure: WARNING: libintl.h: proceeding with the compiler's result
configure: error:
*** You must have either have gettext support in your C library, or use the
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
ls ~/iPhoneOS-V7-4.3/lib/
charset.alias libasprintf.la libcharset.la libffi.la
libgettextpo.a libgpg-error.la libintl.la libpixman-1.la
libturbojpeg.a
engines libcelt.a libcrypto.a libgcrypt.a
libgettextpo.la libiconv.a libjpeg.a libsasl2.a
libturbojpeg.la
gettext libcelt.la libffi-3.0.11-rc2 libgcrypt.la
libgettextsrc.la libiconv.la libjpeg.la libsasl2.la
libz.a
libasprintf.a libcharset.a libffi.a libgettextlib.la
libgpg-error.a libintl.a libpixman-1.a libssl.a
pkgconfig
ls ~/iPhoneOS-V7-4.3/lib/pkgconfig/
celt.pc gettext.pc libcrypto.pc libffi.pc libiconv.pc
libintl.pc libssl.pc openssl.pc pixman-1.pc zlib.pc
gettext.pc and libintl.pc are added manully.
vi ~/iPhoneOS-V7-4.3/lib/pkgconfig/gettext.pc
# gettext pkg-config source file
prefix=/Users/djxiong/iPhoneOS-V7-4.3
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: libgettextlib
Description: gettext is a low-level lib
Version: 0.18.1
Requires:
Conflicts:
Libs: -L${libdir} -lgettextpo
Cflags: -I${includedir}
Is there anything wrong above? Or is it possible to port glib on iOS, and
even if I port glib on iOS successfully, there is still much work to do in
order to run spicy? Whether shoud I rewrite spicy using object-c from
scratch?
thanks
--Darren
2011/7/13 Yonit Halperin <yhalperi at redhat.com>
> On 07/08/2011 06:09 PM, Cliff Sharp wrote:
>
>> Great suggestion.
>> My plan has been to convert to OpenGL - then spice-ios would have the
>> potential to run on most every platform with decent performance.
>> OS/X runs OpenGL and iOS runs OpenGL ES. I know how to implement OpenGL
>> is such a way that it would be the same code base on both of these
>> platforms and with none to minor changes would run on a lot of other
>> platforms.
>>
>> If you wish to use OpenGL, common/gl_canvas.c should help. We currently
> don't use it, I'm not sure why, maybe it didn't improved performance
> compared to software canvas.
>
>> Who would be a good person to ask to maybe provide some guidance from a
>> spice architectural standpoint?
>>
>> I have spent a lot of hours digging the the current code but without
>> knowing all the tons of libraries very well I feel like I am just
>> spinning my wheels.
>> If I could just get a little help with a starting point, in the code, I
>> could start making some progress.
>>
>> Thanks
>>
>> On Jul 8, 2011, at 5:28 AM, Attila Sukosd wrote:
>>
>> Hi,
>>>
>>> Wouldn't an idea be to get the OpenGL version (+ glut?) in a usable
>>> shape? I would guess transitioning it to OpenGL ES shouldn't be too
>>> difficult either for android/ios..
>>>
>>> Best Regards,
>>> Attila Sukosd
>>>
>>> ------------------------------**-----------
>>> DTU Computing Center - www.cc.dtu.dk <http://www.cc.dtu.dk>
>>> attila at cc.dtu.dk <mailto:attila at cc.dtu.dk>, gbaras at student.dtu.dk
>>> <mailto:gbaras at student.dtu.dk>**, s070600 at student.dtu.dk
>>> <mailto:s070600 at student.dtu.dk**>
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Jul 8, 2011 at 9:35 AM, Christophe Fergeau
>>> <cfergeau at redhat.com <mailto:cfergeau at redhat.com>> wrote:
>>>
>>>> Hi Cliff,
>>>>
>>>> On Thu, Jul 07, 2011 at 06:12:07PM -0500, Cliff Sharp wrote:
>>>>
>>>>> I would like to ask a question to extract a fairly detailed response
>>>>> from
>>>>> those who are most familiar with the spice architecture.
>>>>>
>>>>> What (in some detail) would be needed, as far as architecture and
>>>>> software development, to maybe start with the spice-protocol (i.e. as
>>>>> little as possible) and build a command line spice client to run on a
>>>>> platform?
>>>>>
>>>>
>>>> Your best bet might be to look at what spice-glib does, it's part of
>>>> spice-gtk, but it doesn't have any GUI-related dependency, so it
>>>> should be
>>>> pretty light on deps, and it handles most of the low-level protocol
>>>> interactions with a spice-server. Marc-André might be able to give a
>>>> more
>>>> detailed description of what this provides.
>>>>
>>>> Christophe
>>>>
>>>> ______________________________**_________________
>>>> Spice-devel mailing list
>>>> Spice-devel at lists.freedesktop.**org <Spice-devel at lists.freedesktop.org>
>>>> <mailto:Spice-devel at lists.**freedesktop.org<Spice-devel at lists.freedesktop.org>
>>>> >
>>>> http://lists.freedesktop.org/**mailman/listinfo/spice-devel<http://lists.freedesktop.org/mailman/listinfo/spice-devel>
>>>>
>>>>
>>>>
>>
>> ____
>>
>> Cliff Sharp | csharp at vbridges.com <mailto:csharp at vbridges.com>
>>
>>
>>
>>
>>
>>
>>
>> ______________________________**_________________
>> Spice-devel mailing list
>> Spice-devel at lists.freedesktop.**org <Spice-devel at lists.freedesktop.org>
>> http://lists.freedesktop.org/**mailman/listinfo/spice-devel<http://lists.freedesktop.org/mailman/listinfo/spice-devel>
>>
>
> ______________________________**_________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.**org <Spice-devel at lists.freedesktop.org>
> http://lists.freedesktop.org/**mailman/listinfo/spice-devel<http://lists.freedesktop.org/mailman/listinfo/spice-devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120206/b7ac323f/attachment-0001.htm>
More information about the Spice-devel
mailing list