
As a happy user of the rpm system I find myself needing to bend apt-get's ear. On a Pi I got sick of having 3 versions of cpp so I just asked synaptic to remove the lot and then installed just 4.8. This worked fine except I found that I needed to make symbolic links from cpp to cpp-4.8 etc. I now need to install libtool but synaptic wants to also install cpp (-4.6) without an option. I figured I could tell apt-get to forget about cpp and just get on with it (ie --nodeps in rpm), but it doesn't seem to have such an option. I have hazy memories of hacking a file somewhere to make the problem go away by changing the cpp deps. Suggestions please.

On 22.11.14 22:56, Allan Duncan wrote:
I figured I could tell apt-get to forget about cpp and just get on with it (ie --nodeps in rpm), but it doesn't seem to have such an option.
Though using nothing else for the last decade or so, I haven't experienced apt-get insisting on an older version than is installed. Does the problem go away if your pre-installation of cpp 4.8 is also performed by apt-get, rather than some other application being used to confuse/corrupt knowledge of the installed base? What happens if you just apt-get install libtool, then apt-get install cpp? Even if the former installs cpp 4.6, then the latter will upgrade to 4.8, achieving the desired outcome, I figure. Erik -- Melbourne Water Use: "More water is lost to stormwater each year than we use. On average we use about 40 billion litres of water each year, and each year about 500 billion litres runs into our drains." Leonie Duncan, Environment Victoria healthy river campaigner, quoted on p7 of Journal 21.10.08. But what the heck, with the N-S Pipeline, we can take water from the foodbowl.

On 23/11/14 23:38, Erik Christiansen wrote:
On 22.11.14 22:56, Allan Duncan wrote:
I figured I could tell apt-get to forget about cpp and just get on with it (ie --nodeps in rpm), but it doesn't seem to have such an option.
Though using nothing else for the last decade or so, I haven't experienced apt-get insisting on an older version than is installed. Does the problem go away if your pre-installation of cpp 4.8 is also performed by apt-get, rather than some other application being used to confuse/corrupt knowledge of the installed base?
What happens if you just apt-get install libtool, then apt-get install cpp? Even if the former installs cpp 4.6, then the latter will upgrade to 4.8, achieving the desired outcome, I figure.
As far as I can tell -4.6 is the "official" cpp and the other ones are add-ons. I expected (erroneously) that installing -4.8 in isolation would do the symbolic links and advertise itself as cpp. All three are there in synaptic's table of available packages.

On 24/11/14 00:57, Allan Duncan wrote:
As far as I can tell -4.6 is the "official" cpp and the other ones are add-ons. I expected (erroneously) that installing -4.8 in isolation would do the symbolic links and advertise itself as cpp. All three are there in synaptic's table of available packages.
Debian generally makes the primary package (e.g., gcc) depend on a specific version, e.g., gcc-4.8. The apt-get show command should reveal the dependencies.

Allan Duncan <amd2345@fastmail.com.au> writes:
On a Pi I got sick of having 3 versions of cpp so I just asked synaptic to remove the lot and then installed just 4.8. This worked fine except I found that I needed to make symbolic links from cpp to cpp-4.8 etc.
I haven't bothered to check, but these are probably provided by the "cpp" package rather than the "cpp-4.N" package. The latter is versioned such that e.g. cpp=4:4.7.2-1 Depends on cpp-4.7.
I now need to install libtool but synaptic wants to also install cpp (-4.6) without an option.
I see that libtool depends on cpp, so tell your package manager to install the version of cpp that you want, not the version that is in your target release. e.g. bash4$ rmadison -aamd64 cpp debian: cpp | 4:4.4.5-1 | squeeze | amd64 cpp | 4:4.7.2-1 | wheezy | amd64 cpp | 4:4.9.1-5 | jessie | amd64 cpp | 4:4.9.2-1 | sid | amd64 new: So, apt-get install libtool cpp/jessie # or apt-get install libtool cpp=4:4.9.1-5 Presumably you're on raspbian, where this may not be an option. PS: mixing stable and testing is likely to break things. I recommend you use the default cpp that your release ships, and stop pining for newer versions.
I figured I could tell apt-get to forget about cpp and just get on with it (ie --nodeps in rpm), but it doesn't seem to have such an option.
apt corresponds to yum, not rpm. dpkg has corresponding --force-* commands. If you use them, you WILL blow your foot off.

On 24/11/14 14:48, Trent W. Buck wrote:
Allan Duncan <amd2345@fastmail.com.au> writes:
On a Pi I got sick of having 3 versions of cpp so I just asked synaptic to remove the lot and then installed just 4.8. This worked fine except I found that I needed to make symbolic links from cpp to cpp-4.8 etc.
I haven't bothered to check, but these are probably provided by the "cpp" package rather than the "cpp-4.N" package. The latter is versioned such that e.g. cpp=4:4.7.2-1 Depends on cpp-4.7.
I now need to install libtool but synaptic wants to also install cpp (-4.6) without an option.
I see that libtool depends on cpp, so tell your package manager to install the version of cpp that you want, not the version that is in your target release. e.g.
bash4$ rmadison -aamd64 cpp debian: cpp | 4:4.4.5-1 | squeeze | amd64 cpp | 4:4.7.2-1 | wheezy | amd64 cpp | 4:4.9.1-5 | jessie | amd64 cpp | 4:4.9.2-1 | sid | amd64 new:
So,
apt-get install libtool cpp/jessie # or apt-get install libtool cpp=4:4.9.1-5
Presumably you're on raspbian, where this may not be an option.
PS: mixing stable and testing is likely to break things.
I recommend you use the default cpp that your release ships, and stop pining for newer versions.
The only line in sources.list is deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi which I presumed was the stable line. It provides me with a choice of cpp -4.6, -4.7 and -4.8 I would prefer to run with 4.8 as I have it everywhere else.
I figured I could tell apt-get to forget about cpp and just get on with it (ie --nodeps in rpm), but it doesn't seem to have such an option.
apt corresponds to yum, not rpm. dpkg has corresponding --force-* commands. If you use them, you WILL blow your foot off.
My next attempt was to simply get the source and compile the package, but apt-get complained about no URI, even after I duped the above line and changed "deb" to "deb-src" like the man page example. Got the bits with a web browser instead and just need to work out how to do the build. I may still need to find and hack the data file on the packages to say the cpp-4.8 provides cpp or whatever debian parlance is.

