Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Where is the OPENSSL needed to build CPAN packages for OS/2?

85 views
Skip to first unread message

Shmuel Metz

unread,
Feb 8, 2012, 9:31:10 PM2/8/12
to
I want to install the Perl module Email-ARF-0.006 from CPAN, which
requires Crypt-OpenSSL-Random-0.04, which in turn has an OPENSSL[1]
dependency. A google search came up with
openssl-1.0.0e-os2knix-20110910-rutime.zip, but that doesn't seem to
include the libraries needed to complete the build. What is the proper
OPENSSL package to install?

[1] I get the messages
Note (probably harmless): No library found for -lssl
Note (probably harmless): No library found for -lcrypto
Note (probably harmless): No library found for -lsocket
weakld: error: Unresolved symbol (UNDEF EXPORT)
'boot_Crypt__OpenSSL__Random'.
weakld: error: Unresolved symbol (UNDEF) '_RAND_status'.
weakld: error: Unresolved symbol (UNDEF) '_RAND_egd'.
weakld: error: Unresolved symbol (UNDEF) '_RAND_seed'.
weakld: error: Unresolved symbol (UNDEF) '_RAND_bytes'.
error LNK2029: "_RAND_bytes" : unresolved external
error LNK2029: "_RAND_status" : unresolved external
error LNK2029: "_RAND_egd" : unresolved external
error LNK2029: "_RAND_seed" : unresolved external

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spam...@library.lspace.org

Dave Yeo

unread,
Feb 8, 2012, 11:31:30 PM2/8/12
to
Shmuel (Seymour J.) Metz wrote:
> I want to install the Perl module Email-ARF-0.006 from CPAN, which
> requires Crypt-OpenSSL-Random-0.04, which in turn has an OPENSSL[1]
> dependency. A google search came up with
> openssl-1.0.0e-os2knix-20110910-rutime.zip, but that doesn't seem to
> include the libraries needed to complete the build. What is the proper
> OPENSSL package to install?
>
> [1] I get the messages
> Note (probably harmless): No library found for -lssl
> Note (probably harmless): No library found for -lcrypto
> Note (probably harmless): No library found for -lsocket
> weakld: error: Unresolved symbol (UNDEF EXPORT)
> 'boot_Crypt__OpenSSL__Random'.
[...]

You can always create the needed libraries, eg
emximp -o libssl.lib ssl.dll
emximp -o libcrypto.lib crypto.dll
Then put the libraries on your LIBRARY_PATH or pass the location to GCC
with -L
You don't need libsocket and anyways there should be one in your GCC
library directory.
Dave

Ruediger Ihle

unread,
Feb 9, 2012, 2:13:50 AM2/9/12
to
On Thu, 9 Feb 2012 02:31:10 UTC, Shmuel (Seymour J.) Metz <spam...@library.lspace.org.invalid> wrote:

> A google search came up with
> openssl-1.0.0e-os2knix-20110910-rutime.zip, but that doesn't
> seem to include the libraries needed to complete the build.

There's a runtime and a development package for OpenSSL.
You can find the latest version as well as a link to earlier
releases at:

http://bauxite.sakura.ne.jp/software/os2/#openssl



--
Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
http://www.s-t.de

Shmuel Metz

unread,
Feb 9, 2012, 9:41:07 AM2/9/12
to
In <4f334c3f$0$61340$c3e8da3$f626...@news.astraweb.com>, on
02/08/2012
at 08:31 PM, Dave Yeo <dave....@gmail.com> said:

>You can always create the needed libraries,

From what? openssl-1.0.0e-os2knix-20110910-rutime.zip has krpt410.dll,
kcrypt10.dll, kssl10.dll and kssl410.dll; Q:\OS2TK45\lib has
crypto.lib.

>emximp

Where is the documentation? The only emx*.inf I have is EMXRT.INF, and
it doesn't mention emximp.

Thanks.

Dave Yeo

unread,
Feb 9, 2012, 12:56:53 PM2/9/12
to
Shmuel (Seymour J.) Metz wrote:
> In<4f334c3f$0$61340$c3e8da3$f626...@news.astraweb.com>, on
> 02/08/2012
> at 08:31 PM, Dave Yeo<dave....@gmail.com> said:
>
>> You can always create the needed libraries,
>
> From what? openssl-1.0.0e-os2knix-20110910-rutime.zip has krpt410.dll,
> kcrypt10.dll, kssl10.dll and kssl410.dll; Q:\OS2TK45\lib has
> crypto.lib.

Good question, not the one in the toolkit. You could create DEF files to
see what the exports are. See below.

>
>> emximp
>
> Where is the documentation? The only emx*.inf I have is EMXRT.INF, and
> it doesn't mention emximp.

Just run emximp without any parametres. Out of date documentation is in
emxdev.inf which unfortunately does not come with eCS but is on Hobbes
in the dev/emx9d directory IIRC.
Dave

KO Myung-Hun

unread,
Feb 10, 2012, 2:32:26 AM2/10/12
to Shmuel (Seymour J.) Metz
Hi/2.

Shmuel (Seymour J.) Metz wrote:
> In <4f334c3f$0$61340$c3e8da3$f626...@news.astraweb.com>, on
> 02/08/2012
> at 08:31 PM, Dave Yeo <dave....@gmail.com> said:
>
>> You can always create the needed libraries,
>
> From what? openssl-1.0.0e-os2knix-20110910-rutime.zip has krpt410.dll,
> kcrypt10.dll, kssl10.dll and kssl410.dll; Q:\OS2TK45\lib has
> crypto.lib.
>

Maybe, openssl-1.0.0e-os2knix-20110910-dev.zip

But you can find the updated one on the URL where Rudi already said.

http://bauxite.sakura.ne.jp/software/os2/#openssl

>> emximp
>
> Where is the documentation? The only emx*.inf I have is EMXRT.INF, and
> it doesn't mention emximp.
>

See emxdev.inf.

Of course, you should have dev-packages of EMX not runtime.

http://hobbes.nmsu.edu/h-browse.php?dir=/pub/os2/dev/emx/v0.9d

--
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.14
Under OS/2 Warp 4 for Korean with FixPak #15
On Intel Core2Duo T5500 1.66GHz with 2GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

Shmuel Metz

unread,
Feb 10, 2012, 11:41:37 AM2/10/12
to
In <4f340908$0$2313$c3e8da3$4605...@news.astraweb.com>, on 02/09/2012
at 09:56 AM, Dave Yeo <dave....@gmail.com> said:

>You could create DEF files to see what the exports are.

Does that mean that the build needs .dll files rather than .a or .lib
files?

>Out of date documentation is in emxdev.inf which unfortunately
>does not come with eCS but is on Hobbes in the dev/emx9d
>directory IIRC.

/pub/os2/dev/emx/v0.9d has

emx-0-9-d.wpi EMX 0.9d Development Enviroment in WarpIN format (GCC)

emx-0-9-d1.wpi EMX 0.9d Development Enviroment in WarpIN format (GCC)

Does it matter which I use?

Shmuel Metz

unread,
Feb 10, 2012, 11:42:18 AM2/10/12
to
In <4F34C80A...@chollian.net>, on 02/10/2012
at 04:32 PM, KO Myung-Hun <ko...@chollian.net> said:

>Maybe, openssl-1.0.0e-os2knix-20110910-dev.zip

Google sent me to <http://www.os2site.com/sw/internet/openssl/> which
has openssl-1.0.0a-os2knix-20100603-dev.zip and
openssl-1.0.0e-os2knix-20110910-runtime.zip but no
openssl-1.0.0e-os2knix-20110910-dev.zip, Do you have a URL?

>But you can find the updated one on the URL where Rudi already said.

> http://bauxite.sakura.ne.jp/software/os2/#openssl

BTDT,GTS

That site has links to multiple packages. Rudi did not say which link
to follow. Are these the right ones?

1.0.0g OS2-EMX (for genuine EMX) : openssl-1.0.0g-os2emx-20120121.zip
1.0.0g OS2-KNIX runtime : openssl-1.0.0g-os2knix-20120121-runtime.zip
1.0.0g OS2-KNIX development headers/libs :
openssl-1.0.0g-os2knix-20120121-dev.zip

If so, does the third contain everything in the other two?

Dave Yeo

unread,
Feb 10, 2012, 1:32:53 PM2/10/12
to
Shmuel (Seymour J.) Metz wrote:
> That site has links to multiple packages. Rudi did not say which link
> to follow. Are these the right ones?
>
> 1.0.0g OS2-EMX (for genuine EMX) : openssl-1.0.0g-os2emx-20120121.zip
> 1.0.0g OS2-KNIX runtime : openssl-1.0.0g-os2knix-20120121-runtime.zip
> 1.0.0g OS2-KNIX development headers/libs :
> openssl-1.0.0g-os2knix-20120121-dev.zip
>
> If so, does the third contain everything in the other two?

EMX and KNIX (klibc) are different libc's. Assuming you're using GCC
3.3.5 or newer you need both the KNIX files.
Dave

Dave Yeo

unread,
Feb 10, 2012, 1:38:17 PM2/10/12
to
Shmuel (Seymour J.) Metz wrote:
> In<4f340908$0$2313$c3e8da3$4605...@news.astraweb.com>, on 02/09/2012
> at 09:56 AM, Dave Yeo<dave....@gmail.com> said:
>
>> >You could create DEF files to see what the exports are.
> Does that mean that the build needs .dll files rather than .a or .lib
> files?

You only need the .lib files to build. You need the .dll files to
actually run, including make test.

>
>> >Out of date documentation is in emxdev.inf which unfortunately
>> >does not come with eCS but is on Hobbes in the dev/emx9d
>> >directory IIRC.
> /pub/os2/dev/emx/v0.9d has
>
> emx-0-9-d.wpi EMX 0.9d Development Enviroment in WarpIN format (GCC)
>
> emx-0-9-d1.wpi EMX 0.9d Development Enviroment in WarpIN format (GCC)
>
> Does it matter which I use?

Unless you're actually planning on developing with the old EMX you only
need http://hobbes.nmsu.edu/download/pub/os2/dev/emx/v0.9d/emxview.zip
which sorta applies to the newer GCC's. Think of it as out of date
documentation which is what it is.
Dave

Shmuel Metz

unread,
Feb 15, 2012, 3:41:59 PM2/15/12
to
In <Bd1D8ggkpXsj-pn2-djpDIjIKK64I@Tobias>, on 02/09/2012
at 07:13 AM, "Ruediger Ihle" <NOSPAM$R.I...@S-t.De> said:

>There's a runtime and a development package for OpenSSL.

Things are getting murkier. I've unzipped and looked at

