EnvironmentSetup/AmigaOS

From Wiki.ooo4kids.org

Jump to: navigation, search

Back to EnvironmentSetup

Work in progress. Please DO NOT translate this page

Contents

Discovering Amiga OS 4.1

November 2010

15 November


10 November

October 2010

16th October

July 2010

26th July

25th July

24th July

Subversion triggers a bug in JXFS, the filesystem used on the machine I received, this FS is not usable for development. I then installed my work partition with the standard Amiga filesystem called FFS2. In order to make it faster, it is necessary to add the following line to the user-startup script (user configuration should be made there): run >NIL: fs_plugin_cache DH1:

May 2010

1st May

I finally was able to copy the OOo4Kids source on the disk. Was a nightmare :

Current status : improve configure (the notepad seems to be helpful, and at least allows to modify the scripts.


Done :

Issues :


Facts:

April 2010

27th April

Facts:

All settings of the OS can be changed through the appropriate "preferences" program. They can be found in the "Prefs" drawer. As an example, to set the network settings, one need to run Prefs/Internet


5th April

Back at home (uff). I tested more intensively the Amiga OS 4.1 :-)

Thoughts:

Hardware side : there are only two USB ports available. One for the keyboard, and one for the mouse. So how to add my USB key containing the softwares I downloaded? (please think 3 or 4 USB ports, 2 is not enough).

hack : use an Apple keyboard, so, since this is an USB hub, other USB ports are available.

Facts:

The Sam440ep Flex motherboard has 5 USB ports. The only thing to know is that because of Uboot (Sam BIOS), the keyboard must be connected on the rear upper USB port to work in Uboot. After that, when the OS is loaded, the keyboard will work in any USB port.


March 2010

29th March

Received my machine today !! Unfortunaly, will ony be able to test it wednesday afternoon, or even saturday.

Links for the beginning :

Thoughts:

Native extension archives on Amiga OS 4.1 is .lha Fortunately, I was able to unarchive the SDK archive, and start reading the documentation.

Strange .info files included (sort of blobs).

Facts:




Porting OOo4Kids on Amiga OS

=> Tips and tools


Milestone in progress is : 0.1


Todo (basics/first step):

Important: we really thought to a native port, and install AmiCygnix does not mean we'll use it for the port. At milestone 0.6, it is scheduled to use the native API for the controls, and the frames. Means a lot of work, something similar to the native Mac OS X port of OpenOffice.org

Cross Compilation

Everything is explained there : http://www.zerohero.se/cross/os4.html

Will give it a try though ... :-)

Result of "gcc -dumpspecs" : specs dumped by gcc


My first compilation on Amiga

simple hello

OS detection with Amiga in OOo source code

Results from config.guess

config.guess takes over the machine detection, and put the results in environment variables :

UNAME_MACHINE contains the result of `uname -m`

9.Code:test> uname -m

ppc

UNAME_RELEASE contains the result of`uname -r`

9.Code:test> uname -r

53.3

UNAME_SYSTEM contains the result of `uname -s`

9.Code:test> uname -s

AmigaOS

UNAME_VERSION contains the result of `uname -v`

9.Code:test> uname -v

3.5

(plain wrong, because should be 4.x )

Current choice

So, on the Sam440, we obtain : "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}"=ppc:AmigaOS:53.3:3.5

