-
Notifications
You must be signed in to change notification settings - Fork 786
Fix warning (treated as error) when building with Emscripten #2605
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,7 +185,7 @@ else() | |
if(WIN32) | ||
add_compile_flag("-D_GNU_SOURCE") | ||
add_link_flag("-Wl,--stack,8388608") | ||
else() | ||
elseif(NOT EMSCRIPTEN) | ||
add_compile_flag("-fPIC") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this flag even doing here in the first place? CMake should be adding this automatically when it knows its building a DLL, no? I'm OK with landing this part of the change for now, but would like to look into removing this line completely There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might this have something to do with this warning?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we not be trying to build with SHARED using emscripten, as the warning says. Other platforms can use SHARED but the emscripten build should only use STATIC. |
||
endif() | ||
add_debug_compile_flag("-O0") | ||
|
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.
Is this fixing an actual issue on this CI? (If so why don't tests fail?)
If it's trying to prevent an issue we only see on other CI, is that necessary?
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.
Edit: See comment below first.
This is a common thing on Travis, which cancels jobs when it doesn't see console output for 10 minutes, usually affecting long-running build tasks like this one (also see comment above). They have a bash function named
travis_wait
for this, but the last time I checked it suppressed output while the task executes so one can't watch the build. Adding this doesn't seem strictly necessary based on the latest test runs, but is very likely to prevent issues in the future.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.
Just noticed that your question was about something different. Tests do indeed fail when using the
emscripten-upstream
image, but it works when using the legacyemscripten-fastcomp
image (emscripten:sdk-incoming-64bit
is an outdated variant of fastcomp not updated anymore). This is happening since the first day Emscripten switched to upstream by default and I started testing it, so I thought a TODO would be appropriate to raise awareness. This is a very odd problem in that(At least the last time I checked)
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 sounds worth investigating. The fact that you can't repro it locally is very strange, especially since using the docker image should produce identical results.
I guess I'm OK landing this if its urgent but I'd rather try to fix instead.
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 PR is unrelated to the upstream breakage, though, it only updates the outdated fastcomp image to a recent fastcomp image (both work) and adds the TODO comment.
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.
Oh I see
sdk-incoming
is also fastcomp?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.
Yeah, I believe that's Emscripten before upstream became the default, and they then switched to the other naming.