Allan Duncan <amd2345@fastmail.com.au> writes:
So, apt-get install libtool cpp/jessie [...] Presumably you're on raspbian, where this may not be an option.
I recommend you use the default cpp that your release ships, and stop pining for newer versions.
[Raspbian wheezy] provides me with a choice of cpp -4.6, -4.7 and -4.8
It's providing cpp-4.8 but the standard cpp of raspbian wheezy is (apparently) 4.6, the same as Debian wheezy. Debian is not set up to allow you to *only install* 4.8 when the default is 4.6. AFAIK there is no standard way to make it the default, though I suppose you could do something like this in your .profile: export CC=gcc-4.8 CPP=cpp-4.8 CXX=g++-4.8 # et cetera If you're going to just override the symlinks provided by the metapackages (e.g. "cpp"), you'll want to dpkg-divert the originals away, otherwise a security upgrade will reset them.
I would prefer to run with 4.8 as I have it everywhere else.
IMO that is inadequate justification. If you really insist, try using equivs to lie to the package manager by providing a stub like Package: daft Section: metapackages Provides: cpp-4.6, gcc-4.6, g++-4.6 # et cetera I *think* it won't actively blow up in your face unless you are building kernel stuff (e.g. dkms), which AIUI is finicky about getting the same gcc stack throughout.

2014-11-25 1:31 GMT+01:00 Trent W. Buck <trentbuck@gmail.com>:
AFAIK there is no standard way to make it the default, though I suppose you could do something like this in your .profile:
Have a look to the command update-alternatives I'm not sure whether it is applicable to debian, but under Ubuntu it's the standard way to choose between multiple version of a package, when there are some. In my Ubuntu 12.04 the default compiler is 4.4, but I installed also 4.6. Then with command:
sudo update-alternatives --config gcc (or g++, or whatever) I can choose the version I prefer.
-- Mick

On 25/11/14 19:52, Michele Bert wrote:
2014-11-25 1:31 GMT+01:00 Trent W. Buck <trentbuck@gmail.com>:
AFAIK there is no standard way to make it the default, though I suppose you could do something like this in your .profile:
Have a look to the command update-alternatives I'm not sure whether it is applicable to debian, but under Ubuntu it's the standard way to choose between multiple version of a package, when there are some. In my Ubuntu 12.04 the default compiler is 4.4, but I installed also 4.6. Then with command:
sudo update-alternatives --config gcc (or g++, or whatever) I can choose the version I prefer.
Thanks. I'll look into that.

Michele Bert <micbert75@gmail.com> writes:
2014-11-25 1:31 GMT+01:00 Trent W. Buck <trentbuck@gmail.com>:
AFAIK there is no standard way to make it the default, though I suppose you could do something like this in your .profile:
Have a look to the command update-alternatives I'm not sure whether it is applicable to debian, but under Ubuntu it's the standard way to choose between multiple version of a package, when there are some. In my Ubuntu 12.04 the default compiler is 4.4, but I installed also 4.6. Then with command:
sudo update-alternatives --config gcc (or g++, or whatever) I can choose the version I prefer.
Ah, thanks. I was too lazy to check, and assumed the gcc stack was not set up for alternatives. Mea culpa.

On 25/11/14 18:23, Trent W. Buck wrote:
Michele Bert <micbert75@gmail.com> writes:
2014-11-25 1:31 GMT+01:00 Trent W. Buck <trentbuck@gmail.com>:
AFAIK there is no standard way to make it the default, though I suppose you could do something like this in your .profile: Have a look to the command update-alternatives I'm not sure whether it is applicable to debian, but under Ubuntu it's the standard way to choose between multiple version of a package, when there are some. In my Ubuntu 12.04 the default compiler is 4.4, but I installed also 4.6. Then with command: sudo update-alternatives --config gcc (or g++, or whatever)
Yes, this is entirely applicable to Debian - update-alternatives is the standard tool for this purpose in Debian, where it ORIGINATED.

On 26/11/14 12:56, Jason White wrote:
On 25/11/14 18:23, Trent W. Buck wrote:
Michele Bert <micbert75@gmail.com> writes:
2014-11-25 1:31 GMT+01:00 Trent W. Buck <trentbuck@gmail.com>:
AFAIK there is no standard way to make it the default, though I suppose you could do something like this in your .profile: Have a look to the command update-alternatives I'm not sure whether it is applicable to debian, but under Ubuntu it's the standard way to choose between multiple version of a package, when there are some. In my Ubuntu 12.04 the default compiler is 4.4, but I installed also 4.6. Then with command: sudo update-alternatives --config gcc (or g++, or whatever)
Yes, this is entirely applicable to Debian - update-alternatives is the standard tool for this purpose in Debian, where it ORIGINATED.
Fedora has "alternatives" instead, which is described in the man page as a functional drop-in of the debian "update-alternatives" rewriten to remove perl dependencies.
participants (5)
-
Allan Duncan
-
Erik Christiansen
-
Jason White
-
Michele Bert
-
trentbuck@gmail.com