Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Kirtai opened this issue Aug 1, 2024 · 4 comments
Open

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

Kirtai opened this issue Aug 1, 2024 · 4 comments

Comments

@Kirtai
Copy link

Kirtai commented Aug 1, 2024

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
Copy link
Contributor

cstes commented Aug 18, 2024

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
Copy link
Author

Kirtai commented Aug 19, 2024

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
Copy link

OpenSmalltalk-Bot commented Aug 19, 2024 via email

@cstes
Copy link
Contributor

cstes commented Aug 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants