Page 3 of 5

Re: Big Sur and PureBasic

Posted: Tue Dec 01, 2020 5:22 pm
by Mindphazer
fsw wrote:J
Feel free to add more Big Sur incompatibilities to this thread as you encounter them.
If they are all in one place they are easier to find...
Hi,
Since i upgraded to Big Sur, one of my application doesn't compile anymore. I get a linker error :

Code: Select all

clang: error: no such file or directory: '/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation'
That's weird because my other applications compile without problems. I've reinstalled Xcode command line tools, but i still have the issue.
If someone have an idea

Thanks !

Re: Big Sur and PureBasic

Posted: Tue Dec 01, 2020 10:27 pm
by fsw
Mindphazer wrote: Hi,
Since i upgraded to Big Sur, one of my application doesn't compile anymore. I get a linker error :

Code: Select all

clang: error: no such file or directory: '/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation'
That's weird because my other applications compile without problems. I've reinstalled Xcode command line tools, but i still have the issue.
If someone have an idea

Thanks !
First I thought there might be a call to a OS function that was deprecated years ago.
But on my machine under: “/System/Library/Frameworks/CoreFoundation.framework/”
There is no “CoreFoundation” but “Resources” and “Versions”.

Can you list the PureBasic libraries that are pulled into this app, but are not in the apps that compile?

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 3:17 am
by Paul
fsw wrote: First I thought there might be a call to a OS function that was deprecated years ago.
But on my machine under: “/System/Library/Frameworks/CoreFoundation.framework/”
There is no “CoreFoundation” but “Resources” and “Versions”.
On both Catalina and Mojave I see CoreFoundation.framework contains this...

Image

And "CoreFoundation" is a link to "Versions/A/CoreFoundation"

Image

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 6:51 am
by fsw
Found some info:
https://www.reddit.com/r/MacOSBeta/comm ... n_big_sur/
https://stackoverflow.com/questions/625 ... sl-corefou
https://github.com/nyholku/purejavahidapi/issues/75

Bottom line:
Apple wrote: New in macOS Big Sur 11 beta, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for a library presence by attempting to dlopen() the path, which will correctly check for the library in the cache.
I think this problem arises from the fact that system files and directories are treated differently on Big Sur than on prior macOS versions:
https://arstechnica.com/gadgets/2020/11 ... iew/11/#h1

Suppose PureBasic needs to be updated for Big Sur...

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 9:11 am
by Mindphazer
Thanks all
I guess i need to find out what PB command is generating this linker error....

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 9:51 am
by Fred
My MacBookAir mid-2012 doesn't support Big Sur, so I can't investigate for now. Will try to find a way to.

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 9:58 am
by Mindphazer
Hi Fred,

I've managed to install Big Sur on VMWare Workstation. Not a big deal, but i guess it's better on a "real" Mac !

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 10:10 am
by Mindphazer
OMG !!!

I know why my app doesn't compile !!
My code uses this ImportC

Code: Select all

ImportC "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation"
    CGEventCreate(source)
    CGEventGetFlags(event)
    CFRelease(cf)
  EndImport
This part of the code was meant to capture the Option Key pressed at startup (i think i used Wilbert's example here : viewtopic.php?f=13&t=51755)

I guess i need to find out another way to do this !!

I'm sorry I haven't seen this before in my code !!

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 10:59 am
by wilbert
does it help if you change the ImportC line into this ?

Code: Select all

ImportC "-framework CoreFoundation"

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 11:09 am
by Mindphazer
Yes it does !
No more linker error

Thanks a lot Wilbert

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 2:40 pm
by dibor
Hi to All.
My Mac mini M1 in the way, so, will check PB on it when it be arrived.

Best Wishes.

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 6:06 pm
by fsw
wilbert wrote:does it help if you change the ImportC line into this ?

Code: Select all

ImportC "-framework CoreFoundation"
Mindphazer wrote:Yes it does !
No more linker error
Thanks a lot Wilbert
This is something I’ve always appreciated about this forum:
Great help and an awesome attitude.

Fred, I suppose you are off the hook on this one :P

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 6:10 pm
by fsw
dibor wrote:Hi to All.
My Mac mini M1 in the way, so, will check PB on it when it be arrived.
Good for you. :twisted:

Please keep us posted.

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 6:24 pm
by fsw
Fred wrote:My MacBookAir mid-2012 doesn't support Big Sur, so I can't investigate for now. Will try to find a way to.
One way is to buy a new MacBook Air with M1 :P

Re: Big Sur and PureBasic

Posted: Wed Dec 02, 2020 7:26 pm
by Kiffi
fsw wrote:
Fred wrote:My MacBookAir mid-2012 doesn't support Big Sur, so I can't investigate for now. Will try to find a way to.
One way is to buy a new MacBook Air with M1 :P
Send me money and I will give it a try. :P