[erlang-questions] Issues with Erlang Build under SUSE SLES 11 SP 1 on S390
claudef@REDACTED
claudef@REDACTED
Fri Apr 27 14:29:26 CEST 2012
Dear colleagues,
When including SSL support, I'm still having an issue during the build of
Erlang from the source under SUSE SLES 11 SP1 S390 platform. The error
remains in the Erlang crypto module (openssl) and relates to a missing
-fPIC compiler flag. I've tried to set the following flags to force the
-fPIC flag.
export CFLAGS="$CFLAGS -fPIC"
export CXXFLAGS="$CXXFLAGS -fPIC"
export CC="gcc -fPIC"
The -fPIC flag shows shows up in the previous gcc executions, but in this
step it gets overwritten by the -shared option. Is there any option that
configures the compile of the crypto module, or a place where I could
modify this argument?
make
...
make[3]: Entering directory `/opt/erlang/otp_src_R14B03/lib/crypto/c_src'
make -f s390x-ibm-linux-gnu/Makefile TYPE=opt
make[4]: Entering directory `/opt/erlang/otp_src_R14B03/lib/crypto/c_src'
/usr/bin/install -c -d ../priv/lib/s390x-ibm-linux-gnu
gcc -fPIC -shared -Wl,-Bsymbolic -o
../priv/lib/s390x-ibm-linux-gnu/crypto.so
../priv/obj/s390x-ibm-linux-gnu/crypto.o -Wl,-R/usr/local/ssl/lib
-Wl,-R/usr/local/lib64 -Wl,-R/usr/sfw/lib64 -Wl,-R/opt/local/lib64
-Wl,-R/usr/lib64 -Wl,-R/usr/pkg/lib64 -Wl,-R/usr/local/openssl/lib64
-Wl,-R/usr/lib/openssl/lib64 -Wl,-R/usr/openssl/lib64
-Wl,-R/usr/local/ssl/lib64 -Wl,-R/usr/lib/ssl/lib64 -Wl,-R/usr/ssl/lib64
-Wl,-R/usr/local/lib -Wl,-R/usr/sfw/lib -Wl,-R/opt/local/lib
-Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -Wl,-R/usr/local/openssl/lib
-Wl,-R/usr/lib/openssl/lib -Wl,-R/usr/openssl/lib -Wl,-R/usr/lib/ssl/lib
-Wl,-R/usr/ssl/lib -L/usr/local/ssl/lib -lcrypto
/usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld:
/usr/local/ssl/lib/libcrypto.a(mem_clr.o): relocation R_390_PC32DBL
against `memchr@@GLIBC_2.2' can not be used when making a shared object;
recompile with -fPIC
/usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status
make[4]: *** [../priv/lib/s390x-ibm-linux-gnu/crypto.so] Error 1
make[4]: Leaving directory `/opt/erlang/otp_src_R14B03/lib/crypto/c_src'
make[3]: *** [opt] Error 2
make[3]: Leaving directory `/opt/erlang/otp_src_R14B03/lib/crypto/c_src'
make[2]: *** [opt] Error 2
make[2]: Leaving directory `/opt/erlang/otp_src_R14B03/lib/crypto'
make[1]: *** [opt] Error 2
make[1]: Leaving directory `/opt/erlang/otp_src_R14B03/lib'
make: *** [libs] Error 2
Thanks in advance for your support.
Regards,
Claude
Claude Falbriard
Certified IT Specialist L2 - Middleware
AMS Hortolândia / SP - Brazil
phone: +55 19 9837 0789
cell: +55 13 8117 3316
e-mail: claudef@REDACTED
From: CGS <cgsmcmlxxv@REDACTED>
To: claudef@REDACTED
Cc: erlang-questions@REDACTED
Date: 26/04/2012 18:27
Subject: Re: [erlang-questions] Issues with Erlang Build under SUSE
SLES 11 SP 1 on S390
I suppose you can pass --with-ssl-lib=SSL_LIBRARY_PATH and
--with-ssl-include=SSL_INCLUDE_PATH.
And, yes, there should be libopenssl-devel under SuSE.
CGS
On Thu, Apr 26, 2012 at 8:20 PM, <claudef@REDACTED> wrote:
Dear colleagues,
Thanks, for the quick reply. The issue with the crypto.c clearly relates
to OpenSSL. Unfortunately an openssl-devel package is not available from
Novell SUSE. I've downloaded the latest source packages of Kerberos 5
(MIT) and as well as OpenSSL. Remains some doubts how to use the
configuration arguments described in the Erlang install process
--with-ssl=PATH - Specify location of OpenSSL include and lib
Is there an example how to setup this PATH?
Questions:
1 - What exactly goes into the PATH argument of with-ssl= ? Is there an
example how to use it?
2 - Why does the /configure shell search for the krb5.h only under the
location of /usr/include
Those are the locations generated by Kerberos5:
/usr/local/include/krb5.h
/usr/local/include/krb5/krb5.h
and for the openssl package
/usr/local/ssl/bin/openssl
/usr/local/ssl/include/openssl
3. Any modules need to be placed under /usr/include (default path of
./configure) ?
Thanks in advance for your support to add crypto (ssl) suport to Erlang.
Regards,
Claude
Claude Falbriard
Certified IT Specialist L2 - Middleware
AMS Hortolândia / SP - Brazil
phone: +55 19 9837 0789
cell: +55 13 8117 3316
e-mail: claudef@REDACTED
From: CGS <cgsmcmlxxv@REDACTED>
To: claudef@REDACTED
Cc: Erlang-Questions Questions <erlang-questions@REDACTED>
Date: 26/04/2012 10:03
Subject: Re: [erlang-questions] Issues with Erlang Build under SUSE
SLES 11 SP 1 on S390
Hi,
I suppose you need to install OpenSSL-dev (from the error it looks like
you are missing some OpenSSL headers).
CGS
On Thu, Apr 26, 2012 at 2:17 PM, <claudef@REDACTED> wrote:
Dear colleagues,
I'm compiling an Erlang environment under the SUSE SLES 11 SP1 on a S390
platform building it from the source. I'm facing an error condition when
adding the support for OpenSSL and Erlang "crypto" support using the
following configuration:
./configure --with-ssl --with-ssl=/usr/lib64/openssl
The configure completes normal, but the subsequent "make" step throws a
sequence of errors like this:
..
crypto.c: In function âhmac_md5â:
crypto.c:1713: error: âMD5_CTXâ undeclared (first use in this function)
crypto.c:1713: error: expected â;â before âctxâ
crypto.c:1714: warning: ISO C90 forbids mixed declarations and code
crypto.c:1737: error: âctxâ undeclared (first use in this function)
crypto.c: In function âhmac_sha1â:
crypto.c:1752: error: âSHA_CTXâ undeclared (first use in this function)
crypto.c:1752: error: expected â;â before âctxâ
crypto.c:1753: warning: ISO C90 forbids mixed declarations and code
crypto.c:1776: error: âctxâ undeclared (first use in this function)
make[4]: *** [../priv/obj/s390x-ibm-linux-gnu/crypto.o] Error 1
make[4]: Leaving directory `/opt/erlang/otp_src_R14B03/lib/crypto/c_src'
make[3]: *** [opt] Error 2
make[3]: Leaving directory `/opt/erlang/otp_src_R14B03/lib/crypto/c_src'
make[2]: *** [opt] Error 2
make[2]: Leaving directory `/opt/erlang/otp_src_R14B03/lib/crypto'
make[1]: *** [opt] Error 2
make[1]: Leaving directory `/opt/erlang/otp_src_R14B03/lib'
make: *** [libs] Error 2
..
Without OpenSSL support, the Erlang package compiles successfully and
I've tested it with the console prompt.
Thanks in advance for your hints how to fix this issue with the crypto
module.
Regards,
Claude
Claude Falbriard
Certified IT Specialist L2 - Middleware
AMS Hortolândia / SP - Brazil
phone: +55 19 9837 0789
cell: +55 13 8117 3316
e-mail: claudef@REDACTED
_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120427/1a355a8f/attachment.htm>
More information about the erlang-questions
mailing list