Skip to content
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

Install Error #7

Closed
ddegras opened this issue Jun 25, 2024 · 5 comments
Closed

Install Error #7

ddegras opened this issue Jun 25, 2024 · 5 comments

Comments

@ddegras
Copy link

ddegras commented Jun 25, 2024

Hi, I get the following error when trying to install the package (version 0.2.1) from CRAN on my Mac OS X. The CRAN package checks return the same error for all mac architectures.

* installing *source* package ‘fCWTr’ ...
** package ‘fCWTr’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... clang -arch x86_64
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether clang -arch x86_64 accepts -g... yes
checking for clang -arch x86_64 option to enable C11 features... none needed
checking how to run the C preprocessor... clang -arch x86_64 -E
checking for brew... yes
checking whether the compiler supports GNU C++... yes
checking whether clang++ -arch x86_64 -std=gnu++17 accepts -g... yes
checking for clang++ -arch x86_64 -std=gnu++17 option to enable C++11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for fftw3.h... yes
checking for library containing fftwf_free... no
configure: error: The fftw3 library is required.
ERROR: configuration failed for package ‘fCWTr’
@lschneiderbauer
Copy link
Owner

Hi,
thanks for the report.

the problem with CRAN seems to be that the fftw library that the MAC build system offers does not include fftwf library (the "float" version of fftw) and so the build fails. (I didn't have time yet to investigate how to fix that or if that is even fixable).

I see from your output that you seem to have the exact same problem: fftw3.h is available, but not fftwf_free (which is contained in fftwf).
May I ask what you did to install fftw?
It seems MAC distributions of fftw in general do not include fftwf.

@ddegras
Copy link
Author

ddegras commented Jun 25, 2024

Thank you for your quick reply. I downloaded fftw from https://www.fftw.org, opened a terminal window and typed ./configure && make && make install as requested.

@lschneiderbauer
Copy link
Owner

As a temporary workaround, can you try
./configure --enable-float && make && make install ?

After that try to install fCWTr again. Please let me know if that fixes this particular error on your machine.

On another note:
If you want to make use of openmp, you could also try to add --enable-openmp.

@ddegras
Copy link
Author

ddegras commented Jun 26, 2024

Thank you very much, the workaround worked!

Before closing this issue, I would like to follow up on your other suggestion. This may be of interest to other users as well. I successfully installed openmp by typing brew install libomp in the terminal. I then typed
export LDFLAGS="-L/usr/local/opt/libomp/lib" export CPPFLAGS="-I/usr/local/opt/libomp/include"
as recommended to make sure that compilers can find libomp.
After that, I recompiled fftw with
./configure --enable-float --enable-openmp && make && make install
but got the following error:
checking for OpenMP flag of C compiler... unknown configure: error: don't know how to enable OpenMP

Do you have ideas on how to fix this issue?

I am aware this question is different from the original one, but hesitate to open a separate issue as openmp is independent of your R package. Nevertheless, please feel free to close this issue as you see fit. Thanks.

@lschneiderbauer
Copy link
Owner

lschneiderbauer commented Dec 27, 2024

Hi @ddegras,

sorry for the long radio silence, but as you might have guessed, I cannot provide a solution to the problem, only guesses.

Sometimes, the openmp feature needs to be explicitely needs to be explicitly enabled by providing a '-fopenmp' flag to the compiler, I am not sure that is related to your problem though.

In any case, if there are more questions that I can answer, feel free to reopen, or open another issue. I am closing this one for now.

lschneiderbauer added a commit that referenced this issue Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants