-
Notifications
You must be signed in to change notification settings - Fork 214
Fix includes #127
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 includes #127
Conversation
|
IMO this patch won't fix the problem you're describing. After reading MoarVM/MoarVM#997 resp. your changes to ROSA I think it boils down to be a packaging problem in ROSA or a build-configuration problem in MoarVM! |
|
The build system of libtommath supports a custom include dir, the patch did fix the problem. But I don't know all details about how the compiler works with includes |
|
Why does tommath_class.h include itself? |
I'm not 100% sure but I think I know how this patch fixed your problem...
please correct me if I'm wrong!
please have a look at the documentation in |
|
No, moarvm does not have bundled libtommath, you may make sure by looking into src.rpm here: https://abf.io/build_lists/2952993 moarvm developers suggest to manually put libtommath source into 3rdparty/libtommath, but we did not put it there, and I made a small patch which switches includes: https://abf.io/perl6/moarvm/blob/rosa2016.1/ROSA-Use-system-headers.patch Now I've rebuilt packages that depend from libtommath as a build dependency, e.g. https://abf.io/perl6/dropbear , they are built correctly with the patched libtommath. |
|
Apparently that now looks like the correct patch to me, but I'm still unsure about how the initial patch of this PR fixed your problem :-) This issue can be closed, right? |
|
b0f31a9 fixed my problem, because on your system it is /usr/include/tommath*.h, bot on mine it is /usr/include/tommath/tommath*.h by setting this directory to the build script of libtommath. In my configuration the compiler could not understand
It's up to you to decide wether to merge this PR or not :-) |
Ah, I just had a look again and apparently the patch in https://abf.io/perl6/moarvm/blob/rosa2016.1/ROSA-Use-system-headers.patch still isn't correct IMO The patch should be an updated e.g. @rofl0r can you probably have a look please? ... as I'm a bit confused now :D ... 1. if we should merge this or not? and 2. what the correct fix should be? thx :) |
that's correct, unless the path containing those headers is passed as an apart from that there's nothing speaking against using |
|
@karel-m can you please have a look if your builds are fine with these changes? |
|
libtomctrypt does build OK (https://abf.io/import/libtomcrypt/commit/e5fcc07a3c9de648fcb0f928bbdd0ff3d31fb7fb) |
This patch for works, maybe yes. |
the changes in this PR work fine for me |
Header files which are located in the same directory that the file from where it is included must be included using `" "`, not `< >`. Otherwise the compiler (gcc 5) cannot understand `#include <tommath_class.h>` in `/usr/include/tommath/tommath.h`.
I still think that the correct patch would either be in rosa or even in moarvm, but if this patch helps you and since it doesn't hurt us it's rebased and merged |
|
Thank you. |
as of @czurnieden "there's always leftovers" and he's right that's a leftover of #127
Header files which are located in the same directory that the file from where it is included must be included using
" ", not< >. Otherwise the compiler (gcc 5) cannot understand#include <tommath_class.h>in/usr/include/tommath/tommath.h.