Skip Menu |

This queue is for tickets about the Net-SSLeay CPAN distribution.

Report information
The Basics
Id: 97834
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Net-SSLeay

People
Owner: MIKEM [...] cpan.org
Requestors: Vincent.Riera [...] imgtec.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Subject: Re: [rt.cpan.org #97834] Net-SSLeay fails to compile for MIPS
Date: Fri, 08 Aug 2014 06:38:26 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] airspayce.com>
Hello Vincent, Thanks for your report. Unfortunately I have no way to test on MIPS, so think you are on your own. If you find a suitable fix, pls send a patch and I will include it in the distro. Cheers. On Thursday, August 07, 2014 11:03:18 AM you wrote: Show quoted text
> Thu Aug 07 11:03:17 2014: Request 97834 was acted upon. > Transaction: Ticket created by Vincent.Riera@imgtec.com > Queue: Net-SSLeay > Subject: Net-SSLeay fails to compile for MIPS > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: Vincent.Riera@imgtec.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > > 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. >
-- Mike McCauley VK4AMM mikem@airspayce.com Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.airspayce.com Phone +61 7 5598-7474
Subject: Re: [rt.cpan.org #97834] Net-SSLeay fails to compile for MIPS
Date: Fri, 8 Aug 2014 09:41:26 +0100
To: <bug-Net-SSLeay [...] rt.cpan.org>
From: Vicente Olivert Riera <Vincent.Riera [...] imgtec.com>
Hello Mike, you don't need MIPS hardware to test it on MIPS. You can cross-compile, using Buildroot, for instance. Or I could do it if you want. Could you please send me some patches I can try? Thanks. On 08/07/2014 09:38 PM, Mike McCauley via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > Hello Vincent, > > Thanks for your report. > Unfortunately I have no way to test on MIPS, so think you are on your own. > If you find a suitable fix, pls send a patch and I will include it in the > distro. > > Cheers. > > On Thursday, August 07, 2014 11:03:18 AM you wrote:
>> Thu Aug 07 11:03:17 2014: Request 97834 was acted upon. >> Transaction: Ticket created by Vincent.Riera@imgtec.com >> Queue: Net-SSLeay >> Subject: Net-SSLeay fails to compile for MIPS >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: Vincent.Riera@imgtec.com >> Status: new >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >> >> >> 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. >>
> >
-- Vincent
Subject: Re: [rt.cpan.org #97834] Net-SSLeay fails to compile for MIPS
Date: Fri, 08 Aug 2014 18:48:27 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] airspayce.com>
Hello, I wont be able to build any MIPS tests. I think its over to you... If you find a suitable fix, pls send a patch and I will include it in the distro. Cheers. On Friday, August 08, 2014 04:41:38 AM you wrote: Show quoted text
> Queue: Net-SSLeay > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > Hello Mike, > > you don't need MIPS hardware to test it on MIPS. You can cross-compile, > using Buildroot, for instance. Or I could do it if you want. > > Could you please send me some patches I can try? > > Thanks. > > On 08/07/2014 09:38 PM, Mike McCauley via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > > > Hello Vincent, > > > > Thanks for your report. > > Unfortunately I have no way to test on MIPS, so think you are on your > > own. > > If you find a suitable fix, pls send a patch and I will include it in the > > distro. > > > > Cheers. > > > > On Thursday, August 07, 2014 11:03:18 AM you wrote:
> >> Thu Aug 07 11:03:17 2014: Request 97834 was acted upon. > >> Transaction: Ticket created by Vincent.Riera@imgtec.com > >> > >> Queue: Net-SSLeay > >> > >> Subject: Net-SSLeay fails to compile for MIPS > >> > >> Broken in: (no value) > >> > >> Severity: (no value) > >> > >> Owner: Nobody > >> > >> Requestors: Vincent.Riera@imgtec.com > >> > >> Status: new > >> > >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >> > >> 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.
-- Mike McCauley VK4AMM mikem@airspayce.com Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.airspayce.com Phone +61 7 5598-7474
Subject: Re: [rt.cpan.org #97834] Net-SSLeay fails to compile for MIPS
Date: Fri, 8 Aug 2014 11:42:16 +0100
To: <bug-Net-SSLeay [...] rt.cpan.org>
From: Vicente Olivert Riera <Vincent.Riera [...] imgtec.com>
I'm not good at perl and I don't know anything about perl build systems, so if you don't help me I won't be able to fix this. Could you please tell me who is the responsible to write this in the Makefile? OPTIMIZE = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic Because I have edited the "inc/Module/Install/PRIVATE/Net/SSLeay.pm" file and commented this line: OPTIMIZE => $opts->{optimize}, And the OPTIMIZE variable in the Makefile keeps being populated with the same value. However, if I change it to this: OPTIMIZE => "-O2", then, the OPTIMIZE variable in the Makefile has this value: OPTIMIZE = -O2 And however, if I change it to this: OPTIMIZE => "", then, the OPTIMIZE variable in the Makefile is populated again with: OPTIMIZE = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic So, it seems if the OPTIMIZE variable in the "inc/Module/Install/PRIVATE/Net/SSLeay.pm" file has an empty value (or not exists at all), some default mechanism puts the OPTIMIZE variable in the Makefile with all of those values, which include "-m64 -mtune=generic" and make it fail for MIPS. On 08/08/2014 09:48 AM, Mike McCauley via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > Hello, > > I wont be able to build any MIPS tests. I think its over to you... > If you find a suitable fix, pls send a patch and I will include it in the > distro. > > Cheers. > > > On Friday, August 08, 2014 04:41:38 AM you wrote:
>> Queue: Net-SSLeay >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >> >> Hello Mike, >> >> you don't need MIPS hardware to test it on MIPS. You can cross-compile, >> using Buildroot, for instance. Or I could do it if you want. >> >> Could you please send me some patches I can try? >> >> Thanks. >> >> On 08/07/2014 09:38 PM, Mike McCauley via RT wrote:
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>> >>> Hello Vincent, >>> >>> Thanks for your report. >>> Unfortunately I have no way to test on MIPS, so think you are on your >>> own. >>> If you find a suitable fix, pls send a patch and I will include it in the >>> distro. >>> >>> Cheers. >>> >>> On Thursday, August 07, 2014 11:03:18 AM you wrote:
>>>> Thu Aug 07 11:03:17 2014: Request 97834 was acted upon. >>>> Transaction: Ticket created by Vincent.Riera@imgtec.com >>>> >>>> Queue: Net-SSLeay >>>> >>>> Subject: Net-SSLeay fails to compile for MIPS >>>> >>>> Broken in: (no value) >>>> >>>> Severity: (no value) >>>> >>>> Owner: Nobody >>>> >>>> Requestors: Vincent.Riera@imgtec.com >>>> >>>> Status: new >>>> >>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>> >>>> 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.
>
-- Vincent
Subject: Re: [rt.cpan.org #97834] Net-SSLeay fails to compile for MIPS
Date: Fri, 08 Aug 2014 22:07:43 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] airspayce.com>
Hello, On Friday, August 08, 2014 06:42:29 AM you wrote: Show quoted text
> Queue: Net-SSLeay > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > I'm not good at perl and I don't know anything about perl build systems, > so if you don't help me I won't be able to fix this.
I dont have a MIPS cross compiler and cannot help you. try changing to OPTIMIZE => " ", with a space Cheers. Show quoted text
> > Could you please tell me who is the responsible to write this in the > Makefile? > > OPTIMIZE = -O2 -g -pipeinc/Module/Install/PRIVATE/Net/SSLeay.pm -Wall -Wp,-
D_FORTIFY_SOURCE=2 -fexceptions Show quoted text
> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic > > Because I have edited the "inc/Module/Install/PRIVATE/Net/SSLeay.pm" > file and commented this line: > > OPTIMIZE => $opts->{optimize}, > > And the OPTIMIZE variable in the Makefile keeps being populated with the > same value. > > However, if I change it to this: > > OPTIMIZE => "-O2", > > then, the OPTIMIZE variable in the Makefile has this value: > > OPTIMIZE = -O2 > > And however, if I change it to this: > > OPTIMIZE => "", > > then, the OPTIMIZE variable in the Makefile is populated again with: > > OPTIMIZE = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic > > So, it seems if the OPTIMIZE variable in the > "inc/Module/Install/PRIVATE/Net/SSLeay.pm" file has an empty value (or > not exists at all), some default mechanism puts the OPTIMIZE variable in > the Makefile with all of those values, which include "-m64 > -mtune=generic" and make it fail for MIPS. > > On 08/08/2014 09:48 AM, Mike McCauley via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > > > Hello, > > > > I wont be able to build any MIPS tests. I think its over to you... > > If you find a suitable fix, pls send a patch and I will include it in the > > distro. > > > > Cheers. > > > > On Friday, August 08, 2014 04:41:38 AM you wrote:
> >> Queue: Net-SSLeay > >> > >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >> > >> Hello Mike, > >> > >> you don't need MIPS hardware to test it on MIPS. You can cross-compile, > >> using Buildroot, for instance. Or I could do it if you want. > >> > >> Could you please send me some patches I can try? > >> > >> Thanks. > >> > >> On 08/07/2014 09:38 PM, Mike McCauley via RT wrote:
> >>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >>> > >>> Hello Vincent, > >>> > >>> Thanks for your report. > >>> Unfortunately I have no way to test on MIPS, so think you are on your > >>> own. > >>> If you find a suitable fix, pls send a patch and I will include it in > >>> the > >>> distro. > >>> > >>> Cheers. > >>> > >>> On Thursday, August 07, 2014 11:03:18 AM you wrote:
> >>>> Thu Aug 07 11:03:17 2014: Request 97834 was acted upon. > >>>> Transaction: Ticket created by Vincent.Riera@imgtec.com > >>>> > >>>> Queue: Net-SSLeay > >>>> > >>>> Subject: Net-SSLeay fails to compile for MIPS > >>>> > >>>> Broken in: (no value) > >>>> > >>>> Severity: (no value) > >>>> > >>>> Owner: Nobody > >>>> > >>>> Requestors: Vincent.Riera@imgtec.com > >>>> > >>>> Status: new > >>>> > >>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >>>> > >>>> 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.
-- Mike McCauley VK4AMM mikem@airspayce.com Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.airspayce.com Phone +61 7 5598-7474
Subject: Re: [rt.cpan.org #97834] Net-SSLeay fails to compile for MIPS
Date: Fri, 8 Aug 2014 15:32:07 +0100
To: <bug-Net-SSLeay [...] rt.cpan.org>
From: Vicente Olivert Riera <Vincent.Riera [...] imgtec.com>
Hello, On 08/08/2014 01:07 PM, Mike McCauley via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > I dont have a MIPS cross compiler and cannot help you.
Well, you can use the Mentor toolchain which is free: https://sourcery.mentor.com/GNUToolchain/release2791 Show quoted text
> try changing to > OPTIMIZE => " ", > with a space
It works. But do you think that's a good solution to apply upstream? Cheers, -- Vincent Show quoted text
> Cheers. >
>> >> Could you please tell me who is the responsible to write this in the >> Makefile? >> >> OPTIMIZE = -O2 -g -pipeinc/Module/Install/PRIVATE/Net/SSLeay.pm -Wall -Wp,-
> D_FORTIFY_SOURCE=2 -fexceptions
>> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic >> >> Because I have edited the "inc/Module/Install/PRIVATE/Net/SSLeay.pm" >> file and commented this line: >> >> OPTIMIZE => $opts->{optimize}, >> >> And the OPTIMIZE variable in the Makefile keeps being populated with the >> same value. >> >> However, if I change it to this: >> >> OPTIMIZE => "-O2", >> >> then, the OPTIMIZE variable in the Makefile has this value: >> >> OPTIMIZE = -O2 >> >> And however, if I change it to this: >> >> OPTIMIZE => "", >> >> then, the OPTIMIZE variable in the Makefile is populated again with: >> >> OPTIMIZE = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions >> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic >> >> So, it seems if the OPTIMIZE variable in the >> "inc/Module/Install/PRIVATE/Net/SSLeay.pm" file has an empty value (or >> not exists at all), some default mechanism puts the OPTIMIZE variable in >> the Makefile with all of those values, which include "-m64 >> -mtune=generic" and make it fail for MIPS. >> >> On 08/08/2014 09:48 AM, Mike McCauley via RT wrote:
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>> >>> Hello, >>> >>> I wont be able to build any MIPS tests. I think its over to you... >>> If you find a suitable fix, pls send a patch and I will include it in the >>> distro. >>> >>> Cheers. >>> >>> On Friday, August 08, 2014 04:41:38 AM you wrote:
>>>> Queue: Net-SSLeay >>>> >>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>> >>>> Hello Mike, >>>> >>>> you don't need MIPS hardware to test it on MIPS. You can cross-compile, >>>> using Buildroot, for instance. Or I could do it if you want. >>>> >>>> Could you please send me some patches I can try? >>>> >>>> Thanks. >>>> >>>> On 08/07/2014 09:38 PM, Mike McCauley via RT wrote:
>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>> >>>>> Hello Vincent, >>>>> >>>>> Thanks for your report. >>>>> Unfortunately I have no way to test on MIPS, so think you are on your >>>>> own. >>>>> If you find a suitable fix, pls send a patch and I will include it in >>>>> the >>>>> distro. >>>>> >>>>> Cheers. >>>>> >>>>> On Thursday, August 07, 2014 11:03:18 AM you wrote:
>>>>>> Thu Aug 07 11:03:17 2014: Request 97834 was acted upon. >>>>>> Transaction: Ticket created by Vincent.Riera@imgtec.com >>>>>> >>>>>> Queue: Net-SSLeay >>>>>> >>>>>> Subject: Net-SSLeay fails to compile for MIPS >>>>>> >>>>>> Broken in: (no value) >>>>>> >>>>>> Severity: (no value) >>>>>> >>>>>> Owner: Nobody >>>>>> >>>>>> Requestors: Vincent.Riera@imgtec.com >>>>>> >>>>>> Status: new >>>>>> >>>>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>>> >>>>>> 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.
>
-- Vincent
Subject: Re: [rt.cpan.org #97834] Net-SSLeay fails to compile for MIPS
Date: Sat, 09 Aug 2014 07:42:02 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] airspayce.com>
Hello, what you will need to do is add some code to inc/Module/Install/PRIVATE/Net/SSLeay.pm at about line 136. This is where build-and-platform specific compiler flags are set up. You will need to uniquely detect the case where you are compiling for MIPS, or maybe using the MIPS compiler, and set $opts->{optimize} to ' ' (ie a space) or whatever flaghs make sense for your case. After you have tested it, send me a context diff and I will included it in the base code. Cheers. On Friday, August 08, 2014 10:32:21 AM you wrote: Show quoted text
> Queue: Net-SSLeay > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > Hello, > > On 08/08/2014 01:07 PM, Mike McCauley via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > I dont have a MIPS cross compiler and cannot help you.
> > Well, you can use the Mentor toolchain which is free: > > https://sourcery.mentor.com/GNUToolchain/release2791 >
> > try changing to > > OPTIMIZE => " ", > > with a space
> > It works. But do you think that's a good solution to apply upstream? > > Cheers, > -- > Vincent >
> > Cheers. > >
> >> Could you please tell me who is the responsible to write this in the > >> Makefile? > >> > >> OPTIMIZE = -O2 -g -pipeinc/Module/Install/PRIVATE/Net/SSLeay.pm -Wall > >> -Wp,-
> > > > D_FORTIFY_SOURCE=2 -fexceptions > >
> >> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic > >> > >> Because I have edited the "inc/Module/Install/PRIVATE/Net/SSLeay.pm" > >> file and commented this line: > >> > >> OPTIMIZE => $opts->{optimize}, > >> > >> And the OPTIMIZE variable in the Makefile keeps being populated with the > >> same value. > >> > >> However, if I change it to this: > >> > >> OPTIMIZE => "-O2", > >> > >> then, the OPTIMIZE variable in the Makefile has this value: > >> > >> OPTIMIZE = -O2 > >> > >> And however, if I change it to this: > >> > >> OPTIMIZE => "", > >> > >> then, the OPTIMIZE variable in the Makefile is populated again with: > >> > >> OPTIMIZE = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > >> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic > >> > >> So, it seems if the OPTIMIZE variable in the > >> "inc/Module/Install/PRIVATE/Net/SSLeay.pm" file has an empty value (or > >> not exists at all), some default mechanism puts the OPTIMIZE variable in > >> the Makefile with all of those values, which include "-m64 > >> -mtune=generic" and make it fail for MIPS. > >> > >> On 08/08/2014 09:48 AM, Mike McCauley via RT wrote:
> >>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >>> > >>> Hello, > >>> > >>> I wont be able to build any MIPS tests. I think its over to you... > >>> If you find a suitable fix, pls send a patch and I will include it in > >>> the > >>> distro. > >>> > >>> Cheers. > >>> > >>> On Friday, August 08, 2014 04:41:38 AM you wrote:
> >>>> Queue: Net-SSLeay > >>>> > >>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >>>> > >>>> Hello Mike, > >>>> > >>>> you don't need MIPS hardware to test it on MIPS. You can cross-compile, > >>>> using Buildroot, for instance. Or I could do it if you want. > >>>> > >>>> Could you please send me some patches I can try? > >>>> > >>>> Thanks. > >>>> > >>>> On 08/07/2014 09:38 PM, Mike McCauley via RT wrote:
> >>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >>>>> > >>>>> Hello Vincent, > >>>>> > >>>>> Thanks for your report. > >>>>> Unfortunately I have no way to test on MIPS, so think you are on your > >>>>> own. > >>>>> If you find a suitable fix, pls send a patch and I will include it in > >>>>> the > >>>>> distro. > >>>>> > >>>>> Cheers. > >>>>> > >>>>> On Thursday, August 07, 2014 11:03:18 AM you wrote:
> >>>>>> Thu Aug 07 11:03:17 2014: Request 97834 was acted upon. > >>>>>> Transaction: Ticket created by Vincent.Riera@imgtec.com > >>>>>> > >>>>>> Queue: Net-SSLeay > >>>>>> > >>>>>> Subject: Net-SSLeay fails to compile for MIPS > >>>>>> > >>>>>> Broken in: (no value) > >>>>>> > >>>>>> Severity: (no value) > >>>>>> > >>>>>> Owner: Nobody > >>>>>> > >>>>>> Requestors: Vincent.Riera@imgtec.com > >>>>>> > >>>>>> Status: new > >>>>>> > >>>>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >>>>>> > >>>>>> 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.
-- Mike McCauley VK4AMM mikem@airspayce.com Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.airspayce.com Phone +61 7 5598-7474
Subject: Re: [rt.cpan.org #97834] Net-SSLeay fails to compile for MIPS
Date: Mon, 11 Aug 2014 16:00:24 +0100
To: <bug-Net-SSLeay [...] rt.cpan.org>
From: Vicente Olivert Riera <Vincent.Riera [...] imgtec.com>
Hello Mike, first I apologize because I have found this is not a failure in the Net-SSLeay package itself. I think I have found what the problem is. Let me explain it to you. In the Buildroot tool we are cross-compiling a full Linux root filesystem for another architecture. In this case, I run the Buildroot tool in my x86_64 machine to build a MIPS (or any other architecture) root filesystem. The Net-SSLeay build system uses the Config module (use Config;), and that modules has a read only variable (%Config) which has all the information that the Configure program had during the Perl build time. Given that Perl is needed to build Net-SSLeay, and given that my machine is an x86_64 (cannot run MIPS code on it), it's obvious that my x86_64 Perl is used during the Net-SSLeay build. Then, the %Config variable has all the information that the Configure program had during the build time of my x86_64 Perl. That's why we see those flags (-m64 -mtune=generic) in the OPTIMIZE variable, because they are taken from the %Config variable. So, I have a question for you. Is there a way to use the Config module of the Perl we build for the target? This wouldn't be a fix to go upstream. It would be just a fix for the Buildroot distribution. Before building the Net-SSLeay package, we build Perl, and the Config module is located in "/BR/output/staging/usr/lib/perl5/5.18.2/mipsel-linux/Config.pm". How could we patch the Makefile.PL to make it use that Config module instead of the one in my host's Perl? Thanks in advance. On 08/08/2014 10:42 PM, Mike McCauley via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > Hello, > > what you will need to do is add some code to > inc/Module/Install/PRIVATE/Net/SSLeay.pm > at about line 136. > This is where build-and-platform specific compiler flags are set up. > > > You will need to uniquely > detect the case where you are compiling for MIPS, or maybe using the MIPS > compiler, and set $opts->{optimize} to ' ' (ie a space) or whatever flaghs make > sense for your case. > > After you have tested it, send me a context diff and I will included it in the > base code. > > Cheers. > > > > On Friday, August 08, 2014 10:32:21 AM you wrote:
>> Queue: Net-SSLeay >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >> >> Hello, >> >> On 08/08/2014 01:07 PM, Mike McCauley via RT wrote:
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>> I dont have a MIPS cross compiler and cannot help you.
>> >> Well, you can use the Mentor toolchain which is free: >> >> https://sourcery.mentor.com/GNUToolchain/release2791 >>
>>> try changing to >>> OPTIMIZE => " ", >>> with a space
>> >> It works. But do you think that's a good solution to apply upstream? >> >> Cheers, >> -- >> Vincent >>
>>> Cheers. >>>
>>>> Could you please tell me who is the responsible to write this in the >>>> Makefile? >>>> >>>> OPTIMIZE = -O2 -g -pipeinc/Module/Install/PRIVATE/Net/SSLeay.pm -Wall >>>> -Wp,-
>>> >>> D_FORTIFY_SOURCE=2 -fexceptions >>>
>>>> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic >>>> >>>> Because I have edited the "inc/Module/Install/PRIVATE/Net/SSLeay.pm" >>>> file and commented this line: >>>> >>>> OPTIMIZE => $opts->{optimize}, >>>> >>>> And the OPTIMIZE variable in the Makefile keeps being populated with the >>>> same value. >>>> >>>> However, if I change it to this: >>>> >>>> OPTIMIZE => "-O2", >>>> >>>> then, the OPTIMIZE variable in the Makefile has this value: >>>> >>>> OPTIMIZE = -O2 >>>> >>>> And however, if I change it to this: >>>> >>>> OPTIMIZE => "", >>>> >>>> then, the OPTIMIZE variable in the Makefile is populated again with: >>>> >>>> OPTIMIZE = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions >>>> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic >>>> >>>> So, it seems if the OPTIMIZE variable in the >>>> "inc/Module/Install/PRIVATE/Net/SSLeay.pm" file has an empty value (or >>>> not exists at all), some default mechanism puts the OPTIMIZE variable in >>>> the Makefile with all of those values, which include "-m64 >>>> -mtune=generic" and make it fail for MIPS. >>>> >>>> On 08/08/2014 09:48 AM, Mike McCauley via RT wrote:
>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>> >>>>> Hello, >>>>> >>>>> I wont be able to build any MIPS tests. I think its over to you... >>>>> If you find a suitable fix, pls send a patch and I will include it in >>>>> the >>>>> distro. >>>>> >>>>> Cheers. >>>>> >>>>> On Friday, August 08, 2014 04:41:38 AM you wrote:
>>>>>> Queue: Net-SSLeay >>>>>> >>>>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>>> >>>>>> Hello Mike, >>>>>> >>>>>> you don't need MIPS hardware to test it on MIPS. You can cross-compile, >>>>>> using Buildroot, for instance. Or I could do it if you want. >>>>>> >>>>>> Could you please send me some patches I can try? >>>>>> >>>>>> Thanks. >>>>>> >>>>>> On 08/07/2014 09:38 PM, Mike McCauley via RT wrote:
>>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>>>> >>>>>>> Hello Vincent, >>>>>>> >>>>>>> Thanks for your report. >>>>>>> Unfortunately I have no way to test on MIPS, so think you are on your >>>>>>> own. >>>>>>> If you find a suitable fix, pls send a patch and I will include it in >>>>>>> the >>>>>>> distro. >>>>>>> >>>>>>> Cheers. >>>>>>> >>>>>>> On Thursday, August 07, 2014 11:03:18 AM you wrote:
>>>>>>>> Thu Aug 07 11:03:17 2014: Request 97834 was acted upon. >>>>>>>> Transaction: Ticket created by Vincent.Riera@imgtec.com >>>>>>>> >>>>>>>> Queue: Net-SSLeay >>>>>>>> >>>>>>>> Subject: Net-SSLeay fails to compile for MIPS >>>>>>>> >>>>>>>> Broken in: (no value) >>>>>>>> >>>>>>>> Severity: (no value) >>>>>>>> >>>>>>>> Owner: Nobody >>>>>>>> >>>>>>>> Requestors: Vincent.Riera@imgtec.com >>>>>>>> >>>>>>>> Status: new >>>>>>>> >>>>>>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>>>>> >>>>>>>> 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.
>
-- Vincent
Subject: Re: [rt.cpan.org #97834] Net-SSLeay fails to compile for MIPS
Date: Mon, 11 Aug 2014 17:28:42 +0100
To: <bug-Net-SSLeay [...] rt.cpan.org>
From: Vicente Olivert Riera <Vincent.Riera [...] imgtec.com>
I have tried with this patch: ############################################ --- Net-SSLeay-1.65/Makefile.PL.orig 2014-08-11 17:23:36.203061223 +0100 +++ Net-SSLeay-1.65/Makefile.PL 2014-08-11 17:24:24.018902453 +0100 @@ -1,10 +1,11 @@ #!/usr/bin/perl +use lib '/BR/output/staging/usr/lib/perl5/5.18.2/mipsel-linux'; +use Config; use strict; use warnings; use lib 'ext'; use inc::Module::Install; -use Config; use File::Spec; name('Net-SSLeay'); ############################################ but that gives me some problems: Compilation failed in require at inc/Module/Install/Makefile.pm line 6. BEGIN failed--compilation aborted at inc/Module/Install/Makefile.pm line 6. Compilation failed in require at inc/Module/Install.pm line 307. Backslash found where operator expected at Makefile.PL line 41, near "$regen_script \" (Missing operator before \?) Bareword found where operator expected at Makefile.PL line 41, near "$(ABSPERLRUN" (Missing operator before ABSPERLRUN?) Scalar found where operator expected at Makefile.PL line 41, near ") $regen_script" (Missing operator before $regen_script?) Unquoted string "constants" may clash with future reserved word at Makefile.PL line 41. Backslash found where operator expected at Makefile.PL line 44, near "$regen_script \" (Missing operator before \?) Bareword found where operator expected at Makefile.PL line 44, near "$(ABSPERLRUN" (Missing operator before ABSPERLRUN?) Scalar found where operator expected at Makefile.PL line 44, near ") $regen_script" (Missing operator before $regen_script?) Semicolon seems to be missing at Makefile.PL line 45. Semicolon seems to be missing at Makefile.PL line 49. syntax error at Makefile.PL line 40, near "c :" Bareword "postamble" not allowed while "strict subs" in use at Makefile.PL line 39. Execution of Makefile.PL aborted due to compilation errors. On 08/11/2014 04:00 PM, Vicente Olivert Riera wrote: Show quoted text
> Hello Mike, > > first I apologize because I have found this is not a failure in the > Net-SSLeay package itself. > > I think I have found what the problem is. Let me explain it to you. > > In the Buildroot tool we are cross-compiling a full Linux root > filesystem for another architecture. In this case, I run the Buildroot > tool in my x86_64 machine to build a MIPS (or any other architecture) > root filesystem. > > The Net-SSLeay build system uses the Config module (use Config;), and > that modules has a read only variable (%Config) which has all the > information that the Configure program had during the Perl build time. > > Given that Perl is needed to build Net-SSLeay, and given that my machine > is an x86_64 (cannot run MIPS code on it), it's obvious that my x86_64 > Perl is used during the Net-SSLeay build. Then, the %Config variable has > all the information that the Configure program had during the build time > of my x86_64 Perl. That's why we see those flags (-m64 -mtune=generic) > in the OPTIMIZE variable, because they are taken from the %Config variable. > > So, I have a question for you. Is there a way to use the Config module > of the Perl we build for the target? This wouldn't be a fix to go > upstream. It would be just a fix for the Buildroot distribution. > > Before building the Net-SSLeay package, we build Perl, and the Config > module is located in > "/BR/output/staging/usr/lib/perl5/5.18.2/mipsel-linux/Config.pm". > > How could we patch the Makefile.PL to make it use that Config module > instead of the one in my host's Perl? > > Thanks in advance. > > On 08/08/2014 10:42 PM, Mike McCauley via RT wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >> >> Hello, >> >> what you will need to do is add some code to >> inc/Module/Install/PRIVATE/Net/SSLeay.pm >> at about line 136. >> This is where build-and-platform specific compiler flags are set up. >> >> >> You will need to uniquely >> detect the case where you are compiling for MIPS, or maybe using the MIPS >> compiler, and set $opts->{optimize} to ' ' (ie a space) or whatever >> flaghs make >> sense for your case. >> >> After you have tested it, send me a context diff and I will included >> it in the >> base code. >> >> Cheers. >> >> >> >> On Friday, August 08, 2014 10:32:21 AM you wrote:
>>> Queue: Net-SSLeay >>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>> >>> Hello, >>> >>> On 08/08/2014 01:07 PM, Mike McCauley via RT wrote:
>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>> I dont have a MIPS cross compiler and cannot help you.
>>> >>> Well, you can use the Mentor toolchain which is free: >>> >>> https://sourcery.mentor.com/GNUToolchain/release2791 >>>
>>>> try changing to >>>> OPTIMIZE => " ", >>>> with a space
>>> >>> It works. But do you think that's a good solution to apply upstream? >>> >>> Cheers, >>> -- >>> Vincent >>>
>>>> Cheers. >>>>
>>>>> Could you please tell me who is the responsible to write this in the >>>>> Makefile? >>>>> >>>>> OPTIMIZE = -O2 -g -pipeinc/Module/Install/PRIVATE/Net/SSLeay.pm -Wall >>>>> -Wp,-
>>>> >>>> D_FORTIFY_SOURCE=2 -fexceptions >>>>
>>>>> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic >>>>> >>>>> Because I have edited the "inc/Module/Install/PRIVATE/Net/SSLeay.pm" >>>>> file and commented this line: >>>>> >>>>> OPTIMIZE => $opts->{optimize}, >>>>> >>>>> And the OPTIMIZE variable in the Makefile keeps being populated >>>>> with the >>>>> same value. >>>>> >>>>> However, if I change it to this: >>>>> >>>>> OPTIMIZE => "-O2", >>>>> >>>>> then, the OPTIMIZE variable in the Makefile has this value: >>>>> >>>>> OPTIMIZE = -O2 >>>>> >>>>> And however, if I change it to this: >>>>> >>>>> OPTIMIZE => "", >>>>> >>>>> then, the OPTIMIZE variable in the Makefile is populated again with: >>>>> >>>>> OPTIMIZE = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions >>>>> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic >>>>> >>>>> So, it seems if the OPTIMIZE variable in the >>>>> "inc/Module/Install/PRIVATE/Net/SSLeay.pm" file has an empty value (or >>>>> not exists at all), some default mechanism puts the OPTIMIZE >>>>> variable in >>>>> the Makefile with all of those values, which include "-m64 >>>>> -mtune=generic" and make it fail for MIPS. >>>>> >>>>> On 08/08/2014 09:48 AM, Mike McCauley via RT wrote:
>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>>> >>>>>> Hello, >>>>>> >>>>>> I wont be able to build any MIPS tests. I think its over to you... >>>>>> If you find a suitable fix, pls send a patch and I will include it in >>>>>> the >>>>>> distro. >>>>>> >>>>>> Cheers. >>>>>> >>>>>> On Friday, August 08, 2014 04:41:38 AM you wrote:
>>>>>>> Queue: Net-SSLeay >>>>>>> >>>>>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>>>> >>>>>>> Hello Mike, >>>>>>> >>>>>>> you don't need MIPS hardware to test it on MIPS. You can >>>>>>> cross-compile, >>>>>>> using Buildroot, for instance. Or I could do it if you want. >>>>>>> >>>>>>> Could you please send me some patches I can try? >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> On 08/07/2014 09:38 PM, Mike McCauley via RT wrote:
>>>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>>>>> >>>>>>>> Hello Vincent, >>>>>>>> >>>>>>>> Thanks for your report. >>>>>>>> Unfortunately I have no way to test on MIPS, so think you are >>>>>>>> on your >>>>>>>> own. >>>>>>>> If you find a suitable fix, pls send a patch and I will include >>>>>>>> it in >>>>>>>> the >>>>>>>> distro. >>>>>>>> >>>>>>>> Cheers. >>>>>>>> >>>>>>>> On Thursday, August 07, 2014 11:03:18 AM you wrote:
>>>>>>>>> Thu Aug 07 11:03:17 2014: Request 97834 was acted upon. >>>>>>>>> Transaction: Ticket created by Vincent.Riera@imgtec.com >>>>>>>>> >>>>>>>>> Queue: Net-SSLeay >>>>>>>>> >>>>>>>>> Subject: Net-SSLeay fails to compile for MIPS >>>>>>>>> >>>>>>>>> Broken in: (no value) >>>>>>>>> >>>>>>>>> Severity: (no value) >>>>>>>>> >>>>>>>>> Owner: Nobody >>>>>>>>> >>>>>>>>> Requestors: Vincent.Riera@imgtec.com >>>>>>>>> >>>>>>>>> Status: new >>>>>>>>> >>>>>>>>> Ticket <URL: >>>>>>>>> https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>>>>>> >>>>>>>>> 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.
>>
> >
-- Vincent
Subject: Re: [rt.cpan.org #97834] Net-SSLeay fails to compile for MIPS
Date: Tue, 12 Aug 2014 06:57:36 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] airspayce.com>
Hi, I dont know how to handle your cross-compile issues. I would have thought that your 'use lib' approach would be the best one. Perhaps you also need some other paths in 'use lib'? Or maybe the -I command line arg? Maybe you also need a 'no lib' to remove your hosts Config file directory? Cheers. On Monday, August 11, 2014 11:00:44 AM you wrote: Show quoted text
> Queue: Net-SSLeay > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > Hello Mike, > > first I apologize because I have found this is not a failure in the > Net-SSLeay package itself. > > I think I have found what the problem is. Let me explain it to you. > > In the Buildroot tool we are cross-compiling a full Linux root > filesystem for another architecture. In this case, I run the Buildroot > tool in my x86_64 machine to build a MIPS (or any other architecture) > root filesystem. > > The Net-SSLeay build system uses the Config module (use Config;), and > that modules has a read only variable (%Config) which has all the > information that the Configure program had during the Perl build time. > > Given that Perl is needed to build Net-SSLeay, and given that my machine > is an x86_64 (cannot run MIPS code on it), it's obvious that my x86_64 > Perl is used during the Net-SSLeay build. Then, the %Config variable has > all the information that the Configure program had during the build time > of my x86_64 Perl. That's why we see those flags (-m64 -mtune=generic) > in the OPTIMIZE variable, because they are taken from the %Config variable. > > So, I have a question for you. Is there a way to use the Config module > of the Perl we build for the target? This wouldn't be a fix to go > upstream. It would be just a fix for the Buildroot distribution. > > Before building the Net-SSLeay package, we build Perl, and the Config > module is located in > "/BR/output/staging/usr/lib/perl5/5.18.2/mipsel-linux/Config.pm". > > How could we patch the Makefile.PL to make it use that Config module > instead of the one in my host's Perl? > > Thanks in advance. > > On 08/08/2014 10:42 PM, Mike McCauley via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > > > Hello, > > > > what you will need to do is add some code to > > inc/Module/Install/PRIVATE/Net/SSLeay.pm > > at about line 136. > > This is where build-and-platform specific compiler flags are set up. > > > > > > You will need to uniquely > > detect the case where you are compiling for MIPS, or maybe using the MIPS > > compiler, and set $opts->{optimize} to ' ' (ie a space) or whatever flaghs > > make sense for your case. > > > > After you have tested it, send me a context diff and I will included it in > > the base code. > > > > Cheers. > > > > On Friday, August 08, 2014 10:32:21 AM you wrote:
> >> Queue: Net-SSLeay > >> > >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >> > >> Hello, > >> > >> On 08/08/2014 01:07 PM, Mike McCauley via RT wrote:
> >>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >>> I dont have a MIPS cross compiler and cannot help you.
> >> > >> Well, you can use the Mentor toolchain which is free: > >> https://sourcery.mentor.com/GNUToolchain/release2791
> >>> > >>> try changing to > >>> OPTIMIZE => " ", > >>> with a space
> >> > >> It works. But do you think that's a good solution to apply upstream? > >> > >> Cheers, > >> -- > >> Vincent > >>
> >>> Cheers. > >>>
> >>>> Could you please tell me who is the responsible to write this in the > >>>> Makefile? > >>>> > >>>> OPTIMIZE = -O2 -g -pipeinc/Module/Install/PRIVATE/Net/SSLeay.pm -Wall > >>>> -Wp,-
> >>> > >>> D_FORTIFY_SOURCE=2 -fexceptions > >>>
> >>>> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic > >>>> > >>>> Because I have edited the "inc/Module/Install/PRIVATE/Net/SSLeay.pm" > >>>> file and commented this line: > >>>> > >>>> OPTIMIZE => $opts->{optimize}, > >>>> > >>>> And the OPTIMIZE variable in the Makefile keeps being populated with > >>>> the > >>>> same value. > >>>> > >>>> However, if I change it to this: > >>>> > >>>> OPTIMIZE => "-O2", > >>>> > >>>> then, the OPTIMIZE variable in the Makefile has this value: > >>>> > >>>> OPTIMIZE = -O2 > >>>> > >>>> And however, if I change it to this: > >>>> > >>>> OPTIMIZE => "", > >>>> > >>>> then, the OPTIMIZE variable in the Makefile is populated again with: > >>>> > >>>> OPTIMIZE = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > >>>> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic > >>>> > >>>> So, it seems if the OPTIMIZE variable in the > >>>> "inc/Module/Install/PRIVATE/Net/SSLeay.pm" file has an empty value (or > >>>> not exists at all), some default mechanism puts the OPTIMIZE variable > >>>> in > >>>> the Makefile with all of those values, which include "-m64 > >>>> -mtune=generic" and make it fail for MIPS. > >>>> > >>>> On 08/08/2014 09:48 AM, Mike McCauley via RT wrote:
> >>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >>>>> > >>>>> Hello, > >>>>> > >>>>> I wont be able to build any MIPS tests. I think its over to you... > >>>>> If you find a suitable fix, pls send a patch and I will include it in > >>>>> the > >>>>> distro. > >>>>> > >>>>> Cheers. > >>>>> > >>>>> On Friday, August 08, 2014 04:41:38 AM you wrote:
> >>>>>> Queue: Net-SSLeay > >>>>>> > >>>>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >>>>>> > >>>>>> Hello Mike, > >>>>>> > >>>>>> you don't need MIPS hardware to test it on MIPS. You can > >>>>>> cross-compile, > >>>>>> using Buildroot, for instance. Or I could do it if you want. > >>>>>> > >>>>>> Could you please send me some patches I can try? > >>>>>> > >>>>>> Thanks. > >>>>>> > >>>>>> On 08/07/2014 09:38 PM, Mike McCauley via RT wrote:
> >>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > >>>>>>> > >>>>>>> Hello Vincent, > >>>>>>> > >>>>>>> Thanks for your report. > >>>>>>> Unfortunately I have no way to test on MIPS, so think you are on > >>>>>>> your > >>>>>>> own. > >>>>>>> If you find a suitable fix, pls send a patch and I will include it > >>>>>>> in > >>>>>>> the > >>>>>>> distro. > >>>>>>> > >>>>>>> Cheers. > >>>>>>> > >>>>>>> On Thursday, August 07, 2014 11:03:18 AM you wrote:
> >>>>>>>> Thu Aug 07 11:03:17 2014: Request 97834 was acted upon. > >>>>>>>> Transaction: Ticket created by Vincent.Riera@imgtec.com > >>>>>>>> > >>>>>>>> Queue: Net-SSLeay > >>>>>>>> > >>>>>>>> Subject: Net-SSLeay fails to compile for MIPS > >>>>>>>> > >>>>>>>> Broken in: (no value) > >>>>>>>> > >>>>>>>> Severity: (no value) > >>>>>>>> > >>>>>>>> Owner: Nobody > >>>>>>>> > >>>>>>>> Requestors: Vincent.Riera@imgtec.com > >>>>>>>> > >>>>>>>> Status: new > >>>>>>>> > >>>>>>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834
> >>>>>>>> >
> >>>>>>>> > >>>>>>>> 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.
-- Mike McCauley VK4AMM mikem@airspayce.com Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.airspayce.com Phone +61 7 5598-7474
Subject: Re: [rt.cpan.org #97834] Net-SSLeay fails to compile for MIPS
Date: Tue, 12 Aug 2014 13:58:50 +0100
To: <bug-Net-SSLeay [...] rt.cpan.org>
From: Vicente Olivert Riera <Vincent.Riera [...] imgtec.com>
On 08/11/2014 09:57 PM, Mike McCauley via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > > > Hi, > > I dont know how to handle your cross-compile issues. > I would have thought that your 'use lib' approach would be the best one. > Perhaps you also need some other paths in 'use lib'? > Or maybe the -I command line arg?
I have also tried that with no luck. Show quoted text
> Maybe you also need a 'no lib' to remove your hosts Config file directory?
That's impossible in this case because you can't know the configuration of every Perl installation for all Linux distributions. I think the best solution for us will be to disable the optimization by passing OPTIMIZE=" " to the Perl command. Show quoted text
> Cheers. > > On Monday, August 11, 2014 11:00:44 AM you wrote:
>> Queue: Net-SSLeay >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >> >> Hello Mike, >> >> first I apologize because I have found this is not a failure in the >> Net-SSLeay package itself. >> >> I think I have found what the problem is. Let me explain it to you. >> >> In the Buildroot tool we are cross-compiling a full Linux root >> filesystem for another architecture. In this case, I run the Buildroot >> tool in my x86_64 machine to build a MIPS (or any other architecture) >> root filesystem. >> >> The Net-SSLeay build system uses the Config module (use Config;), and >> that modules has a read only variable (%Config) which has all the >> information that the Configure program had during the Perl build time. >> >> Given that Perl is needed to build Net-SSLeay, and given that my machine >> is an x86_64 (cannot run MIPS code on it), it's obvious that my x86_64 >> Perl is used during the Net-SSLeay build. Then, the %Config variable has >> all the information that the Configure program had during the build time >> of my x86_64 Perl. That's why we see those flags (-m64 -mtune=generic) >> in the OPTIMIZE variable, because they are taken from the %Config variable. >> >> So, I have a question for you. Is there a way to use the Config module >> of the Perl we build for the target? This wouldn't be a fix to go >> upstream. It would be just a fix for the Buildroot distribution. >> >> Before building the Net-SSLeay package, we build Perl, and the Config >> module is located in >> "/BR/output/staging/usr/lib/perl5/5.18.2/mipsel-linux/Config.pm". >> >> How could we patch the Makefile.PL to make it use that Config module >> instead of the one in my host's Perl? >> >> Thanks in advance. >> >> On 08/08/2014 10:42 PM, Mike McCauley via RT wrote:
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>> >>> Hello, >>> >>> what you will need to do is add some code to >>> inc/Module/Install/PRIVATE/Net/SSLeay.pm >>> at about line 136. >>> This is where build-and-platform specific compiler flags are set up. >>> >>> >>> You will need to uniquely >>> detect the case where you are compiling for MIPS, or maybe using the MIPS >>> compiler, and set $opts->{optimize} to ' ' (ie a space) or whatever flaghs >>> make sense for your case. >>> >>> After you have tested it, send me a context diff and I will included it in >>> the base code. >>> >>> Cheers. >>> >>> On Friday, August 08, 2014 10:32:21 AM you wrote:
>>>> Queue: Net-SSLeay >>>> >>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>> >>>> Hello, >>>> >>>> On 08/08/2014 01:07 PM, Mike McCauley via RT wrote:
>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>> I dont have a MIPS cross compiler and cannot help you.
>>>> >>>> Well, you can use the Mentor toolchain which is free: >>>> https://sourcery.mentor.com/GNUToolchain/release2791
>>>>> >>>>> try changing to >>>>> OPTIMIZE => " ", >>>>> with a space
>>>> >>>> It works. But do you think that's a good solution to apply upstream? >>>> >>>> Cheers, >>>> -- >>>> Vincent >>>>
>>>>> Cheers. >>>>>
>>>>>> Could you please tell me who is the responsible to write this in the >>>>>> Makefile? >>>>>> >>>>>> OPTIMIZE = -O2 -g -pipeinc/Module/Install/PRIVATE/Net/SSLeay.pm -Wall >>>>>> -Wp,-
>>>>> >>>>> D_FORTIFY_SOURCE=2 -fexceptions >>>>>
>>>>>> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic >>>>>> >>>>>> Because I have edited the "inc/Module/Install/PRIVATE/Net/SSLeay.pm" >>>>>> file and commented this line: >>>>>> >>>>>> OPTIMIZE => $opts->{optimize}, >>>>>> >>>>>> And the OPTIMIZE variable in the Makefile keeps being populated with >>>>>> the >>>>>> same value. >>>>>> >>>>>> However, if I change it to this: >>>>>> >>>>>> OPTIMIZE => "-O2", >>>>>> >>>>>> then, the OPTIMIZE variable in the Makefile has this value: >>>>>> >>>>>> OPTIMIZE = -O2 >>>>>> >>>>>> And however, if I change it to this: >>>>>> >>>>>> OPTIMIZE => "", >>>>>> >>>>>> then, the OPTIMIZE variable in the Makefile is populated again with: >>>>>> >>>>>> OPTIMIZE = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions >>>>>> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic >>>>>> >>>>>> So, it seems if the OPTIMIZE variable in the >>>>>> "inc/Module/Install/PRIVATE/Net/SSLeay.pm" file has an empty value (or >>>>>> not exists at all), some default mechanism puts the OPTIMIZE variable >>>>>> in >>>>>> the Makefile with all of those values, which include "-m64 >>>>>> -mtune=generic" and make it fail for MIPS. >>>>>> >>>>>> On 08/08/2014 09:48 AM, Mike McCauley via RT wrote:
>>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> I wont be able to build any MIPS tests. I think its over to you... >>>>>>> If you find a suitable fix, pls send a patch and I will include it in >>>>>>> the >>>>>>> distro. >>>>>>> >>>>>>> Cheers. >>>>>>> >>>>>>> On Friday, August 08, 2014 04:41:38 AM you wrote:
>>>>>>>> Queue: Net-SSLeay >>>>>>>> >>>>>>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>>>>> >>>>>>>> Hello Mike, >>>>>>>> >>>>>>>> you don't need MIPS hardware to test it on MIPS. You can >>>>>>>> cross-compile, >>>>>>>> using Buildroot, for instance. Or I could do it if you want. >>>>>>>> >>>>>>>> Could you please send me some patches I can try? >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> On 08/07/2014 09:38 PM, Mike McCauley via RT wrote:
>>>>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=97834 > >>>>>>>>> >>>>>>>>> Hello Vincent, >>>>>>>>> >>>>>>>>> Thanks for your report. >>>>>>>>> Unfortunately I have no way to test on MIPS, so think you are on >>>>>>>>> your >>>>>>>>> own. >>>>>>>>> If you find a suitable fix, pls send a patch and I will include it >>>>>>>>> in >>>>>>>>> the >>>>>>>>> distro. >>>>>>>>> >>>>>>>>> Cheers. >>>>>>>>> >>>>>>>>> On Thursday, August 07, 2014 11:03:18 AM you wrote:
>>>>>>>>>> Thu Aug 07 11:03:17 2014: Request 97834 was acted upon. >>>>>>>>>> Transaction: Ticket created by Vincent.Riera@imgtec.com >>>>>>>>>> >>>>>>>>>> Queue: Net-SSLeay >>>>>>>>>> >>>>>>>>>> Subject: Net-SSLeay fails to compile for MIPS >>>>>>>>>> >>>>>>>>>> Broken in: (no value) >>>>>>>>>> >>>>>>>>>> Severity: (no value) >>>>>>>>>> >>>>>>>>>> Owner: Nobody >>>>>>>>>> >>>>>>>>>> Requestors: Vincent.Riera@imgtec.com >>>>>>>>>> >>>>>>>>>> Status: new >>>>>>>>>> >>>>>>>>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97834
>>>>>>>>>> >
>>>>>>>>>> >>>>>>>>>> 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.
>
-- Vincent
Subject: Re: [rt.cpan.org #97834] Net-SSLeay fails to compile for MIPS
Date: Fri, 15 Aug 2014 12:23:45 +0100
To: <bug-Net-SSLeay [...] rt.cpan.org>
From: Vicente Olivert Riera <Vincent.Riera [...] imgtec.com>
Fixed: http://git.buildroot.net/buildroot/commit/?id=6057878756f6f58d613a40be9636581ae5950aa0 Could you please close this bug? Thanks. -- Vincent