#21955 closed defect (fixed)
gtkmm does not build
Reported by: | hwr@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.1 |
Keywords: | Cc: | pcmaniac@…, muchatel@…, laurent.perrinet@…, niels_seidel@…, dbevans (David B. Evans), francois.bodet@… | |
Port: | gtkmm |
Description (last modified by blb@…)
I was trying to build gobby, which failed because gtkmm failed to build on 10.6.1:
---> Building gtkmm Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_gtkmm/work/gtkmm-2.16.0" && /usr/bin/make -j2 all " returned error 2 Command output: /usr/bin/make all-recursive Making all in src make[4]: Nothing to be done for `all'. Making all in gdkmm Making all in private make[5]: Nothing to be done for `all'. make[5]: Nothing to be done for `all-am'. make[4]: Nothing to be done for `all-am'. Making all in gtk /usr/bin/make all-recursive Making all in src make[4]: Nothing to be done for `all'. Making all in gtkmm Making all in private make[5]: Nothing to be done for `all'. /bin/sh ../../libtool --tag=CXX --mode=compile /usr/bin/g++-4.2 -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"gtkmm\" -I../../gtk -I../../gtk -I../../pango -I../../pango -I../../atk -I../../atk -I../../gdk -I../../gdk -I../../gtk -I../../gtk -I/opt/local/include/glibmm-2.4 -I/opt/local/lib/glibmm-2.4/include -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/giomm-2.4 -I/opt/local/lib/giomm-2.4/include -I/opt/local/include/cairomm-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/opt/local/include/pangomm-1.4 -I/opt/local/include/pango-1.0 -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/gtk-unix-print-2.0 -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include -O2 -arch i386 -Wall -MT recentinfo.lo -MD -MP -MF .deps/recentinfo.Tpo -c -o recentinfo.lo recentinfo.cc /bin/sh ../../libtool --tag=CXX --mode=compile /usr/bin/g++-4.2 -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"gtkmm\" -I../../gtk -I../../gtk -I../../pango -I../../pango -I../../atk -I../../atk -I../../gdk -I../../gdk -I../../gtk -I../../gtk -I/opt/local/include/glibmm-2.4 -I/opt/local/lib/glibmm-2.4/include -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/giomm-2.4 -I/opt/local/lib/giomm-2.4/include -I/opt/local/include/cairomm-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/opt/local/include/pangomm-1.4 -I/opt/local/include/pango-1.0 -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/gtk-unix-print-2.0 -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include -O2 -arch i386 -Wall -MT ruler.lo -MD -MP -MF .deps/ruler.Tpo -c -o ruler.lo ruler.cc /usr/bin/g++-4.2 -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"gtkmm\" -I../../gtk -I../../gtk -I../../pango -I../../pango -I../../atk -I../../atk -I../../gdk -I../../gdk -I../../gtk -I../../gtk -I/opt/local/include/glibmm-2.4 -I/opt/local/lib/glibmm-2.4/include -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/giomm-2.4 -I/opt/local/lib/giomm-2.4/include -I/opt/local/include/cairomm-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/opt/local/include/pangomm-1.4 -I/opt/local/include/pango-1.0 -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/gtk-unix-print-2.0 -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include -O2 -arch i386 -Wall -MT recentinfo.lo -MD -MP -MF .deps/recentinfo.Tpo -c recentinfo.cc -fno-common -DPIC -o .libs/recentinfo.o /usr/bin/g++-4.2 -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"gtkmm\" -I../../gtk -I../../gtk -I../../pango -I../../pango -I../../atk -I../../atk -I../../gdk -I../../gdk -I../../gtk -I../../gtk -I/opt/local/include/glibmm-2.4 -I/opt/local/lib/glibmm-2.4/include -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/giomm-2.4 -I/opt/local/lib/giomm-2.4/include -I/opt/local/include/cairomm-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/opt/local/include/pangomm-1.4 -I/opt/local/include/pango-1.0 -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/gtk-unix-print-2.0 -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include -O2 -arch i386 -Wall -MT ruler.lo -MD -MP -MF .deps/ruler.Tpo -c ruler.cc -fno-common -DPIC -o .libs/ruler.o recentinfo.cc: In member function 'bool Gtk::RecentInfo::get_application_info(const Glib::ustring&, Glib::StringArrayHandle&, guint&, time_t&) const': recentinfo.cc:192: error: invalid conversion from 'gchar**' to 'const gchar**' recentinfo.cc:192: error: initializing argument 3 of 'gboolean gtk_recent_info_get_application_info(GtkRecentInfo*, const gchar*, const gchar**, guint*, time_t*)' make[5]: *** [recentinfo.lo] Error 1 make[5]: *** Waiting for unfinished jobs.... mv -f .deps/ruler.Tpo .deps/ruler.Plo make[4]: *** [all-recursive] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Error: The following dependencies failed to build: gtkmm gtksourceview2 libgnomecups libxmlxx2 net6 gnutls libgcrypt libgpg-error libtasn1 lzo opencdk obby avahi dbus dbus-glib dbus-python25 py25-gobject python25 py25-numeric libdaemon libglade2 py25-gtk py25-cairo py25-numpy fftw-3 py25-nose py25-setuptools Error: Status 1 encountered during processing.
Attachments (3)
Change History (21)
comment:1 Changed 15 years ago by blb@…
Description: | modified (diff) |
---|---|
Keywords: | snowleopard added |
Owner: | changed from macports-tickets@… to devans@… |
Port: | gtkmm added |
comment:2 Changed 15 years ago by pcmaniac@…
Cc: | pcmaniac@… added |
---|
comment:3 Changed 15 years ago by pcmaniac@…
it fails for me too, on 10.5.8 exactly the same error messages
comment:5 Changed 15 years ago by autoverkauf@…
It's maybe a problem with gtkmm 2.16.0 -Y see simular problem here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549430
comment:6 Changed 15 years ago by jmroot (Joshua Root)
Keywords: | snowleopard removed |
---|---|
Summary: | gtkmm does not build on 10.6.1 → gtkmm does not build |
Changed 15 years ago by muchatel@…
Attachment: | Portfile-gtkmm.diff added |
---|
Changed 15 years ago by muchatel@…
Attachment: | Portfile-glibmm.diff added |
---|
Changed 15 years ago by muchatel@…
Attachment: | Portfile-pangomm.diff added |
---|
comment:8 Changed 15 years ago by muchatel@…
I confirm that it is the problem with old version of gtkmm. Upgrade to the newest version solves the problem (see attached patch files to relevant Portfiles)
comment:9 Changed 15 years ago by WolfgangFahl (Wolfgang Fahl)
I'd be glad to find a pointer how to upgrade here. The attached diff files above are in HTML format and there is no information here what to do with these. Sorry that I'm asking for something which is probably considered common knowledge here.
comment:10 Changed 15 years ago by WolfgangFahl (Wolfgang Fahl)
Ok here is a script for start (at least I found out what the small gray icon close to the link is for). What needs to be done after downloading the patch files?
# # apply diff patches of macports ticket #21955 # # install wget (if not done yet) sudo port install wget # base url for the three attachments base="https://trac.macports.org/raw-attachment/ticket/21955" # example url # https://trac.macports.org/raw-attachment/ticket/21955/Portfile-glibmm.diff # get the three libraries for lib in gtkmm glibmm pangomm do
patch=Portfile-$lib.diff if [ -f $patch ] then
echo "portfile patch $patch already downloaded"
else
echo "getting portfile patch $patch" wget --no-check-certificate $base/$patch
fi locate $lib | grep Portfile | grep -v old
done
comment:11 Changed 15 years ago by WolfgangFahl (Wolfgang Fahl)
# # apply diff patches of macports ticket #21955 # # install wget (if not done yet) sudo port install wget # base url for the three attachments base="https://trac.macports.org/raw-attachment/ticket/21955" # example url # https://trac.macports.org/raw-attachment/ticket/21955/Portfile-glibmm.diff # get the three libraries for lib in gtkmm glibmm pangomm do patch=Portfile-$lib.diff if [ -f $patch ] then echo "portfile patch $patch already downloaded" else echo "getting portfile patch $patch" wget --no-check-certificate $base/$patch fi locate $lib | grep Portfile | grep -v old done
comment:12 Changed 15 years ago by WolfgangFahl (Wolfgang Fahl)
Some investigation later this script seems to work. May be this could be a basis for getting similar tickets applied for novices and other people:
# # apply diff patches of macports ticket #21955 # author wf (contact via http://www.bitplan.com) # 2009-10-22 # License: Public domain # # check the availability of a user specific Local Portfile repository # see 4.6 of http://guide.macports.org # checksourcesconf() { # get the sources conf echo "looking for sources.conf .." sourcesconf=`locate macports/sources.conf` echo "found $sourcesconf" echo "looking for local portfile repository in $HOME" localrep=`grep $HOME $sourcesconf` echo "found $localrep" expectedrep="file://"$HOME"/ports" if [ "$localrep" = "$expectedrep" ] then echo "good ..." else echo "you might want to add $expectedrep to $sourcesconf as outlined in 4.6 Local Portfile Repositories of http://guide.macports.org" exit 1 fi } # # get the relative path of a portfile starting from "release" e.g. # getRelativePath() { # get relative path echo $1 | awk ' # split with path separator BEGIN { FS="/";docollect=0 } { # loop over path parts for (i=1;i<NF;i++) { # when collection is active if (docollect) { path=path delim $i delim="/" } if ($i=="release") docollect=1 } print path }' } # do we have a local portfile repository? checksourcesconf # install wget (if not done yet) echo "installing wget with sudo port install wget" sudo port install wget # base url for the three attachments base="https://trac.macports.org/raw-attachment/ticket/21955" # get the current directory current=`pwd` # example url # https://trac.macports.org/raw-attachment/ticket/21955/Portfile-glibmm.diff # get the three libraries for lib in gtkmm glibmm pangomm do # go back to directory where we started cd $current # the patch file we are looking for patch=Portfile-$lib.diff # check whether it's already there if [ -f $patch ] then echo "portfile patch $patch already downloaded" else echo "getting portfile patch $patch" wget --no-check-certificate $base/$patch fi # apply patch to the given portfile by putting the patch # in the local repository # get the portfile portfile=`locate $lib/Portfile | grep -v old` # if we found a portfile if [ "$portfile" = "" ] then echo "could not find original portfile for $lib" else echo "extracting relative path from $portfile" relpath=`getRelativePath $portfile` echo "found $relpath" echo "creating $relpath in $HOME if it does not exist yet" if [ -d $HOME/$relpath ] then echo "$HOME/relpath already exists ... good" else echo "creating local repository path $relpath" mkdir -p $HOME/$relpath fi # copy the portfile and patch file echo "preparing patch of portfile for $lib" cp $portfile $HOME/$relpath cp $current/$patch $HOME/$relpath echo "patching portfile for $lib" cd $HOME/$relpath patch Portfile $patch echo "you may later try to install $lib with sudo port install $lib" fi done # recreate ports index echo "recreating ports index" cd $HOME/ports portindex # finished
comment:13 Changed 15 years ago by WolfgangFahl (Wolfgang Fahl)
your might want to do a
sudo /usr/libexec/locate.updatedb
before using the script above if you updated macports recently since the updatedb script only runs weekly by default and the locate command might not find all your Portfiles
also "grep -h" might be necessary in the checksourcesconf() section
comment:14 Changed 15 years ago by someuser12
I suggest the following changes (improvements?) to the script above:
- use portfile=
port file $lib
instead of portfile=locate $lib/Portfile | grep -v old
(then, there is no need to rebuild the locate database since we don't use locate)
- do not use locate to find the sources.conf file, but rather some trick like:
portprefix=
port dir wget | sed -e 's/var\/macports\/sources.*//'
sourcesconf=$portprefix/etc/macports/sources.conf
(and make sure wget is installed before calling checksourcesconf() )
Indeed, if there are several versions of Mac OS X on the hard disk (say 10.4 and 10.5), using locate we are going to find the sources.conf file of the first one, which might not be the running one (I had the problem). I think the trick hereabove is more robust.
By the way, suggestion for the maintainers of MacPorts: give a way to get the prefix from the port command (something like "port prefix" would return "/opt/local") or, maybe better, add a command like "echo" that expands the global TCL variables used in portfiles instead of the pseudoports (if this command is "tclexpand", then "port tclexpand '$prefix'" would return "/opt/local").
- do not assume that the local repository is in $HOME but read the sources.conf file to find where it is (and complains if there is none, as did the script). The best would be to check all local repositories listed in sources.conf and see if there is one where the user has write access but... Here we assume there is only one.
- accordingly, make all operations (cp, patch, and so on) in $localrep instead of explicitly using $HOME .
Then, the script looks like:
#!/bin/sh # # apply diff patches of macports ticket #21955 # author wf (contact via http://www.bitplan.com) # 2009-10-22 # License: Public domain # # check the availability of a user specific Local Portfile repository # see 4.6 of http://guide.macports.org # checksourcesconf() { # get the sources conf echo "looking for sources.conf .." portprefix=`port dir wget | sed -e 's/var\/macports\/sources.*//'` sourcesconf=$portprefix/etc/macports/sources.conf echo "found $sourcesconf" echo "looking for local portfile repository" localrep=`grep ^file:// $sourcesconf | sed -e 's/^file:\/\///'` echo "found $localrep" if [ "$localrep" = "" ] then echo "you might want to add $HOME/ to $sourcesconf as outlined in 4.6 Local Portfile Repositories of http://guide.macports.org" exit 1 else echo "good ..." fi } # # get the relative path of a portfile starting from "release" e.g. # getRelativePath() { # get relative path echo $1 | awk ' # split with path separator BEGIN { FS="/";docollect=0 } { # loop over path parts for (i=1;i<NF;i++) { # when collection is active if (docollect) { path=path delim $i delim="/" } if ($i=="ports") docollect=1 } print path }' } # install wget (if not done yet) echo "installing wget with sudo port install wget" sudo port install wget # do we have a local portfile repository? checksourcesconf # base url for the three attachments base="https://trac.macports.org/raw-attachment/ticket/21955" # get the current directory current=`pwd` # example url # https://trac.macports.org/raw-attachment/ticket/21955/Portfile-glibmm.diff # get the three libraries for lib in gtkmm glibmm pangomm do # go back to directory where we started cd $current # the patch file we are looking for patch=Portfile-$lib.diff # check whether it's already there if [ -f $patch ] then echo "portfile patch $patch already downloaded" else echo "getting portfile patch $patch" wget --no-check-certificate $base/$patch fi # apply patch to the given portfile by putting the patch # in the local repository # get the portfile portfile=`port file $lib` # if we found a portfile if [ "$portfile" = "" ] then echo "could not find original portfile for $lib" else echo "extracting relative path from $portfile" relpath=`getRelativePath $portfile` echo "found $relpath" echo "creating $relpath in $localrep if it does not exist yet" if [ -d $localrep/$relpath ] then echo "$localrep/relpath already exists ... good" else echo "creating local repository path $relpath" mkdir -p $localrep/$relpath fi # copy the portfile and patch file echo "preparing patch of portfile for $lib" cp $portfile $localrep/$relpath cp $current/$patch $localrep/$relpath echo "patching portfile for $lib" cd $localrep/$relpath patch Portfile $patch echo "you may later try to install $lib with sudo port install $lib" fi done # recreate ports index echo "recreating ports index from repository $localrep" cd $localrep portindex cd $current # finished
comment:15 Changed 15 years ago by mf2k (Frank Schima)
Cc: | niels_seidel@… added |
---|
Cc reporter of duplicate #22239.
comment:16 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | devans@… added |
---|---|
Owner: | changed from devans@… to ryandesign@… |
Status: | new → assigned |
comment:17 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:18 Changed 15 years ago by mf2k (Frank Schima)
Cc: | francois.bodet@… added |
---|
Cc reporter of dup #22277.
Cc Me!