-
Notifications
You must be signed in to change notification settings - Fork 720
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
compatibility for older macs in wast-parser.c #2527
Comments
So this variant of optional::value() is not part of the libc++ dylink that shipped in 10.13? How old is 10.13 now? Is supporting that version a hard requirement for you? I guess there are a couple of options:
|
as i understand it, this is a bug in APPUL's SDK, not an inherent issue from older platforms: https://stackoverflow.com/questions/44217316/how-do-i-use-stdoptional-in-c i think it's a little unfair to ditch older targets on the basis of "how old is xx now" when the issue isn't the platform per-se, but APPUL's abuse of its developer community, which seems to keep coming back for more. it feels like an APPUL bug because it says "macOS 10.13 unknown" which doesn't feel like the typical SDK error. even if i change
to
i now get a weird:
doesn't seem like a related error. @shravanrn any ideas? |
I don't know that this is an apple's SDK bug so much as an incompatibility with the version of libc++ that apple shipped with macOS 10.13, no? I assume that what the libc++ headers as saying that if they allowed this method then the resulting binary would not load on 10.13 due to dylib compatibility issues? Also, I'm not sure I understand what you are trying to say with |
I guess one thing we should do is define which is the oldest version of macOS that wabt build can target and then we should be passing |
It looks like that way we would do that is to add |
no, i'm not building on 10.13. i am building on 10.14 or 10.15, but this isn't the point. i am using the mmacosx-verison-min already, and this is how the issue cropped up. as i understand that stackoverflow, this is an APPUL SDK issue. the person who had 27 upvotes on the stackoverflow seems to do a good job of arguing APPUL deviating from the standard. in any case i'm okay with using the * operator to get around it, and i doubt that this change is the reason i'm now experiencing build failures in firefox central that i didn't experience before. |
- wasm2c is fucked. there is an issue right now, in spite of a small mod that allows it to compile fine on 10.13 (or so i think): WebAssembly/wabt#2527 https://stackoverflow.com/questions/44217316/how-do-i-use-stdoptional-in-c so for now we rollback wasm2c until i can get to the bottom of it. hopefully @shravanrn can help out.
IIUC correctly the problem is that Was apple wrong to ship 10.13 without Basically, if we want to target 10.13 then we need to limit ourselves libc++ library feature that were available at that time when 10.13 was shipped since libc++.dylink is baked into the OS. If we do decide we want to support running wabt on 10.13 then we should add CMAKE_OSX_DEPLOYMENT_TARGET=10.13 to our cmake file. Currently, the status quo is that wabt doesn't support running on 10.13. Do you (or some of your users maybe?) need to run wabt on 10.13? If not, can you bump your |
do you need native wabt? wabt can be compiled to webassembly, this is used by projects such as e.g. chicory and it works great. |
wabt doesn't currently build when targeting 10.13 because it uses std::optional::value which is not available on 10.13. See: #2527
Do you need to limit yourselves or is it possible to have a MACOSX_VERSION_MIN <= 1013 cpp macro that would use the * operator instead of the value() member? You could then add a line in the readme that this macro is unsafe, unsupported and is being provided for the sake of compatibility? Sent from my BlackBerry 10 smartphone on the Rogers network. From: Sam CleggSent: Friday, 10 January 2025 12:28 PMTo: WebAssembly/wabtReply To: WebAssembly/wabtCc: gagan sidhu; AuthorSubject: Re: [WebAssembly/wabt] compatibility for older macs in wast-parser.c (Issue #2527)
IIUC correctly the problem is that std::bad_optional_access is missing from the libc++.dylink in 10.13. This means that when you target 10.13 the compiler will correctly warn if you try to use APIs that depend on std::bad_optional_accessat runtime (i.e.std::optional::value()`).
Was apple wrong to ship 10.13 without std::bad_optional_access? Maybe? Most likely LLVM simply had not implemented it yet at the time when 10.13 shipped.
Basically, if we want to target 10.13 then we need to limit ourselves libc++ library feature that were available at that time when 10.13 was shipped since libc++.dylink is baked into the OS.
If we do decide we want to support running wabt on 10.13 then we should add CMAKE_OSX_DEPLOYMENT_TARGET=10.13 to our cmake file.
Currently, the status quo is that wabt doesn't support running on 10.13. Do you (or some of your users maybe?) need to run wabt on 10.13? If not, can you bump your macosx-verison-min?
—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": "#2527 (comment)",
"url": "#2527 (comment)",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
That sounds like a possibility yes. However I think that the Perhaps as a followup to #2528 we can reduce CMAKE_OSX_DEPLOYMENT_TARGET to 10.13 and apply a workaround? |
wabt doesn't currently build when targeting 10.13 because it uses std::optional::value which is not available on 10.13. See: #2527
it's up to you on how you want to tackle it @sbc100 but i wanted to mention that it seems this * operator hasn't caused anything bad in my testing, which was simply running firefox 136 on a 10.8 VM and going to nytimes to see if video played with sound, which it did. i dunno if that * operator is so bad. i don't want you bending over backwards. that stackoverflow said the only drawback is the lack of an access check. however it does seem like you know more about STD, standards, etc than i, and as such i'll leave it up to you. re compiling with firefox: https://hg.mozilla.org/mozilla-unified/rev/607266cea485dde9ac0393378974c99f814c65ca which migrates rlsoundbox back to XUL as opposed to lgpllibs, which allows the use firefox's shared locks for older targets that don't have c++17. by adding this diff: to this file: the build compiles without issue, and seems to work fine. sorry about that @shravanrn i'll issue an apology in the upcoming commit |
@SoniEx2 thanks for chiming in, it turns out my issue with compilation was an artefact of using the following commit: https://hg.mozilla.org/mozilla-unified/rev/607266cea485dde9ac0393378974c99f814c65ca which migrates rlsoundbox back to XUL as opposed to lgpllibs, which allows the use firefox's shared locks for older targets that don't have c++17. by adding this diff: https://hg.mozilla.org/mozilla-unified/diff/38ef245d937c619df0ca620d38d20bd96a4217cd/security/rlbox/rlbox.mozbuild#l1.12 to this file: https://hg.mozilla.org/mozilla-unified/diff/607266cea485dde9ac0393378974c99f814c65ca/security/rlbox/moz.build#l1.30 the build compiles without issue, and seems to work fine. my apologies to @shravanrn WebAssembly/wabt#2527
@i3roly if you would like to send a PR to lower However I would want to know that you have a real use case for running wabt on 10.13 yourself, otherwise I don't think it is worth it. Note that running wabt on 10.13 is not the same thing has building the output of wasmc with 10.13 support (which is what firefox does I believe). |
Note that the difference between |
hi,
so i have seen that a new wasm2c was pushed to mozilla-unified/central the other day.
i noticed that the new tokenqueue class is using a member (value):
https://github.com/WebAssembly/wabt/blob/main/src/wast-parser.cc#L3824
that is not available for older mac targets.
is it possible the developers would consider adding/modifying the structure so that it will work on macs older than 10.13?
thanks
The text was updated successfully, but these errors were encountered: