Discussion:
Where is the OPENSSL needed to build CPAN packages for OS/2?
(too old to reply)
Shmuel (Seymour J.) Metz
2012-02-09 02:31:10 UTC
Permalink
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 ***@library.lspace.org
Dave Yeo
2012-02-09 04:31:30 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
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
Shmuel (Seymour J.) Metz
2012-02-09 14:41:07 UTC
Permalink
In <4f334c3f$0$61340$c3e8da3$***@news.astraweb.com>, on
02/08/2012
Post by Dave Yeo
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.
Post by Dave Yeo
emximp
Where is the documentation? The only emx*.inf I have is EMXRT.INF, and
it doesn't mention emximp.

Thanks.
--
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 ***@library.lspace.org
Dave Yeo
2012-02-09 17:56:53 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
02/08/2012
Post by Dave Yeo
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.
Post by Shmuel (Seymour J.) Metz
Post by Dave Yeo
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
Shmuel (Seymour J.) Metz
2012-02-10 16:41:37 UTC
Permalink
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 (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 ***@library.lspace.org
Dave Yeo
2012-02-10 18:38:17 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
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.
Post by Shmuel (Seymour J.) Metz
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
KO Myung-Hun
2012-02-10 07:32:26 UTC
Permalink
Hi/2.
Post by Shmuel (Seymour J.) Metz
02/08/2012
Post by Dave Yeo
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
Post by Shmuel (Seymour J.) Metz
Post by Dave Yeo
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 (Seymour J.) Metz
2012-02-10 16:42:18 UTC
Permalink
Post by KO Myung-Hun
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?
Post by KO Myung-Hun
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?
--
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 ***@library.lspace.org
Dave Yeo
2012-02-10 18:32:53 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
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
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
Ruediger Ihle
2012-02-09 07:13:50 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
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 (Seymour J.) Metz
2012-02-15 20:41:59 UTC
Permalink
Post by Ruediger Ihle
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
--
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 ***@library.lspace.org
Dave Yeo
2012-02-16 00:50:58 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
Post by Ruediger Ihle
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
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 (Seymour J.) Metz
2012-02-16 09:26:54 UTC
Permalink
Post by Dave Yeo
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.
Post by Dave Yeo
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
--
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 ***@library.lspace.org
Ruediger Ihle
2012-02-16 12:36:45 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
...
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.
--
Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
http://www.s-t.de
Shmuel (Seymour J.) Metz
2012-02-16 16:39:16 UTC
Permalink
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 (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 ***@library.lspace.org
Dave Yeo
2012-02-16 15:40:23 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
Post by Dave Yeo
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.
Post by Shmuel (Seymour J.) Metz
Post by Dave Yeo
ps you can convert libcypto.a to libcrypto.lib with emxomf, same
with libcrypto.a.
Yes.
Post by Shmuel (Seymour J.) Metz
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 (Seymour J.) Metz
2012-02-16 17:36:08 UTC
Permalink
In <4f3d236c$0$20309$c3e8da3$***@news.astraweb.com>, on
02/16/2012
Post by Dave Yeo
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?
--
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 ***@library.lspace.org
Dave Yeo
2012-02-16 20:15:00 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
02/16/2012
Post by Dave Yeo
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 (Seymour J.) Metz
2012-02-17 03:36:52 UTC
Permalink
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?
--
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 ***@library.lspace.org
Dave Yeo
2012-02-17 03:39:38 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
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 (Seymour J.) Metz
2012-02-19 00:25:35 UTC
Permalink
In <4f3dda10$0$24370$c3e8da3$***@news.astraweb.com>, on
02/16/2012
Post by Dave Yeo
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

--
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 ***@library.lspace.org
Dave Yeo
2012-02-19 04:29:34 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
02/16/2012
Post by Dave Yeo
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 (Seymour J.) Metz
2012-02-19 16:19:01 UTC
Permalink
Post by Dave Yeo
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

--
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 ***@library.lspace.org
Dave Yeo
2012-02-19 18:10:56 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
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'.
H:/Vendors/CPAN/Crypt-OpenSSL-Random-0.04/Random.def
weakld: error: Unresolved symbol (UNDEF) '_zError'.
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
weakld: error: Unresolved symbol (UNDEF) '_deflateEnd'.
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
weakld: error: Unresolved symbol (UNDEF) '_deflate'.
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
weakld: error: Unresolved symbol (UNDEF) '_deflateInit_'.
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
weakld: error: Unresolved symbol (UNDEF) '_inflate'.
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
weakld: error: Unresolved symbol (UNDEF) '_inflateEnd'.
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
weakld: error: Unresolved symbol (UNDEF) '_inflateInit_'.
U:\tmp\ldconv_libcrypto_s_a_3a04f411f921ba090.lib(c_zlib.obj)
Ignoring unresolved externals reported from weak prelinker.
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 (Seymour J.) Metz
2012-02-19 23:15:09 UTC
Permalink
Post by Dave Yeo
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?
Post by Dave Yeo
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.
--
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 ***@library.lspace.org
Dave Yeo
2012-02-20 03:52:24 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
Post by Dave Yeo
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?
Post by Shmuel (Seymour J.) Metz
Post by Dave Yeo
For boot_Crypt__OpenSSL__Random it is quite possibly a missing
underline prefix on the symbol.
[...]
Post by Shmuel (Seymour J.) Metz
and h:\Vendors\CPAN\Crypt-OpenSSL-Random-0.04\Random.def contains
LIBRARY 'RandomBQ' INITINSTANCE TERMINSTANCE
-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
2012-02-20 08:14:23 UTC
Permalink
Post by Dave Yeo
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 "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
http://www.s-t.de
Ruediger Ihle
2012-02-20 13:18:50 UTC
Permalink
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.
--
Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
http://www.s-t.de
Shmuel (Seymour J.) Metz
2012-02-21 00:32:14 UTC
Permalink
Post by Dave Yeo
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
Post by Dave Yeo
There should be an underline prefix on the symbol.
Thanks. I added it, tested it and reported the fact that it worked.
--
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 ***@library.lspace.org
Dave Yeo
2012-02-21 00:48:16 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
Post by Dave Yeo
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.
Post by Shmuel (Seymour J.) Metz
Post by Dave Yeo
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 (Seymour J.) Metz
2012-02-21 17:21:44 UTC
Permalink
In <4f42e9d7$0$31144$c3e8da3$***@news.astraweb.com>, on
02/20/2012
Post by Dave Yeo
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.
--
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 ***@library.lspace.org
Dave Yeo
2012-02-21 20:29:50 UTC
Permalink
Post by Shmuel (Seymour J.) Metz
02/20/2012
Post by Dave Yeo
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

Loading...