I had a lot of problems with pdf2svg since it was giving me a seg fault. What I did at the end was:
Instaling as follows:
cairo is too old, increase version
pango, remove ENV.x11
poppler --with-glib, remove ENV.x11, increase version to 0.20.0
gdk-pixbuf
atk
gtk+
pdf2svg
I want to share and also backup some procedures which could be useful and I have done over and over again. They are focused to mac and linux as environments for developing computer science. From time to time, I could also publish some other kind of stuff ..
Saturday, May 12, 2012
Friday, May 11, 2012
About gtk+ homebrew formula
Link the hombrew cairo/include/cairo dir to /opt/X11/include/cairo. Then edit the formula and add
# NEW START
ENV.append 'LDFLAGS', '-L/usr/local/Cellar/cairo/1.10.2/lib'
ENV.append 'CPPFLAGS', '-I/usr/local/Cellar/cairo/1.10.2/include'
# NEW END
# NEW START
ENV.append 'LDFLAGS', '-L/usr/local/Cellar/cairo/1.10.2/lib'
ENV.append 'CPPFLAGS', '-I/usr/local/Cellar/cairo/1.10.2/include'
# NEW END
About htop-osx homebrew formula
This formula does not work if you have installed a newer libtool. The solution is to add
system "autoreconf -i"
to the formula, after the system autogen.sh call, before the configure.
system "autoreconf -i"
to the formula, after the system autogen.sh call, before the configure.
About poppler homebrew formula
In order to compile successfully the homebrew poppler formula, it is necessary to:
- move/rename the old cairo directorry, /opt/X11/include/cairo , which is used by default by the poppler formula.
- Install cairo with homebrew.
- Since the previous is a keg only formula, follow the instructions at the end of the installation, adding
ENV.append 'LDFLAGS', '-L/usr/local/Cellar/cairo/1.10.2/lib'
ENV.append 'CPPFLAGS', '-I/usr/local/Cellar/cairo/1.10.2/include'
inside install function before configure
- Install it.
- move/rename the old cairo directorry, /opt/X11/include/cairo , which is used by default by the poppler formula.
- Install cairo with homebrew.
- Since the previous is a keg only formula, follow the instructions at the end of the installation, adding
ENV.append 'LDFLAGS', '-L/usr/local/Cellar/cairo/1.10.2/lib'
ENV.append 'CPPFLAGS', '-I/usr/local/Cellar/cairo/1.10.2/include'
inside install function before configure
- Install it.
Wednesday, April 11, 2012
xmgrace and png lib on Snow Leopard 10.6.8
I am using xmgrace a lot for plotting. Although I still like gnuplot, and its 3D utilities are beyond those of xmgrace (which is only 2D), I find xmgrace usefull for storing all the graph info into one single file. Yes, I know, I can save the gnuplot commands, and then rebuild the graph with the original data, etc, but xmgrace just contains everuthing in a single file.
I am currently printing to both pdf and jpeg formats from xmgrace, since png support was broken. But I need png support. After some digging into the system, I found that Snow Leopard has several versions for libpng and its include files, changing the lib/inc version number. At the end, I foudn the following solution to the configure script whichs sets everything up:
This means I am using the png library installed from XQuartz. BTW, if you are using homebrew as me, just edit the grace formula to add the flags shown above:
def install
#ENV.x11
ENV.append "LDFLAGS", "-L/opt/X11/lib"
ENV.append "CPPFLAGS", "-I/opt/X11/include/libpng15"
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}", "--with-zlib",
"--with-png-library=-lpng15",
"--enable-grace-home=#{prefix}"
system "make install"
end
If you have gfortran, do not have f77, and you want the fortran tests, make a symbolic link from gfrotran to f77.
I am currently printing to both pdf and jpeg formats from xmgrace, since png support was broken. But I need png support. After some digging into the system, I found that Snow Leopard has several versions for libpng and its include files, changing the lib/inc version number. At the end, I foudn the following solution to the configure script whichs sets everything up:
./configure LDFLAGS="-L/opt/X11/lib" CPPFLAGS="-I/opt/X11/include/libpng15" --with-png-library=-lpng15
This means I am using the png library installed from XQuartz. BTW, if you are using homebrew as me, just edit the grace formula to add the flags shown above:
def install
#ENV.x11
ENV.append "LDFLAGS", "-L/opt/X11/lib"
ENV.append "CPPFLAGS", "-I/opt/X11/include/libpng15"
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}", "--with-zlib",
"--with-png-library=-lpng15",
"--enable-grace-home=#{prefix}"
system "make install"
end
If you have gfortran, do not have f77, and you want the fortran tests, make a symbolic link from gfrotran to f77.
Thursday, November 3, 2011
Latex and Inkscape on Snow Leopard
Recently, I have been using the great Inkscape (version 0.48.2) drawing tool for my work. But, I also needed LaTeX support. I then tried to use the textext plugin, but I faced many problems with inkscape and the plugin extensions, with error messages related to lxml support and others. At the end, what worked was :
- Remove the python internal support for inkscape (see the useful blog http://blog.lrem.net/2010/07/05/fixing-inkscape-python-extensions/) :
cd /Applications/Inkscape.app/Contents/Resources/
mv python OLD.python - Install, if have not done so already, the lxml and maybe numpy packeges for python:
easy_install numpy lxml - Move the textext scripts to /Applications/Inkscape.app/Contents/Resources/extensions
Tuesday, October 25, 2011
gdb-7.3.1 on Snow Leopard
I was updating the default gdb debugger on Snow Leopard (version 6.3.50) to a more current one (7.3.1), because I need better support for the STL.
The source compilation was OK. But, the executable should be signed in order to work (A security measure). This is well explained on http://sourceware.org/gdb/wiki/BuildingOnDarwin . After that, I can call ddd as:
ddd --debugger "/usr/local/bin/gdb-7.3.1" ./test.x
Of course, this implies I have configured/compiled gdb as:
./configure --prefix=/usr/local --with-python
The last flag is to active python pretty printers for stl containers inside gdb.
The source compilation was OK. But, the executable should be signed in order to work (A security measure). This is well explained on http://sourceware.org/gdb/wiki/BuildingOnDarwin . After that, I can call ddd as:
ddd --debugger "/usr/local/bin/gdb-7.3.1" ./test.x
Of course, this implies I have configured/compiled gdb as:
./configure --prefix=/usr/local --with-python
The last flag is to active python pretty printers for stl containers inside gdb.
Subscribe to:
Posts (Atom)