The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - General (http://hintsforums.macworld.com/forumdisplay.php?f=16)
-   -   Fink and Perl 5.8 = failure (http://hintsforums.macworld.com/showthread.php?t=8200)

ClarkGoble 01-02-2003 04:35 PM

Fink and Perl 5.8 = failure
 
I was about to do update a few more applications when I found that my installing of the latest version of Perl had pretty well killed my Fink setup. Is Fink incompatible with the new Perl? (5.8)

Also, I noticed that you can't install Expect via Fink. (This was prior to Christmas in my unupgraded Perl state) You have to find the Wish distribution (available on Version Tracker or Source Forge) and then install the full Wish/TCL/TK system. It puts the files in the Apple binary locations and works fine. If you try and do it with either the normal source code of Expect or via Fink installing source you'll get some odd errors. I believe they are related to the install of TCL and where files are. I was in the process of tracking down each Makefile problem when I discovered the other distribution.

I already put a note about this on the Expect hint in the main OSX Hint page. Expect is very useful, especially when doing things with Applescript that involve more complex manipulation of Unix programs.

tas 01-02-2003 04:45 PM

Sorry, no help, just empathy: to my horror, I just found out that the same thing happened here. i installed perl 5.8.0 yesterday, and my fink seems to be dead now. When I type
Code:

fink list
I get
Code:

dyld: perl Undefined symbols:
_Perl_sv_2pv
_perl_get_sv

And I was so proud of my new perl...

ClarkGoble 01-02-2003 08:47 PM

That's odd. I actually could get fink list to work. I noticed the problem when nothing was showing up in FinkCommander. It was when I started playing around some more that I found the problem.

The only bad thing is that I don't think you can uninstall the new version of Perl.

sao 01-03-2003 12:06 AM

Please read the following post:

http://archive.develooper.com/macosx.../msg02447.html


Cheers...

tas 01-03-2003 03:26 AM

SAO FOR SUPREME-RULER-OF-FINK!!!
thx man!

sao 01-03-2003 06:24 AM

tas,

Glad it worked... :)


Cheers...

sao 01-03-2003 02:18 PM

ClarkGoble,

Did you followed the instructions on the page "Installing Perl 5.8 on Jaguar" at:

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


Cheers...

ClarkGoble 01-03-2003 03:28 PM

No, it was in part of a package and I assumed that the package manager would do those things. There was no note on the installer of such a page of caveats.

I didn't install it via the normal .gz format and install methods. Had I been doing that I would have looked at such things. But since it was part of a full OSX installer and so forth, I thought that implied a certain level of integration into OSX.

Obviously I choose. . .poorly.

But realistically the only real problem I had was with Perl. So perhaps the OSX installer did resolve everything that was mentioned in that Apple tech note.

I followed the Fink note. All my installed programs now show up, but not the uninstalled ones. I'm still tweaking around with Fink and am trying to rebuild more things.

ClarkGoble 01-03-2003 11:23 PM

Just thought I'd give an update. I went through the Apple note on Perl and found a few things that the installer for Perl didn't set up.

First of CPAN appeared to require NcFTP. So I built that. Its available at

http://www.ncftpd.com/ncftp/

Anyway, I think went and tried to redo all the XS modules in /sw/lib/perl5/darwin. However I kept get compile errors in weird places. At the moment I'm reinstalling Fink from scratch, to see if that fixes things.

sao 01-04-2003 12:48 AM

ClarkGoble,

Maybe this thread can help:

http://www.mail-archive.com/fink-use.../msg07401.html


Cheers...

ClarkGoble 01-04-2003 01:28 AM

I got it more or less working. I basically deleted Fink and then re-installed it. Went without a hitch.

The only problem I'm still having is with Fink Commander. It won't list any packages whatsoever. I even downloaded the source, just in case there was some odd Perl linkages. But it seemed a fairly simple program and rebuilding that in Project Builder didn't help at all.

Anyone with Perl 5.8 running Fink Commander?

I've not tried any TK stuff. That was the prior problem I had. I'd installed the Aqua version of TK/TCL and there occasional was a bit of confusion in some shell scripts.

sao 01-04-2003 02:52 AM

Quote:

ClarkGoble wrote:
Anyone with Perl 5.8 running Fink Commander?
I 'think' FinkCommander runs the 'fink index' command if the user changes the tree settings in the Preferences panel. It then updates the table to reflect the new settings.


Cheers...

sao 01-04-2003 12:29 PM

ClarkGoble,

From within FinkCommander, try running:

Source > Utilities > Index


Cheers...

ClarkGoble 01-04-2003 03:49 PM

I did that. No go.

I'm stuck using dselect.

sao 01-05-2003 12:31 AM

ClarkGoble,

Maybe you follow this thread here:

http://sourceforge.net/mailarchive/f...&forum_id=9724

or post your problem to the 'fink-users' list.


Cheers...

ClarkGoble 01-05-2003 05:47 AM

All my environmental variables seem set right. I did add the LC_ALL as C to Fink Commander, but it made no difference.

I'll post a message to the list you sent. Thanks for the feedback. I actually don't mind dselect as bad as I thought I would. It is more of a hassle, but not enormously so.

V-tach 01-15-2003 04:39 PM

I followed the instructions on the Apple Developer site, but now I get an error message from perl on log-in about my locale settings. Can anybody tell me what I did wrong, because they seem to be set when I check with printenv!?

Code:

Welcome to Darwin!
Wed Jan 15 16:22:08 EST 2003
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LC_ALL = (unset),
        LANG = "en_US"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
 ________________________________________
/ Life's the same, except for the shoes. \
\ - The Cars                            /
 ----------------------------------------
        \  ^__^
        \  (oo)\_______
            (__)\      )\/\
                ||----w |
                ||    ||
[imac:~] V-tach% printenv
HOME=/Users/V-tach
SHELL=/bin/tcsh
USER=plinehan
LANG=en_US
PATH=/sw/bin:/sw/sbin:/Users/V-tach/bin/powerpc-apple-darwin:/Users/V-tach/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/X11R6/bin:./
__CF_USER_TEXT_ENCODING=0x1F5:0:0
TERM=vt100
TERMCAP=???
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=81
LOGNAME=V-tach
HOSTTYPE=macintosh
VENDOR=apple
OSTYPE=darwin
MACHTYPE=powerpc
SHLVL=1
PWD=/Users/V-tach
GROUP=staff
HOST=imac.local.
ENV_SET=
DISPLAY=:0.0
LC_ALL=C
MANPATH=/sw/share/man:/sw/man:/Users/plinehan/man:/usr/local/share/man:/usr/share/man:/usr/X11R6/man
INFOPATH=/sw/share/info:/sw/info:/usr/local/share/info:/usr/local/lib/info:/usr/local/info:/usr/share/info
PERL5LIB=/sw/lib/perl5
[imac:~] V-tach%


sao 01-16-2003 03:07 AM

V-tach,

To solve the immediate problem try unsetting LANG.

If you use bash or other bourne variants:

unset LANG

For tcsh or other csh variants:

unsetenv LANG


Cheers...

sao 01-16-2003 03:35 AM

First read:

ls /usr/share/locale
Code:

perl: warning: Setting locale failed.
        perl: warning: Please check that your locale settings:
                LC_ALL = "En_US",
                LANG = (unset)
            are supported and installed on your system.
        perl: warning: Falling back to the standard locale ("C").

This means that your locale settings had LC_ALL set to ``En_US'' and LANG exists but has no value. Perl tried to believe you but could not. Instead, Perl gave up and fell back to the ``C'' locale, the default locale that is supposed to work no matter what. This usually means your locale settings were wrong, they mention locales your system has never heard of, or the locale installation in your system has problems (for example, some system files are broken or missing). There are quick and temporary fixes to these problems, as well as more thorough and lasting fixes.

Temporarily fixing locale problems

The two quickest fixes are either to render Perl silent about any locale inconsistencies or to run Perl under the default locale ``C''.

Perl's moaning about locale problems can be silenced by setting the environment variable PERL_BADLANG to a zero value, for example ``0''. This method really just sweeps the problem under the carpet: you tell Perl to shut up even when Perl sees that something is wrong. Do not be surprised if later something locale-dependent misbehaves.

Perl can be run under the ``C'' locale by setting the environment variable LC_ALL to ``C''. This method is perhaps a bit more civilized than the PERL_BADLANG approach, but setting LC_ALL (or other locale variables) may affect other programs as well, not just Perl. In particular, external programs run from within Perl will see these changes. If you make the new settings permanent (read on), all programs you run see the changes. See ENVIRONMENT for the full list of relevant environment variables and USING LOCALES for their effects in Perl. Effects in other programs are easily deducible. For example, the variable LC_COLLATE may well affect your sort program (or whatever the program that arranges `records' alphabetically in your system is called).

You can test out changing these variables temporarily, and if the new settings seem to help, put those settings into your shell startup files. Consult your local documentation for the exact details. For in Bourne-like shells (sh, ksh, bash, zsh):


LC_ALL=en_US.ISO8859-1
export LC_ALL

This assumes that we saw the locale ``en_US.ISO8859-1'' using the commands discussed above. We decided to try that instead of the above faulty locale ``En_US''--and in Cshish shells (csh, tcsh)


setenv LC_ALL en_US.ISO8859-1

or if you have the ``env'' application you can do in any shell


env LC_ALL=en_US.ISO8859-1 perl ...


For more info on how to Permanently fixing your system's locale configuration check here:

http://www.perlpod.com/stable/perllocale.html


Cheers...

V-tach 01-17-2003 12:39 PM

Thanks for the tips sao, but I tracked down the cause of my problem. Once again I ran afoul of Apple's arcane .tcshrc structure.

I installed Perl 5.8.0 using the instructions at

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

and followed these instructions:

Before moving on, however, you need to set an environment variable:

Code:

setenv LC_ALL C
echo "setenv LC_ALL C" >> ~/.tcshrc


However my .tcshrc already had



Code:

source /usr/share/tcsh/examples/rc
in it, so it looks like it ignored the


Code:

setenv LC_ALL C

statement. I got rid of the errors by appending the statement to my ~/Library/init/tcsh/environment.mine file instead.

V-tach 01-17-2003 05:13 PM

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

sao 01-18-2003 02:15 AM

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...

V-tach 01-20-2003 12:20 AM

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)

tas 02-11-2003 08:14 AM

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!

gedalin 02-16-2003 07:13 AM

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

edalzell 04-19-2003 01:43 AM

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 04-19-2003 01:47 AM

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

sao 04-19-2003 06:23 AM

edalzell,

Did you set your PERL5 environment variable? It's supposed to get set by /sw/bin/init.csh (or init.sh)?

gedalin 04-19-2003 06:35 AM

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

edalzell 04-19-2003 12:46 PM

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.

gedalin 04-19-2003 01:52 PM

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.

edalzell 04-19-2003 02:20 PM

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?

gedalin 04-19-2003 02:27 PM

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).

edalzell 04-19-2003 02:35 PM

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?

gedalin 04-19-2003 02:40 PM

Which perl is it ? Try /usr/bin/perl -v. And try /usr/local/bin/perl -v.

gedalin 04-19-2003 03:11 PM

I did 'sudo mv /Library/Perl /Library/Perl_old' and perl -v worked.

edalzell 04-20-2003 01:26 AM

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 04-20-2003 01:35 AM

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

gedalin 04-20-2003 02:14 AM

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.

edalzell 04-20-2003 01:02 PM

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!!


All times are GMT -5. The time now is 05:38 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.