-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi,
Please have a look at the following fixes for SVN squeak classical VM.
Patches for platforms/unix/plugins/SqueakFFIPrims (see below).
Those are against revision 3796 latest (I think) from svn.
The issues are
1) missing #include in any-libffi.c 2) missing sqFFIPlugin.c file in config.cmake 3) ffi-config refers to non-existing ../../config/config.guess
Thanks if this can be applied to subversion.
David Stes
Index: plugins/SqueakFFIPrims/any-libffi.c =================================================================== - --- plugins/SqueakFFIPrims/any-libffi.c (revision 3796) +++ plugins/SqueakFFIPrims/any-libffi.c (working copy) @@ -13,6 +13,7 @@ * *****************************************************************************/ #include "sq.h" +#include "sqVirtualMachine.h" /* primitiveFail in struct VirtualMachine */ #include "sqFFI.h"
#ifndef NO_FFI_SUPPORT Index: plugins/SqueakFFIPrims/config.cmake =================================================================== - --- plugins/SqueakFFIPrims/config.cmake (revision 3796) +++ plugins/SqueakFFIPrims/config.cmake (working copy) @@ -46,7 +46,7 @@ PLUGIN_DISABLE () ENDIF () ENABLE_LANGUAGE (ASM) - - PLUGIN_SOURCES ("${cross}/plugins/${plugin}/sqManualSurface.c ${SQFFIC} ${unix}/plugins/${plugin}/${cpu}-${abi}.c ${unix}/plugins/${plugin}/${cpu}-${abi}-asm.S") + PLUGIN_SOURCES ("${cross}/plugins/${plugin}/sqFFIPlugin.c ${cross}/plugins/${plugin}/sqManualSurface.c ${SQFFIC} ${unix}/plugins/${plugin}/${cpu}-${abi}.c ${unix}/plugins/${plugin}/${cpu}-${abi}-asm.S") IF (CMAKE_COMPILER_IS_GNUCC) SET (CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}") SET (CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -c") Index: plugins/SqueakFFIPrims/ffi-config =================================================================== - --- plugins/SqueakFFIPrims/ffi-config (revision 3796) +++ plugins/SqueakFFIPrims/ffi-config (working copy) @@ -7,7 +7,7 @@ # -lib print nothing if supported, otherwise `-lffi' # -query exit with status 0 if supported, 1 if libffi required
- -cfgdir=../../config +cfgdir=../../cmake
if [ $# -gt 0 ]; then case $1 in @@ -39,6 +39,7 @@
case ${abi} in linux) abi=sysv;; + solaris*) abi=sysv;; darwin*) abi=darwin;; *) abi=libffi; lib="-lffi";; esac
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Any news on the patches below please for SVN (subversion) ?
Thanks, David Stes
- --
Hi,
Please have a look at the following fixes for SVN squeak classical VM.
Patches for platforms/unix/plugins/SqueakFFIPrims (see below).
Those are against revision 3796 latest (I think) from svn.
The issues are
1) missing #include in any-libffi.c 2) missing sqFFIPlugin.c file in config.cmake 3) ffi-config refers to non-existing ../../config/config.guess
Thanks if this can be applied to subversion.
David Stes
Index: plugins/SqueakFFIPrims/any-libffi.c =================================================================== - --- plugins/SqueakFFIPrims/any-libffi.c (revision 3796) +++ plugins/SqueakFFIPrims/any-libffi.c (working copy) @@ -13,6 +13,7 @@ * *****************************************************************************/ #include "sq.h" +#include "sqVirtualMachine.h" /* primitiveFail in struct VirtualMachine */ #include "sqFFI.h"
#ifndef NO_FFI_SUPPORT Index: plugins/SqueakFFIPrims/config.cmake =================================================================== - --- plugins/SqueakFFIPrims/config.cmake (revision 3796) +++ plugins/SqueakFFIPrims/config.cmake (working copy) @@ -46,7 +46,7 @@ PLUGIN_DISABLE () ENDIF () ENABLE_LANGUAGE (ASM) - - PLUGIN_SOURCES ("${cross}/plugins/${plugin}/sqManualSurface.c ${SQFFIC} ${unix}/plugins/${plugin}/${cpu}-${abi}.c ${unix}/plugins/${plugin}/${cpu}-${abi}-asm.S") + PLUGIN_SOURCES ("${cross}/plugins/${plugin}/sqFFIPlugin.c ${cross}/plugins/${plugin}/sqManualSurface.c ${SQFFIC} ${unix}/plugins/${plugin}/${cpu}-${abi}.c ${unix}/plugins/${plugin}/${cpu}-${abi}-asm.S") IF (CMAKE_COMPILER_IS_GNUCC) SET (CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}") SET (CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -c") Index: plugins/SqueakFFIPrims/ffi-config =================================================================== - --- plugins/SqueakFFIPrims/ffi-config (revision 3796) +++ plugins/SqueakFFIPrims/ffi-config (working copy) @@ -7,7 +7,7 @@ # -lib print nothing if supported, otherwise `-lffi' # -query exit with status 0 if supported, 1 if libffi required
- -cfgdir=../../config +cfgdir=../../cmake
if [ $# -gt 0 ]; then case $1 in @@ -39,6 +39,7 @@
case ${abi} in linux) abi=sysv;; + solaris*) abi=sysv;; darwin*) abi=darwin;; *) abi=libffi; lib="-lffi";; esac
Hi David,
Sorry I did not reply earlier. I'll try to follow up this weekend.
If you have a chance, could you please send a copy of the patch file as an attachment? I'm using a mutt mail client and I was having trouble extracting it.
Thanks, Dave
On Fri, Jan 29, 2021 at 07:43:03PM +0100, stes@PANDORA.BE wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Any news on the patches below please for SVN (subversion) ?
Thanks, David Stes
Hi,
Please have a look at the following fixes for SVN squeak classical VM.
Patches for platforms/unix/plugins/SqueakFFIPrims (see below).
Those are against revision 3796 latest (I think) from svn.
The issues are
- missing #include in any-libffi.c
- missing sqFFIPlugin.c file in config.cmake
- ffi-config refers to non-existing ../../config/config.guess
Thanks if this can be applied to subversion.
David Stes
Index: plugins/SqueakFFIPrims/any-libffi.c
- --- plugins/SqueakFFIPrims/any-libffi.c (revision 3796)
+++ plugins/SqueakFFIPrims/any-libffi.c (working copy) @@ -13,6 +13,7 @@
*****************************************************************************/ #include "sq.h" +#include "sqVirtualMachine.h" /* primitiveFail in struct VirtualMachine */ #include "sqFFI.h"
#ifndef NO_FFI_SUPPORT Index: plugins/SqueakFFIPrims/config.cmake ===================================================================
- --- plugins/SqueakFFIPrims/config.cmake (revision 3796)
+++ plugins/SqueakFFIPrims/config.cmake (working copy) @@ -46,7 +46,7 @@ PLUGIN_DISABLE () ENDIF () ENABLE_LANGUAGE (ASM)
- PLUGIN_SOURCES ("${cross}/plugins/${plugin}/sqManualSurface.c ${SQFFIC} ${unix}/plugins/${plugin}/${cpu}-${abi}.c ${unix}/plugins/${plugin}/${cpu}-${abi}-asm.S")
- PLUGIN_SOURCES ("${cross}/plugins/${plugin}/sqFFIPlugin.c ${cross}/plugins/${plugin}/sqManualSurface.c ${SQFFIC} ${unix}/plugins/${plugin}/${cpu}-${abi}.c ${unix}/plugins/${plugin}/${cpu}-${abi}-asm.S") IF (CMAKE_COMPILER_IS_GNUCC) SET (CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}") SET (CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -c")
Index: plugins/SqueakFFIPrims/ffi-config
- --- plugins/SqueakFFIPrims/ffi-config (revision 3796)
+++ plugins/SqueakFFIPrims/ffi-config (working copy) @@ -7,7 +7,7 @@ # -lib print nothing if supported, otherwise `-lffi' # -query exit with status 0 if supported, 1 if libffi required
- -cfgdir=../../config
+cfgdir=../../cmake
if [ $# -gt 0 ]; then case $1 in @@ -39,6 +39,7 @@
case ${abi} in linux) abi=sysv;;
- solaris*) abi=sysv;; darwin*) abi=darwin;; *) abi=libffi; lib="-lffi";;
esac
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2
iQEcBAEBCAAGBQJgFFbaAAoJEAwpOKXMq1MaS4IH/iMQhdxKfE4axp673m+tzjmZ JXGnd31HrhAisHBiyQmPmPE/OleiRJ8TkESe2HfSR0JqUJgF1yQEmLH0aCrBklip SCkP6Mpy1dIy+ThTqkpwn2tpI+6IeCbJXyDggWACgke5Y2bcEVuG4N2Q+sG/K/ba aEvCaq96EYDtUuFzMgnB3hEyeV00GVUnjPGUlMrcg/AVOEAJ0Un0pJmP9m4evWTS y8ME8nbZCO+hChpU3lN5QmvlxAVCj0E2R9m3wuTAClPZ0mteA2pETV1NBRFcC0MP RkDWZrXAk1XBKnNisXPUNcJRqynUai3AIC4uv3obK/l5scfNH56nsSKdbN3wiGo= =5ets -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi,
Thanks if you can double check before adding the patches.
Patch 01 does not affect Linux I think, because it relates to "any-libffi.c" which I think is not used on Linux, but you'd better double check.
The idea is that any-libffi.c is for "any libffi" implementation, which is the one used for Solaris.
So that may explain why it worked in the past, but when the header files changed, it went by unnoticed.
Patch 02 is most important.
I don't quite understand how it can work without the missing file. I think this affects both Solaris and Linux, but it may work on Linux perhaps due to some other difference.
Patch 03 only affects Solaris, it adds Solaris to the ffi-config script.
On Solaris both any-libffi and the optimized version would be possible, although I'd be inclined to just keep using the generic any-libffi.c code.
David Stes
Thanks David, I committed your patches to SVN r3797
Dave
On Sat, Jan 30, 2021 at 11:50:22AM +0100, stes@PANDORA.BE wrote:
Hi,
Thanks if you can double check before adding the patches.
Patch 01 does not affect Linux I think, because it relates to "any-libffi.c" which I think is not used on Linux, but you'd better double check.
The idea is that any-libffi.c is for "any libffi" implementation, which is the one used for Solaris.
So that may explain why it worked in the past, but when the header files changed, it went by unnoticed.
Patch 02 is most important.
I don't quite understand how it can work without the missing file. I think this affects both Solaris and Linux, but it may work on Linux perhaps due to some other difference.
Patch 03 only affects Solaris, it adds Solaris to the ffi-config script.
On Solaris both any-libffi and the optimized version would be possible, although I'd be inclined to just keep using the generic any-libffi.c code.
David Stes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Thanks. The patch seems to work; I've rebuilt with revision 3797.
In revision 3796 I had the following error:
bash-5.0$ squeak sq64-20101106-dtl.image failed loading module /usr/lib/amd64/squeak/4.19.5-3796/so.SqueakFFIPrims due to ld.so.1: squeakvm64: relocation error: file /usr/lib/amd64/squeak/4.19.5-3796/so.SqueakFFIPrims: symbol ffiLogFileNameOfLength: referenced symbol not found
bash-5.0$ ckformat sq64-20101106-dtl.image 68000
But that's fixed now.
Many thanks, David Stes
vm-dev@lists.squeakfoundation.org