Hi Ryan, Thanks for that.
> Released versions of gcc are not fully compatible with Apple Silicon > processors. gcc12, when it is released, should be. Until gcc12 is released, > if you are using an Apple Silicon processor, you should use libgcc-devel > instead of libgcc. If you are using an Intel processor, I would not have > expected you to encounter any ports that require libgcc-devel. It’s a Silicon Mac. > Normally the way to switch from libgcc to libgcc-devel would be to forcibly > deactivate libgcc and then activate libgcc-devel. However you've encountered > a conflict with libgcc11. This seems wrong to me, so there may be a bug in > the ports. This problem has already been filed as > https://trac.macports.org/ticket/64878 but nobody has yet reacted to it. You > can try forcibly deactivating libgcc11 too, but I'm not certain that won't > break something else. I did deactivate libgcc11, but that did not create a conflict. Unfortunately I have nothing further to contribute to that bug. >> $ sudo port deactivate libgcc11 >> ---> Deactivating libgcc11 @11.2.0_1 >> ---> Cleaning libgcc11 OK, now that I deactivated libgcc (and libgcc11), activated libgcc-devel, and ran a port rev-upgrade without issues, my ports should be in a consistent state again, right? That means the issue with the broken jupyter-notebooks is unrelated, probably a bug of its own, but something that I avoided by changing my python version to 3.10, where everything works. Best, Peter -- Dr Peter Brommer Associate Professor | Warwick Centre for Predictive Modelling | School of Engineering | University of Warwick [email protected] | www.warwick.ac.uk/pbrommer | External: +44 (0) 24 7652 8613 | Internal: 28613 D2.08 | School of Engineering | Library Road | Coventry | CV4 7AL | United Kingdom PGP Key: 2048R/B6DEA483 | Fingerprint: 5B6F F30A 9999 79C0 16CD 939E B406 9D2A B6DE A483 I am a Rainbow Ally, see http://www.warwick.ac.uk/lgbtuasupporters - Pronouns: he/him > On 29 Mar 2022, at 21:26, Ryan Schmidt <[email protected]> wrote: > > On Mar 29, 2022, at 09:00, Peter Brommer wrote: > >> I somehow managed to shoot myself in the foot with an ill considered forced >> deactivate. A port upgrade outdated command would abort when it tried to >> install libgcc-devel. This must have been a new dependency of one of my >> installed ports (I would blame py39-scipy or py39-numpy, but I have no >> proof). >> >> ---> Computing dependencies for libgcc-devel >> Error: Can't install libgcc-devel because conflicting ports are active: >> libgcc >> Error: Problem while installing libgcc-devel >> >> I then forced the deactivation of libgcc: >> $ port deactivate libgcc >> Password: >> Note: It is not recommended to uninstall/deactivate a port that has >> dependents as it breaks the dependents. >> The following ports will break: >> fftw-3 @3.3.10_0 >> fftw-3 @3.3.10_0 >> py39-scipy @1.7.1_0 >> fftw @2.1.5_9 >> py39-numpy @1.21.3_0 >> gcc11 @11.2.0_1 >> netcdf-fortran @4.5.4_0 >> OpenBLAS @0.3.20_0 >> openmpi-default @4.1.2_0 >> openmpi-gcc11 @4.1.2_0 >> Continue? [y/N]: y >> Warning: Deactivate forced. Proceeding despite dependencies. >> ---> Deactivating libgcc @5.0_0 >> ---> Cleaning libgcc >> >> Then the activation of libgcc-devel failed: >> ---> Installing libgcc-devel @12-20220320_0+enable_stdlib_flag >> ---> Activating libgcc-devel @12-20220320_0+enable_stdlib_flag >> Error: Failed to activate libgcc-devel: Image error: >> /opt/local/include/gcc/c++/algorithm is being used by the active libgcc11 >> port. Please deactivate this port first, or use 'port -f activate >> libgcc-devel' to force the activation. >> Error: See >> /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc-devel/libgcc-devel/main.log >> for details. >> Error: Problem while installing libgcc-devel >> Error: Follow https://guide.macports.org/#project.tickets if you believe >> there is a bug. >> >> Which I again forced >> $ sudo port deactivate libgcc11 >> ---> Deactivating libgcc11 @11.2.0_1 >> ---> Cleaning libgcc11 >> >> Port upgrade outdated then completed without issue. But now I cannot >> reactivate libgcc >> $ sudo port activate libgcc >> Password: >> ---> Computing dependencies for libgcc >> Error: Can't install libgcc because conflicting ports are active: >> libgcc-devel >> Warning: Failed to execute portfile from registry for libgcc @5.0_0 >> ---> Activating libgcc @5.0_0 >> Error: port activate failed: Image error: /opt/local/share/doc/libgcc/README >> is being used by the active libgcc-devel port. Please deactivate this port >> first, or use 'port -f activate libgcc' to force the activation. >> $ sudo port deactivate libgcc-devel >> Note: It is not recommended to uninstall/deactivate a port that has >> dependents as it breaks the dependents. >> The following ports will break: >> py310-numpy @1.22.3_0 >> py310-scipy @1.8.0_0 >> py39-numpy @1.22.3_0 >> py39-scipy @1.8.0_0 >> Continue? [y/N]: n >> ---> Cleaning libgcc-devel >> >> Unfortunately now jupyter notebooks stopped working (which may or may not be >> related to the libgcc-devel matter): >> File >> "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbconvert/exporters/html.py", >> line 14, in <module> >> from jinja2 import contextfilter >> ImportError: cannot import name 'contextfilter' from 'jinja2' >> (/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jinja2/__init__.py) >> >> But now my question: How can I get a consistent set of modules and >> dependencies back? Or is my best bet upgrading to Monterey (currently on Big >> Sur), when I have to reinstall all modules anyway? > > Released versions of gcc are not fully compatible with Apple Silicon > processors. gcc12, when it is released, should be. Until gcc12 is released, > if you are using an Apple Silicon processor, you should use libgcc-devel > instead of libgcc. If you are using an Intel processor, I would not have > expected you to encounter any ports that require libgcc-devel. > > Normally the way to switch from libgcc to libgcc-devel would be to forcibly > deactivate libgcc and then activate libgcc-devel. However you've encountered > a conflict with libgcc11. This seems wrong to me, so there may be a bug in > the ports. This problem has already been filed as > https://trac.macports.org/ticket/64878 but nobody has yet reacted to it. You > can try forcibly deactivating libgcc11 too, but I'm not certain that won't > break something else. > > You may continue using Big Sur if you wish. Upgrading to Monterey will not > solve this problem. > > If you have been using libgcc-devel and wish to go back to using the stable > libgcc, you would forcibly deactivate libgcc-devel and then activate libgcc > (and, at the moment due to the bug you observed, libgcc11 as well). > >
