Re: Debian ARM system-Can't find headers when compiling

Ivan Vučica <[email protected]> Sat, 31 Mar 2012 16:25:41 +0200
Newsgroups gmane.comp.lib.gnustep.user
Message-ID <CAGPLYoSxj+Kx04e1aACjreQBxew-WG90b+KBVv9Q-6AW2kfA6A@mail.gmail.com>
--===============1004650925518554153==
Content-Type: multipart/alternative; boundary=f46d0408d73d2f74a804bc8abdfa

--f46d0408d73d2f74a804bc8abdfa
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

My instructions were tested for x86 only, and unfortunately I don't have
any means for testing on that platform.

Where are the headers installed?
Did you also try passing -I containing path to the folder containing
Foundation/ folder?

If it works, add this to OBJCFLAGS in config.make.

Did you try installing GNUstep from source on the same machine using clang?
I know that you may be reluctant to do this considering it's an ARM
machine, but it may be the way to go and to ensure headers are installed.
It takes about 6min on a relatively weak x86 VPS I control, so I suspect it
shouldn't take more than an hour on your ARM. Alternatively, you can try
cross compiling (although that doesn't appear to work out of the box, at
least for me).

On Thu, Mar 29, 2012 at 19:49, Brian Young <[email protected]> wrote:

>
> I've been setting up GNUstep on my Debian 2.6 linux ARM system. (GuruPlug=
)
> BUT, I can't compile anything because my system is complaining that it
> can't
> find the foundation and other header files.
>
>
> ####################### This is my setup ###################
>
> I installed using the following commands:
> % apt-get install clang
> % apt-get install gnustep gnustep-devel gnustep-games
>
> Then I
>
> http://blog.vucica.net/2010/12/getting-objective-c-2-0-to-work-on-debians=
-gnustep-with-clang.html
> followed these directions  to change a few setting is the following make
> file:  /usr/share/GNUstep/Makefiles/config.make
>  CC       =3D clang
>  OBJCFLAGS=3D -I/usr/lib/gcc/arm-linux-gnueabi/4.4.5/include
>  CPP      =3D clang -E
>
> I then setup my shell environment:
> % source /usr/share/GNUstep/Makefiles/GNUstep.sh
>
> BUT, when I try to compile the simplest of programs, I get a fatal error
> that it can't find the Foundation header file:
>
> % clang -fobjc-arc -framework Foundation main.m -o prog1
>  clang: warning: unknown platform, assuming -mfloat-abi=3Dsoft
>  main.m:11:9: fatal error: 'Foundation/Foundation.h' file not found
>  #import <Foundation/Foundation.h>
>          ^
>  1 diagnostic generated.
>
> Can someone help me figure out how to setup my system so it looks for the
> header files in the correct place? (/usr/include/GNUstep/)
>
> Thank you!!!
>
>
>
>
>
> ############### The simple code in main.m  #################
>
>
> #import <Foundation/Foundation.h>
> #import <stdio.h>
>
> int main (int argc, const char * argv[])
> {
>
>    @autoreleasepool {
>
>
>        float Celsius;
>        float Fahrenheit =3D 100;
>
>        Celsius =3D (Fahrenheit - 32) / 1.8 ;
>
>        NSLog(@"Fahrenheit: %i\n is equal to\nCelsius: %i", (int)
> Fahrenheit, (int) Celsius);
>
>       printf ("Fahrenheit: %f is equal to %f Celsius.\n", Fahrenheit,
> Celsius);
>
>    }
>    return 0;
> }
>
> --
> View this message in context:
> http://old.nabble.com/Debian-ARM-system-Can%27t-find-headers-when-compili=
ng-tp33544884p33544884.html
> Sent from the GNUstep - Help mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Help-gnustep mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/help-gnustep
>



--=20
Ivan Vu=C4=8Dica - [email protected]

--f46d0408d73d2f74a804bc8abdfa
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

My instructions were tested for x86 only, and unfortunately I don&#39;t hav=
e any means for testing on that platform.<div><br></div><div>Where are the =
headers installed?</div><div>Did you also try passing -I containing path to=
 the folder containing Foundation/ folder?</div>

<div><br></div>
<div>If it works, add this to OBJCFLAGS in config.make.<div><br></div><div>=
Did you try installing GNUstep from source on the same machine using clang?=
 I know that you may be reluctant to do this considering it&#39;s an ARM ma=
chine, but it may be the way to go and to ensure headers are installed. It =
takes about 6min on a relatively weak x86 VPS I control, so I suspect it sh=
ouldn&#39;t take more than an hour on your ARM. Alternatively, you can try =
cross compiling (although that doesn&#39;t appear to work out of the box, a=
t least for me).</div>


