Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Unix & Migration

Unix & Migration
Thread Tools
[domino]
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
Apr 19, 2006, 10:39 AM
 
I have PB G4 15" and I'm looking to migrate to MBP. I do a fair amount of Unix, PHP, MySql work. I'm wondering how Apple's Migration tool will deal with 'unix' types of files, paths, and . (invisible) files.

Thanks for any assistance you can offer.

Bill J.
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Apr 19, 2006, 10:48 AM
 
Edit: durr, I can't read.
( Last edited by mduell; Apr 19, 2006 at 10:55 AM. )
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
Apr 19, 2006, 11:23 AM
 
Mark:

I'm not sure what your reply has to do with my originally posted question.

Bill J.
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Apr 20, 2006, 11:55 AM
 
Apple's migration tool copies what you tell it to, more or less. By default, it copies the user home directory (invisible files and all), login information and /Library IIRC. That's really all you need to get the new machine up and running. Once it is, you can use Firewire Target Disk mode on the old machine and copy all you need manually, using the Finder or the Terminal or whatever.
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
Apr 21, 2006, 12:35 AM
 
Thanks for the above information. Taking your good advise, I have completed the 'migration' process. But I now have the following anomaly.

I can't seem to find the dir /usr/local/ on my MacBook Pro after migrating from my PB G4. Viewing both the PB and the MBP in Terminal I can see /usr/local/ on the PB, which contains:

./ bin/ libexec/ sbin/
../ include/ local/ share/
X11R6/ lib/ mysql/ standalone/


But the dir /usr/ on the MBP shows only:

./ X11R6/ lib/ sbin/ standalone/
../ bin/ libexec/ share/

Obviously some significant dirs have not been "migrated" to the MPB.

My goal is to get php & mysql back up and running as soon as possible.

Thanks for any assistance you can offer.

Bill J.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Apr 22, 2006, 10:04 AM
 
Bill, you really should look into using DarwinPorts (or Fink), software like this standard fare on Linux/Unix distributions such as Fedora/Redhat/Debian/Gentoo/FreeBSD, etc.

Not only will DarwinPorts help you maintain your installs of PHP, MySQL, etc. and help you with upgrading when desirable, but all DP software is located in /opt/local. All you'd have to do is transfer this entire directory over to your new computer, add /opt/local to your path, and call it a day.
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
Apr 22, 2006, 01:48 PM
 
Originally Posted by besson3c
Not only will DarwinPorts help you maintain your installs of PHP, MySQL, etc. and help you with upgrading when desirable, but all DP software is located in /opt/local. All you'd have to do is transfer this entire directory over to your new computer, add /opt/local to your path, and call it a day.
Thanks for this assistance. I have used Darwin Ports in the past and have found it very useful.

How does the transfer of the dir /opt/local/ address the issue of my /usr/local/ dir not having the dirs within it I need to run php and mysql?

Bill
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Apr 22, 2006, 06:18 PM
 
The migration tool only copies user data. /usr/local is not considered user data. You can copy it manually, as I described above, but are you really certain that you want to copy binaries compiled on PPC to an Intel based Mac? Woudln't it be much better to recompile?
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
Apr 23, 2006, 11:10 PM
 
Originally Posted by P
The migration tool only copies user data. /usr/local is not considered user data. You can copy it manually, as I described above, but are you really certain that you want to copy binaries compiled on PPC to an Intel based Mac? Woudln't it be much better to recompile?
I see your point. So with the Intel Macs things like mysql and php have to be recompiled using Intel aware builds?

Does this mean I'm starting from scratch? Neither of these were simple tasks to install and configure in the first place. Where would one go to begin the process again, this time for Intel Macs?

Thanks for your assistance.

Bill J.
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Apr 24, 2006, 11:43 AM
 
PHP should be included with the OS, I think - or maybe I misremember. Anyway, your best bet is to use a ports distribution. Personally, I like DarwinPorts, who also claim to be compatible with Intel-macs already. Fink just has a preliminary version ready.
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
Apr 24, 2006, 11:34 PM
 
Originally Posted by P
PHP should be included with the OS, I think - or maybe I misremember. Anyway, your best bet is to use a ports distribution. Personally, I like DarwinPorts, who also claim to be compatible with Intel-macs already. Fink just has a preliminary version ready.
Running php -v in Terminal yields:

PHP 4.4.1 (cli) (built: Mar 5 2006 09:58:20)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

#1. Is this version to 'old' to run successfully on Intel Macs?

#2. It's been a while since I've used Darwinports. Will it rebuild the entire php and mysql modules from the ground up? Or will it be aware they are already installed and therefore only update them?

