Oberon Community Platform Forum
December 14, 2019, 06:04:07 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Compiling for FPU rather than SSE.  (Read 9919 times)
peasthope
Full Member
***
Posts: 100


WWW
« on: April 27, 2014, 06:40:24 PM »

 In  topic "Problem with last two releases", « Reply #6 on: 2013-05-03, 04:54:14 » gfeldm wrote,
Quote
To create a new system which uses FPU instead of SSE the following
two modifications in file "Release.Tool" should be sufficient: ...

Many files compiled and a segmentation error occurred before completion.  The Log is
http://carnot.yi.org/AOS.17872.Log
and the transcript from the host terminal is
http://carnot.yi.org/BuildingLinuxAosWithFPU.txt  .

For general interest, the transcript has information beyond the end of the Log and lines ending <CR><LF> should open directly in the browser.

Regards,                 ... Peter E.


« Last Edit: April 27, 2014, 06:44:19 PM by peasthope » Logged
Bernhard T.
Administrator
Full Member
*****
Posts: 164


« Reply #1 on: April 30, 2014, 08:23:12 AM »

Hi Peter,

I forwarded the errors in your log to Felix & Günter personally and I am trying to reproduce your error under WinAos (my current build system) in SVN Revision 5541 (updated yesterday).

Since the errors apparently occur in some interface to Linux libraries, I modified the lines as suggested
by Günter in Release.Tool and saved it under ReleaseFPUx.Tool, created a new working Directory UnixAos
and started

    Release.Build --file=ReleaseFPUx.Tool --path=../UnixAos/ --build --zip --XML LinuxAos

Under WinAos there were no Errors. I packed the complete build directory and have put it here:ftp://ftp.lrz.de/transfer/BlueBottle-A2
It will stay there for some unpredictable time (days to weeks from today) ...

hope it helps
--
  Bernhard
« Last Edit: April 30, 2014, 12:06:45 PM by Bernhard T. » Logged
peasthope
Full Member
***
Posts: 100


WWW
« Reply #2 on: May 02, 2014, 02:32:06 PM »

P.s. The compilation here was in a Debian Wheezy system with LinuxAos rev.5500.

I'll test your result on the Sharp Mebius.

Thanks for making the zip file and putting it on your server,      ... Peter E.
Logged
peasthope
Full Member
***
Posts: 100


WWW
« Reply #3 on: May 05, 2014, 06:48:43 PM »

I packed the complete build directory and have put it here:ftp://ftp.lrz.de/transfer/BlueBottle-A2 ...

I installed LinuxAos rev.5500 strictly with Günter's install.UnixAos.  Then copied all the files in your UnixAos.zip into /usr/aos/obj/, overwriting *.Obj files.  Then tried to start AosLinux with failure again.  These lines from the console are not good.

Code:
LinuxAos (rev.5500): Kernel: Initialized and started.
X11 Display depth = 16
Locks incompatible with Objects/@/Process
Locks incompatible with Objects/@/Process

At least one crucial file from the SSE compilation must not have been updated with your FPU compilation.  Your archive doesn't contain an aos.linux does it?  Therefore the aos.linux from rev.5500 remained and there might be other files.  Günter's UnixAosNotes.pdf mentions that aos.linux is the module loader.  That also should be compiled for rev.5541?

Here compilation failed in Debian Wheezy.  Given convincing evidence that compilation would succeed in Debian old stable, Squeeze, I could reinstall that on a SSE machine and attempt the LinuxAos compilation again.  But from what you said, we are not sure the compilation failure came from a difference between libraries of Squeeze and Wheezy.

I suppose this situation illustrates the hardware complexity, which is part of the motivation of Wirth and Reed to develop the FPGA based system.

A hardware compatibility list in http://www.ocp.inf.ethz.ch/wiki/OCP/ would be worthwhile?

Thanks fror your help,                       ... Peter E.

Logged
Bernhard T.
Administrator
Full Member
*****
Posts: 164


« Reply #4 on: May 09, 2014, 08:12:40 AM »

Your archive doesn't contain an aos.linux does it?  

no, it does not.

My Problem is that I have almost no experience with LinuxAos.

If your goal is to have a NativeAos / A2 on that Notebook, I might try to create a FPU iso ...
In this case, please send me a note via email.

regards
--
  Bernhard
« Last Edit: May 09, 2014, 08:14:26 AM by Bernhard T. » Logged
fnecati
Jr. Member
**
Posts: 60


« Reply #5 on: May 09, 2014, 02:09:59 PM »