<div><br><div class=3D"gmail_quote">On Thu, Mar 29, 2012 at 19:49, Brian Yo=
ung <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a>&gt;</span> wrote:<br><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pad=
ding-left:1ex">


<br>
I&#39;ve been setting up GNUstep on my Debian 2.6 linux ARM system. (GuruPl=
ug)<br>
BUT, I can&#39;t compile anything because my system is complaining that it =
can&#39;t<br>
find the foundation and other header files.<br>
<br>
<br>
####################### This is my setup ###################<br>
<br>
I installed using the following commands:<br>
% apt-get install clang<br>
% apt-get install gnustep gnustep-devel gnustep-games<br>
<br>
Then I<br>
<a href=3D"http://blog.vucica.net/2010/12/getting-objective-c-2-0-to-work-o=
n-debians-gnustep-with-clang.html" target=3D"_blank">http://blog.vucica.net=
/2010/12/getting-objective-c-2-0-to-work-on-debians-gnustep-with-clang.html=
</a><br>



followed these directions =C2=A0to change a few setting is the following ma=
ke<br>
file: =C2=A0/usr/share/GNUstep/Makefiles/config.make<br>
 =C2=A0CC =C2=A0 =C2=A0 =C2=A0 =3D clang<br>
 =C2=A0OBJCFLAGS=3D -I/usr/lib/gcc/arm-linux-gnueabi/4.4.5/include<br>
 =C2=A0CPP =C2=A0 =C2=A0 =C2=A0=3D clang -E<br>
<br>
I then setup my shell environment:<br>
% source /usr/share/GNUstep/Makefiles/GNUstep.sh<br>
<br>
BUT, when I try to compile the simplest of programs, I get a fatal error<br=
>
that it can&#39;t find the Foundation header file:<br>
<br>
% clang -fobjc-arc -framework Foundation main.m -o prog1<br>
 =C2=A0clang: warning: unknown platform, assuming -mfloat-abi=3Dsoft<br>
 =C2=A0main.m:11:9: fatal error: &#39;Foundation/Foundation.h&#39; file not=
 found<br>
 =C2=A0#import &lt;Foundation/Foundation.h&gt;<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^<br>
 =C2=A01 diagnostic generated.<br>
<br>
Can someone help me figure out how to setup my system so it looks for the<b=
r>
header files in the correct place? (/usr/include/GNUstep/)<br>
<br>
Thank you!!!<br>
<br>
<br>
<br>
<br>
<br>
############### The simple code in main.m =C2=A0#################<br>
<br>
<br>
#import &lt;Foundation/Foundation.h&gt;<br>
#import &lt;stdio.h&gt;<br>
<br>
int main (int argc, const char * argv[])<br>
{<br>
<br>
 =C2=A0 =C2=A0@autoreleasepool {<br>
<br>
<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0float Celsius;<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0float Fahrenheit =3D 100;<br>
<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0Celsius =3D (Fahrenheit - 32) / 1.8 ;<br>
<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0NSLog(@&quot;Fahrenheit: %i\n is equal to\nCels=
ius: %i&quot;, (int)<br>
Fahrenheit, (int) Celsius);<br>
<br>
 =C2=A0 =C2=A0 =C2=A0 printf (&quot;Fahrenheit: %f is equal to %f Celsius.\=
n&quot;, Fahrenheit,<br>
Celsius);<br>
<br>
 =C2=A0 =C2=A0}<br>
 =C2=A0 =C2=A0return 0;<br>
}<br>
<span><font color=3D"#888888"><br>
--<br>
View this message in context: <a href=3D"http://old.nabble.com/Debian-ARM-s=
ystem-Can%27t-find-headers-when-compiling-tp33544884p33544884.html" target=
=3D"_blank">http://old.nabble.com/Debian-ARM-system-Can%27t-find-headers-wh=
en-compiling-tp33544884p33544884.html</a><br>



Sent from the GNUstep - Help mailing list archive at Nabble.com.<br>
<br>
<br>
_______________________________________________<br>
Help-gnustep mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Help-gnustep@gnu.=
org</a><br>
<a href=3D"https://lists.gnu.org/mailman/listinfo/help-gnustep" target=3D"_=
blank">https://lists.gnu.org/mailman/listinfo/help-gnustep</a><br>
</font></span></blockquote></div><br><br clear=3D"all"><div><br></div>-- <b=
r>Ivan Vu=C4=8Dica -=C2=A0<a href=3D"mailto:[email protected]" target=3D"_bla=
nk">[email protected]</a><div><div><div><br></div></div></div><br>
</div></div>

--f46d0408d73d2f74a804bc8abdfa--


--===============1004650925518554153==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Help-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-gnustep

--===============1004650925518554153==--