You are not logged in.

#1 2010-11-28 18:51:22

jai134
Member
Registered: 2008-11-26
Posts: 234

Howto unset cflags[SOLVED]

Hello. I'm trying to compile android sources and got the advice to "unset cflags". How do I do that? When am I supposed to do that? I saw a thread about compiling MPlayer and there the advice was to give "unset cflags" before ./compile. I have folloving commands: $. build/envsetup.sh $lunch cyano..... and $make. I did try to $unset cflags and after that make. I did try to comment out whole CFLAGS line in makepkg.conf. Not good. Only new errors.
EDIT : Today everything was ok. I think it was because of the sources. Not ready for a build.

Last edited by jai134 (2010-11-30 18:36:41)

Offline

#2 2010-11-28 19:37:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Howto unset cflags[SOLVED]

Have you tried

unset CFLAGS
unset CXXFLAGS

- capital letters?


The archstuff repo has android-sdk r07-1 - is that what you're trying to compile?

Last edited by karol (2010-11-28 19:39:16)

Offline

#3 2010-11-28 19:40:15

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Howto unset cflags[SOLVED]

Use the commands karol mentioned in your PKGBUILD, right before you get to compiling.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2010-11-28 19:42:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Howto unset cflags[SOLVED]

Take a look at this PKGBUILD: http://aur.archlinux.org/packages/mplay … n/PKGBUILD

unset CFLAGS
./configure blah blah blah
make

Last edited by karol (2010-11-28 19:45:44)

Offline

#5 2010-11-28 21:10:53

jai134
Member
Registered: 2008-11-26
Posts: 234

Re: Howto unset cflags[SOLVED]

That was a lot of answers. Thankyou. I'm very much a newbie but I did try unset cflags and tested it with echo $CFLAGS. no cflags set. Same error. Must be something else. Btw it's CyanogenMod 6.1 I'm trying to compile. Android sources for my phone. Because of that I'm a little bit confused. I don't use the ./configure command. I'm following this tut: http://forum.xda-developers.com/showthread.php?t=803103. Where am I supposed to issue the "unset" command?

Offline

#6 2010-11-28 21:22:05

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Howto unset cflags[SOLVED]

Maybe you can post the errors you're getting.

The 'unset' part should go before 'make'.

In the 'Howto build for GT-I9000' instructions you've got

. build/envsetup.sh

Can you post that file?

Offline

#7 2010-11-29 10:49:21

jai134
Member
Registered: 2008-11-26
Posts: 234

Re: Howto unset cflags[SOLVED]

After a fresh sync this morning that problem is gone. Now I have a new one. Building stops here:

target thumb C: libhardware_legacy <= hardware/libhardware_legacy/wifi/wifi.c
target thumb C: libwpa_client <= external/wpa_supplicant_6/wpa_supplicant/src/common/wpa_ctrl.c
hardware/libhardware_legacy/wifi/wifi.c:78:2: error: invalid preprocessing directive #static
make: *** [out/target/product/galaxys/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/wifi/wifi.o] Fel 1

I know WiFi is broken in this Beta-build. Can I skip building it in some way and can I change this: invalid preprocessing directive #static.

Offline

Board footer

Powered by FluxBB