A previous detection of AmigaOS is included in config.guess, so we have to add a new case. So until the 3.5 version will be fixed (for a 4.x value), we'll consider we're running Amiga OS 4.x when ppc and AmigaOS are detected (no other case does match with this result.

Conclusion => In our case, we'll display : powerpc-unknown-amigaos


Draft 

uname -a returns  :


OS=AMIGAOS // 4.x

CPU=P // PowerPC

amigagppc.mk // use unxlngppc4.mk as default values ?


Contains :

# fichier mk Unix Linux HPPA utilisant GCC, merci de faire les modifications génériques pour Linux dans unxlng.mk
PICSWITCH:=-fPIC
.INCLUDE : unxlng.mk
CDEFS+=-DAMIGA
CFLAGS+=
CFLAGSCC+=
CFLAGSCXX+=
DLLPOSTFIX=lh   // ??? static or dynamic libs  ??

/Draft


Perl stuff

Currently stalled at Perl installation step:

checking for perl... /SDK/Local/C/perl
checking the Perl version... Can't open threads.library
checked (perl 20)
checking for required Perl modules... ./configure[6746]: Can't: not found
configure: error: Failed to find some modules

=> Perl can't run correctly (probably a configuration issue):

/AmigaOS4.1> Code:SDK/local/C/perl -v

Can't open threads.library

Update : this url might help (thanks to Chris Young for the info) : Perl pthreads.lha

TAG DONE.png I copied the one sent by Elwood, in Sys/Libs, and this solved the issue

Note: this is a hack, and should not happen in a normal installation ...


This can be achieved installing the missing modules via CPAN => Install Perl modules using CPAN

The log:

checking the Perl version... checked (perl 5)
checking for required Perl modules... 
Can't locate Archive/Zip.pm in @INC (@INC contains: /SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos 
                                   /SDK/Local/clib2/lib/perl5/5.8.5 /SDK/Local/clib2/lib/perl5/site_perl/5.8.5/ppc-amigaos 
                                   /SDK/Local/clib2/lib/perl5/site_perl/5.8.5 /SDK/Local/clib2/lib/perl5/site_perl .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
configure: error: Failed to find some modules



Origin of the breakage (configure, line around 6746)  :

{ $as_echo "$as_me:$LINENO: checking for required Perl modules" >&5                                               
$as_echo_n "checking for required Perl modules... " >&6; }                                                        
if `$PERL -e 'use Archive::Zip;'`; then                                                                           
        { $as_echo "$as_me:$LINENO: result: all modules found" >&5                                                
$as_echo "all modules found" >&6; }                                                                               
else       

TAG DONE.png After some tries, and lot of warnings, Archive::Zip is installed using CPAN.



TAG TODO.png Currently broken ...  :/

Perl installation seems not reliable ... :

/SDK/newlib/include/netinet/in.h:148:1: warning: this is the location of the previous definition
In file included from /SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/perl.h:1985,
                 from Zlib.xs:31:
/SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/amigaos.h:22:1: warning: "SIGQUIT" redefined
In file included from /SDK/newlib/include/signal.h:5,
                 from /SDK/newlib/include/sys/select.h:7,
                 from /SDK/newlib/include/sys/time.h:16,
                 from /SDK/newlib/include/sys/resource.h:4,
                 from /SDK/newlib/include/sys/reent.h:19,
                 from /SDK/newlib/include/stdlib.h:16,
                 from /SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/perl.h:451,
                 from Zlib.xs:31:
/SDK/newlib/include/sys/signal.h:34:1: warning: this is the location of the previous definition
In file included from /SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/perl.h:1985,
                 from Zlib.xs:31:
/SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/amigaos.h:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'constructed'
In file included from /SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/perl.h:2082,
                 from Zlib.xs:31:
/SDK/local/newlib/include/pthread.h:46:23: error: sys/sched.h: No such file or directory
In file included from /SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/perl.h:2082,
                 from Zlib.xs:31:
/SDK/local/newlib/include/pthread.h:61: error: field 'SchedParam' has incomplete type
In file included from /SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/XSUB.h:322,
                 from Zlib.xs:32:
/SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/amigaosexport.h:1098: warning: 'struct timespec' declared inside parameter list
In file included from Zlib.xs:68:
ppport.h:4337:1: warning: "Perl_sv_catpvf_mg_nocontext" redefined
In file included from /SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/XSUB.h:323,
                 from Zlib.xs:32:
/SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/amigaosexportinlines.h:906:1: warning: this is the location of the previous definition
In file included from Zlib.xs:68:
ppport.h:4410:1: warning: "Perl_sv_setpvf_mg_nocontext" redefined
In file included from /SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/XSUB.h:323,
                 from Zlib.xs:32:
/SDK/Local/clib2/lib/perl5/5.8.5/ppc-amigaos/CORE/amigaosexportinlines.h:907:1: warning: this is the location of the previous definition
gmake: *** [Zlib.o] Error 1
Can't exec "/SDK/C/gmake": Unknown error 0 at /SDK/Local/clib2/lib/perl5/5.8.5/CPAN.pm line 4566.
  /SDK/C/gmake  -- NOT OK
Running make test
  Can't test without successful make
Running make install
  make had returned bad status, install seems impossible

 

Milestones for the port (rough estimation)

-> This port will NOT use Java

Milestone 0.1

-> the version is plain wrong. must be 4.1, and 3.5 is returned

config.guess return the wrong OS.

***Thanks to Elwood for his time, helping me to reformat the partition. 
The current new file system seems to be able to support the svn co without freeze. Crossing the fingers ...

Result of ./configure :

 ,,*)   CC_FOR_BUILD=$CC ;;
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
esac ;
+ > /dev/null 
+ 2>&1 
+ 2> /dev/null 
+ UNAME_MACHINE=ppc
+ 2> /dev/null 
+ UNAME_RELEASE=53.2
+ 2> /dev/null 
+ UNAME_SYSTEM=AmigaOS
+ 2> /dev/null 
+ UNAME_VERSION=3.5
+ echo ppc-unknown-amigaos
+ exit 0
configure: error:  operating system is not suitable to build OpenOffice.org!