openssl-0.9.8t-os2knix-20120121-dev.zip
openssl-0.9.8t-os2knix-20120121-runtime.zip
openssl-1.0.0g-os2knix-20120121-dev.zip
openssl-1.0.0g-os2knix-20120121-runtime.zip

None of these have the dll or lib library names (ssl, crypto) that
Crypt-OpenSSL-Random-0.04 calls for, although each has similar dll
names

OPENSSL-0.9.8T

kcrypto dll
kcrypto4 dll
kssl dll
kssl4 dll

openssl-1.0.0g
kcrpt410 dll
kcrypt10 dll
kssl10 dll
kssl410 dll

The Readme of 1.0.0g mentions that it is missing some functions, but
the four for which I got error messages are in *both* kcrpt410.dll and
kcrypt10.dll[1]. Presumably I need to override the packaging of
Crypt-OpenSSL-Random-0.04, but which DLL's should I substitute for
crypt and ssl?

Also, each releas of OPENSSL has two versions of libcrypto.a and
libssl.a; one in lib and one in lib\tcpipv4. The sizes for libssl.a
are different. Is that an issue?

[1] They're also in both kcrypto.dll and kcrypto4.dll

Dave Yeo

unread,
Feb 15, 2012, 7:50:58 PM2/15/12
to
Shmuel (Seymour J.) Metz wrote:
It is the lib name that is important. As long as it points to those dlls
it's fine. They renamed the dlls to avoid conflicts.
The versions in lib\tcpipv4 are for if you want to make your program
work with the old 16 bit stack in which case you have to define
TCPV40HDRS and have the LIBRARY_PATH set to include /usr/lib/tcpipv4
before /usr/lib and the same with openssl
Dave
ps you can convert libcypto.a to libcrypto.lib with emxomf, same with
libcrypto.a. On OS/2 the lib prefix is optional for FAT compatibility
Dave

Shmuel Metz

unread,
Feb 16, 2012, 4:26:54 AM2/16/12
to
In <4f3c52f7$0$1514$c3e8da3$92d0...@news.astraweb.com>, on 02/15/2012
at 04:50 PM, Dave Yeo <dave....@gmail.com> said:

>It is the lib name that is important. As long as it points to those
>dlls it's fine.

I'm not sure what you mean. LIBPATH includes Q:\usr\local\openssl\dll,
which contains kcrpt410.dll, kcrypt10.dll, kssl10.dll and kssl410.dll.
but does not contain crypto.dll, libcrypto.dll, libssl.dll or
ssl.dll[1]; both kcrpt410.dll and kcrypt10.dll contain the four _RAND_
subroutines needed.

>ps you can convert libcypto.a to libcrypto.lib with emxomf, same
>with libcrypto.a.

I assume you mean same with libssl.a? Do I need flags, or is the below
enough?

Q:\usr\bin\emxomf -o Q:\usr\local\OPENSSL\lib\libcrypto.lib
Q:\usr\local\OPENSSL\lib\libcrypto.a
Q:\usr\bin\emxomf -o Q:\usr\local\OPENSSL\lib\libssl.lib
Q:\usr\local\OPENSSL\lib\libssl.a

[1] The packaging has -lcrypto and -lssl

Ruediger Ihle

unread,
Feb 16, 2012, 7:36:45 AM2/16/12
to
On Thu, 16 Feb 2012 09:26:54 UTC, Shmuel (Seymour J.) Metz <spam...@library.lspace.org.invalid> wrote:


> ...
> Q:\usr\local\OPENSSL\lib\libcrypto.a
> ...
> Q:\usr\local\OPENSSL\lib\libssl.a
>
> [1] The packaging has -lcrypto and -lssl


Assuming that you are using GCC3.x or GCC4.x you might want to
add "Q:/usr/local/OPENSSL/lib" to your LIBRARY_PATH environment
variable. Be sure to use forward slashes as path separators.

Dave Yeo

unread,
Feb 16, 2012, 10:40:23 AM2/16/12
to
Shmuel (Seymour J.) Metz wrote:
> In<4f3c52f7$0$1514$c3e8da3$92d0...@news.astraweb.com>, on 02/15/2012
> at 04:50 PM, Dave Yeo<dave....@gmail.com> said:
>
>> >It is the lib name that is important. As long as it points to those
>> >dlls it's fine.
> I'm not sure what you mean. LIBPATH includes Q:\usr\local\openssl\dll,
> which contains kcrpt410.dll, kcrypt10.dll, kssl10.dll and kssl410.dll.
> but does not contain crypto.dll, libcrypto.dll, libssl.dll or
> ssl.dll[1]; both kcrpt410.dll and kcrypt10.dll contain the four_RAND_
> subroutines needed.

The libraries, libcrypto.a or .lib etc are used during the build to link
against the DLLs. The DLLs are used when the newly built program is ran.
The authors of the package correctly renamed the DLLs to avoid conflicts
with other versions of these DLLs. So eg -lcrypto actually links against
kcrypt410.dll or kcrypt10.dll. I'm not familiar with this package so
can't say more about the DLLs.
Same idea for the other libraries and DLLs.

>
>> >ps you can convert libcypto.a to libcrypto.lib with emxomf, same
>> >with libcrypto.a.

Yes.

> I assume you mean same with libssl.a? Do I need flags, or is the below
> enough?

Just emxomf libssl.a should be enough.
Dave

Shmuel Metz

unread,
Feb 16, 2012, 11:39:16 AM2/16/12
to
In <Bd1D8ggkpXsj-pn2-exLRcIHEl358@Tobias>, on 02/16/2012
at 12:36 PM, "Ruediger Ihle" <NOSPAM$R.I...@S-t.De> said:

>Assuming that you are using GCC3.x or GCC4.x you might want to add
>"Q:/usr/local/OPENSSL/lib" to your LIBRARY_PATH environment variable.
>Be sure to use forward slashes as path separators.

Yes. Thanks.

Shmuel Metz

unread,
Feb 16, 2012, 12:36:08 PM2/16/12
to
In <4f3d236c$0$20309$c3e8da3$9dec...@news.astraweb.com>, on
02/16/2012
at 07:40 AM, Dave Yeo <dave....@gmail.com> said:

>Just emxomf libssl.a should be enough.

Don't I need -o if the current directory is not the one in which
libssl.a exists? Or is emxomf smart enough to use the drive and
directory from the input if no output is specified?

Dave Yeo

unread,
Feb 16, 2012, 3:15:00 PM2/16/12
to
Shmuel (Seymour J.) Metz wrote:
> In<4f3d236c$0$20309$c3e8da3$9dec...@news.astraweb.com>, on
> 02/16/2012
> at 07:40 AM, Dave Yeo<dave....@gmail.com> said:
>
>> >Just emxomf libssl.a should be enough.
> Don't I need -o if the current directory is not the one in which
> libssl.a exists? Or is emxomf smart enough to use the drive and
> directory from the input if no output is specified?

IIRC it will just output the file in the same directory as the original.
Run emxomf without parameters to see the help or jsut leave the .a files
and when building emxomf should be run automatically each time it is
needed. Slows down the build process as it is only a temporary file that
is created each time.
Dave

Shmuel Metz

unread,
Feb 16, 2012, 10:36:52 PM2/16/12
to
In <4f3d63c7$0$1649$c3e8da3$aae7...@news.astraweb.com>, on 02/16/2012
at 12:15 PM, Dave Yeo <dave....@gmail.com> said:

>or jsut leave the .a files and when building emxomf should be run
>automatically each time it is needed.

Doesn't happen. Are you sure that Makemaker supports that?

Dave Yeo

unread,
Feb 16, 2012, 10:39:38 PM2/16/12
to
Shmuel (Seymour J.) Metz wrote:
> In<4f3d63c7$0$1649$c3e8da3$aae7...@news.astraweb.com>, on 02/16/2012
> at 12:15 PM, Dave Yeo<dave....@gmail.com> said:
>
>> >or jsut leave the .a files and when building emxomf should be run
>> >automatically each time it is needed.
> Doesn't happen. Are you sure that Makemaker supports that?

I'm not sure how the port your using works, I've only done this on the
old EMX perl and that was years ago. Can you log the relevant part of
the build process and post it?
Dave

Shmuel Metz

unread,
Feb 18, 2012, 7:25:35 PM2/18/12
to
In <4f3dda10$0$24370$c3e8da3$12bc...@news.astraweb.com>, on
02/16/2012
at 07:39 PM, Dave Yeo <dave....@gmail.com> said:

>I'm not sure how the port your using works, I've only done this on
>the old EMX perl and that was years ago. Can you log the relevant
>part of the build process and post it?

Okay

[h:\vendors\cpan\crypt-openssl-random-0.04]set LIBRARY_PATH
U:/usr/lib;U:/usr/lib/gcc-lib/i386-pc-os2-emx/3.3.5;U:/usr/lib;u:/extras/lib;u:/dev/qt/trunk/lib;u:/openldap/lib;u:/cups/lib;Q:\usr\local\OPENSSL\lib

[h:\vendors\cpan\crypt-openssl-random-0.04]perl Makefile.PL
Have /perl5/lib/5.10.0/os2
Want /PROGRAMS/PERL/lib/5.10.0/os2
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [os2]
Config says: [os2]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
Note (probably harmless): No library found for -lssl
Note (probably harmless): No library found for -lcrypto
Note (probably harmless): No library found for -lsocket
Writing Makefile for Crypt::OpenSSL::Random
Writing MYMETA.yml and MYMETA.json

[h:\vendors\cpan\crypt-openssl-random-0.04]U:\extras\bin\make
Skip blib/lib/Crypt/OpenSSL/Random.pm (unchanged)
gcc -c -DDOSISH -DOS2=2 -DEMBED -I. -fno-strict-aliasing -pipe -I/usr/local/include -O2 -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions
=2 -s -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\" -Zdll "-IQ:/PROGRAMS/PERL/lib/5.10.0/os2/CORE" Random.c
In file included from Q:/PROGRAMS/PERL/lib/5.10.0/os2/CORE/perl.h:2495,
from Random.xs:2:
Q:/PROGRAMS/PERL/lib/5.10.0/os2/CORE/os2ish.h:30:1: warning: "PERL_DONT_CREATE_GVSV" redefined
In file included from Random.xs:2:
Q:/PROGRAMS/PERL/lib/5.10.0/os2/CORE/perl.h:932:1: warning: this is the location
of the previous definition
Running Mkbootstrap for Crypt::OpenSSL::Random ()
Q:/PROGRAMS/PERL/BIN/perl.exe -MExtUtils::Command -e 'chmod' -- 644 Random.bs
Q:/PROGRAMS/PERL/BIN/perl.exe -MExtUtils::Command -e 'rm_f' -- blib/arch/auto/Crypt/OpenSSL/Random/RandomBQ.dll
gcc -Zdll -Zomf Random.o -O2 -fomit-frame-pointer -falign-loops=2 -falign-jump
s=2 -falign-functions=2 -s -o blib/arch/auto/Crypt/OpenSSL/Random/RandomBQ.dll
\
Q:/PROGRAMS/PERL/lib/5.10.0/os2/CORE/libperl.a Q:/PROGRAMS/PERL/lib/5.10.0/os2/CORE/libperl_override.a Random.def \
|| ( Q:/PROGRAMS/PERL/BIN/perl.exe -MExtUtils::Command -e 'rm_f' -- blib/arch/auto/Crypt/OpenSSL/Random/RandomBQ.dll && sh -c false )
weakld: error: Unresolved symbol (UNDEF EXPORT) 'boot_Crypt__OpenSSL__Random'.
weakld: info: The symbol is referenced by:
H:/Vendors/CPAN/Crypt-OpenSSL-Random-0.04/Random.def
weakld: error: Unresolved symbol (UNDEF) '_RAND_status'.
weakld: info: The symbol is referenced by:
U:\tmp\ldconv_Random_o_2374f40420a1a3d18.obj
weakld: error: Unresolved symbol (UNDEF) '_RAND_egd'.
weakld: info: The symbol is referenced by:
U:\tmp\ldconv_Random_o_2374f40420a1a3d18.obj
weakld: error: Unresolved symbol (UNDEF) '_RAND_seed'.
weakld: info: The symbol is referenced by:
U:\tmp\ldconv_Random_o_2374f40420a1a3d18.obj
weakld: error: Unresolved symbol (UNDEF) '_RAND_bytes'.
weakld: info: The symbol is referenced by:
U:\tmp\ldconv_Random_o_2374f40420a1a3d18.obj
Ignoring unresolved externals reported from weak prelinker.

U:\tmp\ldconv_Random_o_2374f40420a1a3d18.obj(ldconv_Random_o_2374f40420a1a3d18.o
bj) : error LNK2029: "_RAND_bytes" : unresolved external
U:\tmp\ldconv_Random_o_2374f40420a1a3d18.obj(ldconv_Random_o_2374f40420a1a3d18.o
bj) : error LNK2029: "_RAND_status" : unresolved external
U:\tmp\ldconv_Random_o_2374f40420a1a3d18.obj(ldconv_Random_o_2374f40420a1a3d18.o
bj) : error LNK2029: "_RAND_egd" : unresolved external
U:\tmp\ldconv_Random_o_2374f40420a1a3d18.obj(ldconv_Random_o_2374f40420a1a3d18.o
bj) : error LNK2029: "_RAND_seed" : unresolved external


There were 4 errors detected
make.exe: *** [blib/arch/auto/Crypt/OpenSSL/Random/RandomBQ.dll] Error 1

Dave Yeo

unread,
Feb 18, 2012, 11:29:34 PM2/18/12
to
Shmuel (Seymour J.) Metz wrote:
> In<4f3dda10$0$24370$c3e8da3$12bc...@news.astraweb.com>, on
> 02/16/2012
> at 07:39 PM, Dave Yeo<dave....@gmail.com> said:
>
>> >I'm not sure how the port your using works, I've only done this on
>> >the old EMX perl and that was years ago. Can you log the relevant
>> >part of the build process and post it?
> Okay
>
> [h:\vendors\cpan\crypt-openssl-random-0.04]set LIBRARY_PATH
> U:/usr/lib;U:/usr/lib/gcc-lib/i386-pc-os2-emx/3.3.5;U:/usr/lib;u:/extras/lib;u:/dev/qt/trunk/lib;u:/openldap/lib;u:/cups/lib;Q:\usr\local\OPENSSL\lib

Wrong directory separators for Q:\usr\local\OPENSSL\lib. You should try
putting it at the front of LIBRARY_PATH as well.
set LIBRARY_PATH=Q:/usr/local/OPENSSL/lib;%LIBRARY_PATH%
If your using GCC 4.4.6 maybe,
SET
LIBRARY_PATH=%GCCDIR2%/local446/lib/gcc/i386-pc-os2-emx/4.4.6;%GCCDIR2%/local446/lib;%GCCDIR2%/local446/lib;%GCCDIR2%/local446/lib/gcc/i386-pc-os2-emx/4.4.6;Q:/usr/local/OPENSSL/lib;%LIBRARY_PATH%
Where %GCCDIR2%=u:\usr
Dave

Shmuel Metz

unread,
Feb 19, 2012, 11:19:01 AM2/19/12
to
In <4f407ab0$0$4935$c3e8da3$a8a6...@news.astraweb.com>, on 02/18/2012
at 08:29 PM, Dave Yeo <dave....@gmail.com> said:

>Wrong directory separators for Q:\usr\local\OPENSSL\lib.

That turns out to not be the problem; I edited Config.pm and
Config_heavy.pl to include Q:\usr\local\OPENSSL\lib vut dropped a
keystroke in Config_heavy.pl; correcting that got rid of most of the
errors but added some new ones.

Directory of U:\usr\lib\libsocket.a

6-11-07 9:23 631,488 0 libsocket.a

