-
Notifications
You must be signed in to change notification settings - Fork 99
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
-fPIC not included in f2py flags when FFLAGS set #102
Comments
f2py usually knows the right way to compile Fortran files for Python. The One intermediate solution is to set the default Makefile.variables to use A On Thu, Dec 1, 2011 at 2:16 AM, Kyle Mandli <
|
Would a better fix then be to include some Makefile logic with this dependent on the compiler? In the newer Clawpack Makefiles we have been including something like this for module flags since they are also compiler dependent. Perhaps something like ifeq ($FC,gfortran)
FFLAGS = -fPIC
else ifeq ($FC,ifort)
FFLAGS = -shared
else ... I left out the The other option is to look into what the |
This is a problem with the FFLAGS environment variables being set interfering with f2py, and doesn't have anything to do with our Makefiles. I'm going to close this issue. Kyle, please reopen this if I screwed up :) |
This seems to have broken again with the pull request for issue #103. |
@mandli I'm still convinced that this is an error in your system setup, not a bug in the PyClaw build system. Let me make sure I understand this:
This is because when f2py detects an exported FFLAGS it will replace its compile flags with the contents of FFLAGS, it will not append any flags that your environment fails to specify (such as building relocatable code). The correct answer here is to either unset FFLAGS before you start trying to build PyClaw, or ensure the exported FFLAGS are correct. |
I don't think this is a problem with PyClaw but a problem with the way f2py gets flags. What really should do is always append -fPIC to everything since having it twice does not damage but not having it breaks everything. My suggestion is to somehow use --f90flags and -f77flags to get around this but I am not sure how to block f2py from using FFLAGS. After playing with this a bit, I don't think it's going to work though. I guess I ready to relent on this subject as it appears I really should not be setting my own generic flag variables in the environment. What is the current "best practice" in terms of overriding flagging variables then, just to do it on the make line or configure? This seems a bit tedious. |
Discussion moved to https://groups.google.com/d/topic/claw-dev/Irt7qQv7C0E/discussion |
I am not sure if this is something we can fix but when I run any of the examples I get errors related to not including -fPIC in the compiling flags. I ran
in one of the applications and everything worked fine. I also tried adding
to Makefile.variables which also seems to have solved the problem. It does not look like we are doing anything special with f2py arguments so it may be prudent to either include the above Makefile fix or pass f2py the user defined FFLAGS variable through the appropriate command line flags.
The text was updated successfully, but these errors were encountered: