[MacPorts] #52468: gtk3 3.22.0_0 build fails on 10.5 ppc
MacPorts
noreply at macports.org
Wed Oct 19 15:53:25 CEST 2016
#52468: gtk3 3.22.0_0 build fails on 10.5 ppc
-------------------------+-----------------------------
Reporter: dgonyier@… | Owner: devans@…
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.4
Resolution: | Keywords: leopard powerpc
Port: gtk3 |
-------------------------+-----------------------------
Comment (by ken.cunningham.webuse@…):
OK, Peter, I might be able to help you. I am not the world's expert on
macports, gcc, clang, or anything else, but this works for me here on my 6
functional PPC machines.
1. clang would not appear to be useful, at present, on PPC. Nobody on
Earth likely knows more about this than Jeremy, and that's what he says
above (comment 9). So I would suggest you uninstall your installations of
clang-3.3 and clang-3.4 and forget about them for the time being. Perhaps
smarter people than you and me might make clang-3.7 work on PPC one day.
Then we will all flock to it. Until then, clang on PPC is not appearing to
be an option to me at present.
2. look at your /opt/local/etc/macports/macports.conf file and make sure
you haven't messed with it at all. You want default values in there. If
you added anything, strongly consider deleting it.
3. clean out any partially-installed ports. Look in
/opt/local/var/macports/build to see if you have any left behind. `sudo
port clean` them.
4. now you need to decide what to do. (Unless you feel you really know
what you're doing, or are a glutton for punishment, I suggest you look
carefully at option a.)
a. '''Stick with ports that are known to work with the default toolchain
and hope for someone to fix clang-3.7 someday.''' This is safest, but you
won't be fully up-to-date with the world with every port, which may or may
not matter to you. If you decide to do this, set up a local repository for
ports (as I described in comment8 above). This takes 2 minutes to do. Move
the older portfile for gtk3 @3.20.9_0 into there, with it's folder
structure (gnome/gtk3). You are done. gtk3 will never again try to update.
All other ports will move along. As you come across ports that won't
update any longer, move them in there too. I have set up repositories like
this for Tiger, Leopard, and SnowLeopard, and shared them on github. You
can use mine if you want, or make your own.
b. '''Use the default toolchain for most things, but when a port like
gtk3 won't update, if you need the update, try a newer gcc'''. This works,
as above (comment 28). `$ sudo port -v install gtk3 configure.compiler
=macports-gcc-6` will force gtk3 to install using the compiler of your
choice, in this case gcc6. it will override any blacklisting in the
portfile. If it builds successfully, which it does in this case, you won't
know for certain if you might have a problem with c++ libraries. I
believe, actually, everything will probably usually work corrrectly, but I
know 0.01% of what Jeremy knows and he says you could have problems with
c++ libraries doing this. Basically they could speak slightly different
dialects. Some things may not interact correctly, even if they build
correctly. You'll have to test them yourself. You might have problems. You
might not.
c. '''use gcc6 to build mostly everything, but use the default toolchain
when gcc6 won't work'''. This would solve the dialect problem, if
everything built with gcc6. Most things do, as it turns out.
Unfortunately, q few ports do not. To do this, you either need to
uninstall all your ports and start over (yuck), or at least identify the
c++ ports (see comment 17 above) uninstall those, and proceed as below:
put this at the top of your /opt/local/etc/macports/macports.conf
{{{
cxx_stdlib macports-libstdc++
buildfromsource always
default_compilers macports-gcc-6 macports-gcc-5 macports-gcc-4.8
}}}
this will override any compiler selections in the portfile, and it
appears to override any blacklisting in the portfile as well and also,
somewhat surprisingly, it seems to override the cxx11 portgroup. It
'''just works'''. I haven't needed to touch a single portfile so far. Then
try to reinstall your uninstalled ports. Certain ports will not build.
When that happens, you might often find fixes in homebrew or on Google to
make gcc6 work, as usually many have been down this road before. It's
usually something simple, like better error checking in newer gcc versions
that you need to override. Sometimes it is not simple (like fancier
objective-c that gcc6 doesn't understand). In those cases, you need to
temporarily disable your default compiler like this:
{{{
cxx_stdlib macports-libstdc++
buildfromsource always
#default_compilers macports-gcc-6 macports-gcc-5 macports-gcc-4.8
}}}
build that one port that wouldn't build with gcc6 with the default
toolchain (which it will do automatically for your), and then remove that
# to re-enable your default compilers. Once again, the dialect problem
might occur if the port contains c++ code. You'll have to test it out.
Once again, I have never actually seen a problem doing this, but a problem
could happen.
--
Ticket URL: <https://trac.macports.org/ticket/52468#comment:45>
MacPorts <https://www.macports.org/>
Ports system for the Mac operating system
More information about the macports-tickets
mailing list