Quote
Many files compiled and a segmentation error occurred before completion.  The Log is
http://carnot.yi.org/AOS.17872.Log
and the transcript from the host terminal is
http://carnot.yi.org/BuildingLinuxAosWithFPU.txt  .
 

I had similar problems with my Debian Wheezy (1GB RAM). I can manage to build LinuxAos if I run the command SystemTools.CollectGarbage ~
a few times while building process continues.  You can track Memory usage using performance monitor (Inspect->Performance), while free memory is getting to lower limit run the Garbage Collector.

Quote
inuxAos (rev.5500): Kernel: Initialized and started.
X11 Display depth = 16
Locks incompatible with Objects/@/Process
Locks incompatible with Objects/@/Process
 

After building successfully, you have to create boot loader file, see UnixAos.Tool file (Docu->UnixAos Build).
BootLinker.Link LinuxAosCore := ....  ~

After LinuxAosCore file is created, copy *.Obj and LinuxAosCore to /usr/aos/obj/
Logged
Bernhard T.
Administrator
Full Member
*****
Posts: 164


« Reply #6 on: May 13, 2014, 08:50:26 AM »

   
   Your archive doesn't contain an aos.linux does it?  
   
no, it does not.

so the the open questions are:

1. how to build UnixAos/DarwinAos/LinuxAos in WinAos or native A2?

2. how to build native A2 in UnixAos/DarwinAos/LinuxAos?

Hopefully Günter F. can answer them.

regards
--
  Bernhard
Logged
peasthope
Full Member
***
Posts: 100


WWW
« Reply #7 on: May 13, 2014, 04:07:44 PM »

You can track Memory usage using performance monitor (Inspect->Performance), while free memory is getting to lower limit run the Garbage Collector.  

Ok, thanks.  A simple problem with a simple solution.

The installed system here is rev.5500.  It works with the usual working directory, except that the pie menu is gone(?).  Today, when I attempt to start aos using the build directory as the working directory, this appears in the terminal.

Code:
peter@dalton:~/Desktop/LinuxAos5500/build$ aos
LinuxAos (rev.5500): Kernel: Initialized and started.
X11 Display depth = 16
Locks incompatible with Objects/@/Process
Locks incompatible with Objects/@/Process

When the earlier build failed, a lock file was left in the host system?  Is there a lock file to remove?

Should rev.5500 be able to perform the compilation from the rev.5545 sources?

so the the open questions are:
1. how to build UnixAos/DarwinAos/LinuxAos in WinAos or native A2?
2. how to build native A2 in UnixAos/DarwinAos/LinuxAos?

Yes, instructions for the cross builds in the wiki strike me as a good idea.

Regards,                     ... Peter E.

« Last Edit: May 14, 2014, 04:46:23 AM by peasthope » Logged
peasthope
Full Member
***
Posts: 100


WWW
« Reply #8 on: May 14, 2014, 03:43:23 PM »

Quote
When the earlier build failed, a lock file was left in the host system?  Is there a lock file to remove?

Rather than puzzle about that, I emptied <somewhere-else>/build and started again from Release.Build LinuxAos ~.

Quote
Should rev.5500 be able to perform the compilation from the rev.5545 sources?

As modules are compiled, the Performance Monitor shows the heap following a sawtooth pattern.  Each tooth must correspond to a module.  The whole process moves quickly, giving the impression that the heap might suddenly be filled before I can respond with a SystemTools.CollectGarbage ~.  It comes to this.

Code:
...
compiling srImage.Mod => A2.srImage done.
compiling srVoxel.Mod => A2.srVoxel done.
*** glibc detected *** /usr/aos/aos.linux: munmap_chunk(): invalid pointer: 0xaabe6000 ***

PANIC: Trap 11 in garbage collector

LinuxAos (rev.5500)   2014/05/14  07:36

Trap 11 (Segmentation violation)

    sp = 00000000, fp = BF8FB684, pc = B775E9F6

Unknown external procedure, pc = B775E9F6
Unknown external procedure, pc = B7761BA8
Unknown external procedure, pc = B71B8FF2
Unknown external procedure, pc = B775DDE6
Unknown external procedure, pc = B71B90F1
Unknown external procedure, pc = B71B9206
Unknown external procedure, pc = B7196B98
Unknown external procedure, pc = B7196D9D
Unknown external procedure, pc = B71129A3
Unknown external procedure, pc = B711CA8A
Unknown external procedure, pc = B711DCFE
Machine.FreeMemBlock:151 pc=347 [0000015BH] = 196 + 151 crc=0CEC7561
  memBlock=AABE6000H (NIL)
  cur=AABE6000H (NIL)
  prev=00000000H (NIL)
