Quantcast

SqueakSSL and libtool

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SqueakSSL and libtool

gettimothy
Howdy all.

Building SqueakSSL compiles just fine, but fails at the libtool stage when compiled as an internal plugin.    (formatted for easier reading below. I replace full path with [......] where it helps clean up things)


/bin/sh
[......]/debugCogSqueakSSL/unixbuild/bld/libtool --mode=link gcc -m32 -g -Og -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DCOGMTVM=0 -DDEBUGVM=0 -DLSB_FIRST=1 -Wl,-z,now -export-dynamic -o squeak vm/vm.a AsynchFilePlugin/AsynchFilePlugin.a B2DPlugin/B2DPlugin.a BitBltPlugin/BitBltPlugin.a FilePlugin/FilePlugin.a SocketPlugin/SocketPlugin.a SqueakSSL/SqueakSSL.a MiscPrimitivePlugin/MiscPrimitivePlugin.a disabledPlugins.o version.o -lutil -ldl -lpthread -lm -lnsl -lpthread vm/vm.a

gcc -m32 -g -Og -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DCOGMTVM=0 -DDEBUGVM=0 -DLSB_FIRST=1 -Wl,-z -Wl,now -o squeak disabledPlugins.o version.o -Wl,--export-dynamic vm/vm.a AsynchFilePlugin/AsynchFilePlugin.a B2DPlugin/B2DPlugin.a BitBltPlugin/BitBltPlugin.a FilePlugin/FilePlugin.a SocketPlugin/SocketPlugin.a SqueakSSL/SqueakSSL.a MiscPrimitivePlugin/MiscPrimitivePlugin.a -lutil -ldl -lpthread -lm -lnsl -lpthread vm/vm.a

SqueakSSL/SqueakSSL.a(sqUnixOpenSSL.o): In function `sqCopyBioSSL':
[......]/debugCogSqueakSSL/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.c:37: undefined reference to `BIO_ctrl_pending'

(more errors omitted for brevity. all of them are unresolved references to stuff in /usr/include/openssl/ssl.h   . these errors do not happen at compile time, only libtool ing )


Here is what I think is going on with SqueakSSL on linux.
SqueakSSL is normally built as an external plugin. My guess external plugins are loaded and linked at load time. Since the thing compiles fine, we don't find the link error and we just get a primitive fail.

However, when I moved it from plugins.ext to plugins.int, I get the link failure above.

Since discovering this, I have tried two things 
1. compile on my pure 64 bit partition...this failed for obvious reasons--we don't have 64 bit Cog yet (: but hey...a guy can hope!
2. I installed openssl compat32 libs alongside the 64 bit versions...as show below.
    2.a I made some changes that I kinda-sorta-hoped would work in some strings in the script that had the substring "/lib64  " but that did not work.

bash-4.2$ ls lib/*ssl*
lib/libssl.so.0 lib/libssl.so.0.9.8 lib/libssl.so.1 lib/libssl.so.1.0.0
bash-4.2$ ls lib64/*ssl*
lib64/libssl.so.0 lib64/libssl.so.0.9.8 lib64/libssl.so.1 lib64/libssl.so.1.0.0
I will have to think about this a bit, but I just wanted to post this update in case I am missing something glaringly obvious 

thx.

tty


_______________________________________________
VM-beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Vm-dev] SqueakSSL and libtool

Igor Stasenko

If my memory serves me well, the ssl plugin makefiles designed only to work as external plugin, and it cannot be linked statically with VM, hence you got these errors.

Can't help with solving the problem, since i translated it once to work with Cmake
to be part of Pharo VM and not quite willing to return to same problem again (i hope you understand very well why :)

Btw, you can just take a prebuilt pharo VM binary which comes with ssl plugin
Or try building yourself , as described in readme here:
https://github.com/pharo-project/pharo-vm



On 9 April 2014 21:40, gettimothy <[hidden email]> wrote:
 
Howdy all.

Building SqueakSSL compiles just fine, but fails at the libtool stage when compiled as an internal plugin.    (formatted for easier reading below. I replace full path with [......] where it helps clean up things)


/bin/sh
[......]/debugCogSqueakSSL/unixbuild/bld/libtool --mode=link gcc -m32 -g -Og -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DCOGMTVM=0 -DDEBUGVM=0 -DLSB_FIRST=1 -Wl,-z,now -export-dynamic -o squeak vm/vm.a AsynchFilePlugin/AsynchFilePlugin.a B2DPlugin/B2DPlugin.a BitBltPlugin/BitBltPlugin.a FilePlugin/FilePlugin.a SocketPlugin/SocketPlugin.a SqueakSSL/SqueakSSL.a MiscPrimitivePlugin/MiscPrimitivePlugin.a disabledPlugins.o version.o -lutil -ldl -lpthread -lm -lnsl -lpthread vm/vm.a

gcc -m32 -g -Og -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DCOGMTVM=0 -DDEBUGVM=0 -DLSB_FIRST=1 -Wl,-z -Wl,now -o squeak disabledPlugins.o version.o -Wl,--export-dynamic vm/vm.a AsynchFilePlugin/AsynchFilePlugin.a B2DPlugin/B2DPlugin.a BitBltPlugin/BitBltPlugin.a FilePlugin/FilePlugin.a SocketPlugin/SocketPlugin.a SqueakSSL/SqueakSSL.a MiscPrimitivePlugin/MiscPrimitivePlugin.a -lutil -ldl -lpthread -lm -lnsl -lpthread vm/vm.a

SqueakSSL/SqueakSSL.a(sqUnixOpenSSL.o): In function `sqCopyBioSSL':
[......]/debugCogSqueakSSL/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.c:37: undefined reference to `BIO_ctrl_pending'

(more errors omitted for brevity. all of them are unresolved references to stuff in /usr/include/openssl/ssl.h   . these errors do not happen at compile time, only libtool ing )


Here is what I think is going on with SqueakSSL on linux.
SqueakSSL is normally built as an external plugin. My guess external plugins are loaded and linked at load time. Since the thing compiles fine, we don't find the link error and we just get a primitive fail.

However, when I moved it from plugins.ext to plugins.int, I get the link failure above.

Since discovering this, I have tried two things 
1. compile on my pure 64 bit partition...this failed for obvious reasons--we don't have 64 bit Cog yet (: but hey...a guy can hope!
2. I installed openssl compat32 libs alongside the 64 bit versions...as show below.
    2.a I made some changes that I kinda-sorta-hoped would work in some strings in the script that had the substring "/lib64  " but that did not work.

bash-4.2$ ls lib/*ssl*
lib/libssl.so.0 lib/libssl.so.0.9.8 lib/libssl.so.1 lib/libssl.so.1.0.0
bash-4.2$ ls lib64/*ssl*
lib64/libssl.so.0 lib64/libssl.so.0.9.8 lib64/libssl.so.1 lib64/libssl.so.1.0.0
I will have to think about this a bit, but I just wanted to post this update in case I am missing something glaringly obvious 

thx.

tty





--
Best regards,
Igor Stasenko.

_______________________________________________
VM-beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners
Loading...