Opened 3 years ago
Closed 22 months ago
#64562 closed defect (worksforme)
"libgcc9 cannot be built while libunwind-headers is active." when migrating from Big Sur to Monterey
Reported by: | MarkCallow (Mark Callow) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | Cc: | mascguy (Christopher Nielsen) | |
Port: |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I am trying to migrate my ports from Big Sur to Monterey. I'm exactly following the migration guide. While running restore_ports.tcl
I get many instances of the subject error. The complete message is:
Error: libgcc9 cannot be built while libunwind-headers is active. Error: Please forcibly deactivate libunwind-headers, e.g. by running: Error: Error: sudo port -f deactivate libunwind-headers Error: Error: Then try again. You can reactivate libunwind-headers again later. Error: Failed to configure libgcc9: libunwind-headers is active Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/libgcc9/main.log for details.
I tried sudo port -f deactivate libunwind-headers
as suggested but the same thing happened next time I ran restore_ports.tcl
. I then found closed ticket 59344 and following its suggestion I did sync and clean as well:
mark:~ $ sudo port sync Password: ---> Updating the ports tree mark:~ $ sudo port -f deactivate libunwind-headers ---> Deactivating libunwind-headers @5.0.1_0 ---> Cleaning libunwind-headers mark:~ $ sudo port clean libgcc9 ---> Cleaning libgcc9 mark:~ $ sudo ./restore_ports.tcl myports.txt
But I still get the errors.
How can I migrate the affected ports?
Attachments (1)
Change History (14)
Changed 3 years ago by MarkCallow (Mark Callow)
comment:1 Changed 3 years ago by MarkCallow (Mark Callow)
Description: | modified (diff) |
---|
comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Priority: | High → Normal |
comment:3 Changed 3 years ago by kencu (Ken)
Try manually removing libunwind-headers
from myports.txt
, if it is listed there, then run the restore script again.
comment:4 Changed 3 years ago by MarkCallow (Mark Callow)
Try manually removing libunwind-headers from myports.txt, if it is listed there, then run the restore script again.
It was there. I removed it but I still get the same number of these errors.
comment:5 Changed 3 years ago by kencu (Ken)
the libunwind-headers are needed to build cctools.
After cctools is installed, libunwind-headers must be deactivated to install any of the newer gcc or libgcc versions.
the restore ports script knows nothing of this issue.
so you might need to do those manually, perhaps, if you’re in some kind of loop.
I can’t think of a way for the script to manage that nuance automatically, but perhaps you or someone else might.
comment:6 Changed 3 years ago by kencu (Ken)
I just recalled that we recently discovered a few ports that erroneously have a dependency added on libunwind.
until those are fixed, to remove the dep on libunwind, they might cause this too.
if you see any of these in your list, or libunwind of course, remove them too, and install them manually after the script is done.
apache-arrow fizz folly py37-pyarrow py38-pyarrow py39-pyarrow PDAL rspamd
comment:7 Changed 3 years ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|
comment:8 Changed 3 years ago by MarkCallow (Mark Callow)
It was there. I removed it but I still get the same number of these errors.
Correction. If I do
sudo port sync sudo port -f deactivate libunwind-headers sudo port clean libgcc9
after removing libunwind_headers
from myports.txt
then I do not get the unwind related errors. Instead every attempt to install libgcc9
fails when trying to link gencondmd.o with a bunch of "undefined symbols for architecture x86_64".
@kencu I don't have any of the items you listed but I will try installing cctools manually, removing it from myports.txt. I suspect it won't make any difference though.
comment:9 Changed 3 years ago by kencu (Ken)
well now, that is a totally different kind of error.
One thing about software distros -- there will always be another error (perhaps just not just yet).
So -- is the issue from this ticket (kinda) closed then?
Your build error with the genconmd.o
missing symbols is being tracked here #64316.
The best question to ask there is why on earth do you want libgcc9 anyways? (It's probably just a leftover from ancient days, and you can just delete that too from your list. Then port will install the current gcc setup, gcc11/libgcc11, which builds fine).
comment:10 Changed 3 years ago by kencu (Ken)
The restore ports script doesn't presently have the smarts to update your ports list to the current gcc versions.
I suspect you will get what you want if everywhere in your saved ports list where you see gcc9/libgcc9, change it to gcc11/libgcc11, which is supported on your system.
If you see any variants for your ports that have gcc9 in them, either delete that variant and see if it just works (best) or change it to gcc11 instead if that won't work for that port (second best).
comment:11 Changed 3 years ago by MarkCallow (Mark Callow)
There was only one occurrence of gcc9
in myports.txt
which was in the line for installing libgcc9. I deleted it but, even with that gone and gcc11 manually installed, there were still several attempts to install libgcc9 as a dependency. Bizarrely the source of that dependency appears to be libgcc8 and gcc8. I deleted libgcc8 and gcc8 from myports.txt
too and after that no more build problems. I finally have my ports migrated.
Thanks for your great help @kencu. The workaround you provided is sufficient. If there is nothing that can be done to restore_ports to help with the libunwind_headers issue then you may as well close this issue.
comment:12 Changed 3 years ago by kencu (Ken)
Great!
Some of these things are just hard to automate in a migration script because you have to guess what people really want.
It would be simple enough to blacklist a bunch of ports that will not be migrated… or automatically changed on migration.
Some would not like that, though…
comment:13 Changed 22 months ago by kencu (Ken)
Resolution: | → worksforme |
---|---|
Status: | new → closed |
nothing to fix here, in the end
Log file mendtioned in the error message.