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
compiling current master gives error: undefined reference to `read_wisdom' #68
Comments
Hi Scott, I'm having the same issue. I'm running CentOS 7. I'm building within a Docker container, so I can offer the exact environment required to reproduce this issue. My docker file is on Github: https://raw.githubusercontent.com/scienceguyrob/Docker/master/Images/tvg/CentOS/Dockerfile (commit 58a0dcf). Not sure if this helps! |
I had this problem as well under Ubuntu 16.04 LTS (gcc 5.4.0) Fixed by changing gcc flag ordering in the Makefile:
|
Huh. I've never been able to replicate this bug. And I use Ubuntu 14.04, 16.04 and now 18.04. |
No idea... =) Here's the full compiler info:
|
Hi @scottransom, I've tried installing Presto in a Redhat 6.10 OS machine, in a CentOS 7 machine, and a Ubuntu 18.04 machine and they all give me this bug. I tried fixing it by following @siemion suggestion of editing the gcc flag ordering in the Makefile, but I still get the error. Since you've never been able to replicate this bug, what were your configurations/ did you try to compile presto on a new machine that is fresh out of the box? If so, what dependencies did you install that are not listed on the INSTALL file. Thanks |
Here is my compiler info on my Ubuntu 18.04 machine:
|
Ugh. This is so strange. I regularly compile PRESTO on RHEL7, RHEL6, and all the recent Ubuntu releases (I'm using 18.10 on my laptop now, and will probably try 19.04 this weekend). And yes, I compile PRESTO in out-of-the box configurations of those quite regularly. Are you compiling your own FFTW? Or are you using a package for it? And what if you remove search_bin from the BINARIES target? Does everything else compile? |
Did you by any chance get rid of the -DUSEFFTW flag in CFLAGS? That would cause this as well, I think. |
Yeah, it's a strange one. On the Ubuntu machine, I'm using the libfftw3-dev package that was suggested. On the others, I was compiling my own FFTW. I haven't tried removing the search_bin from the BINARIES. By this, do you mean removing search_bin.c, search_bin_cmd.c, search_bin_cmd.o, and search_bin.o from the $PRESTO/src directory? I just tried now with removing the -DUSEFFTW flag in CFLAGS and it still didn't work. |
If you look in $PRESTO/src/Makefile, search_bin is listed in the BINARIES variable. Just remove the word from there and search_bin won't be compiled by default. I want to see if everything else compiles and runs fine. (i.e. is this a problem just with search_bin, or with other parts of PRESTO that use FFTW). As for -DUSEFFTW, I was wondering if that was not being set somehow. If that is not set, I can completely see how this error would happen. In other words, you should definitely have that as part of CFLAGS. |
Follow up:
Should I remove accelsearch from the BINARIES? |
Ok, that is useful. This definitely means that, for some reason, USEFFTW is not being set properly. Can you please post what one of the gcc lines looks like when you run "make" in $PRESTO/src? And no, you definitely want to keep accelsearch in BINARIES |
This is one of the gcc lines when running "make" in $PRESTO/src:
|
That last "empty" -I might be the problem. It seems like the FFTW include location isn't being found. What do you get if you run If that doesn't give you an include path, you might need to set FFTINC explicitly to the include directory where fftw3.h lives. |
Hi, so I ran the command Would I still need to set FFTINC explicitly o include the directory where ffw3.h lives? Is so, would I set this on my .bashrc file? |
Follow up,
This seems to not give issues with FFTW. However, I get this new error when trying to compile it:
|
Given what you got with the pkg-config command, I think that that "empty" -I should have been -I/usr/local/include. You could try manually setting that in the makefile for FFTINC. The libcurl issue isn't a PRESTO problem, though, but is related to the installation of CFITSIO. You could try a "locate libcurl.so.4" to see if that exists on your system. But curl is definitely a package in all of the Linuxes. |
Hi Scott, I'm on Ubuntu 20.04 and I got the same issue as described above - changing the gcc flag ordering as per Andrew's suggestion also fixed it for me. Thanks, |
@vtonder Thanks for that. I've changed the ordering in the official PRESTO even though I have no idea why that works. Seems really bizarre to me.... |
looks like
read_wisdom
is defined ininclude/ransomfft.h
, but when I include that it fails even more. removingread_wisdom
seems to solve the problem, not sure if that is the smartest thing to do.The text was updated successfully, but these errors were encountered: