Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rating: Thread Rating: 14 votes, 5.00 average. Display Modes
Old 01-17-2003, 05:13 PM   #21
V-tach
Prospect
 
Join Date: Jun 2002
Posts: 20
OK, next problem: with perl now I get this error

Code:
% fink list
dyld: perl Undefined symbols:
_Perl_sv_2pv
_perl_get_sv
Trace/BPT trap

The apple link

http://developer.apple.com/internet/macosx/perl.html

refers to the pearldelta page

http://dev.perl.org/perl5/news/2002/...ined%20symbols

where these instructions are found:

Mac OS X dyld undefined symbols



If after installing Perl 5.8.0 you are getting warnings about missing symbols, for example


dyld: perl Undefined symbols
_perl_sv_2pv
_perl_get_sv



you probably have an old pre-Perl-5.8.0 installation (or parts of one) in /Library/Perl (the undefined symbols used to exist in pre-5.8.0 Perls). It seems that for some reason ``make install'' doesn't always completely overwrite the files in /Library/Perl. You can move the old Perl shared library out of the way like this:


cd /Library/Perl/darwin/CORE
mv libperl.dylib libperlold.dylib



and then reissue ``make install''. Note that the above of course is extremely disruptive for anything using the /usr/local/bin/perl. If that doesn't help, you may have to try removing all the .bundle files from beneath /Library/Perl, and again ``make install''-ing.



My problem is that when I followed these instructions perl (which runs in the background on startup) crashed badly, and kept crashing until I reversed the renaming of libperl.dylib

Now can I kill of the perl that is running in the background, or would this cause more things to crash?

I've been looking through the threads at macosx@perl.org archive but I can't find a solution to this particular problem.

V-tach
V-tach is offline   Reply With Quote
Old 01-18-2003, 02:15 AM   #22
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
Code:
% fink list
dyld: perl Undefined symbols:
_Perl_sv_2pv
_perl_get_sv
Trace/BPT trap
The release notes for perl 5.8.0 indicate:

"Perl 5.8 is not binary compatible with any earlier Perl release,
XS MODULES WILL HAVE TO BE RECOMPILED!"

Mac OS X users that have fink installed may experience the
following error when executing certain perl operations (see 'EXAMPLE').

dyld: perl Undefined symbols:
_Perl_safefree
_Perl_safemalloc
_Perl_saferealloc
_Perl_sv_2pv
_perl_call_sv
_perl_eval_sv
_perl_get_sv

This error is separate from the similar dyld issue mentioned in the
"Mac OS X dyld undefined symbols" section of perldelta[1].


Fink stable currently includes the following six XS modules. If any
of these were installed prior to installing 5.8.0 you will likely
experience the dyld issue.

- DBD::Mysql
- DBI
- Digest::MD5
- MacOSX::File
- Storable
- Term::ReadKey

You will also experience the dyld issue if any other XS modules are
contained within the /sw/lib/perl5 directory. That is, XS modules
from fink unstable or another source.


Solution:

The following three commands will correct the above issue by removing
the current Storable and replacing it with a recompiled version. These
commands must be executed as the superuser. After these commands are
executed the aforementioned issue will be resolved.

mv /sw/lib/perl5/darwin/Storable.pm /tmp
mv /sw/lib/perl5/darwin/auto/Storable /tmp
fink rebuild storable-pm

It IS first necessary to do the mv's, before the rebuild, since fink is
a perl script that explicitly adds /sw/lib/perl5 to @INC, and exhibits
the behavior mentioned above.

You will need to execute the above commands for every XS module that
is contained within /sw/lib/perl5.

Check this post here:

http://www.mail-archive.com/fink-dev.../msg02454.html


Cheers...

Last edited by sao; 01-18-2003 at 02:21 AM.
sao is offline   Reply With Quote
Old 01-20-2003, 12:20 AM   #23
V-tach
Prospect
 
Join Date: Jun 2002
Posts: 20
I started getting multiple crashes and freeze ups that were unpredictable so...

reinstall Jaguar 10.2, archive option

then

delete /sw

then

update to 10.2.3

then

download and re-install Dec 2002 Dev tools

then

install perl 5.8.0 into /usr/local/bin (leaving 5.6.0 pretty much alone)

then

run CPAN

then

download and install fink 0.5.1

elapsed time: 36 hours, but finally everything works!

(and all just for the warm feeling that I have the latest version of perl, as I use it for absolutely nothing)
V-tach is offline   Reply With Quote
Old 02-11-2003, 08:14 AM   #24
tas
Triple-A Player
 
Join Date: Nov 2002
Location: Frankfurt, Germany
Posts: 167
FWIW - maybe this can help somebody sometime... I managed to get my fink installation back to work. I followed the instructions given above like so:
Code:
cd /Library/Perl/darwin/CORE
sudo mv libperl.dylib libperlold.dylib
cd /Library/Perl
find . -name "*.bundle" -delete
I then re-ran "sudo make install" from the perl-5.8.0 directory. After that, fink worked again. I hasten to add that I had to reinstall perl modules I had previously installed, but as these were just a few, it was no bother. Phew, so now I got fink and perl 5.8.0!
tas is offline   Reply With Quote
Old 02-16-2003, 07:13 AM   #25
gedalin
Prospect
 
Join Date: Jan 2002
Posts: 36
Fink Commander + Perl 5.8.0

I am using Fink Commander with Perl 5.8.0 from http://www.serverlogistics.com. The problem is that the fink installed Storable.pm (version 1.0.14-1: /sw/lib/perl5/darwin/Storable.pm and /sw/lib/perl5/darwin/auto/Storable) are incompatible with Perl 5.8.0. I looked for the Storable installed by the Perl 5.8.0 installer and copied it to the above mentioned places. Now Fink Commander lists everything properly. BUT: fink update changes the Storable to the old one, so either avoid uncontrolled updating or copy again after updating.
Michael
gedalin is offline   Reply With Quote
Old 04-19-2003, 01:43 AM   #26
edalzell
MVP
 
Join Date: Nov 2002
Location: Vancouver
Posts: 1,390
Didn't work!

I have 10.2.5 and I followed the instructions on the Apple web page. Turns out I don't have anything in my /Library/Perl/darwin folder!

I can't even run perl -v now!

Help!
edalzell is offline   Reply With Quote
Old 04-19-2003, 01:47 AM   #27
edalzell
MVP
 
Join Date: Nov 2002
Location: Vancouver
Posts: 1,390
Hmmm...I do have the missing libperl.dylib in /System/Library/Perl/darwin/CORE/libperl.dylib.

When I run 'perl -v' I get:
dyld: perl can't open library: /Library/Perl/darwin/CORE/libperl.dylib (No such file or directory, errno = 2)
Trace/BPT trap

How do I add it to my path?

Thanks
edalzell is offline   Reply With Quote
Old 04-19-2003, 06:23 AM   #28
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
edalzell,

Did you set your PERL5 environment variable? It's supposed to get set by /sw/bin/init.csh (or init.sh)?
sao is offline   Reply With Quote
Old 04-19-2003, 06:35 AM   #29
gedalin
Prospect
 
Join Date: Jan 2002
Posts: 36
Edalzell,

You were supposed to do "sudo make install" once again in your perl-5.8.0 directory. I do not have libperl.dyld in /Library/Perl/darwin either but only in /System/Library/Perl/darwin and this is quite enough for perl. You should however have a bunch of files in /Library/Perl/darwin.

Michael
gedalin is offline   Reply With Quote
Old 04-19-2003, 12:46 PM   #30
edalzell
MVP
 
Join Date: Nov 2002
Location: Vancouver
Posts: 1,390
sao, I do have PERL5LIB set, but it is set to /sw/lib/perl5. Which is a fink thang...maybe I should set it to something else?

And I did run sudo make install. This is what I am left with. I can run it again.
edalzell is offline   Reply With Quote
Old 04-19-2003, 01:52 PM   #31
gedalin
Prospect
 
Join Date: Jan 2002
Posts: 36
edalzell,

I have the same PERL5LIB so this is apparently not the problem. For an experiment I have just downloaded Perl 5.8.0 from http://www.serverlogistics.com and installed. Everything works fine (so far). I do not know what has been changed though.
gedalin is offline   Reply With Quote
Old 04-19-2003, 02:20 PM   #32
edalzell
MVP
 
Join Date: Nov 2002
Location: Vancouver
Posts: 1,390
I just installed it as well and I still don't have anything under /Library/Perl/darwin.

Now, is it possible that when I removed that directory (to make sure it was clean) I caused the problem?
edalzell is offline   Reply With Quote
Old 04-19-2003, 02:27 PM   #33
gedalin
Prospect
 
Join Date: Jan 2002
Posts: 36
If you installed Perl from serverlogistics it is probably ok, since it puts Perl in /System/Library/Perl thus overwriting the original distribution. The Apple directions say that their Perl puts everything in /Library/Perl and the /System/... is simply ignored. See if you have /Library/PerlBackup with something like perl....tar.gz. Make sure that it is /usr/bin/perl (the original binary is overwritten).
gedalin is offline   Reply With Quote
Old 04-19-2003, 02:35 PM   #34
edalzell
MVP
 
Join Date: Nov 2002
Location: Vancouver
Posts: 1,390
I do have a backup, but it will be a backup of my previous 5.8 installation.

When I run 'perl -v' I get:
dyld: perl can't open library: /Library/Perl/darwin/CORE/libperl.dylib (No such file or directory, errno = 2)
Trace/BPT trap


So it looks like my perl path is wrong.

How can I fix it?
edalzell is offline   Reply With Quote
Old 04-19-2003, 02:40 PM   #35
gedalin
Prospect
 
Join Date: Jan 2002
Posts: 36
Which perl is it ? Try /usr/bin/perl -v. And try /usr/local/bin/perl -v.
gedalin is offline   Reply With Quote
Old 04-19-2003, 03:11 PM   #36
gedalin
Prospect
 
Join Date: Jan 2002
Posts: 36
I did 'sudo mv /Library/Perl /Library/Perl_old' and perl -v worked.
gedalin is offline   Reply With Quote
Old 04-20-2003, 01:26 AM   #37
edalzell
MVP
 
Join Date: Nov 2002
Location: Vancouver
Posts: 1,390
Strange thing...when I do 'which perl' I get the one in /usr/local/bin, which returns me the above error.

When I run /usr/bin/perl, everything works fine.

What's the deal? Should I just remove the ones in /usr/local?

Why does one work and one not?
edalzell is offline   Reply With Quote
Old 04-20-2003, 01:35 AM   #38
edalzell
MVP
 
Join Date: Nov 2002
Location: Vancouver
Posts: 1,390
Well, I moved the perl stuff that was in /usr/local to /usr/bin and it doesn't work there either.

Must be how it was built.

Any ideas?

Thanks
edalzell is offline   Reply With Quote
Old 04-20-2003, 02:14 AM   #39
gedalin
Prospect
 
Join Date: Jan 2002
Posts: 36
You should have removed the perl from /usr/local/bin and everything would be ok. Now you have to reinstall Perl from your serverlogistics package. It will put the right thing in /usr/bin.
gedalin is offline   Reply With Quote
Old 04-20-2003, 01:02 PM   #40
edalzell
MVP
 
Join Date: Nov 2002
Location: Vancouver
Posts: 1,390
Thanks!

OK...never again will I attempt to compile things by hand. I will just wait until eithe Apple updates or some smart people put together a nice installer.

I seem to be working now!!
Wahoo!!
edalzell is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:08 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.