OpenSmalltalk / opensmalltalk-vm

Cross-platform virtual machine for Squeak, Pharo, Cuis, and Newspeak.
http://opensmalltalk.org/
Other
563 stars 111 forks source link

sqUnixDragDrop.c missing a declaration of fileRecordSize() #693

Open Kirtai opened 3 months ago

Kirtai commented 3 months ago

sqUnixDragDrop.c fails to build due to a missing declaration of fileRecordSize()

Error log

clang -Wall  -g -O2 -DNDEBUG -DDEBUGVM=0 -msse2 -DCOGMTVM=0 -pthread -DLSB_FIRST=1 -m64 -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-value -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -I/usr/include -I/usr/include  -DHAVE_CONFIG_H  -DSQUEAK_BUILTIN_PLUGIN -I/home/faith/tmp/build/opensmalltalk-vm/building/linux64x64/squeak.cog.spur/build -I/home/faith/tmp/build/opensmalltalk-vm/building/linux64x64/squeak.cog.spur/build -I/home/faith/tmp/build/opensmalltalk-vm/platforms/unix/vm -I/home/faith/tmp/build/opensmalltalk-vm/platforms/Cross/vm -I/home/faith/tmp/build/opensmalltalk-vm/src/spur64.cog -I/usr/local/include -I/home/faith/tmp/build/opensmalltalk-vm/platforms/Cross/plugins/DropPlugin  -m64 -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-value -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -I/usr/include -I/usr/include -I/home/faith/tmp/build/opensmalltalk-vm/platforms/Cross/plugins/FilePlugin  -c -o sqUnixDragDrop.o /home/faith/tmp/build/opensmalltalk-vm/platforms/unix/plugins/DropPlugin/sqUnixDragDrop.c
/home/faith/tmp/build/opensmalltalk-vm/platforms/unix/plugins/DropPlugin/sqUnixDragDrop.c:120:66: error: call to undeclared function 'fileRecordSize'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  120 |                 sqInt handle = instantiateClassindexableSize(classByteArray(), fileRecordSize());
      |                                                                                ^
1 error generated.
cstes commented 3 months ago

When building on Debian Linux 12.6 using the Debian build essentials tools + libx11-dev there is a warning in dropRequestFileHandle for an undeclared function fileRecordSize(). However the build continues in that case and the function seems defined in the TEXT segment of FilePlugin.o and undefined in DropPlugin.o. The VM from VMMaker.oscog-eem.3424 seems to work. Also when building on OpenIndiana (UNIX with the Illumos kernel, that is, not on Linux) using gcc 13.3 there is also a warning on fileRecordSize() being undeclared but the VM works. Because I read a different report , are you using Fails to compile on EndeavourOS #685 is this on ArchLinux, Fedora clang/gcc ? I can confirm that I have also seen some build failures during the last weeks with some code cleanup in OpenSmalltalk (for example in sqUnixMain.c) so maybe you could to reproduce the issue by trying a clean new build ?

Kirtai commented 3 months ago

Yes, I am doing this on ArchLinux. It looks like the compilers have become less tolerant of undeclared functions.

Note the following in the output:

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Clean new build still fails at this point.

OpenSmalltalk-Bot commented 3 months ago

Handwave a decade or so back I instigated the need for this, please submitted a git pull request to resolve

Sent from Proton Mail for iOS

On Sun, Aug 18, 2024 at 22:25, Kirtai via Vm-dev @.***(mailto:On Sun, Aug 18, 2024 at 22:25, Kirtai via Vm-dev < wrote:

Yes, I am doing this on ArchLinux. It looks like the compilers have become less tolerant of undeclared functions.

Note the following in the output:

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Clean new build still fails at this point.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

cstes commented 3 months ago

During the last weeks or months (since May I think) I've had some build failures due to code cleanup or changes in the opensmalltalk-vm sources. These sources are partly generated by the VMMaker tool so for example the code for FilePlugin or DropPlugin is partly automatically generated (as indicated by the VMMaker header notice). In some cases it is perhaps a solution to use the binaries from the squeak.org website instead of compiling a vm binary yourself.