#3. Referring to Darwinports & php, you used the phrase: "who also claim to be compatible with Intel-macs already". Does this mean their version of php is 'native' to Intel Macs and the version mentioned above (4.4.1) will have to be 'translated' to ppc?

I know I could simply go ahead and do another install, but learning the overall concept is part of the journey for me.

Your help is most appreciated.

Bill J.
     
proton
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
Apr 25, 2006, 07:55 AM
 
Theoretically any of your PowerPC binaries would run just fine on an Intel Mac, but they would run through Rosetta, just like any other PowerPC application. As PHP, MySQL etc are open source it makes sense to simply compile a new copy on the Intel Mac so that it will run natively on the Intel Mac.

Services like Apache provided by Apple are Intel native, and unless you forced them to run in Rosetta would refuse to load a PowerPC only module version of PHP (mod_php). An application running in Intel native code can not load PowerPC code into itself (plugins, in this case Apache modules), and similarly a PowerPC application running in Rosetta can not load Intel code into itself.

If you want to compile your own version of any Open Source tools you're best to just compile a new version on the Intel Mac and all will be well.

- proton
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
Apr 25, 2006, 09:29 AM
 
proton:

Thanks. This is the larger picture I needed.

So, summing up:

Copy over /usr/local/ from PB G4

Run Darwinports to update both php and mysql

