Hi Everyone,
So that path names are encoded correctly on MacOS, the
FileAttributesPlugin needs to use ux2sqPath() and sq2uxPath().
On linux this "just works". If I've read the build log correctly the
functions are included in vm.a, which is included when linking external
plugins.
However I'm not able to get the symbols resolved on MacOS.
The routines are defined in:
platforms/Mac OS/plugins/FilePlugin/sqMacUnixFileInterface.c
declared in:
platforms/Mac OS/plugins/FilePlugin/sqMacUnixFileInterface.h
and are accessed in:
platforms/Mac OS/vm/sqMacNSPluginUILogic2.c
platforms/Mac OS/vm/sqMacImageIO.c
platforms/Mac OS/vm/sqMacMain.c
The following lines in build.macos64x64/common/Makefile.vm
look like they provide the required magic:
PluginIncludes := FilePlugin HostWindowPlugin SoundPlugin
OSPluginIncludes := FilePlugin HostWindowPlugin SoundPlugin
I attempted to create a plugin makefile:
platforms/Mac OS/plugins/FileAttributesPlugin/Makefile.plugin:
#
# FileAttributesPlugin uses sq2uxPath() and ux2sqPath(), provided by FilePlugin
#
#
include ../common/Makefile.plugin
PluginIncludes += FilePlugin
however this still results in:
Undefined symbols for architecture x86_64:
"_sq2uxPath", referenced from:
_squeakPathtoUnixmaxLen in FileAttributesPlugin.lib(FileAttributesPlugin.o)
"_ux2sqPath", referenced from:
_primitiveReaddir in FileAttributesPlugin.lib(FileAttributesPlugin.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build/vm/Squeak] Error 1
The full source is available at:
https://github.com/akgrant43/opensmalltalk-vm/tree/FileAttributes133
Any suggestions?
Thanks very much,
Alistair
I was looking around how to use plain Makefiles with VIsual Studio
and bumped into a demo of driving compilation and debugging on Linux from
Windows Visual Studio. So intriguing I had to share...
https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-devel…
I see the possibility of Windows Visual Studio debugging the VM while it
runs
inside Windows Subsystem For Linux** displaying its graphical windows in a
Windows xclient.
Great when only a single machine will do, like multi-platform coding while
drinking daiquiris on a Caribbean beach.
cheers -ben
** e.g. Unbuntu, Centos7 (could not get Centos6 working)
Previously validMask = -1 was considered an error. Now validMask < 0 is
considered an error and the value is returned to the image with
primitiveFailForOSError().
This is more robust against word length in the VM and provides a general
mechanism for the plugin to provide error information back to the image.
You can view, comment on, or merge this pull request online at:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/278
-- Commit Summary --
* 274: Update primitiveFileStdioHandles error handling.
-- File Changes --
M platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c (3)
M platforms/RiscOS/plugins/FilePlugin/sqFilePluginBasicPrims.c (3)
M platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c (3)
M src/plugins/FilePlugin/FilePlugin.c (22)
-- Patch Links --
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/278.patchhttps://github.com/OpenSmalltalk/opensmalltalk-vm/pull/278.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/278
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 22424a64ebadf34e285b42700562db82ba0808d7
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/22424a64ebadf34e28…
Author: AlistairGrant <akgrant0710(a)gmail.com>
Date: 2018-08-13 (Mon, 13 Aug 2018)
Changed paths:
M platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
M platforms/RiscOS/plugins/FilePlugin/sqFilePluginBasicPrims.c
M platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c
M src/plugins/FilePlugin/FilePlugin.c
Log Message:
-----------
274: Update primitiveFileStdioHandles error handling.
Previously validMask = -1 was considered an error. Now validMask < 0 is
considered an error and the value is returned to the image with
primitiveFailForOSError().
This is more robust against word length in the VM and provides a general
mechanism for the plugin to provide error information back to the image.
Commit: 3b5449618856b605dc1d5e3d17f1dac86141a39d
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/3b5449618856b605dc…
Author: akgrant43 <akgrant(a)gmail.com>
Date: 2018-08-14 (Tue, 14 Aug 2018)
Changed paths:
M platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
M platforms/RiscOS/plugins/FilePlugin/sqFilePluginBasicPrims.c
M platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c
M src/plugins/FilePlugin/FilePlugin.c
Log Message:
-----------
Merge pull request #278 from akgrant43/Issue274
274: Update primitiveFileStdioHandles error handling.
Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/41e53768dcf9...3b…
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.