This enables the linux builds again, while preserving windows and macos builds. That is a fix for https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/560
If this is compatible with TERF VM, then it should be merged ASAP, the builds are red for too long. (we'll have to inquire next point of failure...)
You can view, comment on, or merge this pull request online at:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562
-- Commit Summary --
* always include <stdio.h> **BEFORE** defining fseeko/ftello * Discard the EXPORT from sqAssert.h for declaring VM functions * Make sure that config.h is included first * Generate source with VMMaker.oscog-nice.2957 so as to restore sqConfig.h inclusion at top * try and omit HAVE_CONFIG_H for compiling getVersion
-- File Changes --
M platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c (3) M platforms/Cross/plugins/IA32ABI/xabicc.c (5) M platforms/Cross/plugins/SoundCodecPrims/sqSoundCodecPluginBasicPrims.c (4) M platforms/Cross/plugins/Squeak3D/b3dInit.c (3) M platforms/Cross/plugins/Squeak3D/b3dMain.c (3) M platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c (4) M platforms/Cross/vm/sqAssert.h (11) M platforms/Cross/vm/sqHeapMap.c (4) M platforms/Cross/vm/sqSCCSVersion.h (2) M platforms/Cross/vm/sqVirtualMachine.c (3) M platforms/unix/config/getversion.c (1) M platforms/unix/plugins/FileAttributesPlugin/faSupport.c (3) M platforms/unix/vm/aio.c (12) M platforms/unix/vm/sqUnixVMProfile.c (5) M platforms/win32/vm/sqPlatformSpecific.h (1) M spur64src/vm/cogit.h (2) M spur64src/vm/cogitARMv8.c (8) M spur64src/vm/cogitX64SysV.c (8) M spur64src/vm/cogitX64WIN64.c (8) M spur64src/vm/cointerp.c (49) M spur64src/vm/cointerp.h (4) M spur64src/vm/cointerpmt.c (31) M spur64src/vm/cointerpmt.h (3) M spur64src/vm/gcc3x-cointerp.c (49) M spur64src/vm/gcc3x-cointerpmt.c (31) M spurlowcode64src/vm/cogit.h (3) M spurlowcode64src/vm/cogitARMv8.c (16) M spurlowcode64src/vm/cogitX64SysV.c (12) M spurlowcode64src/vm/cogitX64WIN64.c (12) M spurlowcode64src/vm/cointerp.c (53) M spurlowcode64src/vm/cointerp.h (5) M spurlowcode64src/vm/gcc3x-cointerp.c (53) M spurlowcodesrc/vm/cogit.h (3) M spurlowcodesrc/vm/cogitARMv5.c (12) M spurlowcodesrc/vm/cogitIA32.c (12) M spurlowcodesrc/vm/cogitMIPSEL.c (16) M spurlowcodesrc/vm/cointerp.c (57) M spurlowcodesrc/vm/cointerp.h (5) M spurlowcodesrc/vm/gcc3x-cointerp.c (57) M spurlowcodestack64src/vm/gcc3x-interp.c (25) M spurlowcodestack64src/vm/interp.c (25) M spurlowcodestacksrc/vm/gcc3x-interp.c (25) M spurlowcodestacksrc/vm/interp.c (25) M spursista64src/vm/cogit.h (2) M spursista64src/vm/cogitARMv8.c (12) M spursista64src/vm/cogitX64SysV.c (8) M spursista64src/vm/cogitX64WIN64.c (8) M spursista64src/vm/cointerp.c (49) M spursista64src/vm/cointerp.h (4) M spursista64src/vm/gcc3x-cointerp.c (49) M spursistasrc/vm/cogit.h (2) M spursistasrc/vm/cogitARMv5.c (8) M spursistasrc/vm/cogitIA32.c (8) M spursistasrc/vm/cogitMIPSEL.c (14) M spursistasrc/vm/cointerp.c (49) M spursistasrc/vm/cointerp.h (2) M spursistasrc/vm/gcc3x-cointerp.c (49) M spursrc/vm/cogit.h (2) M spursrc/vm/cogitARMv5.c (8) M spursrc/vm/cogitIA32.c (8) M spursrc/vm/cogitMIPSEL.c (10) M spursrc/vm/cointerp.c (57) M spursrc/vm/cointerp.h (4) M spursrc/vm/cointerpmt.c (81) M spursrc/vm/cointerpmt.h (5) M spursrc/vm/gcc3x-cointerp.c (57) M spursrc/vm/gcc3x-cointerpmt.c (81) M spurstack64src/vm/gcc3x-interp.c (25) M spurstack64src/vm/interp.c (25) M spurstack64src/vm/validImage.c (17) M spurstacksrc/vm/gcc3x-interp.c (25) M spurstacksrc/vm/interp.c (25) M spurstacksrc/vm/validImage.c (17) M src/plugins/Squeak3D/Squeak3D.c (8) M src/vm/cogit.h (2) M src/vm/cogitARMv5.c (8) M src/vm/cogitIA32.c (8) M src/vm/cogitMIPSEL.c (12) M src/vm/cointerp.c (10) M src/vm/cointerp.h (2) M src/vm/gcc3x-cointerp.c (10) M stacksrc/vm/gcc3x-interp.c (12) M stacksrc/vm/interp.c (12)
-- Patch Links --
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562.patch https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562.diff
@fniephaus approved this pull request.
LGTM, don't know about TERF. Thanks, @nicolas-cellier-aka-nice!
@marceltaeumel approved this pull request.
Maybe merge the current upstream again. Please make the Linux builds work again. Thanks Nicolas!
On Mon, Apr 26, 2021 at 11:54:16AM -0700, Nicolas Cellier wrote:
This enables the linux builds again, while preserving windows and macos builds. That is a fix for https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/560
If this is compatible with TERF VM, then it should be merged ASAP, the builds are red for too long. (we'll have to inquire next point of failure...)
You can view, comment on, or merge this pull request online at:
Builds for the opensmalltalk-vm for Unix/Linux have been broken since February 8, 2001. The commit that caused the initial breakage is:
commit aafcb78371c7e576073a8dbf2f1f32667568e05e Author: Eliot Miranda eliot.miranda@gmail.com Date: Mon Feb 8 20:49:07 2021 -0800
All subsequent versions remain broken, and it has not been possible to build a VM for Linux since that time.
The commit notice includes the following request:
I ask anyone wishing to alter the system here to please contact me and discuss before making changes. It is extraordinarily expensive and frustrating to have to make changes of this kind to make sure that a signfiicantly more complex VM such as Terf's builds correctly.
In April 2021, Nicolas worked through the issues necessary to resolve this problem. He provided platforms and src fixes on GitHub in the fix_include_order branch, along with VMMaker.oscog-nice.2957 in the VMMaker inbox to provide the necessary code generation fix.
Technically, what we need next is: 1) Merge Nicolas' VMMaker fix into VMMaker.oscog, regenerate sources, commit to GitHub 2) Merge the fix_include_order branch into Cog
But we would also like to honor Eliot's request to review such changes before committing.
Eliot, could you please take a look at this and comment?
References: http://source.squeak.org/VMMakerInbox/VMMaker.oscog-nice.2957.mcz https://github.com/OpenSmalltalk/opensmalltalk-vm/tree/fix_include_order https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562 https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/560
Thanks, Dave
This issue apparently affects (some?) Windows builds in addition to unix, see issue #568
We definitely need this asap.
@marceltaeumel pushed 3 commits.
eb2b6023c303b727a7f143555ffb2bbf633ccae3 Updates to CogVM source as per VMMaker.oscog-eem.2985 ff6c9f9b3c7005fe6d1faa947d6d06e2ec9ea8fc Merge remote-tracking branch Cog into fix_include_order db3e4d8674c42f4cc04ebff6a7f01e6caec4c1fb Updates include order as per VMMaker.oscog-nice.2957
So, I updated this PR to HEAD. I will merge this soon. Just testing MSVC builds now.
Some remaining quirks (using VMMaker.oscog-mt.2986 in VMMakerInbox, based in -nice.2957, also in inbox) are: - "#include <asm/cachectl.h>" moves to the bottom in cogitMIPSEL.c - Some hiccups (and extra type casts) regarding usqInt vs sqInt ... ? Maybe it is nothing, maybe there is some extra magic here during source generation that I am not aware of.
So, besides that include-order thingy in the VMMaker, there are only those extra HAVE_CONFIG_H in cross-platform sources: platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c platforms/Cross/plugins/IA32ABI/xabicc.c platforms/Cross/plugins/SoundCodecPrims/sqSoundCodecPluginBasicPrims.c platforms/Cross/plugins/Squeak3D/b3dInit.c platforms/Cross/plugins/Squeak3D/b3dMain.c platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c platforms/Cross/vm/sqHeapMap.c platforms/Cross/vm/sqVirtualMachine.c
Platform-specific fixes considering HAVE_CONFIG_H: platforms/unix/plugins/FileAttributesPlugin/faSupport.c platforms/unix/vm/aio.c platforms/unix/vm/sqUnixVMProfile.c platforms/win32/vm/sqPlatformSpecific.h
And this: platforms/unix/config/getversion.c platforms/Cross/vm/sqSCCSVersion.h platforms/Cross/vm/sqAssert.h
@marceltaeumel pushed 2 commits.
f7d08c178ea2f7543ea8c5a7a3868f16f207be8b Merge remote-tracking branch 'remotes/upstream/Cog' into fix_include_order ed3e870a466c97109627e608c3e7c770aa86dde1 CogVM sources as per VMMaker.oscog-eem.2988 [VMMaker], merged with fixed include order (i.e. "sqConfig.h" and "sqGnu.h") from VMMaker.oscog-mt.2986 (with dtl.2968 and nice.2957) [VMMakerInbox].
Note that sources have to be generated even if a dialog claims that there are not changes. Apparently, the order of include files is not considered a change in the generated artifact:
```Smalltalk [VMMaker generateAllConfigurationsUnderVersionControl] valueSupplyingAnswer: true. "Not false!" ```
Also note that the current VMMaker changes are in the VMMakerInbox: - VMMaker.oscog-mt.2986 based on - VMMaker.oscog-dtl.2968 based on - VMMaker.oscog-nice.2957
@marceltaeumel pushed 2 commits.
c7d93aa5d8e231ab4c5caee119d6764796df57f8 CogVM source as per VMMaker.oscog-eem.2991, merged with VMMaker.oscog-nice.2957 to fix_include_order. 9c9b4f4dc988c399097478790654d30bc7b5f5fd Merge remote-tracking branch 'remotes/upstream/Cog' into fix_include_order
@eliotmiranda approved this pull request.
Looks fine to me. Clearly we need to regenerate sources. Deep apologies for having dragged my feet on this. A long dark night of the soul, now happily in the past (echo cancellation).
Merged #562 into Cog.
Thanks a bunch :D
Builds on aarch64/arm64 Linux work fine. Build order still a problem on build.linux32ARMv6/squeak.cog.spur/build [Tested on Raspberry Pi 3 on RasPi Linux]. Still have to comment out #ifdef _FEATURES_H in "config.h" as workaround
Build order still a problem on build.linux32ARMv6/squeak.cog.spur/build [Tested on Raspberry Pi 3 on RasPi Linux]. Still have to comment out #ifdef _FEATURES_H in "config.h" as workaround
So, the build.linux32ARMv6 config does include "features.h" before "config.h" but that's not an issue for ARMv6? How come?
The only unix-specific changes were in these files: - platforms/unix/plugins/FileAttributesPlugin/faSupport.c - platforms/unix/vm/aio.c - platforms/unix/vm/sqUnixVMProfile.c
Don't those apply to the ARMv6 build as well? Would you post the details where "features.h" is included first?
On 2021-07-25 23:32, Marcel Taeumel wrote:
Would you post the details where "features.h" is included first?
OK. I captured the entire trace, but I believe the salient section is:
vvv===vvv gcc -Wall -g -O2 -DNDEBUG -DDEBUGVM=0 -D_GNU_SOURCE -DUSEEVDEV -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0 -pthread -DLSB_FIRST=1 -march=armv6 -mfpu=vfp -mfloat-abi=hard -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-value -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -DENABLE_FAST_BLT -DHAVE_CONFIG_H -DSQUEAK_BUILTIN_PLUGIN -I/home/pi/OpenSmalltalk/kenVMfix/build.linux32ARMv6/squeak.cog.spur/build -I/home/pi/OpenSmalltalk/kenVMfix/build.linux32ARMv6/squeak.cog.spur/build -I/home/pi/OpenSmalltalk/kenVMfix/platforms/unix/vm -I/home/pi/OpenSmalltalk/kenVMfix/platforms/Cross/vm -I/home/pi/OpenSmalltalk/kenVMfix/spursrc/vm -I/usr/local/include -I/home/pi/OpenSmalltalk/kenVMfix/platforms/Cross/plugins/BitBltPlugin -march=armv6 -mfpu=vfp -mfloat-abi=hard -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-value -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -c -o BitBltArmSimd.o /home/pi/OpenSmalltalk/kenVMfix/platforms/Cross/plugins/BitBltPlugin/BitBltArmSimd.c In file included from /home/pi/OpenSmalltalk/kenVMfix/platforms/Cross/vm/sqMemoryAccess.h:23, from /home/pi/OpenSmalltalk/kenVMfix/platforms/Cross/vm/sqVirtualMachine.h:30, from /home/pi/OpenSmalltalk/kenVMfix/platforms/Cross/plugins/BitBltPlugin/BitBltDispatch.h:30, from /home/pi/OpenSmalltalk/kenVMfix/platforms/Cross/plugins/BitBltPlugin/BitBltInternal.h:29, from /home/pi/OpenSmalltalk/kenVMfix/platforms/Cross/plugins/BitBltPlugin/BitBltArmSimd.c:29: /home/pi/OpenSmalltalk/kenVMfix/build.linux32ARMv6/squeak.cog.spur/build/config.h:40:2: error: #error This file was included too late. Please make sure it is included earlier #error This file was included too late. Please make sure it is included earlier ^~~~~ make[1]: *** [Makefile:182: BitBltArmSimd.o] Error 1 make: *** [Makefile:426: BitBltPlugin/BitBltPlugin.a] Error 2 make: *** Waiting for unfinished jobs.... ^^^===^^^
Did a mvm build on RasPi3: build.kinux32ArmV6/squeak.cog.spur/build.
Changed "mvm" to add flag "-DUSEEVDEV", after which vm-display-fbdev built and VM runnable.
The -DUSEEVDEV flag should be set based on current pull request for fixes to vm-display-fbdev.
Ah I remember. ARM32 has a custom BitBlt-Plugin.
Did 06d1b2d208b64b534eff81d8bb51a4abd8c2146d fix it?
Looks good now.
Thanks much!
vm-dev@lists.squeakfoundation.org