Start the process of reconfiguring, Apache, php and mysql. (Since it's been over two years that I did this some 'refreshing' will be required.) Can you remind me where the three main config files are located?

And all should be well ...

Hopefully, the above will also help other folks make this journey.

Thanks,

Bill J.
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
Apr 30, 2006, 08:46 PM
 
Through numerous hoops and many hours I have successfully loaded the latest Darwinports & XCode Developer. However, (don't you just hate these 'howevers') when I attempt to download php5

sudo port -v install php5

I end up with the following errors at the end:

---> Building openssl with target all
Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwi nports.org_dpupdate_dports_devel_openssl/work/openssl-0.9.8a" && make all CC=/usr/bin/gcc-4.0" returned error 2
Command output: /usr/bin/libtool: internal link edit command failed
making all in engines...
make[1]: Nothing to be done for `all'.
making all in apps...
rm -f openssl
shlib_target=; if [ -n "libcrypto.0.9.8.dylib libssl.0.9.8.dylib" ]; then \
shlib_target="darwin-shared"; \
fi; \
if [ "${shlib_target}" = "darwin-shared" ] ; then \
LIBRARIES="../libssl.a ../libcrypto.a" ; \
else \
LIBRARIES="-L.. -lssl -L.. -lcrypto" ; \
fi; \
make -f ../Makefile.shared -e \
APPNAME=openssl OBJECTS="openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o engine.o ocsp.o prime.o" \
LIBDEPS=" $LIBRARIES -L/opt/local/lib -Wl,-search_paths_first -lz" \
link_app.${shlib_target}
( :; LIBDEPS="${LIBDEPS:-../libssl.a ../libcrypto.a -L/opt/local/lib -Wl,-search_paths_first -lz}"; LDCMD="${LDCMD:-/usr/bin/gcc-4.0}"; LDFLAGS="${LDFLAGS:--fPIC -fno-common -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -O3 -fomit-frame-pointer -DL_ENDIAN}"; LIBPATH=`for x in $LIBDEPS; do if echo $x | grep '^ *-L' > /dev/null 2>&1; then echo $x | sed -e 's/^ *-L//'; fi; done | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o ${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o engine.o ocsp.o prime.o ${LIBDEPS} )
/usr/bin/ld: warning /opt/local/lib/libz.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: Undefined symbols:
_deflate
_deflateEnd
_deflateInit_
_inflate
_inflateEnd
_inflateInit_
collect2: ld returned 1 exit status
make[2]: *** [link_app.darwin] Error 1
make[1]: *** [openssl] Error 2
make: *** [build_apps] Error 1

Error: The following dependencies failed to build: cclient openssl curl libmcrypt libxml2 libxslt mhash tidy
Error: /opt/local/bin/port: Status 1 encountered during processing.


This of course results in no php5 installed. But I'm at a loss as to what these errors means or how to remedy them.

Thanks for any assistance you can offer.

Thanks,

Bill
     
Mithras
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Apr 30, 2006, 11:24 PM
 
Yeah, this is the key line:
/usr/bin/ld: warning /opt/local/lib/libz.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
type the following for us:
file /opt/local/lib/libz.dylib

and if that returns something like
/opt/local/lib/libz.dylib: symbolic link to `libz.1.2.3.dylib'

then type
file /opt/local/lib/libz.1.2.3.dylib
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
Apr 30, 2006, 11:53 PM
 
Here's what I can up with:

~ Ready: file /opt/local/lib/libz.dylib
/opt/local/lib/libz.dylib: symbolic link to `libz.1.2.2.dylib'

~ Ready: file /opt/local/lib/libz.1.2.3.dylib
/opt/local/lib/libz.1.2.3.dylib: cannot open (/opt/local/lib/libz.1.2.3.dylib)


libz.1.2.3.dylib seems to be missing.

Hmm

Bill
     
Mithras
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
May 1, 2006, 10:54 AM
 
Umm, yours is a symbolic link to libz.1.2.2.dylib, so you should type
file /opt/local/lib/libz.1.2.2.dylib
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
May 1, 2006, 11:31 AM
 
Here's what I came up with:

~ Ready: file /opt/local/lib/libz.1.2.2.dylib
/opt/local/lib/libz.1.2.2.dylib: Mach-O dynamically linked shared library ppc


Hope this helps.

Bill
     
Mithras
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
May 1, 2006, 05:48 PM
 
So, as that error message indicated, your libz is compiled for PowerPC, while you are compiling an app for Intel. Did you install DarwinPorts from source, or did you install a binary version? If you installed from a DMG, you should follow the Source Installation instructions.
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
May 2, 2006, 01:53 AM
 
Your suggested link took me to where I originally downloaded it. I got the DarwinPorts DGM by clicking on the link in the first paragraph which begins:

"DarwinPorts version 1.2.1 is available in binary form as a dmg disk image for Tiger (Universal) ..."

So why would it come out compiled for ppc? Or am I missing your point?

Thanks for your continued assistance.

Bill
     
Mithras
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
May 2, 2006, 02:46 AM
 
I dunno, but clearly that's what happened. I'd toss your /opt directory and start again from source.
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
May 2, 2006, 09:42 AM
 
Originally Posted by Mithras
I dunno, but clearly that's what happened. I'd toss your /opt directory and start again from source.
By start again from source you mean use DarwinPorts' directions for 'source installation' rather than the 'pgk installation' I used the first time?

If I trash /opt as you mention above will this eliminate ALL of what I just installed, or will there still be a bunch of files hanging around forever? My disk space is becoming more and more precious.

Thanks,

Bill
     
Mithras
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
May 2, 2006, 10:09 AM
 
Yes, and yes, respectively. Trashing /opt (and emptying the trash!) will indeed delete the files.
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
May 3, 2006, 01:29 AM
 
And so the saga continues ...

I trashed /opt/ and installed darwinports from source, as you suggested. This went fine.

I then proceeded to install php5 using the newly sourced darwinports. Everything went fine until the very end, when I got this error:

---> Attempting to fetch php-5.1.2.tar.bz2 from http://www.php.net/distributions/
---> Verifying checksum(s) for php5
---> Extracting php5
---> Configuring php5
---> Building php5 with target all
---> Staging php5 into destroot
---> Packaging tgz archive for php5 5.1.2_1+darwin_8+macosx
---> Installing php5 5.1.2_1+darwin_8+macosx

If this is your first install, you might want
* copy /opt/local/etc/pear.conf.sample to /opt/local/etc/pear.conf
---> Activating php5 5.1.2_1+darwin_8+macosx
Error: Target com.apple.activate returned: Image error: /opt/local/lib/php/.channels/.alias/pear.txt already exists and does not belong to a registered port. Unable to activate port php5.
Error: /opt/local/bin/port: Status 1 encountered during processing.

/opt/local/lib/php/.channels contains:

./ .alias/ pear.php.net.reg
../ __uri.reg pecl.php.net.reg


Not sure where to go from here.

Please advise.

Thanks,

Bill
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
May 4, 2006, 10:46 PM
 
I realize we're all busy ... but I've gone a long ways with this listing and I'm hanging on some attempts to rectify my php5 installation, based on advise from this list.

Can someone please take a look at my last post and give me a pointer, or point me to some other internet resource?

Thanks for any assistance you can offer.

Bill
     
bokey
Registered User
Join Date: Jul 2006
Location: NJ
Status: Offline
Reply With Quote
May 13, 2006, 02:31 PM
 
Google turned up this link for me
http://www.opendarwin.org/pipermail/...ry/031978.html

and it worked for me
     
[domino]  (op)
Fresh-Faced Recruit
Join Date: Jun 2006
Status: Offline
Reply With Quote
May 14, 2006, 09:50 AM
 
This was a useful link.

Thanks for your assistance!

Bill
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 08:51 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,