<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Florian,<div><br></div><div>    which vm are you trying to build? <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm">https://github.com/OpenSmalltalk/opensmalltalk-vm</a> or some other vm?<br><br><div dir="ltr"><span style="background-color: rgba(255, 255, 255, 0);">_,,,^..^,,,_ (phone)</span></div><div dir="ltr"><br><blockquote type="cite">On Nov 29, 2022, at 4:10 AM, Florian Weimer <fweimer@redhat.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>I'm trying to build the VM with a C compiler which does not accept</span><br><span>implicit function declarations or implici int.</span><br><span></span><br><span>This is in preparation for a future change in GCC and Clang defaults.</span><br><span>More information is here:</span><br><span></span><br><span>  <https://fedoraproject.org/wiki/Changes/PortingToModernC></span><br><span>  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC></span><br><span></span><br><span>(The second link points to a container image with an instrumented GCC</span><br><span>that can be used for experiments, or you can just inject</span><br><span>-Werror=implicit-function-declaration -Werror=implicit-int into the</span><br><span>build, which has the same results if compiler flags injection works</span><br><span>reliably throughout the build environment.)</span><br><span></span><br><span>According to Fedora's records Squeak-4.10.2.2614-src-no-mp3 was</span><br><span>downloaded from <http://squeakvm.org/unix/release/>.</span><br><span></span><br><span>I got passed the first obstacle with these little changes:</span><br><span></span><br><span>diff -ur Squeak-4.10.2.2614-src-no-mp3.orig/Cross/plugins/CroquetPlugin/CroquetPlugin.h Squeak-4.10.2.2614-src-no-mp3/Cross/plugins/CroquetPlugin/CroquetPlugin.h</span><br><span>--- Squeak-4.10.2.2614-src-no-mp3.orig/Cross/plugins/CroquetPlugin/CroquetPlugin.h    2006-09-14 19:52:45.000000000 +0200</span><br><span>+++ Squeak-4.10.2.2614-src-no-mp3/Cross/plugins/CroquetPlugin/CroquetPlugin.h    2022-11-29 12:30:00.834158643 +0100</span><br><span>@@ -20,4 +20,6 @@</span><br><span> */</span><br><span> int ioGatherEntropy(char *bufPtr, int bufSize);</span><br><span></span><br><span>+int triBoxOverlap(float *a, float *b, float *c, float *d, float *e);</span><br><span>+</span><br><span> #endif /* CROQUET_PLUGIN_H */</span><br><span>diff -ur Squeak-4.10.2.2614-src-no-mp3.orig/Cross/plugins/CroquetPlugin/TriBoxStub.c Squeak-4.10.2.2614-src-no-mp3/Cross/plugins/CroquetPlugin/TriBoxStub.c</span><br><span>--- Squeak-4.10.2.2614-src-no-mp3.orig/Cross/plugins/CroquetPlugin/TriBoxStub.c    2009-05-26 23:15:18.000000000 +0200</span><br><span>+++ Squeak-4.10.2.2614-src-no-mp3/Cross/plugins/CroquetPlugin/TriBoxStub.c    2022-11-29 12:30:10.184066148 +0100</span><br><span>@@ -1,3 +1,5 @@</span><br><span>+#include "CroquetPlugin.h"</span><br><span>+</span><br><span> /* a stub for triboxoverlap */</span><br><span> int triBoxOverlap(float *a, float *b, float *c, float *d, float *e) {</span><br><span>   return 0;</span><br><span>diff -ur Squeak-4.10.2.2614-src-no-mp3.orig/Cross/plugins/SerialPlugin/SerialPlugin.h Squeak-4.10.2.2614-src-no-mp3/Cross/plugins/SerialPlugin/SerialPlugin.h</span><br><span>--- Squeak-4.10.2.2614-src-no-mp3.orig/Cross/plugins/SerialPlugin/SerialPlugin.h    2009-08-27 03:48:06.000000000 +0200</span><br><span>+++ Squeak-4.10.2.2614-src-no-mp3/Cross/plugins/SerialPlugin/SerialPlugin.h    2022-11-29 13:02:56.418443376 +0100</span><br><span>@@ -6,9 +6,13 @@</span><br><span></span><br><span> #pragma export on</span><br><span> int serialPortClose(int portNum);</span><br><span>+int serialPortCloseByName(const char *portName);</span><br><span>+</span><br><span> int serialPortCount(void);</span><br><span> int serialPortOpen(int portNum, int baudRate, int stopBitsType, int parityType, int dataBits,</span><br><span>            int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar);</span><br><span>+int serialPortOpenByName(char *portName, int dataRate, int stopBitsType, int parityType, int dataBits,</span><br><span>+             int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar);</span><br><span> int serialPortReadInto(int portNum, int count, void *bufferPtr);</span><br><span> int serialPortReadIntoByName(const char *portName, int count, void *bufferPtr);</span><br><span> int serialPortWriteFrom(int portNum, int count, void *bufferPtr);</span><br><span>diff -ur Squeak-4.10.2.2614-src-no-mp3.orig/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c Squeak-4.10.2.2614-src-no-mp3/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c</span><br><span>--- Squeak-4.10.2.2614-src-no-mp3.orig/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c    2006-10-18 19:10:25.000000000 +0200</span><br><span>+++ Squeak-4.10.2.2614-src-no-mp3/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c    2022-11-29 12:30:44.062730997 +0100</span><br><span>@@ -142,7 +142,7 @@</span><br><span>   return fp;</span><br><span> }</span><br><span></span><br><span>-INLINE static allocateBuffer(struct FileBuf *buf, int size)</span><br><span>+INLINE static int allocateBuffer(struct FileBuf *buf, int size)</span><br><span> {</span><br><span>   if (buf->capacity >= size)</span><br><span>     return 1;</span><br><span></span><br><span>A few more changes like these seem to be needed.</span><br><span></span><br><span>But now I'm hitting this error:</span><br><span></span><br><span>…/unix/src/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c:118: implicit function declaration: isBytes</span><br><span></span><br><span>This error is harder to deal with because it seems to be a bug in the</span><br><span>code generator.  There probably should be a macro definition for isBytes</span><br><span>similar to arrayValueOf, like this:</span><br><span></span><br><span>#define isBytes(oop) (interpreterProxy->isBytes(oop))</span><br><span></span><br><span>Otherwise, the global function definition is picked up instead, and that</span><br><span>does not seem to be the right pattern.</span><br><span></span><br><span>Thanks,</span><br><span>Florian</span><br><span></span><br><span></span><br></div></blockquote></div></body></html>