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
BUG: fortranapex fails with symbol not found in flat namespace #99
Comments
Full Output of Build
|
Full Output of Inspecting fortranapex.cpython-39-darwin.so
|
This may not be a completely isolated issue. I managed to (unintentionally) produce something similar installing apexpy on a CentOS7 machine. Here's the specific error:
It's a different error, but still seems related to the fint function. Steps to reproduce:
Full Output of Inspecting fortranapex.cpython-39-x86_64-linux-gnu.so Full Output of Inspecting fortranapex.cpython-39-x86_64-linux-gnu.so
I assume this is still something wierd I'm doing because noone else is having this issue, but I can't figure out what... Unless anyone has a better idea, I might try reformulating fint as a module just to see if it makes the problem magically go away? |
What happens if you use pip without the |
No such luck, same issue :( ... |
Ah, I got a similar error pairing CC clang with FC gfortran. From your output:
It looks like the CC to gcc isn't working? |
Ah, I forgot there were sometimes issues with clang! Do you suppose specifying CC to some version of gcc would help? I can try in a few minutes. |
I think it will fix your issue, it worked for me! |
Oh no, now it doesn't install at all!
Let me see if I can update gcc. The default is identified as "experimental". |
@ljlamarche has this been resolved now? |
Yes. Ultimately there's two things to remember when building/testing apexpy:
I don't THINK the gcc thing actually had anything to do with this, although I haven't tested it thoroughly. The instructions to use |
Description:
Yet another instillation issue. This specifically applies to building and installing apexpy from the cloned GitHub repository, following the instructions in this section. After installing the necessary prerequisites to build the package (gfortran, build, and pkg-config), it appears to have successfully build and install the package, however apexpy (specifically fortranapex) cannot be imported:
I've tried many variations on the "known" tricks to solve instillation issues, nothing has worked so far.
To Reproduce:
Starting from clean conda environment in cloned apexpy repo (develop branch):
Speculation:
The problem appears to be relates to
_f2pywrapfint_
infortranapex.cpython-39-darwin.so
, which is added to the apexpy directory upon pip install. Inspectingfortranapex.cpython-39-darwin.so
reveals that_f2pywrapfint_
is listed as undefined.Pertinent block:
Full output of this command is given at the end of this description.
I've found a few other mentions of similar issues, but it's not clear that there is a definite solution (or even that they are necessarily the same problem. I think the most relevant is a quote from this comment:
"Somehow, the constant variables in the class are compiled as indirect symbols that cannot be found in flat namespace on macOS using AppleClang++."
Other potentially useful threads:
tensorflow/tensorflow#54242
tensorflow/tensorflow#41682
tensorflow/tensorflow#39262
tensorflow/tensorflow#36945
Potentially noteable is the fact that fint is the ONLY portion of fortran source code that is written as a function rather than a module. I never could figure out why this was, but it may be impacting something? I think it's far more liekly that this is a quirk with my setup.
Computer Information:
The text was updated successfully, but these errors were encountered: