aligned_alloc in gcc@7 but not in Mojave #1256
-
I have been running my code for years on macOS and gcc@7 from homebrew. When I updated gcc@7 for Mojave, by run-time asks for a function that it depends on the OS having, but it doesn't where it is looking for it. Why is the gcc@7 build asking for it now when it didn't previously? Can I get another formula that doesn't? I tried building at lower C++ standards but that doesn't help. I have seen that this is a common lament for many years, so why wasn't it avoided or remedied? My main code is not calling it, but maybe something in anaconda is. Thanks for any suggestions. ImportError: dlopen(/Users/rspencer/Applications/CompuCell3D_3.7.4/CC3D_INSTALL/lib/python/_CC3DXML.so, 2): Symbol not found: _aligned_alloc |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 10 replies
-
Does this path exist on your system?
|
Beta Was this translation helpful? Give feedback.
-
Yes
(base) iMac-Pro:~ rspencer$ ls /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
Entitlements.plist SDKSettings.json System
Library SDKSettings.plist usr
In my cmake file though, it auto-inserted:
CMAKE_OSX_DEPLOYMENT_TARGET 10.14
CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
I think installing gfortran from hpc.sourceforge may have hammered something in gcc. Or there are just some changes in builds with Mojave. I removed that as best as I could, but they warn to try this also:
“And on Catalina, you may have to specify an additional include and library path -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib for the compiler to find the system headers and libraries.”
Is that what you may be recommending?
I am staying on Mojave because I am not sure of OpenCL support on Catalina yet.
Thanks so much
Richard
…--
Richard Spencer
Computational Biologist
T 919.541.0022 | M 919.306.9098
***@***.******@***.***>
109 T.W. Alexander Dr.
Research Triangle Park, NC 27711
www.gdit.com<http://www.gdit.com/>
***@***.***D4EE0A.A8F66270]
From: Carlo Cabrera ***@***.***>
Date: Sunday, April 11, 2021 at 3:26 PM
To: Homebrew/discussions ***@***.***>
Cc: Spencer, Richard ***@***.***>, Author ***@***.***>
Subject: Re: [Homebrew/discussions] aligned_alloc in ***@***.*** but not in Mojave (#1256)
Does this path exist on your system?
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgh.neting.cc%2FHomebrew%2Fdiscussions%2Fdiscussions%2F1256%23discussioncomment-597051&data=04%7C01%7CSpencer.Richard%40epa.gov%7C64542688f9b7466612f808d8fd1fa812%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637537660016768188%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=RfbBZlT0srxC4o%2FOUMqrUBgLEF5YrfXBm%2Fvd2OEysn0%3D&reserved=0>, or unsubscribe<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgh.neting.cc%2Fnotifications%2Funsubscribe-auth%2FADKXDKR7G7WDQHUCWLKTLY3TIHZUXANCNFSM42X3DCEA&data=04%7C01%7CSpencer.Richard%40epa.gov%7C64542688f9b7466612f808d8fd1fa812%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637537660016778147%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=E2t8Hvio6Wu9aGZowHP1ey24vuVUubQfDHxwh7HiF%2Bs%3D&reserved=0>.
|
Beta Was this translation helpful? Give feedback.
-
This will hopefully be fixed by a rebuild of
That doesn't look right. You want
The
Something similar might help, but, as above, you actually want to use
rather than an unversioned path. The unversioned path likely points to the headers and libraries (library stubs, actually) for macOS 10.15, which will define an |
Beta Was this translation helpful? Give feedback.
-
(cc3d_macos_10.13) iMac-Pro:CC3D_BUILD rspencer$ brew update && brew upgrade ***@***.***
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
dua-cli
==> Updated Formulae
***@***.*** ✔ ***@***.*** ✔ ***@***.*** ✔ bind cimg dbdeployer file-roller ***@***.*** libserdes mlt monero navi serverless sphinx-doc stunnel v2ray wxmaxima
==> Updated Casks
koodo-reader latexit monero-wallet tunnelblick webcatalog
You have 3 outdated formulae installed.
You can upgrade them with brew upgrade
or list them with brew outdated.
==> Upgrading 1 outdated package:
***@***.*** 7.5.0_3 -> 7.5.0_4
==> Upgrading ***@***.*** 7.5.0_3 -> 7.5.0_4
==> Downloading https://homebrew.bintray.com/bottles/gcc%407-7.5.0_4.mojave.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/95659aa77c264356df8c2eb9d24800aba62f0d308b86d601e0d259885700aebf?response-content-disposition=attachment%3Bfilename%3D%22gcc%407-7.5.0_4.mojave.bottle.tar.gz%22&Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHAqOi8vZDI5dnprNG93MDd3a
######################################################################## 100.0%
==> Pouring ***@***.***_4.mojave.bottle.tar.gz
🍺 ***@***.***/7.5.0_4: 1,404 files, 254.4MB
Removing: ***@***.***/7.5.0_3... (1,402 files, 249.5MB)
But interestingly, surprisingly, CommandTools looks ahead and routes it like this too. I can’t choose MacOSX.sdk\ 1 because CMake changes backslashes to forward slashes and doesn’t recognize the space if not escaped.
(base) iMac-Pro:~ rspencer$ ls -al /Library/Developer/CommandLineTools/SDKs
total 0
drwxr-xr-x 6 root wheel 192 Apr 11 08:12 .
drwxr-xr-x 5 root admin 160 Apr 9 19:25 ..
lrwxr-xr-x 1 root wheel 15 Apr 11 08:12 MacOSX.sdk -> MacOSX10.15.sdk
drwxr-xr-x 7 root wheel 224 Apr 9 19:25 MacOSX.sdk 1
lrwxr-xr-x 1 root wheel 10 Nov 10 16:07 MacOSX10.14.sdk -> MacOSX.sdk
drwxr-xr-x 8 root wheel 256 Apr 11 08:12 MacOSX10.15.sdk
(base) iMac-Pro:~ rspencer$ ls -alt /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
total 0
drwxr-xr-x 5 rspencer staff 160 Nov 10 17:09 .
lrwxr-xr-x 1 rspencer staff 10 Nov 10 17:08 MacOSX10.15.sdk -> MacOSX.sdk
drwxr-xr-x 6 rspencer staff 192 Dec 19 2019 ..
drwxr-xr-x 4 rspencer staff 128 Nov 7 2019 DriverKit19.0.sdk
drwxr-xr-x 8 rspencer staff 256 Nov 7 2019 MacOSX.sdk
Then I get an OpenCL error I wasn’t getting with the Xcode.app Frameworks.
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/dispatch/queue.h:926:3: error: 'dispatch_qos_class_t' has not been declared
dispatch_qos_class_t qos_class, int relative_priority);
^~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/dispatch/queue.h:1109:1: error: 'dispatch_qos_class_t' does not name a type; did you mean 'dispatch_queue_attr_t'?
dispatch_qos_class_t
^~~~~~~~~~~~~~~~~~~~
dispatch_queue_attr_t
Now I am confused that I get it here too, but that is probably a different thread unrelated to homebrew.
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dispatch/queue.h:926:3: error: 'dispatch_qos_class_t' has not been declared
dispatch_qos_class_t qos_class, int relative_priority);
^~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dispatch/queue.h:1109:1: error: 'dispatch_qos_class_t' does not name a type; did you mean 'dispatch_queue_attr_t'?
dispatch_qos_class_t
^~~~~~~~~~~~~~~~~~~~
dispatch_queue_attr_t
I will try to get back to the original error which I thought was coming from the ***@***.*** library, but granted CommandTools should provide it.
With kind regards
--
Richard Spencer
Computational Biologist
From: Carlo Cabrera ***@***.***>
Date: Sunday, April 11, 2021 at 6:08 PM
To: Homebrew/discussions ***@***.***>
Cc: Spencer, Richard ***@***.***>, Author ***@***.***>
Subject: Re: [Homebrew/discussions] aligned_alloc in ***@***.*** but not in Mojave (#1256)
This will hopefully be fixed by a rebuild of ***@***.***, which was done in this PR<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgh.neting.cc%2FHomebrew%2Fhomebrew-core%2Fpull%2F74930&data=04%7C01%7CSpencer.Richard%40epa.gov%7Cd40dd7c52d31456d3a4508d8fd365258%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637537757040560683%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FIcOfzGaCQ%2BN5rnXgz%2Bh2bVsLlj2X1KqiUr0HXCARkE%3D&reserved=0> (for incidental reasons). Please try brew update && brew upgrade ***@***.*** then try again.
In my cmake file though, it auto-inserted:
CMAKE_OSX_DEPLOYMENT_TARGET 10.14
CMAKE_OSX_SYSROOT >/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
That doesn't look right. You want CMAKE_OSX_SYSROOT to be /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk.
I think installing gfortran from hpc.sourceforge may have hammered something in gcc.
The ***@***.*** formula also provides gfortran, though it might be called something like gfortran-7 instead. I think you'll want to use that instead to ensure version compatibility.
but they warn to try this also:
“And on Catalina, you may have to specify an additional include and library path -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib for the compiler to find the system headers and libraries.”
Something similar might help, but, as above, you actually want to use
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
rather than an unversioned path. The unversioned path likely points to the headers and libraries (library stubs, actually) for macOS 10.15, which will define an aligned_alloc function but isn't supported on Mojave.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgh.neting.cc%2FHomebrew%2Fdiscussions%2Fdiscussions%2F1256%23discussioncomment-597351&data=04%7C01%7CSpencer.Richard%40epa.gov%7Cd40dd7c52d31456d3a4508d8fd365258%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637537757040570634%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5IaMCKnIM0IrJkdezclwM5VIkd4eo69NO11hyYHfA80%3D&reserved=0>, or unsubscribe<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgh.neting.cc%2Fnotifications%2Funsubscribe-auth%2FADKXDKUUDCOH7POMPIPOBV3TIIMVFANCNFSM42X3DCEA&data=04%7C01%7CSpencer.Richard%40epa.gov%7Cd40dd7c52d31456d3a4508d8fd365258%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637537757040570634%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2FXI2ZVSR5NP4pD0d9s3CLtR3eko%2BD%2BrWtV5ntKxVnD0%3D&reserved=0>.
|
Beta Was this translation helpful? Give feedback.
-
Actually, the OpenCL error is emitted by gcc. There is a 2015 solution to create a second object.h that gcc can read. But has it been fixed in gcc since then but forgotten? Thanks again. |
Beta Was this translation helpful? Give feedback.
This will hopefully be fixed by a rebuild of
gcc@7
, which was done in this PR (for incidental reasons). Please trybrew update && brew upgrade gcc@7
then try again.That doesn't look right. You want
CMAKE_OSX_SYSROOT
to be/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
.The
gcc@7
formula also providesgfortran
, though it might be called something likegfortran-7
instead. I think you'll want to use th…