-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
add macports libcxx dependency on older macs for gdb #27203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
this will ensure older systems are able to build and use the latest gdb with minimal effort hopefully other members on the macports squad will look into the macro nusiance that otherwise impedes a clean compilation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fixed.
devel/gdb/Portfile
Outdated
@@ -86,6 +86,13 @@ pre-configure { | |||
|
|||
build.dir ${configure.dir} | |||
|
|||
#older macs require a new libcxx | |||
if {${os.platform} eq "darwin" && ${os.major} < 15} { | |||
configure.depends_lib-append port:macports-libcxx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong and gonna break builds on older OS. If you need this for libc++
-consuming versions, please make it conditional accordingly.
Can you please make the recommended changes?As far as I can tell, gdb requires a libc++ newer than the ones in lion and mountain lion. All that we need to do is ensure that older macs use macports-libcxx so gdb is happy Sent from my BlackBerry 10 smartphone on the Rogers network. From: Sergey FedorovSent: Thursday, 26 December 2024 1:03 AMTo: macports/macports-portsReply To: macports/macports-portsCc: gagan sidhu; AuthorSubject: Re: [macports/macports-ports] add macports libcxx dependency on older macs for gdb (PR #27203)
@barracuda156 requested changes on this pull request.
This should be fixed.
In devel/gdb/Portfile:
@@ -86,6 +86,13 @@ pre-configure {
build.dir ${configure.dir}
+#older macs require a new libcxx
+if {${os.platform} eq "darwin" && ${os.major} < 15} {
+ configure.depends_lib-append port:macports-libcxx
This is wrong and gonna break builds on older OS. If you need this for libc++-consuming versions, please make it conditional accordingly.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#27203 (review)",
"url": "#27203 (review)",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
@i3roly What you seem to want is to switch |
i see what you’re saying.
could you please provide the runtime check? lol
Thanks,
Gagan
… On Dec 26, 2024, at 7:46 AM, Sergey Fedorov ***@***.***> wrote:
@i3roly What you seem to want is to switch libc++-using systems to legacy-support-supplied libc++ (which is somewhat newer than archaic system one). However, this is not just unneeded but also breaking for systems which do not use libc++ to begin with. So the correct condition must include not only macOS version (whichever appropriate), but also C++ runtime, so that macports-libcxx is used only when C++ runtime is libc++.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
|
per what @barracuda156 stated, it's better to have a check for the runtime since <=10.7 use libstdc++ as the default, where 10.7 was the first move to using/including libc++. this check will ensure older macs don't get rekt
devel/gdb/Portfile
Outdated
#older macs require a new libcxx | ||
if {${os.platform} eq "darwin" && ${os.major} < 15 && ${configure.cxx_stdlib} eq "libc++"} { | ||
configure.depends_lib-append port:macports-libcxx | ||
configure.cxxflags-append -L/opt/local/lib/libcxx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get it why is hardcoded to /opt/local
instead of ${prefix}
.
it shouldn’t be. i’ll fix that. thanks
Thanks,
Gagan
… On Dec 26, 2024, at 9:43 PM, aeiouaeiouaeiouaeiouaeiouaeiou ***@***.***> wrote:
@aeiouaeiouaeiouaeiouaeiouaeiou requested changes on this pull request.
In devel/gdb/Portfile:
> @@ -86,6 +86,13 @@ pre-configure {
build.dir ${configure.dir}
+#older macs require a new libcxx
+if {${os.platform} eq "darwin" && ${os.major} < 15 && ${configure.cxx_stdlib} eq "libc++"} {
+ configure.depends_lib-append port:macports-libcxx
+ configure.cxxflags-append -L/opt/local/lib/libcxx
I don't get it why is hardcoded to /opt/local instead of ${prefix}.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
i didn't either, but apparently it's used a lot. it's supposed to ensure that macports-libcxx is installed prior to gdb for older macs. look here for more examples of depends_lib-append: https://github.com/search?q=repo%3Amacports%2Fmacports-ports+depends_lib-append&type=code
okay i can do that.
gdb isn't complaining about the lack of headers. i think the newer clang headers are being used, it's just not able to find the appropriate (newer) libcxx associated with these headers, as i've pasted below.
yes, i have, but the problem is the libcxx isn't propagating towards the end of the build:
so the root of the issue is that the macports-libcxx legacy portgroup macro isn't passing the library path so GDB's configure can detect it. the purpose of depends_lib is to ensure that macports-libcxx is installed beforehand. i don't think the legacy portgroup macro can enforce this? correct me if i'm wrong on that? the headers are taken care of by the newer clang that has to be used. i haven't tried with ldflags but i used your cxx-append as the catch-all since you have shown that it plumbs better, and i figured that it was the safest and best way. but i can try with ldflags too. |
oh i see what you’re saying.
yes my apologies that prefix should be removed
Thanks,
Gagan
… On Dec 28, 2024, at 9:19 AM, Ken ***@***.***> wrote:
This is used a lot:
depends_lib-append
This has zero hits in searching the macports repo, other than in this PR:
configure.depends_lib-append
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
remove configure. from depends_lib-append change cxxflags to ldflags
so what would you recommend in this particular instance? adding a line like the following? configure.cppflags-append -I${prefix}/libcxx |
fwiw i noticed that even on sierra (10.12) with the bundled clang 9/xcode, that gdb also fails to build due to the c++17 stuff. very surprised by this, but seems like the version check needs to be < 17 ! |
pretty interesting that no one has picked this up? hope i'm wrong, but default clt failed to install gdb.
anybody? it's getting tiresome having to edit portfiles on vms. |
this will ensure older systems are able to build and use the latest gdb with minimal effort
hopefully other members on the macports squad will look into the macro nusiance that otherwise impedes a clean compilation
Description
Type(s)
Tested on
macOS 10.7.5 11G63 x86_64
Xcode 4.2.1 4D502
Verification
Have you
port lint
?sudo port test
?sudo port -vst install
?