Comments (20)
On 2011/5/5, at δΈε1:57, sreekanth-kocharlakota wrote:
Hi,
I am unable to fix it from past 3 days and I desperately need someone to help me on this. I installed perlbrew like a charm on Ubuntu 10.10 and it worked great. But now I upgraded to 11.04 and am finding issues. I know that the issue is with GCC linker options -lm (linking math.h) and -lrt (time.h). Here are the errors. Can some one tell me how I can fix this problem ?
pp_sys.c:(.text+0x796): undefined reference to
fmod' pp_sys.c:(.text+0x7bf): undefined reference to
fmod'
pp_sys.o: In functionPerl_pp_gmtime': pp_sys.c:(.text+0xc602): undefined reference to
floor'
pp_pack.o: In functionS_pack_rec': pp_pack.c:(.text+0x61fa): undefined reference to
floor'
pp_pack.c:(.text+0x621b): undefined reference tofloor' pp_pack.c:(.text+0x623a): undefined reference to
floor'
collect2: ld returned 1 exit status
make: *** [miniperl] Error 1
Yes this is an known issue in perl5-porters. Ubuntu 11.04 put libm.so in a much different location
under /lib/, which is not in the default search path when building those older-then-11.04 perls.
I highly suggest to solve this building issue in Devel::PatchPerl since perlbrew now relies on it to fix the building
process.
from app-perlbrew.
Hi Gugod.
Can you please elaborate on this ? Can you please tell me what I need to do in the PatchPerl ? Appreciate your help!
"I highly suggest to solve this building issue in Devel::PatchPerl since perlbrew now relies on it to fix the building
process"
from app-perlbrew.
I don't really know exactly what to do on this particular issue. :)
I just know that Devel::PatchPerl is the place that we should be to deal with building process (but not add features).
To be fore specific, a few days ago I was investigating on this and discovered in hints/linux.sh
in the blead, there is a paragraph describing this issue. I tried to copy the blead hints/linux.sh
to a perl-5.12.3, but it did not just work. libm
was found, but there were some other build errors.
That is really all I can tell you :)
from app-perlbrew.
Wow! I brewed my coffee (perl environment) really well on 10.10. My bad to upgrade to 11.04. Kindly keep me posted if you find a fix for this. Thanks gugod!
from app-perlbrew.
To solve this problem, we have to pass -Dperllibs
and -Dplibpth
with space-contained strings like below.
perlbrew install perl-5.12.3 -Dperllibs='-lm -lc'
Then I encountered weird perlbrew's behavior. perlbrew only uses first "word" to build.
Result:
(cd /home/puny/perl5/perlbrew/build; tar xzf /home/puny/perl5/perlbrew/dists/perl-5.12.3.tar.gz;cd /home/puny/perl5/perlbrew/build/perl-5.12.3;rm -f config.sh Policy.sh;patchperl;sh Configure -de '-Dprefix=/home/puny/perl5/perlbrew/perls/perl-5.12.3' '-Dperllibs=-lm';make ;make test_harness && make install) >> '/home/puny/perl5/perlbrew/build.log' 2>&1
The option '-Dperllibs=-lm'
must be like '-Dperllibs="-lm -lc"'
.
I think this option parsing problem may be a bug of perlbrew.
If this is a wrong guess, excuse me :)
from app-perlbrew.
Thanks for spotting that @punytan!
It does feel like a perlbrew bug to me, should spend some time solving it soon.
from app-perlbrew.
It appears that Devel::PatchPerl 0.32 just fixed the building process on Ubuntu 11.04.
I have write a blog describing this update at http://gugod.org/2011/05/perlbrew-020-release.html
If anyone can confirm the building to be successful, we can then close this issue :)
from app-perlbrew.
@gugod
Unfortunately, make
fails on perlbrew 0.20.
It seems we have to specify perllibs
and plibpth
explicitly.
puny@puny-VGN-TZ73B:~/perl5/perlbrew/build/perl-5.12.3$ grep perllibs config.sh
perllibs=' '
puny@puny-VGN-TZ73B:~/perl5/perlbrew/build/perl-5.12.3$ grep plibpth config.sh
plibpth=''
puny@puny-VGN-TZ73B:~/perl5/perlbrew$ perlbrew version
/home/puny/perl5/perlbrew/bin/perlbrew - App::perlbrew/0.20
puny@puny-VGN-TZ73B:~/perl5/perlbrew$ perlbrew install perl-5.12.3
Use the previously fetched perl-5.12.3.tar.gz
Installing /home/puny/perl5/perlbrew/build/perl-5.12.3 into ~/perl5/perlbrew/perls/perl-5.12.3
This could take a while. You can run the following command on another shell to track the status:
tail -f ~/perl5/perlbrew/build.log
(cd /home/puny/perl5/perlbrew/build/perl-5.12.3;rm -f config.sh Policy.sh;patchperl;sh Configure -de '-Dprefix=/home/puny/perl5/perlbrew/perls/perl-5.12.3';make ;make test_harness && make install) >> '/home/puny/perl5/perlbrew/build.log' 2>&1
Installing /home/puny/perl5/perlbrew/build/perl-5.12.3 failed. See /home/puny/perl5/perlbrew/build.log to see why.
If you want to force install the distribution, try:
perlbrew --force install perl-5.12.3
build.log
pp_sys.c:(.text+0x1c6): undefined reference to `ceil'
pp_sys.c:(.text+0x219): undefined reference to `ceil'
pp_sys.c:(.text+0x2db): undefined reference to `floor'
pp_sys.c:(.text+0x4aa): undefined reference to `ceil'
pp_sys.c:(.text+0x5a2): undefined reference to `floor'
pp_sys.c:(.text+0x5fa): undefined reference to `floor'
pp_sys.c:(.text+0x612): undefined reference to `floor'
pp_sys.c:(.text+0x73b): undefined reference to `fmod'
pp_sys.c:(.text+0x76d): undefined reference to `fmod'
pp_sys.c:(.text+0x796): undefined reference to `fmod'
pp_sys.c:(.text+0x7bf): undefined reference to `fmod'
pp_sys.o: In function `Perl_pp_gmtime':
pp_sys.c:(.text+0xc602): undefined reference to `floor'
pp_pack.o: In function `S_pack_rec':
pp_pack.c:(.text+0x61fa): undefined reference to `floor'
pp_pack.c:(.text+0x621b): undefined reference to `floor'
pp_pack.c:(.text+0x623a): undefined reference to `floor'
collect2: ld returned 1 exit status
make: *** [miniperl] Error 1
``
puny@puny-VGN-TZ73B:~/perl5/perlbrew/build/perl-5.12.3$ uname -a
Linux puny-VGN-TZ73B 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux
from app-perlbrew.
Thanks to @magnificent-tears who pointed out two obvious mistakes I made in the installer. They are fixed and I just confirmed that it worked for me (on a EC2 Ubuntu 11.04 instance)
If you install perlbrew by running this:
curl -L http://xrl.us/perlbrewinstall | bash
It should be working now.
It installs a standalone 'patchperl' program with the latest Devel::PatchPerl, which incorporate patches for building on Ubuntu 11.04. The perlbrew
executable now depends on patchperl
to fix any building process.
Please give it a try sometime, thank you.
from app-perlbrew.
Hello Gugod,
You are the Saviour. New patch works great and I am right now brewing my
perl on the Ubuntu 11.04. Appreciate all your help on this.
Thanks and Regards
Sreekanth Kocharlakota
224.433.3277
On Mon, May 9, 2011 at 5:04 PM, gugod <
[email protected]>wrote:
Thanks to @magnificent-tears who pointed out two obvious mistake I made in
the installer. They are fixed and I just confirmed that it worked for me (on
a EC2 Ubuntu 11.04 instance)If you install perlbrew by running this:
curl -L http://xrl.us/perlbrewinstall | bash
It should be working now.
It installs a standalone 'patchperl' program with the latest
Devel::PatchPerl, which incorporate patches for building on Ubuntu 11.04.
Theperlbrew
executable now depends onpatchperl
to fix any building
process.Please give it a try sometime, thank you.
Reply to this email directly or view it on GitHub:
#64 (comment)
Thanks and Regards,
Sreekanth Kocharlakota
M: 224.433.3277
from app-perlbrew.
@gugod,
Thanks!
It works fine without one problem that ext/ODBM_File/hints/linux.pl
checks hard-coded libgdbm
path.
(This problem should be fixed in patchperl or upstream, but I think here is more suitable for this discussion and useful for others.)
The path written in ext/ODBM_File/hints/linux.pl
is:
if (-e '/usr/lib/libgdbm_compat.so' or -e '/usr/lib64/libgdbm_compat.so') {
but on my environment, libgdbm
is located at /usr/lib/i386-linux-gnu/
.
$ locate libgdbm | grep o$
/usr/lib/i386-linux-gnu/libgdbm.so
/usr/lib/i386-linux-gnu/libgdbm_compat.so
So the result of make test
is:
../lib/User/pwent.t ............................................... ok
../lib/feature/unicode_strings.t .................................. ok
x2p/s2p.t ......................................................... ok
Test Summary Report
-------------------
op/stash.t (Wstat: 0 Tests: 31 Failed: 0)
TODO passed: 26
../cpan/Memoize/t/errors.t (Wstat: 11 Tests: 6 Failed: 0)
Non-zero wait status: 11
Parse errors: Bad plan. You planned 11 tests but ran 6.
../ext/ODBM_File/t/odbm.t (Wstat: 32512 Tests: 0 Failed: 0)
Non-zero exit status: 127
Parse errors: No plan found in TAP output
../lib/DBM_Filter/t/01error.t (Wstat: 32512 Tests: 3 Failed: 0)
Non-zero exit status: 127
Parse errors: Bad plan. You planned 21 tests but ran 3.
Files=1808, Tests=349977, 930 wallclock secs (73.67 usr 14.43 sys + 511.11 cusr 72.13 csys = 671.34 CPU)
Result: FAIL
make: *** [test_harness] Error 3
To pass tests, I rewrite ext/ODBM_File/hints/linux.pl
like below,
if (-e '/usr/lib/libgdbm_compat.so' or -e '/usr/lib64/libgdbm_compat.so'
or -e '/usr/lib/i386-linux-gnu/libgdbm.so' or -e '/usr/lib/i386-linux-gnu/libgdbm_compat.so'
) {
then run
$ make clean && make && make test
$ make install
works fine.
This problem is the same cause of Ubuntu 11.04's. And the path to the library vary in architecture.
See also https://github.com/mirrors/perl/blob/blead/hints/linux.sh#L154
from app-perlbrew.
I'm facing what seems to be the same issue using Ubuntu 11.10, perlbrew 0.41 and trying to install perl-5.14.2. The error in build.log starts like this:
<...>
cc -fstack-protector -L/usr/local/lib -o miniperl \
gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o \
miniperlmain.o opmini.o perlmini.o
pp.o: In function `Perl_pp_pow':
pp.c:(.text+0x364e): undefined reference to `pow'
pp.o: In function `Perl_pp_modulo':
pp.c:(.text+0x4415): undefined reference to `floor'
pp.c:(.text+0x45af): undefined reference to `floor'
pp.c:(.text+0x4710): undefined reference to `fmod'
<...>
I tried to use with that option but the result was the same:
perlbrew install perl-5.14.2 -Dperllibs='-lm -lc'
This didn't work too:
perlbrew install perl-5.14.2 -Dperllibs='"-lm -lc"'
from app-perlbrew.
@gnustavo This should be solved already because perlbrew automatically calls "patchperl" now. Is it possible that's missing ? Do a which patchperl
to locate it. If so, you should run cpanm Devel::PatchPerl
to install it if your perlbrew is also installed from CPAN.
from app-perlbrew.
@gugod I have patchperl installed. See:
perl@gnu:~$ which patchperl
/opt/perl/perl5/perlbrew/bin/patchperl
I installed perlbrew with curl -kL http://install.perlbrew.pl | bash
, not via CPAN.
from app-perlbrew.
@gugod You can download the complete build.log. I hope it can help you spot the problem. Thanks.
from app-perlbrew.
This problem is already solved.
You should install or make test
perl manually (without perlbrew) to confirm the issue is caused by perlbrew or not.
from app-perlbrew.
@punytan You're right. I've tried to install perl-5.14.2 manually and it failed with the same message.
Thank you!
from app-perlbrew.
This is Perl's bug #100374. Just to let you know.
from app-perlbrew.
I'm having the same problem
build.log: http://pastebin.com/KETR1UEp
from app-perlbrew.
Solution
http://bitsnoarame.blogspot.com.br/2012/03/perlbrew-em-ubuntu-1110.html
:)
from app-perlbrew.
Related Issues (20)
- Can not find perlbrew after installation HOT 2
- Perlbrew does not work after installing new perl and removing old one
- Site install.perlbrew.pl is not responding HOT 5
- Unable to switch to new perl installation HOT 4
- Can't install stable on MacOS Monterey 12.6.1
- Cannot manage libs with Apache2
- Install fail on OSX 12.6.2 HOT 6
- Feature Request: an option to "install" to uninstall first.
- cpan: install a module, then perl search @INC system wide HOT 2
- Can't install Perl on macOS 13.3 M2 HOT 4
- Manage Perl modules with "Universal Binary" (e.g. arm64, x86_64) HOT 8
- Building and testing Tk-804.036 ... FAIL
- Install of perl5.38.0 fails on OS/X Bigsur
- Preventing Compress::Raw::Zlib From Installing "private" Version of Zlib HOT 1
- `perlbrew install` searches for .bz2 tarballs no longer on CPAN HOT 3
- patchperl requires 'deprecate' module missing on AlmaLinux9 HOT 4
- self-upgrade failure
- Cannot import modules with `cpm`: `install-cpm` vs `install-cpanm` commands HOT 7
- Alternate $PERLBREW_ROOT not being set in $PERLBREW_ROOT/etc/cshrc
- Can not install perl if there is no perl HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app-perlbrew.