gcc -v returns :

Target ppc-amigaos
Configured with : 

../gcc/configure --prefix=gcc \
                 --host=ppc-amigaos \
                 --target=ppc-amigaos \
                 --build=i686-cygwin \
                 --enable-haifa \
                 --enable-sjlj-exceptions \
                 --enable-languages=c,c++

Thread model=single
gcc-version 4.2.4 (adtools build 20090118)


Timeline : early May 2010

Milestone 0.2

configure

TAG DONE.png configure successfull

TAG PROGRESS.png fix set_soenv.in

Needed fix (svn server down, will be commited asap):


=> Current patch : First fixes for Amiga

IMPORTANT: don't forget to run autoconf (if working)



Current configure command line :


8.Code:r765>sh # to enter in the abc-shell
/Amiga cd Code:r765
/Code/r765> 

./configure \
             --with-lang="fr" \
             --with-OOoLight \
             --with-use-shell=abc-shell \
             --disable-cups \ 
             --with-java=no \
             --disable-binfilter \
             --disable-vba \
             --disable-odk \
             --disable-mozilla \
             --disable-gtk \
             --disable-Xaw \
             --with-package-format=installed \
             --disable-gconf \
             --disable-gnome-vfs \
             --enable-opengl

In one line :

./configure --with-lang="fr" --with-OOoLight --with-use-shell=abc-shell --disable-cups --with-java=no --disable-binfilter --disable-vba --disable-odk --disable-mozilla --disable-gtk --disable-Xaw --with-package-format=installed --disable-gconf --disable-gnome-vfs --enable-opengl
Add new constants


What the final screen looks like:

**************************************************************************** 
*
* OOo4Kids or OOoLight 1.00 configuration. 
* 
* 
* Configuration part of OOo4Kids or OOoLight 1.00 build is finished. 
* 
* NB! Be aware that you might not be able to build OOo4Kids or OOoLight if you 
* ignore any warning message that were generated during this configuration 
* process. 
* 
* - Your gcc is not -fvisibility=hidden safe. Disabling visibility
* - building without java will mean some features will not be available
*
*
* USAGE: 
* Source AmigaOSPPCEnv.Set.sh (in sh)
* in order to set up the build-environment variables.
* 
* 
**************************************************************************** 
Complete set_soenv
Build dmake

Building dmake (as a Linux) gives some expected breakers :

unix/runargv.o: In function `runargv':
/Code/r765/dmake/unix/runargv.c:632: undefined reference to `fork'
/Code/r765/dmake/unix/runargv.c:653: undefined reference to `execvp'
unix/runargv.o: In function `dmwaitnext':
/Code/r765/dmake/unix/runargv.c:268: undefined reference to `wait'
unix/runargv.o: In function `dmwaitpid':
/Code/r765/dmake/unix/runargv.c:363: undefined reference to `waitpid'
gmake[2]: *** [dmake] Error 1
gmake[2]: Leaving directory `/Code/r765/dmake'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/Code/r765/dmake'
gmake: *** [all] Error 2

Note : runargv() [unix/runargv] The runargv function manages up to MAXPROCESS process queues (_procs[i]) for parallel process execution and hands the actual commands down to the operating system. Each of the process queues handles the sequential execution of commands that belong to that process queue. Usually this means the sequential execution of the recipe lines that belong to one target. Even in non parallel builds (MAXPROCESS==1) child processes are created and handled.


Timeline : early June 2010

Milestone 0.3

Timeline: early August 2010

Milestone 0.4

Timeline: early October 2010

Milestone 0.5

Timeline: early November 2010

Milestone 0.6

Note : this part can need a lot of time (probably several month, or even a year for a basical native port).

vcl is a critical part, where :

Objective : complete vcl build

TAG TODO.png find some documentation, about event, frames, windows, mouse position, and so on, on the Amiga OS.


Timeline: early April 2011

Milestone 0.7

Timeline: early May 2011

Milestone 0.8

Timeline: early June 2011

Milestone 0.9

Timeline: early July 2011


Eric Bachard 08:26, 5 April 2010 (UTC)

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox