-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Fix fatal error: math.h no such file or directory #3017
Conversation
Thanks @winksaville. Can you amend your commit to be meaningful for what is fixed without having to look at the issue tracker? Referring back to the issue is fine, but "Fix issue #3016" won't be helpful in the future when bisecting to find problems, which for example I just did to find the fix to #3015. Meaningful commit comments helped me narrow down where to look quite a lot and I had to dig through 2 years of commits. Thanks. |
6e94aec
to
34f6707
Compare
Your are correct, my commit message was poor, I've changed the title and commit message, let me know if you'd like something more/different. |
Sorry I regressed #824, but my change that you're reverting was solving a real problem that I encountered when trying to work on this. See my commit message for details: Is it possible to keep the fix from #824 while using |
Nothing is impossible, its just software, I'll see what I can do. |
34f6707
to
e613e09
Compare
Changed the code back to using --cflags and it uses a loop to handle multiple directories. |
Bummer, seems my use of "[[" "]]" doesn't work with ubuntu, looking into it. |
e613e09
to
9ded99e
Compare
The problem is ubuntu default SHELL is dash not bash, changed to using grep. |
9ded99e
to
39bdc76
Compare
Makefile-ponyc
Outdated
|
||
# Enable for testing | ||
#.PHONY: done | ||
#done: |
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.
Did you mean to leave this in? If so, can you expand the comment to describe what it is testing and when you'd want to use it?
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.
It can be used when enabling line 444:
# Used for testing
#llvm.cflags := -I/usr/include -march=x86-64 -I /sec/time -I /usr/local/include -I /3/4 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/xyz/abc
I could remove both or add a documentation like:
# Enable the "done:" target for testing when the commented out line above is enabled:
# llvm.cflags := -I/usr/include -march=x86-64 ....
On the face of it, its easier to remove both. Its too bad we don't have any good way to test Makefiles. So what do you prefer, or maybe something else?
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'd suggest removing both, but I'd also be okay with keeping them if you add the comment explaining it.
This fixes ponylang#3016 by conditionally adding llvm include directories in a loop.
39bdc76
to
7130aef
Compare
@jemc and I talked on slack and decided to remove the "test" code. |
Thank you for the extra work! |
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.
Good to merge when CI passes.
This breaks building on FreeBSD. |
Huh, well it broke one FreeBSD vm I am using but not another. Good times! |
@SeanTAllen , where can I find the build breakage, I'm not familiar where/how the FreeBSD builds are built? Is there a slack conversation about this? |
To answer my own question, the conversation on slack is here and the build breakage is here |
The breakage in the VMs I've tried that are available for vagrant is that: echo "-I/usr/local/llvm60/include -O2 -pipe -DNDEBUG -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics -ffunction-sections -fdata-sections -O2 -pipe -DNDEBUG -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" | grep -oE -- '(^| )-I\s*\S+' Doesn't work on FreeBSD for unknown reasons. It returns nothing. |
Is the above from lines 439 440:
I ask because your "echo" above seems to be mssing the I'd like to add some |
I broke it down to what would actually be failing. On the BSD vms I used, for no apparent reason that grep returned nothing. So it didn't matter that there was no sed. You can give it a try in this BSD vm using Vagrant: https://app.vagrantup.com/generic/boxes/freebsd12 It works in Cirrus-Ci for reasons unknown to me and it works with the same version of Grep (at least according to the version numbers) on MacOS. So, ¯_(ツ)_/¯. |
This fixes #3016 by adding lines back introduced in PR #824. This code conditionally added llvm include directory only if it wasn't already included. These lines were a small part of PR #2976 which adds LLVM 7.0.1 compatibility.