athena and artemis on Mac OS X 10.2
I have successfully installed the latest tarballs for athena and artemis on Mac OS 10.2 (Jaguar) and thought I would share with the list the necessary steps to do the installation. 0. Install 10.2 and the latest development tools (included with 10.2) 1. install the latest patch for xterm from the sourceforge site: ceforge.net/projects/xonx/ and install Xfree86 4.2.0.1 2. rebuild the readline libraries within fink after updating from cvs (I use the fink unstable branch) 3. recompile Tk after making the following modification: in Tk/MMutil.pm replace the subroutine const_config with the following code: sub const_config { my $self = shift; my $name; foreach $name (grep /(%|\.(old|bak|q4|orig|rej))$/,keys %{$self->{PM}}) { delete $self->{PM}->{$name}; } my $flags = $self->{'CCCDLFLAGS'}; $flags =~ s/(-[fK]?\s*)pic\b/${1}PIC/; $self->{'CCCDLFLAGS'} = $flags; if ($^O eq 'MSWin32' && $Config{'ccflags'} =~ /-DPERL_OBJECT/) { $self->{'LDFLAGS'} =~ s/-(debug|pdb:\w+)\s+//g; $self->{'LDDLFLAGS'} =~ s/-(debug|pdb:\w+)\s+//g; } elsif ($^O eq 'darwin' ) { $self->{'LDDLFLAGS'} =~ s/-flat_namespace\s+//; $self->{'LDDLFLAGS'} =~ s/-undefined\s+suppress\s+//; if ( -e "$Config{'archlib'}/CORE/$Config{'libperl'}" ) { $self->{'LDDLFLAGS'} .= " -L\${PERL_ARCHLIB}/CORE -lperl "; } elsif ( -e "/System/Library/Perl/darwin/CORE/libperl.dylib" ) { $self->{'LDDLFLAGS'} .= " -L/System/Library/Perl/darwin/CORE -lperl "; } else { warn "Can't find libperl.dylib"; } $self->{'LDFLAGS'} =~ s/-flat_namespace\s+//; $self->{'LDFLAGS'} =~ s/-undefined\s+suppress\s+//; } elsif ($^O =~ /(openbsd)/i) { # -Bforcearchive is bad news for Tk - we don't want all of libpTk.a in all .s o-s. $self->{'LDDLFLAGS'} =~ s/-Bforcearchive\s*//g; } return $self->MM::const_config; } The only thing that is different is a new conditional block in a if block, but I thought it would be easier just to copy and paste. This hack was taken from Bug's Macintosh Page at http://www.lehigh.edu/~sol0/Macintosh/X/ptk/. It turns out it is no longer necessary to hack the dynamic library loader dylib. After changing the subroutine const_config in MMutil.pm, mumble the usual incantations: perl Makefile.PL make make test sudo make install 4. rebuild the ifeffit source cd ifeffit/src/macosx make clean make sudo make install cd ../../wrappers/perl perl Makefiile.PL make sudo make install cd ../python sudo python setup.py install 5. Rebuild athena and artemis cd athena perl Makefile.PL make sudo make install cd artemis perl Makefile.PL make sudo make install You are done! Caveats: I (being perverse) have not done the installation exactly this way. I have compiled xfree86 4.2.99.1 from the online cvs sources and have in addition installed perl 5.8.0. This is a little more complicated (but not much). I also found that ifeffit was looking for a library libg2c.a and made a symbolic link from /usr/lib/gcc/darwin/2.95.2/libg2c.a to /usr/local/lib so that the ifeffit compilation could proceed normally. I am not sure if this step is necessary for all. I don't think perl 5.8.0 and the newest build of Xfree86 are necessary (but on the other hand that is all I have and can't check the alternatives). The version of perl installed by 10.2 is still 5.6. Any questions? Send me email if you have problems and I will help if I can. Dr. Paul Fons Photonics Research Institute National Institute for Advanced Industrial Science and Technology Ministry of Economics and Trade Umezono 1-1-1 Tsukuba, Japan 305-8568 tel. 81-298-61-5636 fax. 81-298-61-5615 paul-fons@aist.go.jp Lines below are in Japanese 独立行政法人 産業技術総合研究所光技術部門 〒305-8568 茨城県つくば市梅園1-1-1 産総研つくば中央第2 E-mail: paul-fons@aist.go.jp, Tel. 0298-61-5636, Fax. 0298-61-5615
I passed along what I knew about compiling athena and artemis on Mac OS 10.2 (Jaguar). I had no trouble installing the new OS, as well as recompiling Tk, arthemis, athena, and Atoms. I also upgraded to the latest perl 5.8.0. Well, my hard disk died on my powerbook and things didn't go as smoothly, namely because of the way options were specified in my config hash. To address this problem, edit the same file MMUtil.pm and in addition to the changes I mentioned earlier, make the following changes: 278,279c278,279 < $self->{'LDDLFLAGS'} =~ s/-flat_namespace\s+//; < $self->{'LDDLFLAGS'} =~ s/-undefined\s+suppress\s+//; ---
$self->{'LDDLFLAGS'} =~ s/-flat_namespace//; $self->{'LDDLFLAGS'} =~ s/-undefined\s+suppress//; 290,291c290,291 < $self->{'LDFLAGS'} =~ s/-flat_namespace\s+//; < $self->{'LDFLAGS'} =~ s/-undefined\s+suppress\s+//;
$self->{'LDFLAGS'} =~ s/-flat_namespace//; $self->{'LDFLAGS'} =~ s/-undefined\s+suppress//;
I have one more confession to make and that is I attempted (at first) to use the new fink unstable version of pgplot which requires additional flags to the loader to include a couple of Frameworks from apple. This seems to work fine if one changes the Makefile for ifeffit, but in the end leads to undefined runtime symbols when athena, for example, is run. I don't remember exactly the symbols, but they were graphics related NSColor and Bezier was there as well. Somehow the framework linking information wasn't being passed on. Thus I have a copy of the old pgplot in its old location for the linking. Has anyone else tried to tackle this situation? I have to do some work fitting so I am taking a break from compiling (providing my new hard disk doesn't fail as well).
participants (1)
-
Dr. Paul Fons