-
Notifications
You must be signed in to change notification settings - Fork 977
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
compilation error on AIX #1351
Comments
I see you're PowerPC. Please try again with v1.9.6 which has just been released to CRAN this weekend. It passed PowerPC under QEMU emulation. Having said that, I haven't seen these errors about class() or nearest() before so I suspect v1.9.6 will not fix it. A google search for "IBM AIX previous declaration of 'nearest'" throws up other packages having similar issues. If you could investigate those threads and let us know what we need to do that'd be great if possible. (We have no IBM AIX machine to test.) |
Thanks - useful. Had a quick look but can't see what to change. The symbol |
Sorry, this is going beyond my comfort zone (not really familiar with this). Both threads mention "before the system header files" in their fixes. Is there a way to include 'R.h' before 'math.h'? |
The string 'math.h' doesn't occur anywhere in data.table source so I don't see how. |
I suppose we could change the C symbol names from 'nearest' and 'class' to something else. |
Hey Matt, The decision to have this AIX box was made years ago before I arrived here in my current employment, and there really isn't much support from our IT because they themselves aren't that familiar with UNIX/Linux. In terms of support from IBM, I'm not even going to attempt it because it would involve too much red tape, requiring approvals and worst yet, may require $. Not much of an appetite around here just to satisfy my requirements for getting things to work in R. I don't even think IBM would be much help here because I'm not even using the compilers provided by them (again, too much hassle). I was able to get get the GNU compilers to work on AIX thanks Michael Perlz who maintains this wonderful site. I preferred to use the GNU compilers because at least the same compilers are used in other distros, hence better support from others. I'll reach out to that maintainer to see if he's seen this error before in his experience dealing with AIX. If he doesn't have a clue, then I really think my luck stops there. I would then very much appreciate you changing those symbol names. Thanks again. |
Thanks for the further info and background. Understood. I've changed the symbol names. To try it, please :
|
Thank you so much Matt for the fix. It installs on AIX now. If I do hear back from Michael Perlz (maintainter of many compiled packages for AIX), I'll post here so you know as well. Thanks again. |
I was just trying to install a different package (geosphere) and ran into some issues with TRUE or FALSE. Did a search on it and found this thread, and undef'ing TRUE and FALSE made the packages compiled. I just tried "#undef class" and "#undef nearest" on top of bmerge.c in the previous data.table version, but no go. However, I don't think "#undef" is valid for these. Is there a proper way to do this? If so, I could try it out. Thanks! |
Thanks for the confirm. Glad resolved. |
Regarding that geosphere, I just manually modified the source (undef'ing) and compiled successfully. I was just curious as to whether I could manually "#undef nearest" and "#undef class" (or something similar) at the beginning of bmerge.c to see if it works. If it did, then in the future when I run into this AIX issue I would manually modify the source myself without having to bother the package maintainer as this clearly is an AIX problem. Was just getting your thoughts if there was an analogous way to 'undef' the 'class' and 'nearest' in your package, that's all. Thanks again. |
That doesn't seem right to me. If those are gcc headers then perhaps speak to those folk and maybe create a patch or a local copy of the headers without those defines. i.e. find the .h in your system and simply remove the offending #define's, taking a backup first of course. Then you don't need to do anything for each package. |
Hey Matt, I mentioned this issue on the gcc-help mailing list and was given this response. Does it make sense? Just an FYI. Thanks again! |
re: the comments from gcc-help - I also package a gcc compiler for AIX (and have a test version with fortran in it I am using to test R for AIX). The issue with "class" is many many lines on AIX, however, the name "nearest" is easiest to display: "nearest()" seems to be claimed by IEEE math functions - so I am surprised that gcc would not be having namespace collision as well. re: class - I would expect that to be a reserved in many languages, so I am not too surprised. For brevity, I am not including the grep with class as "string to find". I shall apply the patch, and I hope you soon update data.table_1.9.6.tar Michael aka aixtools |
p.s. as I am very new to R - trying this for a friend, I do not understand who to use either the clone git instructions, or the master.zip file (with, although similar, is much smaller than the 1.9.6.tar file I am trying to install). The instructions I had received were merely - get the file, ungzip it and then, in R My apologies for being so "simple-minded". |
@aixtools You can install 1.9.6 from source directly from CRAN by install.packages("data.table", type="source") If you need currently latest 1.9.7 (I've just refreshed the snapshot of install.packages("data.table", repos="https://jangorecki.github.io/data.table", type="source") |
Thanks. |
Hi,
Trying to install data.table on R 3.2.2 on AIX, and am getting the following error. Any suggestions would be greatly appreciated.
The text was updated successfully, but these errors were encountered: