Opened 6 years ago

Closed 6 years ago

#56921 closed defect (fixed)

libgcc8 and libgcc-devel conflict

Reported by: skymoo (Adam Mercer) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cjones051073 (Chris Jones)
Port: gcc8, libgcc8, libgcc-devel

Description

Trying to update my system after gcc8 was updated to 8.2.0 and it's failing to activate with:

Failed to activate libgcc8: Image error: /opt/local/include/gcc/c++/algorithm is being used by the active libgcc-devel port.  Please deactivate this port first, or use 'port -f activate libgcc8' to force the activation.

Full build log is attached.

Attachments (1)

main.log.xz (356.9 KB) - added by skymoo (Adam Mercer) 6 years ago.

Download all attachments as: .zip

Change History (13)

Changed 6 years ago by skymoo (Adam Mercer)

Attachment: main.log.xz added

comment:1 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: cjones051073 added

comment:2 Changed 6 years ago by cjones051073 (Chris Jones)

libgcc8 now provides the default gcc runtime, via libgcc. Both thus intentionally conflict with libgcc-devel which is now based on gcc9.

I suggest you (forcibly) uninstall your current gcc ports, then reinstall them back. If you want to be able to use gcc9 you will need to first install this, so that libgcc-devel is installed before libgcc is.

comment:3 Changed 6 years ago by cjones051073 (Chris Jones)

It appears your scenario was one the checks added to gcc8 did not catch. I just pushed

https://github.com/macports/macports-ports/commit/cb1dd1f3a6233a6c446ac2fd877035309e9d75ff

which should address this.

comment:4 in reply to:  2 ; Changed 6 years ago by skymoo (Adam Mercer)

Replying to cjones051073:

libgcc8 now provides the default gcc runtime, via libgcc. Both thus intentionally conflict with libgcc-devel which is now based on gcc9.

So we can no longer have the development version of gcc installed if we want stable versions as well?

I suggest you (forcibly) uninstall your current gcc ports, then reinstall them back. If you want to be able to use gcc9 you will need to first install this, so that libgcc-devel is installed before libgcc is.

That's what I currently have, I installed libgcc-devel and then the other gcc ports. libgcc-devel is updated before attempting to install gcc8. Also this seems to conflict with your first statement?

comment:5 in reply to:  4 Changed 6 years ago by cjones051073 (Chris Jones)

Replying to skymoo:

Replying to cjones051073:

libgcc8 now provides the default gcc runtime, via libgcc. Both thus intentionally conflict with libgcc-devel which is now based on gcc9.

So we can no longer have the development version of gcc installed if we want stable versions as well?

No. The situation is exactly the same as before. If you want the development gcc installed then you must have installed libgcc-devel instead of libgcc. If you do this, the ports that declare a dependency on libgcc will be satisfied.

I suggest you (forcibly) uninstall your current gcc ports, then reinstall them back. If you want to be able to use gcc9 you will need to first install this, so that libgcc-devel is installed before libgcc is.

That's what I currently have, I installed libgcc-devel and then the other gcc ports. libgcc-devel is updated before attempting to install gcc8. Also this seems to conflict with your first statement?

This is just a bug in the ports you have, that I fixed it the commit I referenced.

The reason for issue this is there is a slight rearrangement of what the various ports provide. For details see

https://github.com/macports/macports-ports/pull/2296

So there is a little bit of dancing I needed to do when upgrading. I just missed the scenario you have.

To fix the situation you now have, you need to just do the manual deactivation/activation. Or start again with your ports updated to include my latest fix.

comment:6 Changed 6 years ago by cjones051073 (Chris Jones)

Just to add, my last fix allows libgcc or libgcc-devel to be updated to the new libgcc + libgcc8 ports.

So if you previously had libgcc-devel (based on gcc8) installed you should, after this, have libgcc + libgcc8. If you then wish to have gcc9 installed, you will need to manually remove libgcc and replace it with libgcc-devel (as before).

comment:7 Changed 6 years ago by cjones051073 (Chris Jones)

I just noticed another small bug in the gcc8 port which had a hard dependency on libgcc8. This is wrong, it should just be a soft one one either libgcc or libgcc-devel. I just pushed another fix for this.

comment:8 Changed 6 years ago by skymoo (Adam Mercer)

Thanks, in the process of reinstalling my gcc ports so I'll let you know when the builds finish.

comment:9 Changed 6 years ago by cjones051073 (Chris Jones)

Are you building them from source ? Just installing via the binary tar balls should only take a few minutes.

comment:10 Changed 6 years ago by skymoo (Adam Mercer)

From source, I've got a pretty weird setup at the moment and need to build from source. I need to perform a reinstall at some point to get everything setup in a better way. It's on the TODO list.

comment:11 Changed 6 years ago by cjones051073 (Chris Jones)

Ah right.... You probably know this but gcc/libgcc are all mammoth builds... Each can easily take an hour or two, depending on your hardware.

comment:12 Changed 6 years ago by skymoo (Adam Mercer)

Resolution: fixed
Status: newclosed

That did the trick. Thanks!

Note: See TracTickets for help on using tickets.