[SqNOS] Building SqueakNOS on Ubuntu

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[SqNOS] Building SqueakNOS on Ubuntu

Ryan Macnak
Hello,

I am trying to build SqueakNOS on Ubuntu 10.10, using the sources from SqueakNOS-19-feb-2010.tar.bz2 from SourceForge.  It gets as far as the final link step but then fails because of an undefined reference to __longjmp_chk.  Any thoughts on what is going wrong?

ld -o ../release/SqueakNOS.kernel -T kernel.ld loader.o ../release/SqueakNOS.obj 
../release/SqueakNOS.obj: In function `callbackLeave':
/home/ryan/platforms/squeaknos/gnu-interp.c:3059: undefined reference to `__longjmp_chk'
make[1]: *** [SqueakNOS.kernel] Error 1
rm loader.o
make[1]: Leaving directory `/home/ryan/platforms/squeaknos/boot'
make: *** [iso] Error 2

Thanks,
Ryan

_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos
Reply | Threaded
Open this post in threaded view
|

Re: [SqNOS] Building SqueakNOS on Ubuntu

David T. Lewis
On Sun, Jan 23, 2011 at 03:09:32PM -0500, Ryan Macnak wrote:

> Hello,
>
> I am trying to build SqueakNOS on Ubuntu 10.10, using the sources from
> SqueakNOS-19-feb-2010.tar.bz2 from SourceForge.  It gets as far as the final
> link step but then fails because of an undefined reference to __longjmp_chk.
>  Any thoughts on what is going wrong?
>
> ld -o ../release/SqueakNOS.kernel -T kernel.ld loader.o
> ../release/SqueakNOS.obj
> ../release/SqueakNOS.obj: In function `callbackLeave':
> /home/ryan/platforms/squeaknos/gnu-interp.c:3059: undefined reference to
> `__longjmp_chk'
> make[1]: *** [SqueakNOS.kernel] Error 1
> rm loader.o
> make[1]: Leaving directory `/home/ryan/platforms/squeaknos/boot'
> make: *** [iso] Error 2
>
> Thanks,
> Ryan

I cannot answer your question WRT the link error, but I would note that
the callbackLeave() and callbackEnter() functions are from method
category "callback support" in class Interpreter. They are unreferenced
in the intepreter itself, and are called only by a couple of plugins
that you are surely not using anyway (IA32ABI and ObjectiveCPlugin).

That suggests that you can probably just comment these two function out
in your interp.c and be no worse off. If you are generating your own
source with VMMaker, just delete the two methods in Interpreter callback
support.

HTH,
Dave

_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos
Reply | Threaded
Open this post in threaded view
|

Re: [SqNOS] Building SqueakNOS on Ubuntu

melkyades
Hi! First of all, thank's for trying. The good news is that this is a known problem and that there is a workaround to it. The bad news is that it's not as good as we would like.

Unfortunately for Ubuntu 10.10, it ships with a libc version that is thightly coupled to linux signaling mechanisms, and including the longjmp part of it causes a chain of undefined references to that mechanism. We haven't implemented a solution to this yet so what we do is to open a Ubuntu 10.04 in a VM, sharing the sources directory, and compiling inside it. Libc version of 10.04 works just fine. That's it, any other thing can be done outside, but compiling the kernel, I'm afraid not.

On the other hand, just some tips: 
- if you are going to compile, I suggest cloning the latest git, we have worked for around a year on it so it is pretty much better (we shall release a new package soon anyway).
- maybe you don't need to compile the kernel at all. The idea is to work at high level, so only in counted cases should you recompile it. I can even pass you a VMWare bundle with everything updated if you want.
- As david said, you may just comment the lines that call longjmp. We use IA32Plugin (Alien plugin) for callbacks to implement paging, but if you don't activate it (activation has to be done manually), there shouldn't be any problem.

Hope that helps!

regards,
           Javier

On Mon, Jan 24, 2011 at 12:44 AM, David T. Lewis <[hidden email]> wrote:
On Sun, Jan 23, 2011 at 03:09:32PM -0500, Ryan Macnak wrote:
> Hello,
>
> I am trying to build SqueakNOS on Ubuntu 10.10, using the sources from
> SqueakNOS-19-feb-2010.tar.bz2 from SourceForge.  It gets as far as the final
> link step but then fails because of an undefined reference to __longjmp_chk.
>  Any thoughts on what is going wrong?
>
> ld -o ../release/SqueakNOS.kernel -T kernel.ld loader.o
> ../release/SqueakNOS.obj
> ../release/SqueakNOS.obj: In function `callbackLeave':
> /home/ryan/platforms/squeaknos/gnu-interp.c:3059: undefined reference to
> `__longjmp_chk'
> make[1]: *** [SqueakNOS.kernel] Error 1
> rm loader.o
> make[1]: Leaving directory `/home/ryan/platforms/squeaknos/boot'
> make: *** [iso] Error 2
>
> Thanks,
> Ryan

I cannot answer your question WRT the link error, but I would note that
the callbackLeave() and callbackEnter() functions are from method
category "callback support" in class Interpreter. They are unreferenced
in the intepreter itself, and are called only by a couple of plugins
that you are surely not using anyway (IA32ABI and ObjectiveCPlugin).

That suggests that you can probably just comment these two function out
in your interp.c and be no worse off. If you are generating your own
source with VMMaker, just delete the two methods in Interpreter callback
support.

HTH,
Dave

_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos



--
Javier Pimás
Ciudad de Buenos Aires

_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos
Reply | Threaded
Open this post in threaded view
|

Re: [SqNOS] Building SqueakNOS on Ubuntu

Ryan Macnak
Thanks for the help, got a successful build.

commenting out longjump + Ubuntu 10.10 => builds but SqueakNOS gets stuck at a slash screen
Ubuntu 10.4 => same undefined reference error
commenting out longjump + Ubuntu 10.4 => successful build

- if you are going to compile, I suggest cloning the latest git, we have worked for around a year on it so it is pretty much better (we shall release a new package soon anyway).

Will this be Squeak 4.1 based?  Also, what are the prospects of the kernel being based on the Cog Stack or Cogit vms?

- maybe you don't need to compile the kernel at all. The idea is to work at high level, so only in counted cases should you recompile it.

Of course, working at a high level is what makes it so appealing :)  My interest is to produce a version of the SqueakNOS kernel that understands the Newspeak bytecodes.  I am hoping that running the Newspeak branch of VMMaker on top of a version of SqueakNOS from circa Squeak 3.9 will not be too painful, or perhaps more likely, that I can add the bytecodes to the SqueakNOS's VMMaker.

Thanks,
Ryan

_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos
Reply | Threaded
Open this post in threaded view
|

Re: [SqNOS] Building SqueakNOS on Ubuntu

melkyades

On Mon, Jan 24, 2011 at 11:21 PM, Ryan Macnak <[hidden email]> wrote:
Thanks for the help, got a successful build.

commenting out longjump + Ubuntu 10.10 => builds but SqueakNOS gets stuck at a slash screen

probably the VM crashed. In git version when squeaknos crashes it activates an output console to debug and see what the error was
 
Ubuntu 10.4 => same undefined reference error

yes, I think you also have to uncomment a line in the Makefile related to including this function from libc.
 
commenting out longjump + Ubuntu 10.4 => successful build

excelent 


- if you are going to compile, I suggest cloning the latest git, we have worked for around a year on it so it is pretty much better (we shall release a new package soon anyway).

Will this be Squeak 4.1 based?  Also, what are the prospects of the kernel being based on the Cog Stack or Cogit vms?

the git repo contains everything but image related stuff: helper scripts, handwritten C code, makefiles, grub to install in hard disk images. We started working on Squeak 3.9, then we moved to 4.1 and now we use Pharo, but all dialects should still work (we even tried cuis once and worked without big problems). I'll try to make a complete release tomorrow.

As for Cog, it should work just fine, but we haven't worked on it yet. The only thing that should be needed is to port the makefile, and for that we have to talk to Eliot to get some clues. 


- maybe you don't need to compile the kernel at all. The idea is to work at high level, so only in counted cases should you recompile it.

Of course, working at a high level is what makes it so appealing :)  My interest is to produce a version of the SqueakNOS kernel that understands the Newspeak bytecodes.  I am hoping that running the Newspeak branch of VMMaker on top of a version of SqueakNOS from circa Squeak 3.9 will not be too painful, or perhaps more likely, that I can add the bytecodes to the SqueakNOS's VMMaker.

Well, that would be a nice experience, I think that exploring security in NewspeakNOS can be really interesting hehe. Let us know what you find out.
 

Thanks,
Ryan

You're welcome.

Regards,
          Javier.

--
Javier Pimás
Ciudad de Buenos Aires

_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos
Reply | Threaded
Open this post in threaded view
|

Re: [SqNOS] Building SqueakNOS on Ubuntu

Gerardo Richarte
In reply to this post by Ryan Macnak
Hi all, I'm catching up old mail (is't that what vacations are for after
all?)

anyway,

On 01/24/2011 11:21 PM, Ryan Macnak wrote:
> Will this be Squeak 4.1 based?  Also, what are the prospects of the
> kernel being based on the Cog Stack or Cogit vms?
AFAIK the lates SqueakNOS based on Pharo 4.1 (as Javier said), does
already use the Stack VM. No Cog yet, but stack VM yes :)
We are way overdue on a complete release as we used to do (VM Appliance,
bootable .iso image, etc), eventually we'll do it, but as Javier
suggested, use the git repository, and then using Monticello you should
be able to NOSify a standard Pharo image pretty straightforward.
>
> Of course, working at a high level is what makes it so appealing :)
>  My interest is to produce a version of the SqueakNOS kernel that
> understands the Newspeak bytecodes.
This is very interesting, please let us know how are you doing with
this, and if you need any more help!

    gera
_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos
Reply | Threaded
Open this post in threaded view
|

Re: [SqNOS] Building SqueakNOS on Ubuntu

Ryan Macnak
>  My interest is to produce a version of the SqueakNOS kernel that
> understands the Newspeak bytecodes.
This is very interesting, please let us know how are you doing with
this, and if you need any more help!

I haven't found the spare time to accomplish much yet, but there are two things to do:

1) Merge SqueakNOS's VM and NSVM.  In practice, I think the easiest way is to copy the 3 extra bytecodes and their support functions over to SqueakNOS's VM, which isn't too painful a proposition.

2) Produce an image with SqueakNOS and Newspeak.  This will be much more difficult, as Newspeak is still Squeak3.9 based.  Newspeak needs to be set up in a Squeak4.1+ image because Cog VMs do not handle the old BlockContexts.  Additionally, only much older versions of SqueakNOS would be loadable into a current Newspeak image.  Unfortunately, the boot process for Newspeak is rather fragile because we still need to maintain a stack of compilers for several (ever more complete) versions of the language. 

Ryan

_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos