Big Sur and PureBasic

Mac OSX specific forum
Mindphazer
Enthusiast
Enthusiast
Posts: 340
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: Big Sur and PureBasic

Post 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 !
MacBook Pro 14" M1 Pro - 16 Gb - MacOS 14 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
User avatar
fsw
Addict
Addict
Posts: 1572
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Big Sur and PureBasic

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

I am to provide the public with beneficial shocks.
Alfred Hitshock
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1243
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: Big Sur and PureBasic

Post 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
Image Image
User avatar
fsw
Addict
Addict
Posts: 1572
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Big Sur and PureBasic

Post 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...

I am to provide the public with beneficial shocks.
Alfred Hitshock
Mindphazer
Enthusiast
Enthusiast
Posts: 340
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: Big Sur and PureBasic

Post by Mindphazer »

Thanks all
I guess i need to find out what PB command is generating this linker error....
MacBook Pro 14" M1 Pro - 16 Gb - MacOS 14 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
Fred
Administrator
Administrator
Posts: 16581
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Big Sur and PureBasic

Post 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.
Mindphazer
Enthusiast
Enthusiast
Posts: 340
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: Big Sur and PureBasic

Post 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 !
MacBook Pro 14" M1 Pro - 16 Gb - MacOS 14 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
Mindphazer
Enthusiast
Enthusiast
Posts: 340
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: Big Sur and PureBasic

Post 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 !!
MacBook Pro 14" M1 Pro - 16 Gb - MacOS 14 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Big Sur and PureBasic

Post by wilbert »

does it help if you change the ImportC line into this ?

Code: Select all

ImportC "-framework CoreFoundation"
Windows (x64)
Raspberry Pi OS (Arm64)
Mindphazer
Enthusiast
Enthusiast
Posts: 340
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: Big Sur and PureBasic

Post by Mindphazer »

Yes it does !
No more linker error

Thanks a lot Wilbert
MacBook Pro 14" M1 Pro - 16 Gb - MacOS 14 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
dibor
Enthusiast
Enthusiast
Posts: 125
Joined: Wed May 20, 2020 5:19 pm
Location: The 3rd planet in the Solar System
Contact:

Re: Big Sur and PureBasic

Post by dibor »

Hi to All.
My Mac mini M1 in the way, so, will check PB on it when it be arrived.

Best Wishes.
Mac Studio M1Max, PB 6.03Arm64 and x64.
Macbook Air M2, PB 6.03Arm64 and x64.
Windows 10, PB 6.03 x64 and x86.
User avatar
fsw
Addict
Addict
Posts: 1572
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Big Sur and PureBasic

Post 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
Last edited by fsw on Wed Dec 02, 2020 6:20 pm, edited 1 time in total.

I am to provide the public with beneficial shocks.
Alfred Hitshock
User avatar
fsw
Addict
Addict
Posts: 1572
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Big Sur and PureBasic

Post 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.

I am to provide the public with beneficial shocks.
Alfred Hitshock
User avatar
fsw
Addict
Addict
Posts: 1572
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Big Sur and PureBasic

Post 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

I am to provide the public with beneficial shocks.
Alfred Hitshock
User avatar
Kiffi
Addict
Addict
Posts: 1346
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Big Sur and PureBasic

Post 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
Hygge
Post Reply