![]() libĬhecking if compiler supports -Wl,-rpath. yesĬhecking for system library directory. cc -EĬhecking whether cc understands -c and -o together. none neededĬhecking how to run the C preprocessor. yesĬhecking for cc option to accept ISO C89. noĬhecking whether we are using the GNU C compiler. a.outĬhecking whether we are cross compiling. yesĬhecking for C compiler default output file name. usr/bin/sedĬhecking whether the C compiler works. usr/bin/grepĬhecking for a sed that does not truncate output. configure -enable-xdebug -with-php-config=/Applications/AMPPS/php-5.3/bin/php-config CFLAGS="-arch i386 $CFLAGS" CCFLAGS="-arch i386 $CCFLAGS" CXXFLAGS="-arch i386 $CXXFLAGS" LDFLAGS="-arch i386 $LDFLAGS"Ĭhecking for grep that handles long lines and -e. Any ideas on why I can’t seem to compile in the right architecture would be appreciated. I’ve included the terminal output below for reference to the process. I tried both methods of changing the architecture listed here in the blog post (thank you), but I still get a x86_64 architecture when running ‘sudo make install’. I consistently get the wrong architecture. I have been going in circles getting AMPPS configured on a Mac OSX 10.8 with PHP debugging. This has been the best explanation of why I get the architecture issue when attempting to use Xdebug in my dev environment. NOTE: this is not reccommended in production environments as it degrades performance! Now restart Apache and you should be good to go. So that debbugger is connected on every page load. Zend_extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20121212/xdebug.soĮDIT: As pointed out by strah below, if you’re going to use MacGDBp for debugging GUI, you need to add additional line to php.ini file: xdebug.remote_autostart=1 ![]() So open /Applications/XAMPP/etc/php.ini with your favorite editor and add the lines to the bottom of it: Configure PHP.iniįinal step is to configure php.ini file. You might need to adjust the path for your XAMPP and PHP version: sudo cp modules/* /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20121212/ 7. Copy filesĬopy the files to PHP extensions directory. When you get x86_64, then your configure didn’t succeed in setting the architecture and you should revert to step 4. The architecture should be reported as i386. Non-fat file: modules/xdebug.so is architecture: i386 When the compilation finishes, you can verify that the module was built 32-bit, by running: > lipo -info modules/xdebug.so Just open the Makefile in your favorite text editor and adjust the flags directly. configure command without (64-bit, left) and with (32-bit, right) the FLAGS settings: The screenshot shows the only 3 differences in resulting Makefile if I ran the. configure -enable-xdebug CC="gcc -arch i386" CXX="g++ -arch i386"Įdit3: If, for some unknown reason, you still don’t get the correct architecture, you can manually edit the Makefile and fix the compile flags yourself. ![]() configure -enable-xdebugĬFLAGS="-arch i386 $CFLAGS" CCFLAGS="-arch i386 $CCFLAGS"ĬXXFLAGS="-arch i386 $CXXFLAGS" LDFLAGS="-arch i386 $LDFLAGS"Įdit: configure command updated to append variables instead of prepending them (thanks Sequan).Įdit2: Alternatively, as suggested by Junaid below, on a Lion you could use the following command (haven’t tried it myself), which is essentially the same, only providing architecture as direct argument to compiler instead of setting it in FLAGS. If your XAMPP is built for i386 (32-bit) architecture, you have to modify default build flags, which otherwise would build for x86_64 (64-bit). Recent XAMPP (mine was 1.8.3-2) are built 64bit and so the configure is rather simple. Run phpize /Applications/XAMPP/xamppfiles/bin/phpize 4. Download xdebugĭownload xdebug source from here or checkout from GIT: git clone git:///derickr/xdebug.git Install XAMPP Developer packageīuilding xdebug requires you to have php headers, so download and install corresponding developer package for XAMPP. Now continue with Macports or Homebrew to install autoconf. This will set the folder where the Xcode is installed so that all the command line tools find it. Once you have Xcode installed, go to Xcode prefs -> Downloads pane and install ‘Xcode command line tools’ and when that is done, open terminal and enter: sudo xcode-select -switch /Applications/Xcode.app According to Cedric’s experience, you’ll need to have at least Autoconf installed via MacPorts or Homebrew and that in turn will require you to install Xcode. ![]() Thanks to Cedric Talbot for commenting and pointing out that I had not noticed I had all the needed developer tools already in place from all the development I do on my Mac. ![]() I just upgraded my XAMPP to latest release and found myself trapped with no memory of how to install xdebug on a Mac with XAMPP. ![]()
0 Comments
Leave a Reply. |