Re: Building Clearsilver under LTIB

Rick Walsh <[email protected]> Tue, 5 May 2009 11:19:23 -0400
Newsgroups gmane.text.clearsilver.general
Message-ID <[email protected]>
I agree.  The cross-compile does work for my C/CPP files but the Python
stuff does not.  Brandon is correct about setup.py -- it's not friendly with
the cross-compiler.  However it seems like its just a couple options that
are hanging it up.  If I can get it to omit "-march=i586 -mtune=i686" from
the command, I think the darn thing would work.  Admittedly, I'm a novice
when it comes to setup.py, so if someone has a suggestion...

I guess as a fallback I can always manually compile it using the command
line setup.py gives me.

make[1]: Leaving directory
`/home/rwalsh05/LTIB/cmn100/rpm/BUILD/clearsilver-0.10.5/cs'
make[1]: Entering directory
`/home/rwalsh05/LTIB/cmn100/rpm/BUILD/clearsilver-0.10.5/cgi'
make[1]: Nothing to be done for `everything'.
make[1]: Leaving directory
`/home/rwalsh05/LTIB/cmn100/rpm/BUILD/clearsilver-0.10.5/cgi'
make[1]: Entering directory
`/home/rwalsh05/LTIB/cmn100/rpm/BUILD/clearsilver-0.10.5/python'
rm -f neo_cgi.so
CC="gcc" LDSHARED="gcc -shared -fPIC" /usr/bin/python setup.py build_ext
--inplace
adding lib_path $(LIB_DIR)
adding lib z
Overriding setup's CC from gcc -pthread to gcc
running build_ext
building 'neo_cgi' extension
gcc -fno-strict-aliasing -DNDEBUG -O2 -march=i586 -mtune=i686
-fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -g -fwrapv
-fPIC -I../ -I/usr/include/python2.5 -c neo_cgi.c -o
build/temp.linux-i686-2.5/neo_cgi.o
cc1: error: unrecognized command line option "-march=i586"
neo_cgi.c:1: error: bad value (i686) for -mtune= switch
error: command 'gcc' failed with exit status 1
make[1]: *** [neo_cgi.so] Error 1
make[1]: Leaving directory
`/home/rwalsh05/LTIB/cmn100/rpm/BUILD/clearsilver-0.10.5/python'
make: *** [cs] Error 2
error: Bad exit status from /home/rwalsh05/LTIB/cmn100/tmp/rpm-tmp.53647
(%build)




On Tue, May 5, 2009 at 4:34 AM, Mario Gliewe <[email protected]> wrote:

> Hello,
>
> cross compiling clearsilver is working fine, one has to remove
> the 'test' target in cs/makefile by hand though.
>
> this is what i'm doing on my linux-host to cross-compile using mingw
> (excerpt from my Makefile):
>
> -snip-
>
> MINGW=i586-mingw32msvc
>
> windows/clearsilver/rules.mk:
>    CC=${MINGW}-gcc \
>    AR=${MINGW}ar \
>    CXX=${MINGW}-g++ \
>    RANLIB=${MINGW}-ranlib \
>        cd windows/clearsilver; \
>        ./configure --host=${MINGW} --target=${MINGW} \
>                    --disable-perl --disable-python
> build-win-clearsilver:
>        make -C windows/clearsilver
>
>
> -snap-
>
> greets
> mario
>
> (brandon: sorry for double-post, wrong button /-)
>



-- 
Regards,
Rick Walsh
[email protected]