Hi,
1. We can query for the VIRTUAL MACHINE and ask if it is 32 or 64 bit (internally depending on wordSize):
�� �� �� �� ��Smalltalk vm is32Bit
�� ��Anything OK on that side.
2. We can also query for the OPERATING SYSTEM we are running on using:
�� �� �� �� ��Smalltalk os
�� ��and there are subclasses for OSPlatform like Win32Platform, Win64Platform as well as Unix32Platform,
�� ��unix64Platform, ...
�� ��But when I evaluate "Smalltalk os" in Pharo 7 Build #70552
�� �� �� 2a) I receive a Win32Platform instance which means 32 bit although I'm running on a Win 64 system
�� �� �� 2b) I receive a Unix32Platform instance which means 32 bit although I'm running on a Ubuntu 64 system
�� ��I see this as a clear bug and very confusing
The reason for this behavior is simple: because I run with the 32 bit VM/image on these two 64 bit operating
systems and in Pharo:
�� for 2a) the#isActivePlatform method ask the VM (???)for the platform name (which is Win32 then)
�� for 2b) the#isActivePlatform method also considers the word size from the VM (???)
But to me the "os" should give me infos about the underlying operating system and is currently
returning a wrong instance (because it falls back to querying about the running VM, not the real platform)
This would be easy to fix with some UFFI calls (for instance piping from "uname -i" on Unix or "ver" on Windows).
With UFFI I would also be able to give more and better infos in the platform hierarchy about the underlying OS.
But doing this would introduce a dependency from the "Systems-Platforms" package to "UFFI" (and currently my
understanding is that UFFI comes later)
>From what I understood from the comment in getPwdViaFFI:with we also would like to focus on a minimal dependency
for bootstrap ... and only depend on FFI and not UFFI.
Any comments how we could deal with that best?
Thx
T.
|
������ | Guille Polito Research Engineer Centre de Recherche en Informatique, Signal et Automatique de Lille CRIStAL - UMR 9189 French National Center for Scientific Research - http://www.cnrs.fr Phone: +33 06 52 70 66 13 |