Difference between revisions of "CompilingMacOsX"

From Inkscape Wiki
Jump to navigation Jump to search
 
(nice work!)
(27 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
It's as simple as: #fink -y install inkscape  
 
It's as simple as: #fink -y install inkscape  
  
Fink will get all the dependencies and install them.
+
Fink will get all the dependencies and install them (assuming "fink list inkscape" shows that inkscape's latest version is installed.)
  
 
----
 
----
  
To get autogen to run I had to perform the following ( Assuming users have fink installed )
+
If you build inkscape yourself, use a full 10.3 install of unstable fink.
  
sudo fink install gtk+ ( which installs gtk+ and gtk+2 )
+
You may need set the following variables to compile cvs
sudo fink install libtool14 ( replacing apple's glibtoolize )
+
(taken right out of fink's .info file). This is in bash syntax.
 
 
These entries are all to be put in your ~/.cshrc ( or applicable shell startup )
 
 
 
setenv ACLOCAL_FLAGS "-I /sw/share/aclocal"
 
setenv CFLAGS -I/sw/include
 
 
 
 
 
setenv LDFLAGS -L/sw/lib
 
setenv CXXFLAGS $CFLAGS
 
setenv CPPFLAGS $CXXFLAGS
 
 
 
--
 
 
 
For a clean 10.3 installation with a brand new Fink, I had to add the following:
 
 
 
* intltool
 
* glib2
 
* glib2-dev
 
* libpng3
 
* libart2
 
* libxml2
 
* gtk+2
 
* gtk+2-dev
 
 
 
In theory you can just list all those on one install command.
 
-- JonCruz
 
 
 
Apart from the above env variables I had to set the following variables to compile cvs
 
(taken right out of fink's .info file). This is in bash syntax, above is tcsh syntax.  
 
 
(I havent experimented with this list to see whats the minimum required.. but if I dont include any of the following than it breaks.)
 
(I havent experimented with this list to see whats the minimum required.. but if I dont include any of the following than it breaks.)
 
<pre>
 
<pre>
Line 54: Line 25:
 
export LIBS="-L/sw/lib -lintl "$LIBS
 
export LIBS="-L/sw/lib -lintl "$LIBS
 
</pre>
 
</pre>
 +
 +
---
  
 
Update: There is a problem with rendering cursors on mac due to a gcc bug. At this point fink is maintaining an inkscape package and they are going to use a patch to fix it for 0.38.1 so I recommend fink package. If you are interested in patching yourself, visit tracker item 932944 at https://sourceforge.net/tracker/index.php?func=detail&aid=932944&group_id=93438&atid=604306 .
 
Update: There is a problem with rendering cursors on mac due to a gcc bug. At this point fink is maintaining an inkscape package and they are going to use a patch to fix it for 0.38.1 so I recommend fink package. If you are interested in patching yourself, visit tracker item 932944 at https://sourceforge.net/tracker/index.php?func=detail&aid=932944&group_id=93438&atid=604306 .
Line 59: Line 32:
 
-- Spundun
 
-- Spundun
  
since gtkmm-2.0 has been added as a requirement, you may need to install it thru darwinports; to use it along whatever you installed with fink prior to that, the flags are:
 
 
<pre>
 
export ACLOCAL_FLAGS="-I /sw/share/aclocal"
 
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/local/lib/pkgconfig/
 
export LDFLAGS="-lintl -L/sw/lib -L/opt/local/lib"
 
export CFLAGS="-I/sw/include -I/opt/local/include"
 
export CPPFLAGS=$CFLAGS
 
export CXXFLAGS=$CFLAGS
 
</pre>
 
 
-- yafosf
 
  
 
If you need to run "./autogen.sh":
 
If you need to run "./autogen.sh":
  
 
  fink install automake1.8 autoconf2.5
 
  fink install automake1.8 autoconf2.5
 
  
 
Otherwise:
 
Otherwise:
Line 84: Line 44:
 
         gtk+2 gtk+2-shlibs gtk+2-dev �
 
         gtk+2 gtk+2-shlibs gtk+2-dev �
 
         libpng3 libpng3-shlibs �
 
         libpng3 libpng3-shlibs �
 +
        libsigc++2 libsigc++2-shlibs �
 +
        gtkmm2.4 gtkmm2.4-dev gtkmm2.4-shlibs �
 
         libtool14 libtool14-shlibs �
 
         libtool14 libtool14-shlibs �
         libpng-shlibs �
+
         libxml2 libxml2-shlibs �
         libsigc++12 libsigc++12-shlibs �
+
         libsigc++2 libsigc++2-shlibs �
 
         popt popt-shlibs  
 
         popt popt-shlibs  
 
  export CPPFLAGS=-I/sw/include
 
  export CPPFLAGS=-I/sw/include
Line 92: Line 54:
 
  # Run ./autogen.sh here if things break below...
 
  # Run ./autogen.sh here if things break below...
 
  ./configure --prefix=/sw
 
  ./configure --prefix=/sw
echo "#define ENABLE_NLS" >> config.h
 
 
  make
 
  make
 
  make install
 
  make install
Line 98: Line 59:
  
 
-- Kees Cook
 
-- Kees Cook
 +
 +
Since gc 6.4 is needed, once fink is updated, you can install: "fink install gc gc-shlibs", but until then, you'll need to compile it yourself.  :(
 +
 +
 +
Some packaging links:
 +
http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html
 +
http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/
 +
 +
---
 +
 +
See the new Info.plist.in file in CVS, as well as packaging/osx-app.sh for building a .app directory.  I have no idea what I'm doing, and I'm doing it blind, so any help is appreciated.  I'm guessing at appropriate paths in src/path-prefix.h, which get activated with configure's --enable-osxapp now.
 +
 +
Also, we probably need to do all this stuff too:
 +
http://gimp-app.sourceforge.net/gimp.app.howto.txt
 +
 +
 +
 +
 +
 +
------
 +
 +
I have succesfully built Inkscape 0.40-1 via Fink under Mac OS X 10.3
 +
 +
After I have moved to "~/Desktop/Inkscape.app/Contents" following the way explained for the Gimp.app
 +
 +
The application lauches itself with a double-click and it is available there http://niwaconcept.free.fr//x11/Inkscape.zip
 +
 +
But if it can be stored there that would be better. The file is 60 Mb do dwnload, and then 280 Mb for the software itself.
 +
 +
M-Rick
 +
 +
upload:inkscape-0.40-2.jpg
 +
upload:inkscape-0.40-1.jpg
 +
 +
----
 +
 +
I've downloaded the zip and copied the resulting .app to /Applications.
 +
 +
Running it gives the following errors:
 +
 +
<pre>/Applications/Inkscape.app/Contents/MacOS robmyers$ ./Inkscape
 +
dyld: ./Inkscape can't open library: /Volumes/Utilisateurs/Users/aymeric/Desktop/Gimp/ScriptExec/build/ScriptExec.build/ScriptExec.build/Objects-normal/ppc/libstdc++_ZeroLink.dylib 
 +
(No such file or directory, errno = 2)
 +
Trace/BPT trap</pre>
 +
 +
- robmyers .
 +
 +
 +
 +
----
 +
 +
Strange ....
 +
And it puts all the path of my computer ...
 +
 +
And scriptExec is the script used by gimp.app, once compiled it is said to change the name.
 +
 +
When I ran inkscape from my computer, I did from many locations and no problems, I will see I have errors feedbacks.
 +
 +
I am not specialized in programming so if someone wants to help no problem.
 +
 +
M-Rick
 +
 +
----
 +
 +
Ok it's done.
 +
 +
 +
Anyway, there are a few bugs, also present in Fink :
 +
 +
Some menus appear behind the windows.
 +
 +
Impossible to export as bitmap, there is an error message "The chosen area to be exported is invalid" and I have it even if I change the path.
 +
 +
I made a DMG, you can download and test it there http://niwaconcept.free.fr//x11/Inkscape.zip
 +
 +
M-Rick
 +
 +
----
 +
 +
That works perfectly. And the .dmg window looks very good, it's a perfect Mac installer.
 +
 +
Thanks!
 +
 +
- robmyers .
 +
 +
----
 +
 +
Erk! But when I try it on a machine without Fink installed, I get the following error:
 +
<pre>
 +
dyld: /Applications/Inkscape.app/Contents/Resources/bin/inkscape can't open library: /sw/lib/libgtkmm-2.4.1.dylib  (No such file or directory, errno = 2)
 +
</pre>
 +
 +
This despite the fact that libgtkmm is present in the Inkscape.app/Contents/Resources/lib/ directory.
 +
 +
- robmyers .
 +
 +
 +
----
 +
 +
Yes, I just made an update for it. I tricked it, because it is looking for a sw folder, so i made a link to the software, just double-click it and and it will create it automatically for you, until I find the way to not have to do this.
 +
 +
M-Rick
 +
 +
----
 +
 +
Does Gimp.app do this? What happens if someone uses Fink and /sw already exists?
 +
 +
Downloading, running and installing, this now works after a couple of runs. Don't know if I was being impatient. :-)
 +
 +
- Inkscape MacOSX Testing Team (i.e. robmyers :-) ).
 +
 +
 +
----
 +
 +
No Gimp.app doesn't do that. Inkscape does that because I haven't found yet the way it tries to find the share folder.
 +
If you already have Fink installed, well, it will not erase it just add the link.
 +
 +
Inkscape.app has a problem with the GTK pixmaps location, so I have made a script inside the software that will create a link automatically. So for the first launch, it is better to launch under an admin session.
 +
But if you have Fink already installed, it won't work unless you are root, so if you don't want to login as root, you can change the settings of the folders /sw and /sw/share to Group/Admin and Acces/Read and Write.
 +
 +
If someone finds the way to correct this, we won't have to do this trick anymore.
 +
 +
M-Rick
 +
 +
----
 +
 +
I think the program will need to add the pixmap location dynamically to $GTK_PATH on startup using setenv before starting Inkscape proper?
 +
 +
- robmyers .
 +
 +
----
 +
 +
I've installed inkscape.app. It works quite well on Japanese environment. "KANJI" can be used!
 +
 +
Ken
 +
 +
upload:japanese.jpg
 +
 +
-----
 +
 +
I've installed it and it works. Very nice. The background image in the DMG is a nice touch, though you could maybe add the standard 'drag this icon to your applications folder' text to that. I still find Inkscape rather slow -- with the Windows version I assumed it was just a porting issue. Is the same true here? I have an SVG document with about 1000 objects. BTW, curious bug -- tooltips for floating palettes appear ''below'' them!

Revision as of 11:25, 3 March 2005

Compiling Inkscape under Mac OS X

You can run Inkscape by compiling by using Fink. http://fink.sourceforge.net

It's as simple as: #fink -y install inkscape

Fink will get all the dependencies and install them (assuming "fink list inkscape" shows that inkscape's latest version is installed.)


If you build inkscape yourself, use a full 10.3 install of unstable fink.

You may need set the following variables to compile cvs (taken right out of fink's .info file). This is in bash syntax. (I havent experimented with this list to see whats the minimum required.. but if I dont include any of the following than it breaks.)

export ACLOCAL_FLAGS="-I /sw/share/aclocal"
export CFLAGS=-I/sw/include
export LDFLAGS=-L/sw/lib
export CXXFLAGS=$CFLAGS
export CPPFLAGS=$CXXFLAGS
export LIBRARY_PATH=/usr/X11R6/lib:/sw/lib
export CPATH=/sw/include
export PATH="/usr/X11R6/bin:"$PATH
export LIBS="-L/sw/lib -lintl "$LIBS

---

Update: There is a problem with rendering cursors on mac due to a gcc bug. At this point fink is maintaining an inkscape package and they are going to use a patch to fix it for 0.38.1 so I recommend fink package. If you are interested in patching yourself, visit tracker item 932944 at https://sourceforge.net/tracker/index.php?func=detail&aid=932944&group_id=93438&atid=604306 .

-- Spundun


If you need to run "./autogen.sh":

fink install automake1.8 autoconf2.5

Otherwise:

fink install �
       intltool �
       glib2 glib2-dev glib2-shlibs �
       gtk+2 gtk+2-shlibs gtk+2-dev �
       libpng3 libpng3-shlibs �
       libsigc++2 libsigc++2-shlibs �
       gtkmm2.4 gtkmm2.4-dev gtkmm2.4-shlibs �
       libtool14 libtool14-shlibs �
       libxml2 libxml2-shlibs �
       libsigc++2 libsigc++2-shlibs �
       popt popt-shlibs 
export CPPFLAGS=-I/sw/include
export LDFLAGS=-L/sw/lib
# Run ./autogen.sh here if things break below...
./configure --prefix=/sw
make
make install


-- Kees Cook

Since gc 6.4 is needed, once fink is updated, you can install: "fink install gc gc-shlibs", but until then, you'll need to compile it yourself. :(


Some packaging links: http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/

---

See the new Info.plist.in file in CVS, as well as packaging/osx-app.sh for building a .app directory. I have no idea what I'm doing, and I'm doing it blind, so any help is appreciated. I'm guessing at appropriate paths in src/path-prefix.h, which get activated with configure's --enable-osxapp now.

Also, we probably need to do all this stuff too: http://gimp-app.sourceforge.net/gimp.app.howto.txt




I have succesfully built Inkscape 0.40-1 via Fink under Mac OS X 10.3

After I have moved to "~/Desktop/Inkscape.app/Contents" following the way explained for the Gimp.app

The application lauches itself with a double-click and it is available there http://niwaconcept.free.fr//x11/Inkscape.zip

But if it can be stored there that would be better. The file is 60 Mb do dwnload, and then 280 Mb for the software itself.

M-Rick

upload:inkscape-0.40-2.jpg upload:inkscape-0.40-1.jpg


I've downloaded the zip and copied the resulting .app to /Applications.

Running it gives the following errors:

/Applications/Inkscape.app/Contents/MacOS robmyers$ ./Inkscape
dyld: ./Inkscape can't open library: /Volumes/Utilisateurs/Users/aymeric/Desktop/Gimp/ScriptExec/build/ScriptExec.build/ScriptExec.build/Objects-normal/ppc/libstdc++_ZeroLink.dylib  
(No such file or directory, errno = 2)
Trace/BPT trap

- robmyers .



Strange .... And it puts all the path of my computer ...

And scriptExec is the script used by gimp.app, once compiled it is said to change the name.

When I ran inkscape from my computer, I did from many locations and no problems, I will see I have errors feedbacks.

I am not specialized in programming so if someone wants to help no problem.

M-Rick


Ok it's done.


Anyway, there are a few bugs, also present in Fink :

Some menus appear behind the windows.

Impossible to export as bitmap, there is an error message "The chosen area to be exported is invalid" and I have it even if I change the path.

I made a DMG, you can download and test it there http://niwaconcept.free.fr//x11/Inkscape.zip

M-Rick


That works perfectly. And the .dmg window looks very good, it's a perfect Mac installer.

Thanks!

- robmyers .


Erk! But when I try it on a machine without Fink installed, I get the following error:

dyld: /Applications/Inkscape.app/Contents/Resources/bin/inkscape can't open library: /sw/lib/libgtkmm-2.4.1.dylib  (No such file or directory, errno = 2)

This despite the fact that libgtkmm is present in the Inkscape.app/Contents/Resources/lib/ directory.

- robmyers .



Yes, I just made an update for it. I tricked it, because it is looking for a sw folder, so i made a link to the software, just double-click it and and it will create it automatically for you, until I find the way to not have to do this.

M-Rick


Does Gimp.app do this? What happens if someone uses Fink and /sw already exists?

Downloading, running and installing, this now works after a couple of runs. Don't know if I was being impatient. :-)

- Inkscape MacOSX Testing Team (i.e. robmyers :-) ).



No Gimp.app doesn't do that. Inkscape does that because I haven't found yet the way it tries to find the share folder. If you already have Fink installed, well, it will not erase it just add the link.

Inkscape.app has a problem with the GTK pixmaps location, so I have made a script inside the software that will create a link automatically. So for the first launch, it is better to launch under an admin session. But if you have Fink already installed, it won't work unless you are root, so if you don't want to login as root, you can change the settings of the folders /sw and /sw/share to Group/Admin and Acces/Read and Write.

If someone finds the way to correct this, we won't have to do this trick anymore.

M-Rick


I think the program will need to add the pixmap location dynamically to $GTK_PATH on startup using setenv before starting Inkscape proper?

- robmyers .


I've installed inkscape.app. It works quite well on Japanese environment. "KANJI" can be used!

Ken

upload:japanese.jpg


I've installed it and it works. Very nice. The background image in the DMG is a nice touch, though you could maybe add the standard 'drag this icon to your applications folder' text to that. I still find Inkscape rather slow -- with the Windows version I assumed it was just a porting issue. Is the same true here? I have an SVG document with about 1000 objects. BTW, curious bug -- tooltips for floating palettes appear below them!