Backtrace Under Mac OS X
Compiling the latest snapshots under Mac OS X
The following steps apply to:
- MacOS 10.2.8 or 10.3
- Fink 0.15.0 and higher
- Fink rsync (recommanded) or Fink cvs
- either gcc 3.1 or gcc 3.3
Steps to perform
- Note: Those steps are the necessary steps if you have not compiled bluefish in local tree previously.
- If you have already compiled bluefish in local tree, and provided that the source files you want to backtrace have a
#define DEBUG
into them, which is not commented out, just perform steps 10-4, 10-5, 12bis, 13 and 14. You can check for the existence of the#define DEBUG
lines by untaring the source file located in /sw/src. Copy it to your Desktop and perform step3. - If you have already compiled bluefish in local tree, and the
#define DEBUG
lines do not exist or are commented out, move the source tarball to your desktop and perform steps 3, 4, 5, 6, 9, 10-2, 10-4, 10-5, 12bis, 13 and 14. - If you want to return to normal compiling, remove from the info file
--with-debugging-output
in the~ConfigParams
line or the whole line if it only contains this flag, and-g
in theSetCFLAGS
line or the whole line if it contains only that flag, delete the folder bluefishxxx in /sw/src and launchfink rebuild bluefish
.
1. Download the tarball from [1], section Development Snapshots.
2. Don't let ~StuffItExpander expand it.
3. Untar it::
Open the Terminal
Move to the directory where you downloaded the tarball by typing:cd ~nameofthedirectory
Press enter
Assuming the name of the tarball is bluefish-2003-10-16.tar.bz2, type:bzip2 -dc bluefish-2003-10-16.tar.bz2 | tar -xvf -
Press enter
4. Enable debugging::
A new folder named bluefish-gtk2 has been created.
Open it by double-clicking it, open the src folder inside it.
Open the desired c file by double-clicking it and change it as follows:
If you find a line:/ #define DEBUG /
near the top of the file, just remove the/
and/
on this line
If this is not the case, add a new line just after the first*/
and type:#define DEBUG
Save the file
5. Tar the folder again::
Type in the terminal:tar cf bluefish-2003-10-16.tar bluefish-gtk2
Press enter
Move the tarball you downloaded elsewhere
Type in the terminal:bzip2 bluefish-2003-10-16.tar
Press enter in the terminal.
6. Copy the new tarball to /sw/src::
Type in the terminal:sudo cp bluefish-2003-10-16.tar.bz2 /sw/src
Press enter
Enter your password at the prompt
7. Check you gcc version with::
gcc --v
8. Copy Fink's bluefish.info and Fink's bluefish.patch files to your local tree (if not already done) with::
If you use gcc 3.1:
sudo cp /sw/fink/10.2/unstable/main/finkinfo/editors/bluefish.* /sw/fink/10.2/local/main/finkinfo/
If you use gcc 3.3 (be aware not to split the line):
sudo cp /sw/fink/10.2-gcc3.3/unstable/main/finkinfo/editors/bluefish.* /sw/fink/10.2/local/main/finkinfo/
If you only have a 10.3 tree:
sudo cp /sw/fink/10.3/unstable/main/finkinfo/editors/bluefish.* /sw/fink/10.3/local/main/finkinfo/
9. Compute the MD5 checksum for the snapshot with::
md5 /sw/src/nameofthebluefishtarball
10. Edit the info file with::
sudo pico /sw/fink/10.2/local/main/finkinfo/bluefish.info
or:
sudo pico /sw/fink/10.3/local/main/finkinfo/bluefish.info
1 - Change the Version: line to match the date in the tarball's name, i.e. if the name of the tarball is bluefish-2003-10-16.tar.bz2, change it to:
Version: 2003-10-16
2 - Change the Source-MD5: line to have the new computed MD5 checksum.
3 - Check if you have a ~SourceDirectory line (if not already done):
If you have one, change it to: ~SourceDirectory: bluefish-gtk2
If you don't have one, add a new line just after the Source-MD5 line, and type: ~SourceDirectory: bluefish-gtk2
4 - Add the g flags to the following line (create it if it does not exist) just under the ~SourceDirectory line:
~SetCFLAGS: -g
5 - Add the appropriate flag to the following line just under the above one:
~ConfigureParams: --with-debugging-output
11. Edit the patch info file with::
sudo pico /sw/fink/10.2/local/main/finkinfo/bluefish.patch
or:
sudo pico /sw/fink/10.3/local/main/finkinfo/bluefish.patch
Change the first two lines to have the date of the tarball's name in them, i.e. if the name of the tarball is bluefish-2003-10-16.tar.bz2, change them to:
--- bluefish-2003-10-16/configure
+++ bluefish-2003-10-16-patched/configure
12. Check you Fink configuration with::
cat /sw/etc/fink.conf
The Trees: line should match the following:
Trees: local/main unstable/main unstable/crypto stable/main stable/crypto local/bootstrap
If this is not the case, open the file with:
sudo pico /sw/etc/fink.conf
and change the line accordingly.
12bis. (Only for version < 0.12) Remove any gnome-vfs2-ssl librairies as long as their versions are lower than 2.2::
Check the version with:
fink list -t -i gnome
Remove the offending librairies (if any) with:
fink remove gnome-vfs2-ssl gnome-vfs2-ssl-dev gnome-vfs2-ssl-shlibs
13. Rebuild the bluefish package::
For version < 0.13:fink -k rebuild bluefish
For version >=0.13:
fink -k rebuild bluefish-gnome2
if have GNOME2 installed
fink -k rebuild bluefish
otherwise
14. Start gdb::
Launch X11 or XDarwin. Open an xterm.
Move to the directory where the source is located by typing:
cd /sw/src/bluefish-2003-10-16/bluefish-gtk2/
Launch gdb with:gdb src/bluefish
Then see details on DebuggingBluefish from Type r to start