missing file sqFFIPlugin.c in config.cmake

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

missing file sqFFIPlugin.c in config.cmake

stes
 
-----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 SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJgEDpfAAoJEAwpOKXMq1MaD+gH/jpY8bPYrJ+ScYisjjZbpLbF
fiD+yOMQBG4UmBWGdgF+41xRrLjKQV/nXLotTsUQS1qHtox+Jl7yGXiYCMuxndvd
x7EwirGO6q81dpmBAwYX/yPWlwRCiBYsjiGPFIB/tu0C/0TpT4WbLOi95xs+PqN6
m8+0585aPPV3bDNxo/eRqWaZdPUG4tN19v0OXqvh77SUMDVpQwMaVWCUKjA1Qn1D
s0esq2bOgkH8VBUP7zUjY/ka9Q+E1W8qAHz3MFZi1ACFbBDZgx6mBd6lD8AR7LQg
kHu/TwWcTuGHGe2faKskgJk54xAOjvTHVz+dcYnFgfrS5vby0L7iNavlGpcm3Fw=
=6Rov
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: missing file sqFFIPlugin.c in config.cmake

stes
 
-----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

-----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-----
Reply | Threaded
Open this post in threaded view
|

Re: missing file sqFFIPlugin.c in config.cmake

David T. Lewis
 
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, [hidden email] 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
>
>  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 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-----
Reply | Threaded
Open this post in threaded view
|

Re: missing file sqFFIPlugin.c in config.cmake

stes
In reply to this post by stes
 
-----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


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJgFTkzAAoJEAwpOKXMq1MaIZYIAI4TS1qmPzX8IpzQy7MNpVqF
IKabGyke5QBF7pw6On5tfUoXZXrzn7iOsxf7aRnNR3qvSD4SUp5X/TiG4anM38m1
0n2Blo/bP1RA7fLXnx69IjWRc8bEbUqOGHDw6XcWjRUpfDHE9jR1Nuf8g2NsUxqr
FrP6m4WEarnnlpST3Qn09VI0dyXYIPlUlqTRL6f2zTJaG3X3C8YWqfGYyT65S8EV
PiTQrAY7TXiYmV2FZ26HwOgBoJenbvGDzOyMNX+RgdOYwpg9kqAs76sbU9NdeiLy
KjsAHw41Gs63vF/W94tfstjFs0Pd/K6i0Mv6OOV+2Rkw77efs2l1fliD5qo1Qxg=
=2dKa
-----END PGP SIGNATURE-----

01-any-libffi.c.patch (570 bytes) Download Attachment
02-config.cmake.patch (1K) Download Attachment
03-ffi-config.patch (758 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: missing file sqFFIPlugin.c in config.cmake

David T. Lewis
 
Thanks David, I committed your patches to SVN r3797

Dave


On Sat, Jan 30, 2021 at 11:50:22AM +0100, [hidden email] 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
>
Reply | Threaded
Open this post in threaded view
|

Re: missing file sqFFIPlugin.c in config.cmake

stes
In reply to this post by 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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJgFZ/FAAoJEAwpOKXMq1Ma1xkH/3yIPQDn7d9ze4u06+wp+z20
XY6dHgDK9sntcDReS4sVCl481B5ZXq04lVtXC82wZbiCOsg/lCbLkD0RzC5kiNVA
xvGuyPxTmvAvQjgB63XCEcHdo52Xs5ZM7rMyj76BnpPdvEYTcjFQcwLDNJjiCZka
taMui6TBLRiGIN69zzQnDfkFC3y1YjOYKCixUiOvANA7EJMEdTR8har1zE1UFPX6
JX8rCYE5m2jGP8gJ4cA/JB0x8ZsXdLZTN62Sn8/Vfi/MKLK1Ll/141mg6vAr4jJH
SM2FRL4HWjPESgCwTbRIj5aTvmwX45EV5FQE4Wr/w+tOOpTvbB5W1b9QSxwABg0=
=lPjt
-----END PGP SIGNATURE-----