LIBRARY_PATH includes U:/usr/lib, and my understnading is that
-Lsocket should find both socket and libsocket. However,

[h:\vendors\cpan\crypt-openssl-random-0.04]perl Makefile.PL verbose
BUILD_REQUIRES => { }
CONFIGURE_REQUIRES => { }
DEFINE => q[]
INC => q[]
LIBS => [q[-lssl -lcrypto]]
NAME => q[Crypt::OpenSSL::Random]
PREREQ_PM => { }
VERSION_FROM => q[Random.pm]
Using PERL=Q:/PROGRAMS/PERL/BIN/perl.exe
Have /perl5/lib/5.10.0/os2
Want /PROGRAMS/PERL/lib/5.10.0/os2
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [os2]
Config says: [os2]
This may or may not cause problems. Please check your installation of
perl if you have problems building this extension.
Potential libraries are '-lssl -lcrypto -lsocket':
ssl not found in /usr/lib
ssl not found in /usr/lib/gcc-lib/i386-pc-os2-emx/3.3.5
ssl not found in /extras/lib
ssl not found in /dev/qt/trunk/lib
ssl not found in /openldap/lib
ssl not found in /cups/lib
ssl not found in Q:/os2tk45/lib
'-lssl_s' found at q:/usr/local/OPENSSL/lib/libssl_s.a
crypto not found in /usr/lib
crypto not found in /usr/lib/gcc-lib/i386-pc-os2-emx/3.3.5 crypto not
found in /extras/lib
crypto not found in /dev/qt/trunk/lib
crypto not found in /openldap/lib
crypto not found in /cups/lib
crypto not found in Q:/os2tk45/lib
'-lcrypto_s' found at q:/usr/local/OPENSSL/lib/libcrypto_s.a socket
not found in /usr/lib
socket not found in /usr/lib/gcc-lib/i386-pc-os2-emx/3.3.5 socket not
found in /extras/lib
socket not found in /dev/qt/trunk/lib
socket not found in /openldap/lib
socket not found in /cups/lib
socket not found in Q:/os2tk45/lib
socket not found in q:/usr/local/OPENSSL/lib
Note (probably harmless): No library found for -lsocket
Writing Makefile for Crypt::OpenSSL::Random
Writing MYMETA.yml and MYMETA.json

In this case that's harmless, but the make fails on other errors:

[h:\vendors\cpan\crypt-openssl-random-0.04]U:\extras\bin\make
Skip blib/lib/Crypt/OpenSSL/Random.pm (unchanged)
gcc -c -DDOSISH -DOS2=2 -DEMBED -I. -fno-strict-aliasing -pipe -I/usr/local/include -O2 -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions
=2 -s -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\" -Zdll "-IQ:/PROGRAMS/PERL/lib/5.10.0/os2/CORE" Random.c
In file included from Q:/PROGRAMS/PERL/lib/5.10.0/os2/CORE/perl.h:2495,
from Random.xs:2:
Q:/PROGRAMS/PERL/lib/5.10.0/os2/CORE/os2ish.h:30:1: warning: "PERL_DONT_CREATE_GVSV" redefined
In file included from Random.xs:2:
Q:/PROGRAMS/PERL/lib/5.10.0/os2/CORE/perl.h:932:1: warning: this is the location
of the previous definition
Running Mkbootstrap for Crypt::OpenSSL::Random ()
Q:/PROGRAMS/PERL/BIN/perl.exe -MExtUtils::Command -e 'chmod' -- 644 Random.bs
Q:/PROGRAMS/PERL/BIN/perl.exe -MExtUtils::Command -e 'rm_f' -- blib/arch/auto/Crypt/OpenSSL/Random/RandomBQ.dll
gcc -Zdll -Zomf Random.o -O2 -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions=2 -s -o blib/arch/auto/Crypt/OpenSSL/Random/RandomBQ.dll
\
Q:/PROGRAMS/PERL/lib/5.10.0/os2/CORE/libperl.a -lssl_s -lcrypto_s Q:/PROGRAMS/PERL/lib/5.10.0/os2/CORE/libperl_override.a Random.def \
|| ( Q:/PROGRAMS/PERL/BIN/perl.exe -MExtUtils::Command -e 'rm_f' -- blib/arch/auto/Crypt/OpenSSL/Random/RandomBQ.dll && sh -c false )
weakld: error: Unresolved symbol (UNDEF EXPORT) 'boot_Crypt__OpenSSL__Random'.
weakld: info: The symbol is referenced by:
H:/Vendors/CPAN/Crypt-OpenSSL-Random-0.04/Random.def
weakld: error: Unresolved symbol (UNDEF) '_zError'.
weakld: info: The symbol is referenced by:
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
weakld: error: Unresolved symbol (UNDEF) '_deflateEnd'.
weakld: info: The symbol is referenced by:
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
weakld: error: Unresolved symbol (UNDEF) '_deflate'.
weakld: info: The symbol is referenced by:
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
weakld: error: Unresolved symbol (UNDEF) '_deflateInit_'.
weakld: info: The symbol is referenced by:
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
weakld: error: Unresolved symbol (UNDEF) '_inflate'.
weakld: info: The symbol is referenced by:
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
weakld: error: Unresolved symbol (UNDEF) '_inflateEnd'.
weakld: info: The symbol is referenced by:
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
weakld: error: Unresolved symbol (UNDEF) '_inflateInit_'.
weakld: info: The symbol is referenced by:
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
Ignoring unresolved externals reported from weak prelinker.

