Skip to content

Commit

Permalink
Merge pull request #419 from ronsaldo/bug/fix-minheadless-squeakssl-m…
Browse files Browse the repository at this point in the history
…ac-build

Minheadless SqueakSSL plugin compilation bug fix

Notes from ronsaldo:

On the minheadless VM that is built using cmake, the add_vm_plugin_sources cmake macro requires specifying the the plugin sources explicitly, which is omitting the src/plugins/SqueakSSL/SqueakSSL.c in the compilation of the plugin. By using the other macro (add_vm_plugin_auto), the platform specific files are automatically found with a glob pattern. This is a mistake that I introduced myself. This problem can be reproduced in Pharo using the minheadless vm of this repository on OS X with the following script:

´´´smalltalk
url := 'https://google.com' asZnUrl.
ZnClient new
url: url;
get;
response
´´´

Additional note: why Mac needs the explicit ${SqueakSSL_Sources} while Windows and Unix don't?

In the case of the minheadless VM for OS X, we are treating the VM as it were an unix since we are removing all of the platform specific windowing code in this VM variant. For this reason, in the cases where OS X is different than another unix, the plugin code has to be added manually.
  • Loading branch information
nicolas-cellier-aka-nice committed Aug 31, 2019
2 parents 20a361a + 23c3d10 commit 4a3b1d4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/PluginsCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,15 @@ if(DARWIN)
endif()

# Squeak SSL plugin
# In the case of the minheadless VM for OS X, we are treating the VM as it were
# an unix since we are removing all of the platform specific windowing code in
# this VM variant. For this reason, in the cases where OS X is different than
# another unix, the plugin code has to be added manually.
if (APPLE)
set(SqueakSSL_Sources
"platforms/iOS/plugins/SqueakSSL/sqMacSSL.c"
)
add_vm_plugin_sources(SqueakSSL EXTERNAL ${SqueakSSL_Sources})
add_vm_plugin_auto(SqueakSSL EXTERNAL ${SqueakSSL_Sources})
vm_plugin_link_libraries(SqueakSSL ${CoreFoundation_LIBRARY} ${Security_LIBRARY})
else()
add_vm_plugin_auto(SqueakSSL EXTERNAL)
Expand Down

0 comments on commit 4a3b1d4

Please sign in to comment.