libgcc, libgcc-devel mixup - recover how?

2022-03-29 Thread Peter Brommer via macports-users
Hi all,

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 
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?

Best,

Peter 

Re: libgcc, libgcc-devel mixup - recover how?

2022-03-29 Thread Ryan Schmidt
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 
> 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).




Re: port diagnose and xcode

2022-03-29 Thread Ryan Schmidt
On Mar 27, 2022, at 13:06, Richard L. Hamilton wrote:
> 
> (although I think Apple provides the servers)

Apple provided the servers from late 2006 [1] (when our first home OpenDarwin 
closed its doors) until late 2016 [2] (when Apple's macOS forge service shut 
down). Since then, we have used GitHub and provided our own servers.

[1] 
https://web.archive.org/web/20070315221536/http://darwinports.opendarwin.org/archives.php?id=36

[2] https://lists.macports.org/pipermail/macports-dev/2016-August/033405.html



Re: Older versions of python

2022-03-29 Thread Ryan Schmidt
On Mar 27, 2022, at 12:48, dan d. wrote:

> Can one delete older python versions then the current python10?  Do some 
> ports anticipate an older version?

You can uninstall any ports you no longer need or want to have installed. If 
any installed ports still declare dependencies on them, MacPorts will notify 
you of this and prevent you from uninstalling them.

As of January 2022, we would like ports to use python310 if possible. Not all 
ports have been updated to do so yet. If you find some that have not yet 
updated, you can file tickets or pull requests.



Re: #64896: gcc and gcc-devel run fails libSystem.B.dylib not found

2022-03-29 Thread Alan Needleman
Thank you very much for your response.

I apologize for being imprecise.

1. The computer is a 2020 MacBook Air m1 and the operating system is MacOS 
12.3. However, I have the same problem on a 2013 Intel MacBook Pro running 
MacOS 11.6.5.

2. The code is a Fortran code that I compiled using gfortran. The code solves 
partial differential equations for scientific modeling.

3. The basic problem is that the code has large static arrays so the static 
storage exceeds 4 GBytes. It seems odd to me that a modern 64bit computer and 
operating system is limited to 32bit addressing for arrays.

4. I had found the URLs you listed in your email but I didn’t find them 
helpful. That could certainly be because I didn’t fully understand them. My 
limitation.

Many thanks for your reply anyway. Much appreciated.

Best regards.

Alan

> #64896: gcc and gcc-devel run fails libSystem.B.dylib not found
> -+
> Reporter: AlanTAMU | Owner: (none)
> Type: defect | Status: new
> Priority: Normal | Milestone:
> Component: ports | Version:
> Resolution: | Keywords:
> Port: ggc, gcc-devel |
> -+
> Changes (by ryandesign):
> 
> * keywords: libSystem.B.dylib =>
> 
> 
> Old description:
> 
>> dyld[93269]: dyld cache '/System/Library/dyld/dyld_shared_cache_arm64e'
>> not loaded: syscall to map cache into shared region failed
>> dyld[93269]: Library not loaded: /usr/lib/libSystem.B.dylib
>> Referenced from: /Users/alan/bench/lapack-test/a.out
>> Reason: tried: '/usr/lib/libSystem.B.dylib' (no such file),
>> '/usr/local/lib/libSystem.B.dylib' (no such file)
> 
> New description:
> 
> {{{
> dyld[93269]: dyld cache '/System/Library/dyld/dyld_shared_cache_arm64e'
> not loaded: syscall to map cache into shared region failed
> dyld[93269]: Library not loaded: /usr/lib/libSystem.B.dylib
> Referenced from: /Users/alan/bench/lapack-test/a.out
> Reason: tried: '/usr/lib/libSystem.B.dylib' (no such file),
> '/usr/local/lib/libSystem.B.dylib' (no such file)
> }}}
> 
> --

> 
> What version of macOS? What version of Xcode? What computer? Have you
> searched for this error message? Here are some results I found; maybe they
> are relevant to you:
> 
> * https://developer.apple.com/forums/thread/697494
> * https://developer.apple.com/forums/thread/669533
> 
> -- 
> Ticket URL: 
> MacPorts 
> Ports system for macOS


Alan Needleman
alan6...@gmail.com







Re: Re: #64896: gcc and gcc-devel run fails libSystem.B.dylib not found

2022-03-29 Thread Christopher Chavez
MacPorts’ Trac instance does not support commenting via email; by default, 
replying to an email notification from Trac will post to the macports-users 
list. I commented on the ticket with your response quoted: 
https://trac.macports.org/ticket/64896#comment:2

> Sent: Wednesday, March 30, 2022 at 3:19 AM
> From: "Alan Needleman" 
> To: macports-users@lists.macports.org
> Subject: Re: #64896: gcc and gcc-devel run fails libSystem.B.dylib not found
> 
> Thank you very much for your response.
> 
> I apologize for being imprecise.
> 
> 1. The computer is a 2020 MacBook Air m1 and the operating system is MacOS 
> 12.3. However, I have the same problem on a 2013 Intel MacBook Pro running 
> MacOS 11.6.5.
> 
> 2. The code is a Fortran code that I compiled using gfortran. The code solves 
> partial differential equations for scientific modeling.
> 
> 3. The basic problem is that the code has large static arrays so the static 
> storage exceeds 4 GBytes. It seems odd to me that a modern 64bit computer and 
> operating system is limited to 32bit addressing for arrays.
> 
> 4. I had found the URLs you listed in your email but I didn’t find them 
> helpful. That could certainly be because I didn’t fully understand them. My 
> limitation.
> 
> Many thanks for your reply anyway. Much appreciated.
> 
> Best regards.
> 
> Alan
> 
> > #64896: gcc and gcc-devel run fails libSystem.B.dylib not found
> > -+
> > Reporter: AlanTAMU | Owner: (none)
> > Type: defect | Status: new
> > Priority: Normal | Milestone:
> > Component: ports | Version:
> > Resolution: | Keywords:
> > Port: ggc, gcc-devel |
> > -+
> > Changes (by ryandesign):
> > 
> > * keywords: libSystem.B.dylib =>
> > 
> > 
> > Old description:
> > 
> >> dyld[93269]: dyld cache '/System/Library/dyld/dyld_shared_cache_arm64e'
> >> not loaded: syscall to map cache into shared region failed
> >> dyld[93269]: Library not loaded: /usr/lib/libSystem.B.dylib
> >> Referenced from: /Users/alan/bench/lapack-test/a.out
> >> Reason: tried: '/usr/lib/libSystem.B.dylib' (no such file),
> >> '/usr/local/lib/libSystem.B.dylib' (no such file)
> > 
> > New description:
> > 
> > {{{
> > dyld[93269]: dyld cache '/System/Library/dyld/dyld_shared_cache_arm64e'
> > not loaded: syscall to map cache into shared region failed
> > dyld[93269]: Library not loaded: /usr/lib/libSystem.B.dylib
> > Referenced from: /Users/alan/bench/lapack-test/a.out
> > Reason: tried: '/usr/lib/libSystem.B.dylib' (no such file),
> > '/usr/local/lib/libSystem.B.dylib' (no such file)
> > }}}
> > 
> > --
> 
> > 
> > What version of macOS? What version of Xcode? What computer? Have you
> > searched for this error message? Here are some results I found; maybe they
> > are relevant to you:
> > 
> > * https://developer.apple.com/forums/thread/697494
> > * https://developer.apple.com/forums/thread/669533
> > 
> > -- 
> > Ticket URL: 
> > MacPorts 
> > Ports system for macOS
> 
> 
> Alan Needleman
> alan6...@gmail.com
> 
> 
> 
> 
>