Subject: | Net-SSLeay fails to compile for MIPS |
Date: | Thu, 7 Aug 2014 16:03:00 +0100 |
To: | <bug-Net-SSLeay [...] rt.cpan.org> |
From: | Vicente Olivert Riera <Vincent.Riera [...] imgtec.com> |
Hello,
I was trying to build Net-SSLeay for MIPS and I found that it fails to
compile.
OS: buildroot
Net-SSLeay version: 1.65
Perl version: 5.18.2
SSL version: 1.0.1h
For some reason the OPTIMIZE variable in
"inc/Module/Install/PRIVATE/Net/SSLeay.pm" is receiving "-m64
-mtune=generic" which cause the compilation to fail.
This is the full build log.
---------------------------------
$ make
Show quoted text
>>> perl-net-ssleay 1.65 Extracting
gzip -d -c /buildroot/dl/Net-SSLeay-1.65.tar.gz | tar
--strip-components=1 -C /buildroot/output/build/perl-net-ssleay-1.65 -xf -
Show quoted text >>> perl-net-ssleay 1.65 Patching
Applying perl-net-ssleay-0000-fix-build-system.patch using patch:
patching file inc/Module/Install/PRIVATE/Net/SSLeay.pm
Show quoted text >>> perl-net-ssleay 1.65 Configuring
cd /buildroot/output/build/perl-net-ssleay-1.65/ && if [ -f Build.PL ] ;
then
OPENSSL_PREFIX=/buildroot/output/host/usr/mips64el-buildroot-linux-gnu/sysroot/usr
PERL_MM_USE_DEFAULT=1 perl Build.PL --config
ar="/buildroot/output/host/usr/bin/mips-linux-gnu-ar" --config
full_ar="/buildroot/output/host/usr/bin/mips-linux-gnu-ar" --config
cc="/buildroot/output/host/usr/bin/mips-linux-gnu-gcc" --config
ccflags="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -pipe -Os " --config
ld="/buildroot/output/host/usr/bin/mips-linux-gnu-gcc" --config
lddlflags="-shared " --config ldflags="" --include_dirs
/buildroot/output/host/usr/mips64el-buildroot-linux-gnu/sysroot/usr/lib/perl5/5.18.2/mips64el-linux/CORE
--destdir /buildroot/output/target --installdirs vendor --install_path
lib=/usr/lib/perl5/site_perl/5.18.2 --install_path
arch=/usr/lib/perl5/site_perl/5.18.2/mips64el-linux --install_path
bin=/usr/bin --install_path script=/usr/bin --install_path
bindoc=/usr/share/man/man1 --install_path libdoc=/usr/share/man/man3 ;
else
OPENSSL_PREFIX=/buildroot/output/host/usr/mips64el-buildroot-linux-gnu/sysroot/usr
PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps perl Makefile.PL
AR="/buildroot/output/host/usr/bin/mips-linux-gnu-ar"
FULL_AR="/buildroot/output/host/usr/bin/mips-linux-gnu-ar"
CC="/buildroot/output/host/usr/bin/mips-linux-gnu-gcc"
CCFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -pipe -Os "
LD="/buildroot/output/host/usr/bin/mips-linux-gnu-gcc"
LDDLFLAGS="-shared " LDFLAGS="" DESTDIR=/buildroot/output/target
INSTALLDIRS=vendor INSTALLVENDORLIB=/usr/lib/perl5/site_perl/5.18.2
INSTALLVENDORARCH=/usr/lib/perl5/site_perl/5.18.2/mips64el-linux
INSTALLVENDORBIN=/usr/bin INSTALLVENDORSCRIPT=/usr/bin
INSTALLVENDORMAN1DIR=/usr/share/man/man1
INSTALLVENDORMAN3DIR=/usr/share/man/man3 ; fi
Checking if your kit is complete...
Looks good
Warning: Guessing NAME [perl-net-ssleay] from current directory name.
*** Be sure to use the same compiler and options to compile your
OpenSSL, perl,
and Net::SSLeay. Mixing and matching compilers is not supported.
Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [n] n
Checking if your kit is complete...
Looks good
Writing Makefile for Net::SSLeay
/bin/sed -i -e "s/^LDDLFLAGS = '\(.*\)'/LDDLFLAGS = \1/"
/buildroot/output/build/perl-net-ssleay-1.65/Makefile
/bin/sed -i -e "s/^CCFLAGS = '\(.*\)'/CCFLAGS = \1/"
/buildroot/output/build/perl-net-ssleay-1.65/Makefile
Show quoted text >>> perl-net-ssleay 1.65 Building
cd /buildroot/output/build/perl-net-ssleay-1.65/ && if [ -f Build.PL ] ;
then perl Build build; else /usr/bin/make -j1
PERL_INC=/buildroot/output/host/usr/mips64el-buildroot-linux-gnu/sysroot/usr/lib/perl5/5.18.2/mips64el-linux/CORE
pure_all; fi
make[1]: Entering directory `/buildroot/output/build/perl-net-ssleay-1.65'
cp lib/Net/SSLeay.pm blib/lib/Net/SSLeay.pm
AutoSplitting blib/lib/Net/SSLeay.pm (blib/lib/auto/Net/SSLeay)
blib/lib/Net/SSLeay.pm: some names are not unique when truncated to 8
characters:
directory blib/lib/auto/Net/SSLeay:
do_https3.al, do_https2.al, do_https4.al, do_https.al truncate to
do_https
do_httpx3.al, do_httpx2.al, do_httpx4.al truncate to do_httpx
get_https.al, get_https3.al, get_https4.al, get_http.al,
get_http3.al, get_http4.al, get_httpx.al, get_httpx3.al, get_httpx4.al
truncate to get_http
head_https.al, head_https3.al, head_https4.al, head_http.al,
head_http3.al, head_http4.al, head_httpx.al, head_httpx3.al,
head_httpx4.al truncate to head_htt
post_https.al, post_https3.al, post_https4.al, post_http.al,
post_http3.al, post_http4.al, post_httpx.al, post_httpx3.al,
post_httpx4.al truncate to post_htt
put_https.al, put_https3.al, put_https4.al, put_http.al,
put_http3.al, put_http4.al, put_httpx.al, put_httpx3.al, put_httpx4.al
truncate to put_http
ssl_read_all.al, ssl_read_until.al, ssl_read_CRLF.al truncate to ssl_read
ssl_write_all.al, ssl_write_CRLF.al truncate to ssl_writ
tcp_read_all.al, tcp_read_until.al, tcp_read_CRLF.al truncate to tcp_read
tcp_write_all.al, tcp_write_CRLF.al truncate to tcp_writ
cp lib/Net/SSLeay.pod blib/lib/Net/SSLeay.pod
cp lib/Net/SSLeay/Handle.pm blib/lib/Net/SSLeay/Handle.pm
/usr/bin/perl "-Iinc" /usr/share/perl5/ExtUtils/xsubpp -typemap
/usr/share/perl5/ExtUtils/typemap -typemap typemap SSLeay.xs >
SSLeay.xsc && mv SSLeay.xsc SSLeay.c
/buildroot/output/host/usr/bin/mips-linux-gnu-gcc -c
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe
-Os -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-DVERSION=\"1.65\" -DXS_VERSION=\"1.65\" -fPIC
"-I/buildroot/output/host/usr/mips64el-buildroot-linux-gnu/sysroot/usr/lib/perl5/5.18.2/mips64el-linux/CORE"
SSLeay.c
mips-linux-gnu-gcc: error: unrecognized argument in option '-mtune=generic'
mips-linux-gnu-gcc: note: valid arguments to '-mtune=' are: 10000 1004kc
1004kf 1004kf1_1 1004kf2_1 10k 12000 12k 14000 14k 16000 16k 2000 20kc
24kc 24kec 24kef 24kef1_1 24kef2_1 24kefx 24kex 24kf 24kf1_1 24kf2_1
24kfx 24kx 2k 3000 34kc 34kf 34kf1_1 34kf2_1 34kfx 34kn 34kx 3900 3k
4000 4100 4111 4120 4130 4300 4400 4600 4650 4700 4k 4kc 4kec 4kem 4kep
4km 4kp 4ksc 4ksd 5000 5400 5500 5k 5kc 5kf 6000 6k 7000 74kc 74kf
74kf1_1 74kf2_1 74kf3_2 74kfx 74kx 7k 8000 8k 9000 9k from-abi
loongson2e loongson2f loongson3a m14k m14kc m14ke m14kec m4k mips1 mips2
mips3 mips32 mips32r2 mips4 mips64 mips64r2 native octeon octeon+
octeon2 orion r10000 r1004kc r1004kf r1004kf1_1 r1004kf2_1 r10k r12000
r12k r14000 r14k r16000 r16k r2000 r20kc r24kc r24kec r24kef r24kef1_1
r24kef2_1 r24kefx r24kex r24kf r24kf1_1 r24kf2_1 r24kfx r24kx r2k r3000
r34kc r34kf r34kf1_1 r34kf2_1 r34kfx r34kn r34kx r3900 r3k r4000 r4100
r4111 r4120 r4130 r4300 r4400 r4600 r4650 r4700 r4k r4kc r4kec r4kem
r4kep r4km r4kp r4ksc r4ksd r5000 r5400 r5500 r5k r5kc r5kf r6000 r6k
r7000 r74kc r74kf r74kf1_1 r74kf2_1 r74kf3_2 r74kfx r74kx r7k r8000 r8k
r9000 r9k rm7000 rm7k rm9000 rm9k sb1 sb1a sr71000 sr71k vr4100 vr4111
vr4120 vr4130 vr4300 vr5000 vr5400 vr5500 vr5k xlp xlr
mips-linux-gnu-gcc: error: unrecognized command line option '-m64'
make[1]: *** [SSLeay.o] Error 1
make[1]: Leaving directory `/buildroot/output/build/perl-net-ssleay-1.65'
make: *** [/buildroot/output/build/perl-net-ssleay-1.65/.stamp_built]
Error 2
---------------------------------
--
Vincent