Re: compiling ArcticFox on 10.11 - atomic not found, cxx11

2023-04-15 Thread Ken Cunningham
$ cat atomic.cxx
#include 
int main(void) {
return (0);
}

$ clang++-mp-9.0 -stdlib=libstdc++ atomic.cxx
atomic.cxx:1:10: fatal error: 'atomic' file not found
#include 
^~~~
1 error generated.


$ clang++-mp-9.0 -stdlib=macports-libstdc++ atomic.cxx


h$ clang++-mp-9.0 -stdlib=libc++  atomic.cxx






Re: off-topic question: Apple open command and/or apps in /Applications are half-broken now

2023-04-15 Thread Kenneth Wolcott
Hi Richard;

  Thank you so much for your very helpful assistance.  Between what
your wrote and the article you referred me to, I did the following
command, which seemed to work for Preview and Reader apps, but not
Highlight (another pdf app), I'm not sure why.  I will continue to
experiment and apply.

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
-kill -r -v -apps u

I'll try to apply your suggestions on how to refer to applications using open.

Thanks,
Ken

On Sat, Apr 15, 2023 at 2:12 PM Richard L. Hamilton  wrote:
>
>
>
> On Apr 15, 2023, at 15:57, Kenneth Wolcott  wrote:
>
> Hi;
>
> off-topic question: Apple open command and/or apps in /Applications
> are half-broken now
>
> I'm asking the question here because I think that there are lots of
> people who might know either the answer to my question and/or can help
> me find the answer by describing my problem more accurately/precisely.
>
>  I don't think anything MacPorts did to my Mac via a port
> installation caused this problem.
>
>  The problem:
>
> example problem:
>
> /usr/bin/open -F -a /Applications/Reader.app/Contents/MacOS/Reader 
> some_file.pdf
>
>
> The usual way is NOT to give the binary to "open", but the app name (without 
> path or .app suffix if there's only one match among the places apps are 
> searched for, but you might need the suffix if you give a full path, and if 
> there's spaces or other problematic characters in the name, you need to quote 
> the app name or full path of the app bundle), like this:
>
> /usr/bin/open -F -a Reader
> or
> /usr/bin/open -F -a /Applications/Reader.app
>
> Whatever library call "open" uses knows about the structure of app bundles 
> and how to find the binary and how to invoke it correctly.
>
> Have you tried rebuilding the launch services database? Sometimes it gets 
> screwed up, which causes problems launching applications correctly. Google 
> for that phrase, or here's one reasonably good description:
> https://eclecticlight.co/2017/08/11/launch-services-database-problems-correcting-and-rebuilding/
>
> Note that the details may depend on your OS version; I don't have handy nor 
> can quickly find a list of OS versions and the exact command(s) for each one, 
> but you should be able to figure it out. I do have two versions in scripts, 
> the older one
>
> sudo 
> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
>  -kill -r -domain local -domain system -domain user
>
> and the newer one
>
> /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
>  -kill -r -domain local -domain system -domain user
>
> The longer path is the real one, but at least on non-ancient macOS versions 
> there's a symlink, so either will work. I don't recall whether the sudo was 
> necessary more recently, either (maybe never, I don't know).
>
> I don't think lsregister does the work itself, but it communicates what to do 
> to another process (one or more of the instances of lsd? of which there's one 
> as root, one for the logged in user, and maybe others left over for other 
> user ids that have used launch services). That implies that the reset of the 
> per user data only applies to the current user.
>
> There's no man page, but running the lsregister command without arguments 
> gives a usage message. On Monterey,
>
> sh-3.2$ 
> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
> lsregister: [OPTIONS] [ ... ]
>   [ -apps [,domain]... ]
>   [ -libs [,domain]... ]
>   [ -all  [,domain]... ]
>
> Paths are searched for applications to register with the Launch Service 
> database.
> Valid domains are "system", "local", "network" and "user". Domains can also
> be specified using only the first letter.
>
>   -delete   Delete the Launch Services database file. You must then 
> reboot!
>   -kill Reset the Launch Services database before doing anything else
>   -seed If database isn't seeded, scan default locations for 
> applications and libraries to register
>   -lint Print information about plist errors while registering bundles
>   -lazy n   Sleep for n seconds before registering/scanning
>   -rRecursive directory scan, do not recurse into packages or 
> invisible directories
>   -RRecursive directory scan, descending into packages and 
> invisible directories
>   -fforce-update registration even if mod date is unchanged
>   -uunregister instead of register
>   -vDisplay progress information
>   -gc   Garbage collect old data and compact the database
>   -dump [table] Display full database contents after registration
>   -hDisplay this help
>
> With -dump you can get a 

Re: off-topic question: Apple open command and/or apps in /Applications are half-broken now

2023-04-15 Thread Richard L. Hamilton


> On Apr 15, 2023, at 15:57, Kenneth Wolcott  wrote:
> 
> Hi;
> 
> off-topic question: Apple open command and/or apps in /Applications
> are half-broken now
> 
> I'm asking the question here because I think that there are lots of
> people who might know either the answer to my question and/or can help
> me find the answer by describing my problem more accurately/precisely.
> 
>  I don't think anything MacPorts did to my Mac via a port
> installation caused this problem.
> 
>  The problem:
> 
> example problem:
> 
> /usr/bin/open -F -a /Applications/Reader.app/Contents/MacOS/Reader 
> some_file.pdf

The usual way is NOT to give the binary to "open", but the app name (without 
path or .app suffix if there's only one match among the places apps are 
searched for, but you might need the suffix if you give a full path, and if 
there's spaces or other problematic characters in the name, you need to quote 
the app name or full path of the app bundle), like this:

/usr/bin/open -F -a Reader
or
/usr/bin/open -F -a /Applications/Reader.app

Whatever library call "open" uses knows about the structure of app bundles and 
how to find the binary and how to invoke it correctly.

Have you tried rebuilding the launch services database? Sometimes it gets 
screwed up, which causes problems launching applications correctly. Google for 
that phrase, or here's one reasonably good description:
https://eclecticlight.co/2017/08/11/launch-services-database-problems-correcting-and-rebuilding/
 


Note that the details may depend on your OS version; I don't have handy nor can 
quickly find a list of OS versions and the exact command(s) for each one, but 
you should be able to figure it out. I do have two versions in scripts, the 
older one

sudo 
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
 -kill -r -domain local -domain system -domain user

and the newer one

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
 -kill -r -domain local -domain system -domain user

The longer path is the real one, but at least on non-ancient macOS versions 
there's a symlink, so either will work. I don't recall whether the sudo was 
necessary more recently, either (maybe never, I don't know).

I don't think lsregister does the work itself, but it communicates what to do 
to another process (one or more of the instances of lsd? of which there's one 
as root, one for the logged in user, and maybe others left over for other user 
ids that have used launch services). That implies that the reset of the per 
user data only applies to the current user.

There's no man page, but running the lsregister command without arguments gives 
a usage message. On Monterey,

sh-3.2$ 
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
lsregister: [OPTIONS] [ ... ]
  [ -apps [,domain]... ]
  [ -libs [,domain]... ]
  [ -all  [,domain]... ]

Paths are searched for applications to register with the Launch Service 
database.
Valid domains are "system", "local", "network" and "user". Domains can also
be specified using only the first letter.

  -delete   Delete the Launch Services database file. You must then reboot!
  -kill Reset the Launch Services database before doing anything else
  -seed If database isn't seeded, scan default locations for 
applications and libraries to register
  -lint Print information about plist errors while registering bundles
  -lazy n   Sleep for n seconds before registering/scanning
  -rRecursive directory scan, do not recurse into packages or 
invisible directories
  -RRecursive directory scan, descending into packages and 
invisible directories
  -fforce-update registration even if mod date is unchanged
  -uunregister instead of register
  -vDisplay progress information
  -gc   Garbage collect old data and compact the database
  -dump [table] Display full database contents after registration
  -hDisplay this help

With -dump you can get a dump of the database in textual form; it's huge and 
may be tricky to parse, but if you're geeky enough it might be interesting. You 
can dig out the version of a particular app, for instance.



Re: off-topic question: Apple open command and/or apps in /Applications are half-broken now

2023-04-15 Thread Kenneth Wolcott
Hi;

  I tried open with a specific pdf file, without -F and without -a,
and it eventually opened Preview with an error message that didn't
make sense to me (insufficient permissions for reading for a file
which I had specified a couple of hours previously, it was 644), but
when I clicked ok to proceed, it went on to display the file I asked
for.

  I so I tried this again with a different pdf file and it displayed
the previous pdf file I requested, but not the current file I
requested.  Since I suspected that it opened both files (since I had
not specified -F), I tried to find a Preview tab for the other file.
The second file did not exist in Preview display since there was only
one instance of Preview running (that I could see) and it did not have
any tabs.

  So, something is definitely broken here, but no clue what it is.

Thanks,
Ken

On Sat, Apr 15, 2023 at 1:10 PM chilli.names...@gmail.com
 wrote:
>
> What happens with
>
> /usr/bin/open some_file.pdf
>
> ?
>
> > On Apr 15, 2023, at 15:57, Kenneth Wolcott  wrote:
> >
> > Hi;
> >
> > off-topic question: Apple open command and/or apps in /Applications
> > are half-broken now
> >
> > I'm asking the question here because I think that there are lots of
> > people who might know either the answer to my question and/or can help
> > me find the answer by describing my problem more accurately/precisely.
> >
> >  I don't think anything MacPorts did to my Mac via a port
> > installation caused this problem.
> >
> >  The problem:
> >
> > example problem:
> >
> > /usr/bin/open -F -a /Applications/Reader.app/Contents/MacOS/Reader 
> > some_file.pdf
> >
> > The Reader app comes up to the Dock but does not display the file, and no 
> > error.
> >
> > example problem variant:
> >
> > /Applications/Reader.app/Contents/MacOS/Reader some_file.pdf
> >
> > Same result.
> >
> > This happens with other applications which I routinely use the open
> > command (in a script) to display files.
> >
> > Uninstalling the app and re-installing seems to have no effect.
> >
> > Rebooting does not change the problem behavior.
> >
> > I experienced this problem just recently.
> >
> > The problem did not appear right after the last time that I updated
> > the MacOS via announced patch from Apple.
> >
> > When I launch Reader from the LaunchPad and use the file->open dialog
> > to open a file and it works as desired.
> >
> > When I launch Preview from the Dock I am able to use the file->open
> > dialog to successfully display a file.
> >
> > M1, Ventura 13.3.1
> >
> > So, what did I do to screw up my M1 mac-mini?
> >
> > How to diagnose the problem?
> >
> > How to more accurately/precisely describe the problem?
> >
> > Thankfully I have xpdf from MacPorts which I can invoke in my
> > script(s) to display my pdf files :-)
> >
> > Thanks,
> > Ken Wolcott


Re: off-topic question: Apple open command and/or apps in /Applications are half-broken now

2023-04-15 Thread chilli.names...@gmail.com
What happens with 

/usr/bin/open some_file.pdf

?

> On Apr 15, 2023, at 15:57, Kenneth Wolcott  wrote:
> 
> Hi;
> 
> off-topic question: Apple open command and/or apps in /Applications
> are half-broken now
> 
> I'm asking the question here because I think that there are lots of
> people who might know either the answer to my question and/or can help
> me find the answer by describing my problem more accurately/precisely.
> 
>  I don't think anything MacPorts did to my Mac via a port
> installation caused this problem.
> 
>  The problem:
> 
> example problem:
> 
> /usr/bin/open -F -a /Applications/Reader.app/Contents/MacOS/Reader 
> some_file.pdf
> 
> The Reader app comes up to the Dock but does not display the file, and no 
> error.
> 
> example problem variant:
> 
> /Applications/Reader.app/Contents/MacOS/Reader some_file.pdf
> 
> Same result.
> 
> This happens with other applications which I routinely use the open
> command (in a script) to display files.
> 
> Uninstalling the app and re-installing seems to have no effect.
> 
> Rebooting does not change the problem behavior.
> 
> I experienced this problem just recently.
> 
> The problem did not appear right after the last time that I updated
> the MacOS via announced patch from Apple.
> 
> When I launch Reader from the LaunchPad and use the file->open dialog
> to open a file and it works as desired.
> 
> When I launch Preview from the Dock I am able to use the file->open
> dialog to successfully display a file.
> 
> M1, Ventura 13.3.1
> 
> So, what did I do to screw up my M1 mac-mini?
> 
> How to diagnose the problem?
> 
> How to more accurately/precisely describe the problem?
> 
> Thankfully I have xpdf from MacPorts which I can invoke in my
> script(s) to display my pdf files :-)
> 
> Thanks,
> Ken Wolcott


off-topic question: Apple open command and/or apps in /Applications are half-broken now

2023-04-15 Thread Kenneth Wolcott
Hi;

off-topic question: Apple open command and/or apps in /Applications
are half-broken now

I'm asking the question here because I think that there are lots of
people who might know either the answer to my question and/or can help
me find the answer by describing my problem more accurately/precisely.

  I don't think anything MacPorts did to my Mac via a port
installation caused this problem.

  The problem:

example problem:

/usr/bin/open -F -a /Applications/Reader.app/Contents/MacOS/Reader some_file.pdf

The Reader app comes up to the Dock but does not display the file, and no error.

example problem variant:

/Applications/Reader.app/Contents/MacOS/Reader some_file.pdf

Same result.

This happens with other applications which I routinely use the open
command (in a script) to display files.

Uninstalling the app and re-installing seems to have no effect.

Rebooting does not change the problem behavior.

I experienced this problem just recently.

The problem did not appear right after the last time that I updated
the MacOS via announced patch from Apple.

When I launch Reader from the LaunchPad and use the file->open dialog
to open a file and it works as desired.

When I launch Preview from the Dock I am able to use the file->open
dialog to successfully display a file.

M1, Ventura 13.3.1

So, what did I do to screw up my M1 mac-mini?

How to diagnose the problem?

How to more accurately/precisely describe the problem?

Thankfully I have xpdf from MacPorts which I can invoke in my
script(s) to display my pdf files :-)

Thanks,
Ken Wolcott


compiling ArcticFox on 10.11 - atomic not found, cxx11

2023-04-15 Thread Riccardo Mottola via macports-users

Hi,

I have issues compiling ArcticFox on 10.11. I think I have some issues 
with compilers and C++ versions.
I got a used macbook since the other one with 10.13 has a fried GPU ans 
inconvenient to use.


On 10.7, where I regularly build, I can use MacPorts clang 6 without any 
issues or additional parameters.
On 10.13, I can build with apple clang, but had issues with MP clang's I 
was still investigating.


On 10.11 I cannot get it to build in any condition.
Whether I use apple's clang or MacPorts clang, I get an issue with 
atomics not being found, I tired clang6 (known to work on older 10.7) 
and 9. -std=c++11 should help fixing the atoimc issue, but apparently it 
doesn't


I configure:
export CC="clang-mp-9.0 -march=core2 -mtune=core2"
export CXX="clang++-mp-9.0 -march=core2 -mtune=core2 -std=c++11"

Build then fails with:

188:52.94 
/Users/multix/Documents/code/Arctic-Fox/media/gmp-clearkey/0.1/RefCounted.h:21:10: 
fatal error: 'atomic' file not found

188:52.94 #include 
188:52.94  ^~~~
188:52.94 1 error generated.
188:52.94



any hints? Strange that if it is a old c++ version, on 10.7 I had no 
issues...


Riccardo