U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj) : error LNK2029: "
_deflateEnd" : unresolved external
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj) : error LNK2029: "
_inflateEnd" : unresolved external
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj) : error LNK2029: "
_deflateInit_" : unresolved external
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj) : error LNK2029: "
_inflateInit_" : unresolved external
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj) : error LNK2029: "
_deflate" : unresolved external
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj) : error LNK2029: "
_zError" : unresolved external
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj) : error LNK2029: "
_inflate" : unresolved external


There were 7 errors detected

Dave Yeo

unread,
Feb 19, 2012, 1:10:56 PM2/19/12
to
Shmuel (Seymour J.) Metz wrote:
> gcc -Zdll -Zomf Random.o -O2 -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions=2 -s -o blib/arch/auto/Crypt/OpenSSL/Random/RandomBQ.dll
> \
> Q:/PROGRAMS/PERL/lib/5.10.0/os2/CORE/libperl.a -lssl_s -lcrypto_s Q:/PROGRAMS/PERL/lib/5.10.0/os2/CORE/libperl_override.a Random.def \
> || ( Q:/PROGRAMS/PERL/BIN/perl.exe -MExtUtils::Command -e 'rm_f' -- blib/arch/auto/Crypt/OpenSSL/Random/RandomBQ.dll&& sh -c false )
6 of these errors are caused by a missing -lz to link in zlib. For
boot_Crypt__OpenSSL__Random it is quite possibly a missing underline
prefix on the symbol. I'd grep through the DLLS and libs to see if that
symbol actually exists, and whether it is referenced by C code or
assembly. If assembly then the assembly will need patching to add the
underline prefix, otherwise perhaps the def is broken.
Dave

Shmuel Metz

unread,
Feb 19, 2012, 6:15:09 PM2/19/12
to
In <4f413b33$0$2160$c3e8da3$9f40...@news.astraweb.com>, on 02/19/2012
at 10:10 AM, Dave Yeo <dave....@gmail.com> said:

>6 of these errors are caused by a missing -lz to link in zlib.

Is that specific to OS/2, or would it also be an issue for *ix, bsd
and windoze?

>For boot_Crypt__OpenSSL__Random it is quite possibly a missing
>underline prefix on the symbol.

Well, h:\Vendors\CPAN\Crypt-OpenSSL-Random-0.04\Random.c contains

XS(boot_Crypt__OpenSSL__Random); /* prototype to pass
-Wmissing-prototypes */
XS(boot_Crypt__OpenSSL__Random)
{
#ifdef dVAR
dVAR; dXSARGS;
#else
dXSARGS;
#endif
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
char* file = __FILE__;
#else
const char* file = __FILE__;
#endif

PERL_UNUSED_VAR(cv); /* -W */
PERL_UNUSED_VAR(items); /* -W */
#ifdef XS_APIVERSION_BOOTCHECK
XS_APIVERSION_BOOTCHECK;
#endif
XS_VERSION_BOOTCHECK ;

newXS("Crypt::OpenSSL::Random::random_bytes",
XS_Crypt__OpenSSL__Random_random_bytes, file);
newXS("Crypt::OpenSSL::Random::random_pseudo_bytes",
XS_Crypt__OpenSSL__Random_random_pseudo_bytes, file);
newXS("Crypt::OpenSSL::Random::random_seed",
XS_Crypt__OpenSSL__Random_random_seed, file);
newXS("Crypt::OpenSSL::Random::random_egd",
XS_Crypt__OpenSSL__Random_random_egd, file);
newXS("Crypt::OpenSSL::Random::random_status",
XS_Crypt__OpenSSL__Random_random_status, file);
#if (PERL_REVISION == 5 && PERL_VERSION >= 9)
if (PL_unitcheckav)
call_list(PL_scopestack_ix, PL_unitcheckav);
#endif
XSRETURN_YES;
}

and h:\Vendors\CPAN\Crypt-OpenSSL-Random-0.04\Random.def contains

LIBRARY 'RandomBQ' INITINSTANCE TERMINSTANCE
DESCRIPTION '@#Distribution Crypt-OpenSSL-Random:0.04#@ Perl (v5.10.0
pl) module Crypt::OpenSSL::Random (Perl-config:
-Dprefix=Q:/PROGRAMS/PERL)'
CODE LOADONCALL
DATA LOADONCALL NONSHARED MULTIPLE
EXPORTS
boot_Crypt__OpenSSL__Random

A scan for boot_Crypt__OpenSSL__Random also picks up
h:\Vendors\CPAN\Crypt-OpenSSL-Random-0.04\Random.o.

Dave Yeo

unread,
Feb 19, 2012, 10:52:24 PM2/19/12
to
Shmuel (Seymour J.) Metz wrote:
> In<4f413b33$0$2160$c3e8da3$9f40...@news.astraweb.com>, on 02/19/2012
> at 10:10 AM, Dave Yeo<dave....@gmail.com> said:
>
>> 6 of these errors are caused by a missing -lz to link in zlib.
>
> Is that specific to OS/2, or would it also be an issue for *ix, bsd
> and windoze?

I'd think so but not necessarily. They could have a static copy of zlib
in the openssl libs and their linkers are smarter then ours.
Does openssl include its own copy of zlib?

