Difference between revisions of "Platform compatibility"
(→Debian) |
|||
Line 107: | Line 107: | ||
==== Linksys NSLU2 ==== | ==== Linksys NSLU2 ==== | ||
− | * First thing need to happen is to gnerate a gcc cross compiler with objc enabled. Current nslu2 supported gcc only has c and c++ enabled when building the crosstool-native package. | + | * First thing need to happen is to gnerate a gcc cross compiler with objc enabled. |
+ | Current nslu2 supported gcc only has c and c++ enabled when building the crosstool-native package. | ||
− | ** | + | ** Compiler cross-compiler for arm cpu using gcc compiler on linux machine. |
<pre> | <pre> | ||
Line 134: | Line 135: | ||
/home/tjyang/slug/unslung/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/armv5b-softfloat-linux/bin | /home/tjyang/slug/unslung/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/armv5b-softfloat-linux/bin | ||
[tjyang@dual bin]$ | [tjyang@dual bin]$ | ||
− | [tjyang@dual bin]$ cat | + | [tjyang@dual bin]$ cat helloworld.m |
#include <stdio.h> | #include <stdio.h> | ||
Line 141: | Line 142: | ||
printf("Hello World\n"); | printf("Hello World\n"); | ||
} | } | ||
− | [tjyang@dual bin]$ ./gcc | + | [tjyang@dual bin]$ ./gcc helloworld.m -lobjc -o helloworld |
− | [tjyang@dual bin]$ file | + | [tjyang@dual bin]$ file helloworld |
hellow: ELF 32-bit MSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.3, dynamically linked (uses shared libs), not stripped | hellow: ELF 32-bit MSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.3, dynamically linked (uses shared libs), not stripped | ||
[tjyang@dual bin]$ uname -a | [tjyang@dual bin]$ uname -a | ||
Line 149: | Line 150: | ||
</pre> | </pre> | ||
− | ** Second step is to use this cross compiler to compile a native compiler | + | ** Second step is to use this cross-compiler which generate binaries code for armb cpu to compile a native compiler. This complier can only be run on native machine nslu2 not on Inteln linux. |
<pre> | <pre> | ||
[tjyang@dual unslung]$ make crosstool-native;make crosstool-native-ipk | [tjyang@dual unslung]$ make crosstool-native;make crosstool-native-ipk | ||
Line 164: | Line 165: | ||
[tjyang@dual unslung]$ | [tjyang@dual unslung]$ | ||
− | login into your nslu2, cd to where the ipk packages | + | login into your nslu2, cd to where the ipk packages are. |
run following commands. | run following commands. | ||
bash-2.05b# for i in *.ipk; do ipkg -force-overwrite install $i; done | bash-2.05b# for i in *.ipk; do ipkg -force-overwrite install $i; done | ||
Line 184: | Line 185: | ||
Installing crosstool-native (0.28-rc37-3) to root... | Installing crosstool-native (0.28-rc37-3) to root... | ||
Configuring crosstool-native | Configuring crosstool-native | ||
− | + | ||
bash-2.05b# for i in *.ipk; do ipkg -force-overwrite install $i; done | bash-2.05b# for i in *.ipk; do ipkg -force-overwrite install $i; done | ||
Installing crosstool-native-arch-bin (0.28-rc37-3) to root... | Installing crosstool-native-arch-bin (0.28-rc37-3) to root... | ||
Line 208: | Line 209: | ||
** try to compile helloworld.m objective-C file and run the helloworld binary on nslu2. | ** try to compile helloworld.m objective-C file and run the helloworld binary on nslu2. | ||
<pre> | <pre> | ||
− | + | ||
− | |||
− | |||
bash-2.05b# gcc helloworld.m -lobjc -o helloworld | bash-2.05b# gcc helloworld.m -lobjc -o helloworld | ||
bash-2.05b# file helloworld | bash-2.05b# file helloworld | ||
Line 237: | Line 236: | ||
</pre> | </pre> | ||
+ | |||
** Of course more strong testing is needed. please add instructon below if you know how to run objective-c's testsuite in crosstool. | ** Of course more strong testing is needed. please add instructon below if you know how to run objective-c's testsuite in crosstool. | ||
Revision as of 22:44, 17 February 2005
Note: Anyone know how to convert Platform Compatibility HowTOsource into wiki language, so we can work on others' effort?
Following are procedures for installing GNUstep on different Operating Systems.
AIX
BSD
Darwin
Intel
PowerPC
FreeBSD
You can install GNUstep via /usr/ports/devel/gnustep. However, not all required dependancies are installed.
If you install the following in advance, you should be fine:
- wmaker
- libxml2
- libxslt
- libgmp4
- libart_lgpl2
- libaudiofile
- ffcall
- glitz
You may also want to install /usr/ports/net/mDNSResponder.
Note: There is a bug in libkvm that requires a mounted /proc. Until this bug is fixed, make sure you have an entry for /proc in your /etc/fstab:
proc /proc procfs rw 0 0
References: FreeBSD GNUstep ports, Freshports GNUstep
Mac OS X
NetBSD
OpenBSD
HP/UX
We should stay away from HPUX-10.20, it is not supported by HP anymore.
Irix
Linux
Debian
Since Debian "Sarge" you can just say
apt-get install x-window-system-core wmaker gnustep gnustep-devel gnustep-games
to get GNUstep, X11 and Window Maker installed.
But what happen if you are on Debian stable (3.0) release ?
Here is an answer from gnustep irc channel:
<fsmunoz> change every occurence of "stable" for "testing" <fsmunoz> remove the security.debian.org line <fsmunoz> do apt-get update <fsmunoz> apt-get dist-upgrade <fsmunoz> repeat this last one until nothing gets installed or removed. <fsmunoz> the, replace "testing" with "unstable" <fsmunoz> then, apt-get update <fsmunoz> apt-get dist-upgrade <fsmunoz> repeat, repeat. <fsmunoz> done
The above was a general guide to upgrade from Debian stable to unstable, not exactly the best way to install GNUstep packages. If one doesn't want to upgrade it is possible to simply add the unstable apt lines to the sources.list and specify the distribution when installing the packages, e.g.
# apt-get install -t unstable gnumail.app
This will probably upgrade some other packages to satisfy dependencies, but will have a much small impact on the system since only the packages on which GNUstep depends will be upgraded.
Yet another way is to add tarzeau's repository; he packages a huge ammount of GNUstep packages. Just add this to your sources.list:
deb http://www.linuks.mine.nu/i_debian/ ./ deb-src http://www.linuks.mine.nu/i_debian/ ./
This repository contains packages made in unstable, so it's possible that the dependencies only are satisfied in unstable systems.
RedHat
Advance Server 3.0
FC 3
Slackware
SuSE
Solaris
http://www.linuks.mine.nu/gnustep/solaris is one package sources to create solaris packages for GNUstep.
Intel
Sparc
Windows
Cygwin
MingW
SFU
Microsfot's Service For Unix.
Others
LiveCD for Intel
Current version is 0.9.4.2
Find the instructions to install and the CD itself here
Linksys NSLU2
- First thing need to happen is to gnerate a gcc cross compiler with objc enabled.
Current nslu2 supported gcc only has c and c++ enabled when building the crosstool-native package.
- Compiler cross-compiler for arm cpu using gcc compiler on linux machine.
[tjyang@dual slug]$ cat checkout.sh cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/nslu co unslung [tjyang@dual toolchain]$ cd crosstool/ [tjyang@dual crosstool]$ grep objc * nslu2-cross335.sh:GCC_LANGUAGES="c,c++,objc" [tjyang@dual crosstool]$ pwd /home/tjyang/slug/unslung/toolchain/crosstool [tjyang@dual crosstool]$ [tjyang@dual slug]$ gmake toolchain [tjyang@dual unslung]$ /export/home/tjyang/slug/unslung/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -v Reading specs from /export/home/tjyang/slug/unslung/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/specs Configured with: /export/home/tjyang/slug/unslung/toolchain/crosstool/build/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/gcc-3.3.5/configure --target=armv5b-softfloat-linux --host=i686-host_pc-linux-gnu --prefix=/export/home/tjyang/slug/unslung/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5 --with-float=soft --with-cpu=xscale --enable-cxx-flags=-mcpu=xscale --with-headers=/export/home/tjyang/slug/unslung/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/armv5b-softfloat-linux/include --with-local-prefix=/export/home/tjyang/slug/unslung/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/armv5b-softfloat-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++,objc --enable-shared --enable-c99 --enable-long-long Thread model: posix gcc version 3.3.5 [tjyang@dual unslung]$
- A simple test of objc on host linux machine.
[tjyang@dual bin]$ pwd /home/tjyang/slug/unslung/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/armv5b-softfloat-linux/bin [tjyang@dual bin]$ [tjyang@dual bin]$ cat helloworld.m #include <stdio.h> int main(void) { printf("Hello World\n"); } [tjyang@dual bin]$ ./gcc helloworld.m -lobjc -o helloworld [tjyang@dual bin]$ file helloworld hellow: ELF 32-bit MSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.3, dynamically linked (uses shared libs), not stripped [tjyang@dual bin]$ uname -a Linux dual 2.4.21-9.ELsmp #1 SMP Thu Jan 8 17:08:56 EST 2004 i686 i686 i386 GNU/Linux [tjyang@dual bin]$
- Second step is to use this cross-compiler which generate binaries code for armb cpu to compile a native compiler. This complier can only be run on native machine nslu2 not on Inteln linux.
[tjyang@dual unslung]$ make crosstool-native;make crosstool-native-ipk [tjyang@dual unslung]$ ls -lrt builds/*.ipk -rw-rw-r-- 1 tjyang tjyang 5569523 Feb 17 13:32 builds/crosstool-native-bin_0.28-rc37-3_armeb.ipk -rw-rw-r-- 1 tjyang tjyang 12677163 Feb 17 13:33 builds/crosstool-native-lib_0.28-rc37-3_armeb.ipk -rw-rw-r-- 1 tjyang tjyang 1722660 Feb 17 13:33 builds/crosstool-native-inc_0.28-rc37-3_armeb.ipk -rw-rw-r-- 1 tjyang tjyang 7049858 Feb 17 13:34 builds/crosstool-native-arch-bin_0.28-rc37-3_armeb.ipk -rw-rw-r-- 1 tjyang tjyang 9032668 Feb 17 13:34 builds/crosstool-native-arch-lib_0.28-rc37-3_armeb.ipk -rw-rw-r-- 1 tjyang tjyang 7483945 Feb 17 13:35 builds/crosstool-native-arch-inc_0.28-rc37-3_armeb.ipk -rw-rw-r-- 1 tjyang tjyang 1058 Feb 17 13:35 builds/crosstool-native_0.28-rc37-3_armeb.ipk [tjyang@dual unslung]$ cp /export/home/tjyang/slug/unslung/builds/*.ipk /disk76/nslu2/tmp/ [tjyang@dual unslung]$ login into your nslu2, cd to where the ipk packages are. run following commands. bash-2.05b# for i in *.ipk; do ipkg -force-overwrite install $i; done Installing crosstool-native-arch-bin (0.28-rc37-3) to root... ipkg: Cannot link from ./opt/armeb/armv5b-softfloat-linux/bin/g++ to './opt/armeb/armv5b-softfloat-linux/bin/c++': No such file or directory Configuring crosstool-native-arch-bin Installing crosstool-native-arch-inc (0.28-rc37-3) to root... Configuring crosstool-native-arch-inc Installing crosstool-native-arch-lib (0.28-rc37-3) to root... ipkg: Cannot link from ./opt/armeb/armv5b-softfloat-linux/lib/libgcc_s.so.1.dir/libgcc_s.so.1 to './opt/armeb/armv5b-softfloat-linux/lib/libgcc_s.so.1': No such file or directory ipkg: Cannot link from ./opt/armeb/armv5b-softfloat-linux/lib/libstdc++.so.5.0.7.dir/libstdc++.so.5.0.7 to './opt/armeb/armv5b-softfloat-linux/lib/libstdc++.so.5.0.7': No such file or directory Configuring crosstool-native-arch-lib Installing crosstool-native-bin (0.28-rc37-3) to root... Configuring crosstool-native-bin Installing crosstool-native-inc (0.28-rc37-3) to root... Configuring crosstool-native-inc Installing crosstool-native-lib (0.28-rc37-3) to root... Configuring crosstool-native-lib Installing crosstool-native (0.28-rc37-3) to root... Configuring crosstool-native bash-2.05b# for i in *.ipk; do ipkg -force-overwrite install $i; done Installing crosstool-native-arch-bin (0.28-rc37-3) to root... ipkg: Cannot link from ./opt/armeb/armv5b-softfloat-linux/bin/g++ to './opt/armeb/armv5b-softfloat-linux/bin/c++': No such file or directory Configuring crosstool-native-arch-bin Installing crosstool-native-arch-inc (0.28-rc37-3) to root... Configuring crosstool-native-arch-inc Installing crosstool-native-arch-lib (0.28-rc37-3) to root... ipkg: Cannot link from ./opt/armeb/armv5b-softfloat-linux/lib/libgcc_s.so.1.dir/libgcc_s.so.1 to './opt/armeb/armv5b-softfloat-linux/lib/libgcc_s.so.1': No such file or directory ipkg: Cannot link from ./opt/armeb/armv5b-softfloat-linux/lib/libstdc++.so.5.0.7.dir/libstdc++.so.5.0.7 to './opt/armeb/armv5b-softfloat-linux/lib/libstdc++.so.5.0.7': No such file or directory Configuring crosstool-native-arch-lib Installing crosstool-native-bin (0.28-rc37-3) to root... Configuring crosstool-native-bin Installing crosstool-native-inc (0.28-rc37-3) to root... Configuring crosstool-native-inc Installing crosstool-native-lib (0.28-rc37-3) to root... Configuring crosstool-native-lib Installing crosstool-native (0.28-rc37-3) to root... Configuring crosstool-native bash-2.05b#
- try to compile helloworld.m objective-C file and run the helloworld binary on nslu2.
bash-2.05b# gcc helloworld.m -lobjc -o helloworld bash-2.05b# file helloworld helloworld: ELF 32-bit MSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.3, dynamically linked (uses shared libs), not stripped bash-2.05b# ./helloworld ./helloworld: error while loading shared libraries: libobjc.so.1: cannot open shared object file: No such file or directory bash-2.05b# libobjc.so.1 is in /opt/armeb/armv5b-softfloat-linux/lib, this path need to be in LD_LIBRARY_PATH. bash-2.05b# ./helloworld Hello World bash-2.05b# uname -a Linux LKG7BFA96 2.4.22-xfs #1 Sat Jan 1 21:34:54 HST 2005 armv5b unknown unknown GNU/Linux bash-2.05b# date Thu Feb 17 11:35:19 CST 2005 bash-2.05b# cat compile.sh /opt/armeb/armv5b-softfloat-linux/bin/gcc helloworld.m -o helloworld -lobjc bash-2.05b# cat /etc/profile PATH=/opt/bin:/share/hdd/data/public/nslu2/tjyang/unslung/staging/bin:${PATH} TERM=xterm export LD_LIBRARY_PATH=/opt/lib:/lib:/opt/armeb/armv5b-softfloat-linux/lib export PATH TERM bash-2.05b#
- Of course more strong testing is needed. please add instructon below if you know how to run objective-c's testsuite in crosstool.
- Using Objective-C enalbed gcc to compile gnustep-core,gnustep-* software.
References: http://lists.gnu.org/archive/html/discuss-gnustep/2005-02/msg00124.html