Heaps.Sweep:258 pc=3972 [00000F84H] = 3714 + 258 crc=7EAA829B
  block=-1363255300
  freeBlock=-1430364132
  endBlockAdr=-1363255300
  tag=-1396809568
  blockSize=33554272 (01FFFF60H)
  freeSize=67108832 (03FFFFE0H)
  memBlock=AABE6000H (NIL)
  nextMemBlock=AF0AB000H (NIL)
Heaps.CollectGarbage:123 pc=5901 [0000170DH] = 5778 + 123 crc=7EAA829B
  root=B2DC9490H (Modules.Module)
  time1=1398F446358C2
  time2=0
Objects.CollectGarbage:33 pc=5477 [00001565H] = 5444 + 33 crc=18B9D168
peter@dalton:~/Desktop/LinuxAos5500/build$

So now, is that an incompatibility involving glibc or a memory overflow?

Thanks,                    ... Peter E.
Logged
Bernhard T.
Administrator
Full Member
*****
Posts: 164


« Reply #9 on: May 15, 2014, 07:41:32 AM »

Code:
...
compiling srImage.Mod => A2.srImage done.
compiling srVoxel.Mod => A2.srVoxel done.
*** glibc detected *** /usr/aos/aos.linux: munmap_chunk(): invalid pointer: 0xaabe6000 ***

PANIC: Trap 11 in garbage collector



that looks like it is happening during compilation of the optional package "Contributions".

Since I don't think that Contributions is a necessary package for LinuxAos, you might try to modify your Release.Tool by adding Contributions to the EXCLUDEPACKAGES list of LinuxAos and retry.

--
  Bernhard
« Last Edit: May 15, 2014, 02:58:37 PM by Bernhard T. » Logged
fld
Newbie
*
Posts: 15


« Reply #10 on: May 15, 2014, 03:55:56 PM »

This trap only occurs in the new Debian release 7.  The crash happens
in the Linux library routine 'free()' when Aos returns heap space
no longer needed.

I could not reproduce it in Debian 6.x, CentOS 6.5, Ubuntu 12.04,
Solaris 11 and MacOS X. For me it looks like a bug in the heap
management of the new Debian release (at least for 32-bit
applications like LinuxAos).

-- Günter
Logged
peasthope
Full Member
***
Posts: 100


WWW
« Reply #11 on: May 15, 2014, 04:24:50 PM »

Since I don't think that Contributions is a necessary package for LinuxAos, you might try to modify your Release.Tool by adding Contributions to the EXCLUDEPACKAGES list of LinuxAos and retry.

Thanks!  In summary,  LinuxAos 5500 was installed on the Sharp Mebius PC-CB1-M1 from the stock LinuxAos.tgz and found to not work.  This was the remedy.
* In a host where rev.5500 for SSE works, the instructions in Aos menu > Docu > AosBuild were followed to completion of "ln -s ... Tools".  The source files retrieved from the repository happened to be rev.5545.
* To avoid the snag in Contributions, <somewhere>/aosrep/source/Release.Tool was edited with leafpad to add " Contributions" in the EXCLUDEPACKAGES list for LinuxAos.  Any linux editor should work.
* Instructions for rebuilding were continued.
* In step 3 the freshly built FPU system worked in the SSE host.
* The contents of <somewhere-else>/build were copied to a removable medium.
* The medium was shifted to the Mebius and the files were copied to <aos installdir>/obj according to step 4.
* The medium was removed and aos proved to work in the Mebius.

Not an entirely trivial exercise.  Particularly considering that access to the source repository is a prerequisite.  A tgz archive allowing routine installation of the FPU variant on an older machine might facilitate wider interest.

This trap only occurs in the new Debian release 7.  ... it looks like a bug in the heap management of the new Debian release (at least for 32-bit applications like LinuxAos).

If I can find a simpler example to illustrate, will file a report in bugs.debian.org.

Thanks to Günter, Necati and Bernhard for the help,             ... Peter E.
Logged
Bernhard T.
Administrator
Full Member
*****
Posts: 164


« Reply #12 on: May 16, 2014, 12:31:30 PM »

A tgz archive allowing routine installation of the FPU variant on an older machine might facilitate wider interest.

absolutely correct.

In http://www.ocp.inf.ethz.ch/forum/index.php/topic,763.msg2800.html#msg2800 Günther mentiones such a distro, I think, I found it  there: http://www.informatik.uni-bremen.de/~fld/UnixAos/rev.5348/, but I guess that it is not the complete distribution and it requires a checkout from the main svn repo.

--
  Bernhard
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!