>
>> For boot_Crypt__OpenSSL__Random it is quite possibly a missing
>> underline prefix on the symbol.
>
[...]
>
> and h:\Vendors\CPAN\Crypt-OpenSSL-Random-0.04\Random.def contains
>
> LIBRARY 'RandomBQ' INITINSTANCE TERMINSTANCE
> DESCRIPTION '@#Distribution Crypt-OpenSSL-Random:0.04#@ Perl (v5.10.0
> pl) module Crypt::OpenSSL::Random (Perl-config:
> -Dprefix=Q:/PROGRAMS/PERL)'
> CODE LOADONCALL
> DATA LOADONCALL NONSHARED MULTIPLE
> EXPORTS
> boot_Crypt__OpenSSL__Random
>

There should be an underline prefix on the symbol.
Dave

Ruediger Ihle

unread,
Feb 20, 2012, 3:14:23 AM2/20/12
to
On Mon, 20 Feb 2012 03:52:24 UTC, Dave Yeo <dave....@gmail.com> wrote:

> I'd think so but not necessarily. They could have a static copy of zlib
> in the openssl libs and their linkers are smarter then ours.
> Does openssl include its own copy of zlib?

There is no copy of zlib in the (OS/2) OpenSSL package. The docs
say, that it is only required when linking statically. When linking
against the import libs, it is not needed. Actually there are 3
versions of the libs: libssl_s.a, libssl_dll.a and libssl.a. The
first one is the static one. The second is the import lib and the
third is by default a copy of the first one. I.O.W. a program that
simply uses -lssl should link against the DLL version of OpenSSL
and thus not need zlib. I don't know, why in Shmuel's case the
static lib is picked.

Ruediger Ihle

unread,
Feb 20, 2012, 8:18:50 AM2/20/12
to
On Mon, 20 Feb 2012 08:14:23 UTC, "Ruediger Ihle" <NOSPAM$R.I...@S-t.De> wrote:

> The first one is the static one. The second is the import
> lib and the third is by default a copy of the first one.

Oops, I meant "a copy of thes second one" i.e. the DLL version.

Shmuel Metz

unread,
Feb 20, 2012, 7:32:14 PM2/20/12
to
In <4f41c37b$0$2595$c3e8da3$f5af...@news.astraweb.com>, on 02/19/2012
at 07:52 PM, Dave Yeo <dave....@gmail.com> said:

>Does openssl include its own copy of zlib?

No. Adding -lz to LIBS in MAKEFILE.PL does indeed resolve that
problem, at least after adding /extras to kLIBC Pathrewriters. That
still doesn't explain why -lsocket doesn't match
Q:\usr\lib\libsocket.a

>There should be an underline prefix on the symbol.

Thanks. I added it, tested it and reported the fact that it worked.

Dave Yeo

unread,
Feb 20, 2012, 7:48:16 PM2/20/12
to
Shmuel (Seymour J.) Metz wrote:
> In<4f41c37b$0$2595$c3e8da3$f5af...@news.astraweb.com>, on 02/19/2012
> at 07:52 PM, Dave Yeo<dave....@gmail.com> said:
>
>> >Does openssl include its own copy of zlib?
> No. Adding -lz to LIBS in MAKEFILE.PL does indeed resolve that
> problem, at least after adding /extras to kLIBC Pathrewriters. That
> still doesn't explain why -lsocket doesn't match
> Q:\usr\lib\libsocket.a

With klibc, unlike the old EMX where it was needed, libsocket doesn't do
anything anyways so I wouldn't worry too much about it though it is
strange it wasn't found. libm is another one that doesn't do anything on
OS/2, it's just there to make porting easier.

>
>> >There should be an underline prefix on the symbol.
> Thanks. I added it, tested it and reported the fact that it worked.

Good. Quite possibly the DEF file was written for EMX which didn't have
the underline prefix on symbols.

Dave

Shmuel Metz

unread,
Feb 21, 2012, 12:21:44 PM2/21/12
to
In <4f42e9d7$0$31144$c3e8da3$b280...@news.astraweb.com>, on
02/20/2012
at 04:48 PM, Dave Yeo <dave....@gmail.com> said:

>Good. Quite possibly the DEF file was written for EMX which didn't
>have the underline prefix on symbols.

Thanks.

What is the easiest way in Perl to test whether the system is using
EMX or kLIBC? All I could think of was searching LIBPATH et al, but
that seems klunky.

Dave Yeo

unread,
Feb 21, 2012, 3:29:50 PM2/21/12
to
Shmuel (Seymour J.) Metz wrote:
> In<4f42e9d7$0$31144$c3e8da3$b280...@news.astraweb.com>, on
> 02/20/2012
> at 04:48 PM, Dave Yeo<dave....@gmail.com> said:
>
>> Good. Quite possibly the DEF file was written for EMX which didn't
>> have the underline prefix on symbols.
>
> Thanks.
>
> What is the easiest way in Perl to test whether the system is using
> EMX or kLIBC? All I could think of was searching LIBPATH et al, but
> that seems klunky.
>

Good question. I guess you could check the GCC version, 3.2.2 or newer
would be KLIBC though I believe Ilya is using a hybrid system. You could
also test for a EMX perl specific file such as perl__.exe. Or try
compiling a small program and test for the macro __KLIBC__ or a specific
header that is only in KLIBC such as perhaps stdint.h.
Searching LIBPATH won't work as most people still have EMX.DLL installed.
Dave
0 new messages